var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); var crollNow = 0; var iTime; var followScroll = 1; var stop = 0; var ifbottom = 0; var rocketTimer; var pingback; var ifPlayed = Array(0,0,0,0,0,0,0); var windowobject; var windowHeight; var SmoothScroll = function (win, opt) { //æä½å¯¹è±¡ this.win = win; this.timeStamp = new Date().getTime(); //æ¯æ¬¡æ»å¨ä½ç§» this.step = opt ? opt.step || 400 : 400; //ç¼å¨ç³»æ° this.f = opt ? opt.f || 0.06 : 0.06; this.interval = 10; this.intervalID = null; this.isFF = navigator.userAgent.toLowerCase().indexOf("firefox")>=0; this.upOrDown = ""; this.init(); } var i=0; SmoothScroll.prototype = { init: function () { var _this = this; if (_this.isFF) { _this.win.addEventListener('DOMMouseScroll', function (e) { _this.upOrDown = e.detail 0 ? "up" : "down"; _this.scrollHander(); if (e.preventDefault) //disable default wheel action of scrolling page e.preventDefault(); else return false; } } } , scrollHander: function () { clearTimeDown(); var _this = this; var _step=_this.step * (_this.upOrDown == "up" ? -1 : 1); var tar = $(window).scrollTop()+ _step; if(tar0){ $(".guider_link").removeClass("select"); $(".guider_link").eq(index).addClass("select"); } if($(".stage").eq(index).offset().top>$("body").scrollTop()){ $(windowobject).animate({"scrollTop":$(".stage").eq(index).offset().top + "px"},1000,function(){ crash(0,$(".stage").eq(index).offset().top,20,150); }); }else{ $(windowobject).animate({"scrollTop":$(".stage").eq(index).offset().top +"px"},1000,function(){ crash_bottom(1,$(".stage").eq(index).offset().top,20,150); }); } if(index!==0){ var height = $(".stage").eq(index).offset().top +windowHeight/2-$("#guider").height()/2; $("#guider").animate({"top":height+20+"px"},1000); } } } function crash_bottom(direction,termin,distant,time){ if(!stop){ var scrollTop = $(window).scrollTop(); if(direction==1){ //åä¸ direction = 0; $(windowobject).animate({"scrollTop":"+="+distant+"px"},time,function(){ crash_bottom(direction,termin,distant*0.6,time); if(distant150){ stop=1;//代表å¼å§åæ¢ç¢°æ $(windowobject).animate({"scrollTop":termin+"px"},time,function(){ //为0代表碰æç»æ crollNow = termin; stop=0; setTimeout(function(){ setTimeDown(); },500); }); } }); }else if(direction == 0){ //åä¸ direction = 1; $(windowobject).animate({"scrollTop":termin+"px"},time,function(){ crash_bottom(direction,termin,distant*0.6,time); if(distant150){ stop=1; $(windowobject).animate({"scrollTop":termin+"px"},time,function(){ crollNow = termin; stop=0; setTimeout(function(){ setTimeDown(); },500); }); } }); } } } function crash(direction,termin,distant,time){ if(!stop){ var scrollTop = $(window).scrollTop(); if(direction==0){ //åä¸ direction = 1; $(windowobject).animate({"scrollTop":"-="+distant+"px"},time,function(){ crash(direction,termin,distant*0.6,time); if(distant150){ stop=1; $(windowobject).animate({"scrollTop":termin+"px"},time,function(){ crollNow = termin; stop=0; setTimeout(function(){ setTimeDown(); },100); }); } }); }else if(direction ==1){ //åä¸ direction = 0; $(windowobject).animate({"scrollTop":termin+"px"},time,function(){ crash(direction,termin,distant*0.6,time); if(distant150){ stop=1; $(windowobject).animate({"scrollTop":termin+"px"},time,function(){ crollNow = termin; stop=0; setTimeout(function(){ if(!ifbottom){ followScroll = 1; setTimeDown(); } },100); }); } }); } } } var timeDown; var intervalDown; var topwin=1; function setTimeDown(){ clearTimeDown(); timeDown = setTimeout(function(){ if(!$(windowobject).is(":animated")){ var index=Math.round($(window).scrollTop()/windowHeight)+1; if(index!=6){ $(windowobject).animate({"scrollTop":"+="+windowHeight+"px"},600,function(){ crash(0,$(window).scrollTop(),20,150); }); var tmpheight=index*windowHeight+(windowHeight-$("#guider").height())/2; $("#guider").animate({"top":tmpheight},800,function(){ var index=Math.floor($("#guider").offset().top/windowHeight); if(index!=0){ $(".guider_link").removeClass("select"); $(".guider_link").eq(index).addClass("select"); } }); } } },8000); } function clearTimeDown(){ clearTimeout(timeDown); } function signAnimate(){ var cicleFun=function(name1,name2,name3,shift,interval){ $(name1).animate({"bottom":"-="+shift+"px"},interval,function(){ $(name1).hide(); $(name2).animate({"bottom":"-="+shift+"px"},interval,function(){ $(name2).hide(); $(name3).animate({"bottom":"-="+shift+"px"},interval,function(){ $(name3).hide(); $(name1).css("bottom","+="+ shift*2+"px").show().animate({"bottom":"-="+shift+"px"},interval,function(){ $(name2).css("bottom","+="+shift*2+"px").show().animate({"bottom":"-="+shift+"px"},interval,function(){ $(name3).css("bottom","+="+shift*2+"px").show().animate({"bottom":"-="+shift+"px"},interval,function(){ setTimeout(function(){cicleFun(name1,name2,name3,shift,interval)},1500); }); }); }); }); }); }); } cicleFun("#sign1_1","#sign2_1","#sign3_1",30,200); cicleFun("#sign1_2","#sign2_2","#sign3_2",30,200); cicleFun("#sign1_plus","#sign2_plus","#sign3_plus",30,200); cicleFun("#sign1_3","#sign2_3","#sign3_3",30,200); cicleFun("#sign1_4","#sign2_4","#sign3_4",30,200); } $(document).ready(function(){ pingback = new PingbackApp(); pingback.getPv(0); setTimeDown(); callExternal("swf1"); var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1; if(is_chrome){ //夿æ¯chromeãæçchromeå æ ¸, ä¾scrollTopå ¼å®¹æ§ä½¿ç¨ windowobject ="body"; }else{ //æ¯æieåff windowobject ="html"; } $(".index_link").click(function(){ $(".guider_link").removeClass("select"); var index = parseInt($(this).attr("index")); $(".index_link").eq(index).addClass("select"); linkToPage(index); }); $(".guider_link").click(function(){ var index= $(this).index(); linkToPage(index); }); //å½åçªå£å¤§å° windowHeight = document.documentElement.clientHeight; $(".stage").css("height",windowHeight); $(".stage_box").css("top",(windowHeight-580)/2+"px"); $("#guider").css("top",$("body").height()-windowHeight/2-$("#guider").height()/2); var opt = {step:windowHeight,f:1}; var div = document.body; new SmoothScroll(div,opt); //çªå£å¤§å°ååæ¶ï¼è§¦åæ¯ä¸ªå±å¹å¤§å°åå var resizeHandler=function(){ $("body").stop(true,true); //黿¢ç¢°æ stop=1; clearTimeDown(); windowHeight = document.documentElement.clientHeight; $(".stage").css("height",windowHeight); $(".stage_box").css("top",(windowHeight-580)/2+"px"); $("#guider").css("top",$("body").height()-windowHeight/2-$("#guider").height()/2); var opt = {step:windowHeight,f:1}; var div = document.body; new SmoothScroll(div,opt); var index=Math.floor($(window).scrollTop()/windowHeight); $(windowobject).animate({"scrollTop":index*windowHeight+"px"}); if(index!=0){ var tmpheight=index*windowHeight+(windowHeight-$("#guider").height())/2; $("#guider").animate({"top":tmpheight},0,function(){ $(".guider_link").removeClass("select"); $(".guider_link").eq(index).addClass("select"); }); } //300毫ç§åæ§è¡stop=0,ç®çæ¯ä¿è¯ieä¸crash彿°ï¼ä¹æ¯timerï¼æ§è¡å®ã setTimeout(function(){ stop=0; },300); } $(window).resize(function(){ //bugfix ieå æ ¸åªæå¨å®æ¶å¨è§¦åè¿ä¸ªå½æ°æè½æ£ç¡®æ§è¡ setTimeout(resizeHandler,10); }); //å¾ä¸ç¿»é¡µç彿° signAnimate(); //æµè§å¨å¾æ çæè½¬å¨ç» var rotateTimer; $("#guider_link1").hover( function(){ var angle = 0; clearInterval(rotateTimer); rotateTimer=setInterval(function(){ angle+=20; $("#logo").rotate(angle); },50); }, function(){ $("#logo").rotate(0); clearInterval(rotateTimer); } ); $(windowobject).animate({"scrollTop":"0px"}); //å»æé¼ æ ä¸é®çç¹å»äºä»¶,å¦åç±æ¤äº§ççå䏿»å¨åå䏿»å¨å°ä¸åæ§å¶ function stopDefaultAndBubble(e) { e = e || window.event; // Stops the Default Browser Action if (e.preventDefault) { e.preventDefault(); } e.returnValue = false; //Stops the event bubbling up to the body element if (e.stopPropagation) { e.stopPropagation(); } e.cancelBubble = true; } $(document).bind('mousedown', function(e) { //mouse middle button if( (e.which == 2) ) { stopDefaultAndBubble(e); //bugfix æçæµè§å¨çieå æ ¸åªæå¨å®æ¶å¨è§¦åè¿ä¸ªå½æ°æçæãã setTimeout(function(){ stopDefaultAndBubble(e); },10); } }) }); function getCookie1(offset) { var endstr = document.cookie.indexOf (";", offset);if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function getCookie2(name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i