function Controller(){function e(){a.toggleMenu(i.videos,Alloy.Globals.animations.menu)}function t(){function e(e){a.is("videos",e);var t=void 0!==v.itemCount&&5>=v.itemCount?_.first(e.videos,v.itemCount):e.videos;_.each(t,function(e){i.table.children[0].add(Alloy.createController("videoTableRow",{url:e.videos[1].video,image:e.thumb,title:e.title}).getView())}),Alloy.Globals.loading.showHide("hide"),u=!1}function t(){}var l=r.signUrl(Alloy.CFG.feedUrls.videos.replace("{{page}}",s));d.getData({getUrl:l},e,t)}require("alloy/controllers/BaseController").apply(this,Array.prototype.slice.call(arguments)),this.__controllerPath="videos",arguments[0]?arguments[0].__parentSymbol:null,arguments[0]?arguments[0].$model:null,arguments[0]?arguments[0].__itemTemplate:null;var i=this,l={},o={};i.__views.videos=Ti.UI.createView({backgroundColor:Alloy.CFG.colors.darkBlue,layout:"vertical",id:"videos"}),i.__views.videos&&i.addTopLevelView(i.__views.videos),i.__views.titleBar=Ti.UI.createView({height:40,top:0,id:"titleBar"}),i.__views.videos.add(i.__views.titleBar),i.__views.menuButton=Ti.UI.createView({width:33,height:33,left:12,backgroundImage:"images/iconMenu.png",id:"menuButton"}),i.__views.titleBar.add(i.__views.menuButton),e?i.__views.menuButton.addEventListener("click",e):o["$.__views.menuButton!click!toggleMenu"]=!0,i.__views.title=Ti.UI.createLabel({font:{fontSize:20,fontFamily:Alloy.CFG.fonts.bold},color:Alloy.CFG.colors.white,text:L("Videos_Title"),id:"title"}),i.__views.titleBar.add(i.__views.title),i.__views.table=Ti.UI.createScrollView({contentWidth:Ti.UI.FILL,id:"table"}),i.__views.videos.add(i.__views.table),i.__views.__alloyId11=Alloy.createController("videoItems",{id:"__alloyId11",__parentSymbol:i.__views.table}),i.__views.__alloyId11.setParent(i.__views.table),l.destroy=function(){},_.extend(i,i.__views);var n,a=require("helpers"),r=require("feedSigner"),s=0,d=require("netConnect"),u=!1,v=arguments[0]||{};i.table.addEventListener("scroll",function(e){n=i.table.children[0].children;var l=120;!u&&i.table.children[0].getRect().height-e.y<=i.table.getRect().height+l&&(u=!0,s=1+n.length/6,Alloy.Globals.loading.showHide("show"),t()),a.i("Scrolling="+e.y+"  page="+s)}),o["$.__views.menuButton!click!toggleMenu"]&&i.__views.menuButton.addEventListener("click",e),_.extend(i,l)}var Alloy=require("alloy"),Backbone=Alloy.Backbone,_=Alloy._;module.exports=Controller;