KISSY.add("pcm/pages/home/index",function(e,n,t,a,i){function o(){this.init()}var r=n.all;return e.augment(o,{init:function(){var e=this;e.initBannerSlide(),e.movieTab(".tab-control-item",".tab-movie-list"),e.movieCalender(),e.listMove(".M-weeklist"),e.listMove(".M-cinemalist"),e.listMove(".M-custlist")},movieCalender:function(){i({dataType:"jsonp",url:"/showAction.json?action=showAction&n_s=new&event_submit_doGetSoon=true",jsonp:"jsoncallback",success:function(e){if(0===Number(e.returnCode)){var n=new a({calender:r(".M-calender-main"),data:e.returnValue,head:{context:r(".M-head-show"),prev:r(".M-head-prev"),next:r(".M-head-next")},post:{rank:r(".M-post-rank"),img:r(".M-post-img"),list:r(".M-post-mask-list"),info:r(".M-post-mask-info"),dayInfo:r(".M-post-day-info"),prev:r(".M-post-prev"),next:r(".M-post-next")}});n.init()}}})},movieTab:function(n,t){r(n).item(0).addClass("current"),r(t).item(0).css({display:"block"}),e.each(r(n),function(e,n){r(e).on("click",function(e){e.preventDefault(),r(e.target).addClass("current"),r(e.target).siblings().removeClass("current"),r(t).item(n).show().siblings().hide()})})},listMove:function(n){if(!(r(n).length<1)){var t=r(n+" li");t.item(0).addClass("current"),e.each(t,function(e,n){r(e).on("mouseenter",function(){r(e).addClass("current"),r(e).siblings().removeClass("current")})})}},bannerSlide:function(){if(e.one("#M-banner")){var n=new t("M-banner",{navClass:"banner-scrollable",contentClass:"banner-content",pannelClass:"banner-item",selectedClass:"current",effect:"hSlide",carousel:!0,autoSlide:!0,timeout:5e3,speed:500,hoverStop:!0,colspan:1,eventType:"mouseenter",adaptive_width:function(){return document.body.offsetWidth}});r("#M-banner").on("mouseenter",function(e){r(".M-BannerLeft").show(),r(".M-BannerRight").show()}),r("#M-banner").on("mouseleave",function(e){r(".M-BannerLeft").hide(),r(".M-BannerRight").hide()}),e.one(".M-BannerRight").on("click",function(e){return n.next(),!1}),e.one(".M-BannerLeft").on("click",function(){return n.previous(),!1})}},initBannerSlide:function(){function n(e){var n=document.querySelector("#M-banner .banner-content"),t=document.createDocumentFragment(),a=null;e.forEach(function(e){a=document.createElement("li"),a.classList.add("banner-item");var n=document.createElement("a");if(n.target="_top",n.href="https://pages.taopiaopiao.com/landing",e.bgcolor?n.style.backgroundColor=e.bgcolor:null,e.bgimg?n.style.backgroundImage="url("+e.bgimg+")":null,e.img&&e.img.length>0){var i=document.createElement("img");i.src=e.img,i.style.width="990px",i.style.height="360px",n.appendChild(i)}a.appendChild(n),t.appendChild(a)}),n.appendChild(t)}var t=this;e.one("#M-banner")&&i({dataType:"jsonp",url:"//tce.alicdn.com/api/data.htm?ids=346553",cache:!0,jsonpCallback:"tce_346553",success:function(e){var a=null;e[346553]&&e[346553].value&&(a=e[346553].value),a.bannerList&&a.bannerList.length>0&&(n(a.bannerList),t.bannerSlide())}})}}),o},{requires:["node","gallery/slide/1.3/","pcm/mods/calender/calender","io"]});