AC.namespace("AC.Page.SubRank");
AC.Page.SubRank={init:function(){AC.Page.Core.init();this.initEvend()},initEvend:function(){if($("#bothFlag").val()){var c=$(".fwb").attr("href").replace("/vip/2","");$(".mod-rank-tab a").eq(0).attr("href",c);$(".mod-rank-tab a").eq(1).attr("href",c+"/vip/2")}$(".fwb").attr("href","javascript:void(0)");$(".mod-rank-tab .active").attr("href","javascript:void(0)");if($("#month_all_rank").length!=0)AC.Page.SubRank.tabs({handle:$("#month_all_rank").find("a"),panel:[".rank-tabcon"],activeClass:"active",
delay:100,callback:function(o){AC.Page.SubRank.getPrevMonthTicketRank(o.index())}});this.initStyle()},initStyle:function(){$(".rank-list-wrap").each(function(){$(this).find(".rank-ul").last().addClass("last")});$(".rank-ul").each(function(){var _thisli=$(this).find("li");_thisli.first().addClass("pt-none")});$(".rank-all-content").find(".rank-all-mod").last().addClass("last")},getPrevMonthTicketRank:function(index){if(!$("#curr-mt-rank-date-range").val())return;if(index==0)$("#month-ticket-state-date").html($("#curr-mt-rank-date-range").val()+
"  \u7edf\u8ba1\u8fdb\u884c\u4e2d...");else $("#month-ticket-state-date").html($("#prev-mt-rank-date-range").val())},tabs:function(options){var opts=$.extend({handle:null,panel:null,eventType:"mouseover",activeClass:null,delay:0,callback:null},options),timer;var tab={view:function(){this.bindEvent();this.active(0)},bindEvent:function(){var self=this;if(opts.eventType=="hover")opts.eventType="mouseover";opts.handle.bind(opts.eventType,function(){if($(this).hasClass(opts.activeClass))return false;timer&&
clearTimeout(timer);self.active($(this).index())})},change:function(element,index){var child=element.children(),actObj=opts.handle.eq(index);actObj.addClass(opts.activeClass).siblings().removeClass(opts.activeClass);child.eq(index).show().siblings().hide()},active:function(index){var self=this,panel=opts.panel;if(opts.preProcess)opts.preProcess(index);function setPanel(){if(panel&&panel instanceof Array)for(var i=0,j=panel.length;i<j;i++)self.change($(panel[i]),index);else self.change(panel,index);
opts.callback&&opts.callback(opts.handle.eq(index))}if(opts.delay)timer=setTimeout(function(){setPanel()},opts.delay);else setPanel()}};tab.view()}};$(function(){AC.Page.SubRank.init();$(".mod-top-small-nav li").eq(8).addClass("active").find("a").attr("href","javascript:void(0)")});
