$(function(){"use strict";var t={_windowEl:null,_videoEl:null,open:function(t){return this._videoEl.attr("src",t),this._videoObj.play(),this._windowEl.fadeTo(500,1),this},close:function(){return this._windowEl.fadeOut(),this._videoObj.pause(),this._videoEl.attr("src",""),this},init:function(){var t=this,n='<div style="display:none;position:fixed;z-index:9999999;left:0;right:0;top:0;bottom:0;"><div style="position:absolute;left:0;right:0;top:0;bottom:0;background:#000;opacity:0.8;filter:alpha(opacity=80);"></div><video controls="controls" style="position:absolute;width:800px;height:450px;left:50%;top:50%;margin-left:-400px;margin-top:-225px;background:#000;" src="" preload></video><a href="javascript:;" style="display:block;position:absolute;width:45px;height:45px;left:50%;top:50%;margin-left:410px;margin-top:-225px;background:url(http://res.wxzz.netease.com/pc/fab/20160523112022/img/popClose_38f1d73.png) 0 0 no-repeat;"></a></div>';return this._windowEl=$(n).appendTo("body"),this._videoEl=this._windowEl.find("video"),this._videoObj=this._videoEl[0],this._windowEl.find("a").eq(0).click(function(){return t.close(),i.cont(),!1}),this}};t.init();var i={_playing:!0,_audioObj:$(".bgm")[0],_musicBtn:$(".music-btn"),pause:function(){this._audioObj.pause()},cont:function(){return this._playing&&this._audioObj.play(),!1},init:function(){var t=this;return this._musicBtn.click(function(){return t._playing?(t._playing=!1,t._audioObj.pause(),t._musicBtn.addClass("pause")):(t._playing=!0,t._audioObj.play(),t._musicBtn.removeClass("pause")),!1}),this._audioObj.volume=.2,this._audioObj.play(),this}};i.init(),$(".video-btn").click(function(){return t.open($(this).data("src")),i.pause(),!1});var n={_NAV_BTN_TPL:'<a href="javascript:;"></a>',_WIDTH:540,_SPEED:500,_AUTO_INTERVAL:3e3,_slideAreaEl:$(".banner-area ul"),_navAreaEl:$(".banner-area .banner-nav"),_navBtnEls:null,_curr:0,_count:0,_iid:null,_switchTo:function(t){return this._navBtnEls.removeClass("active").eq(t).addClass("active"),this._slideAreaEl.stop(!0,!1).animate({marginLeft:-t*this._WIDTH+"px"},this._SPEED),this._curr=t,this},_startAutoPlay:function(){var t=this;return this._iid&&clearInterval(this._iid),this._iid=setInterval(function(){t._switchTo((t._curr+1)%t._count)},this._AUTO_INTERVAL),this},_stopAutoPlay:function(){return this._iid&&clearInterval(this._iid),this._iid=null,this},init:function(){for(var t=this._count=this._slideAreaEl.find("li").length,i="",n=this,s=0;t>s;++s)i+=this._NAV_BTN_TPL;return this._navAreaEl.html(i),this._navBtnEls=this._navAreaEl.find("a"),this._navBtnEls.mouseenter(function(){n._switchTo($(this).index()),n._stopAutoPlay()}).mouseleave(function(){n._startAutoPlay()}).eq(0).addClass("active"),this._startAutoPlay()}};n.init();var s=function(t,i,n){var s=this;this._el=t,this._positionArr=i,this._currIndex=null,this._count=i.length,this._onScroll=function(){var t=s._el.scrollTop(),i=s._calcIndex(t);i!==s._currIndex&&(s._currIndex=i,n&&n(i))},t.on("scroll",this._onScroll),this._onScroll()};s.prototype={_calcIndex:function(t){for(var i=this._count;i--&&!(t>=this._positionArr[i]););return i},destroy:function(){return this._el.off("scroll",this._onScroll),this}},new s($(window),[0,540,1530],function(t){$(".side-nav .btn").removeClass("active").eq(t).addClass("active"),$(".page").removeClass("active").eq(t).addClass("active")}),$(".side-nav .scroll-nav").click(function(){return $("body, html").animate({scrollTop:$(this).data("pos")},500),!1});var e={_MAX_DEGX:20,_MAX_DEGY:15,_CENTERX:200,_CENTERY:293,_fixEl:function(t,i,n){return t.css({transform:"rotateY("+this._MAX_DEGY*i+"deg) rotateX("+-this._MAX_DEGX*n+"deg)"}),this},init:function(){var t=this;return $(".xinshang-item div").mousemove(function(i){var n=(i.offsetX-t._CENTERX)/t._CENTERX,s=(i.offsetY-t._CENTERY)/t._CENTERY;t._fixEl($(this),n,s)}).mouseleave(function(){t._fixEl($(this),0,0)}),this}};e.init(),$(".news-area .news-tab-area a").click(function(){var t=$(this).index();return $(".news-area .news-tab-area a").removeClass("active").eq(t).addClass("active"),$(".news-area .news-list-area ul").removeClass("active").eq(t).addClass("active"),!1})});


Back to home | File page

Subscribe | Register | Login | N