Syn.TvOndemandTopTen=Syn.Component.extend({top_ten_type:"MOD",top_ten_type_name:"Movies",init:function(config){this._super(config);this.top_ten_type=(config.top_ten_type)?config.top_ten_type:this.top_ten_type;this.top_ten_type_name=(config.top_ten_type_name)?config.top_ten_type_name:this.top_ten_type_name;this.syn_tv_pop=new Syn.TvPopup(config);this.syn_tv_pop.removePopups();this.uniqueElmt("topten_tabbed_nav").find("a").connect("click",this,"changeTab");this.uniqueElmt("topten_assets").find("a.ondemand_topten_asset").connect("click",this,"createPopup");this.uniqueElmt("topten_tabbed_nav").find("a").each(function(){$(this).track({"module":"Image","event":"click","args":{"sc_cid":"tvondemandtopten_"+$(this).attr("title").toLowerCase()}})});var obj=this;this.uniqueElmt("topten_assets").find("a.ondemand_topten_asset").each(function(){$(this).track({"module":"Image","event":"click","args":{"sc_cid":"tvondemandtopten_"+obj.top_ten_type_name.toLowerCase()+'_'+$(this).attr("title").toLowerCase()}})})},createPopup:function(element){return this.syn_tv_pop.showPopup(element,"tv_vod_popup")},changeTab:function(element,e){if($(element).attr("rel")!=this.top_ten_type){this.submit({top_ten_type:$(element).attr("rel")})}}});