/*! * superslide v2.1.1 * 轻松解决网站大部分特效展示问题 * 详尽信息请看官网:http://www.superslide2.com/ * * copyright 2011-2013, 大话主席 * * 请尊重原创,保留头部版权 * 在保留版权的前提下可应用于个人或商业用途 * v2.1.1:修复当调用多个superslide,并设置returndefault:true 时返回defaultindex索引错误 * web前端资源网(w3ci.com)web前端技术,jquery资源,web开发框架,提供前端技术,前端学习资料,前端代码示例,前端解决方案,开发常用软件下载。 */ (function($){ $.fn.slide=function(options){ $.fn.slide.defaults={ type:"slide", effect:"fade", autoplay:false, delaytime:500, intertime:2500, triggertime:150, defaultindex:0, titcell:".hd li", maincell:".bd", targetcell:null, trigger:"mouseover", scroll:1, vis:1, titonclassname:"on", autopage:false, prevcell:".prev", nextcell:".next", pagestatecell:".pagestate", opp: false, pnloop:true, easing:"swing", startfun:null, endfun:null, switchload:null, playstatecell:".playstate", mouseoverstop:true, defaultplay:true, returndefault:false }; return this.each(function() { var opts = $.extend({},$.fn.slide.defaults,options); var slider = $(this); var effect = opts.effect; var prevbtn = $(opts.prevcell, slider); var nextbtn = $(opts.nextcell, slider); var pagestate = $(opts.pagestatecell, slider); var playstate = $(opts.playstatecell, slider); var navobj = $(opts.titcell, slider);//导航子元素结合 var navobjsize = navobj.size(); var conbox = $(opts.maincell , slider);//内容元素父层对象 var conboxsize=conbox.children().size(); var sload=opts.switchload; var tarobj = $(opts.targetcell, slider); /*字符串转换*/ var index=parseint(opts.defaultindex); var delaytime=parseint(opts.delaytime); var intertime=parseint(opts.intertime); var triggertime=parseint(opts.triggertime); var scroll=parseint(opts.scroll); var vis=parseint(opts.vis); var autoplay = (opts.autoplay=="false"||opts.autoplay==false)?false:true; var opp = (opts.opp=="false"||opts.opp==false)?false:true; var autopage = (opts.autopage=="false"||opts.autopage==false)?false:true; var pnloop = (opts.pnloop=="false"||opts.pnloop==false)?false:true; var mouseoverstop = (opts.mouseoverstop=="false"||opts.mouseoverstop==false)?false:true; var defaultplay = (opts.defaultplay=="false"||opts.defaultplay==false)?false:true; var returndefault = (opts.returndefault=="false"||opts.returndefault==false)?false:true; var slideh=0; var slidew=0; var selfw=0; var selfh=0; var easing=opts.easing; var inter=null;//autoplay-setinterval var mst =null;//trigger-settimeout var rtnst=null;//returndefault-settimeout var titon = opts.titonclassname; var onindex = navobj.index( slider.find( "."+titon) ); var oldindex = index = onindex==-1?index:onindex; var defaultindex = index; var _ind = index; var clonenum = conboxsize>=vis?( conboxsize%scroll!=0?conboxsize%scroll:scroll):0; var _tar; var ismarq = effect=="leftmarquee" || effect=="topmarquee"?true:false; var dostartfun=function(){ if ( $.isfunction( opts.startfun) ){ opts.startfun( index,navobjsize,slider,$(opts.titcell, slider),conbox,tarobj,prevbtn,nextbtn ) } } var doendfun=function(){ if ( $.isfunction( opts.endfun ) ){ opts.endfun( index,navobjsize,slider,$(opts.titcell, slider),conbox,tarobj,prevbtn,nextbtn ) } } var reseton=function(){ navobj.removeclass(titon); if( defaultplay ) navobj.eq(defaultindex).addclass(titon) } //单独处理菜单效果 if( opts.type=="menu" ){ if( defaultplay ){ navobj.removeclass(titon).eq(index).addclass(titon); } navobj.hover( function(){ _tar=$(this).find( opts.targetcell ); var hoverind =navobj.index($(this)); mst = settimeout(function(){ index=hoverind; navobj.removeclass(titon).eq (index).addclass(titon); dostartfun(); switch (effect) { case "fade":_tar.stop(true,true).animate({opacity:"show"}, delaytime,easing,doendfun ); break; case "slidedown":_tar.stop(true,true).animate({height:"show"}, delaytime,easing,doendfun ); break; } } ,opts.triggertime); },function(){ cleartimeout(mst); switch (effect){ case "fade":_tar.animate( {opacity:"hide"},delaytime,easing ); break; case "slidedown":_tar.animate( {height:"hide"},delaytime,easing ); break; } } ); if (returndefault){ slider.hover(function(){cleartimeout(rtnst);},function(){ rtnst = settimeout( reseton,delaytime ); }); } return; } //处理分页 if( navobjsize==0 )navobjsize=conboxsize;//只有左右按钮 if( ismarq ) navobjsize=2; if( autopage ){ if(conboxsize>=vis){ if( effect=="leftloop" || effect=="toploop" ){ navobjsize=conboxsize%scroll!=0?(conboxsize/scroll^0)+1:conboxsize/scroll; } else{ var temps = conboxsize-vis; navobjsize=1+parseint(temps%scroll!=0?(temps/scroll+1):(temps/scroll)); if(navobjsize<=0)navobjsize=1; } } else{ navobjsize=1 } navobj.html(""); var str=""; if( opts.autopage==true || opts.autopage=="true" ){ for( var i=0; i" } } else{ for( var i=0; i=vis){ //当内容个数少于可视个数,不执行效果。 conbox.children().each(function(){ //取最大值 if( $(this).width()>selfw ){ selfw=$(this).width(); slidew=$(this).outerwidth(true); } if( $(this).height()>selfh ){ selfh=$(this).height(); slideh=$(this).outerheight(true); } }); var _chr = conbox.children(); var cloneele = function(){ for( var i=0; i').css( { "top":-(index*scroll)*slideh, "position":"relative","padding":"0","margin":"0"}).children().css( {"height":selfh} ); break; case "left": conbox.wrap('
').css( { "width":conboxsize*slidew,"left":-(index*scroll)*slidew,"position":"relative","overflow":"hidden","padding":"0","margin":"0"}).children().css( {"float":"left","width":selfw} ); break; case "leftloop": case "leftmarquee": cloneele(); conbox.wrap('
').css( { "width":(conboxsize+vis+clonenum)*slidew,"position":"relative","overflow":"hidden","padding":"0","margin":"0","left":-(clonenum+index*scroll)*slidew}).children().css( {"float":"left","width":selfw} ); break; case "toploop": case "topmarquee": cloneele(); conbox.wrap('
').css( { "height":(conboxsize+vis+clonenum)*slideh,"position":"relative","padding":"0","margin":"0","top":-(clonenum+index*scroll)*slideh}).children().css( {"height":selfh} ); break; } } //针对leftloop、toploop的滚动个数 var scrollnum=function(ind){ var _tempcs= ind*scroll; if( ind==navobjsize ){ _tempcs=conboxsize; }else if( ind==-1 && conboxsize%scroll!=0){ _tempcs=-conboxsize%scroll; } return _tempcs; } //切换加载 var doswitchload=function(objs){ var changeimg=function(t){ for ( var i= t; i<( vis+ t); i++ ){ objs.eq(i).find("img["+sload+"]").each(function(){ var _this = $(this); _this.attr("src",_this.attr(sload)).removeattr(sload); if( conbox.find(".clone")[0] ){ //如果存在.clone var chir = conbox.children(); for ( var j=0 ; j< chir.size() ; j++ ) { chir.eq(j).find("img["+sload+"]").each(function(){ if( $(this).attr(sload)==_this.attr("src") ) $(this).attr("src",$(this).attr(sload)).removeattr(sload) }) } } }) } } switch(effect) { case "fade": case "fold": case "top": case "left": case "slidedown": changeimg( index*scroll ); break; case "leftloop": case "toploop": changeimg( clonenum+scrollnum(_ind) ); break; case "leftmarquee":case "topmarquee": var curs = effect=="leftmarquee"? conbox.css("left").replace("px",""):conbox.css("top").replace("px",""); var slidet = effect=="leftmarquee"? slidew:slideh; var mnum=clonenum; if( curs%slidet!=0 ){ var curp = math.abs(curs/slidet^0); if( index==1 ){ mnum=clonenum+curp }else{ mnum=clonenum+curp-1 } } changeimg( mnum ); break; } }//doswitchload end //效果函数 var doplay=function(init){ // 当前页状态不触发效果 if( defaultplay && oldindex==index && !init && !ismarq ) return; //处理页码 if( ismarq ){ if ( index>= 1) { index=1; } else if( index<=0) { index = 0; } } else{ _ind=index; if ( index >= navobjsize) { index = 0; } else if( index < 0) { index = navobjsize-1; } } dostartfun(); //处理切换加载 if( sload!=null ){ doswitchload( conbox.children() ) } //处理targetcell if(tarobj[0]){ _tar = tarobj.eq(index); if( sload!=null ){ doswitchload( tarobj ) } if( effect=="slidedown" ){ tarobj.not(_tar).stop(true,true).slideup(delaytime); _tar.slidedown( delaytime,easing,function(){ if(!conbox[0]) doendfun() }); } else{ tarobj.not(_tar).stop(true,true).hide(); _tar.animate({opacity:"show"},delaytime,function(){ if(!conbox[0]) doendfun() }); } } if(conboxsize>=vis){ //当内容个数少于可视个数,不执行效果。 switch (effect) { case "fade":conbox.children().stop(true,true).eq(index).animate({opacity:"show"},delaytime,easing,function(){doendfun()}).siblings().hide(); break; case "fold":conbox.children().stop(true,true).eq(index).animate({opacity:"show"},delaytime,easing,function(){doendfun()}).siblings().animate({opacity:"hide"},delaytime,easing);break; case "top":conbox.stop(true,false).animate({"top":-index*scroll*slideh},delaytime,easing,function(){doendfun()});break; case "left":conbox.stop(true,false).animate({"left":-index*scroll*slidew},delaytime,easing,function(){doendfun()});break; case "leftloop": var __ind = _ind; conbox.stop(true,true).animate({"left":-(scrollnum(_ind)+clonenum)*slidew},delaytime,easing,function(){ if( __ind<=-1 ){ conbox.css("left",-(clonenum+(navobjsize-1)*scroll)*slidew); }else if( __ind>=navobjsize ){ conbox.css("left",-clonenum*slidew); } doendfun(); }); break;//leftloop end case "toploop": var __ind = _ind; conbox.stop(true,true).animate({"top":-(scrollnum(_ind)+clonenum)*slideh},delaytime,easing,function(){ if( __ind<=-1 ){ conbox.css("top",-(clonenum+(navobjsize-1)*scroll)*slideh); }else if( __ind>=navobjsize ){ conbox.css("top",-clonenum*slideh); } doendfun(); }); break;//toploop end case "leftmarquee": var templeft = conbox.css("left").replace("px",""); if(index==0 ){ conbox.animate({"left":++templeft},0,function(){ if( conbox.css("left").replace("px","")>= 0){ conbox.css("left",-conboxsize*slidew) } }); } else{ conbox.animate({"left":--templeft},0,function(){ if( conbox.css("left").replace("px","")<= -(conboxsize+clonenum)*slidew){ conbox.css("left",-clonenum*slidew) } }); }break;// leftmarquee end case "topmarquee": var temptop = conbox.css("top").replace("px",""); if(index==0 ){ conbox.animate({"top":++temptop},0,function(){ if( conbox.css("top").replace("px","")>= 0){ conbox.css("top",-conboxsize*slideh) } }); } else{ conbox.animate({"top":--temptop},0,function(){ if( conbox.css("top").replace("px","")<= -(conboxsize+clonenum)*slideh){ conbox.css("top",-clonenum*slideh) } }); }break;// topmarquee end }//switch end } navobj.removeclass(titon).eq(index).addclass(titon); oldindex=index; if( !pnloop ){ //pnloop控制前后按钮是否继续循环 nextbtn.removeclass("nextstop"); prevbtn.removeclass("prevstop"); if (index==0 ){ prevbtn.addclass("prevstop"); } if (index==navobjsize-1 ){ nextbtn.addclass("nextstop"); } } pagestate.html( ""+(index+1)+"/"+navobjsize); };// doplay end //初始化执行 if( defaultplay ){ doplay(true); } if (returndefault)//返回默认状态 { slider.hover(function(){ cleartimeout(rtnst) },function(){ rtnst = settimeout( function(){ index=defaultindex; if(defaultplay){ doplay(); } else{ if( effect=="slidedown" ){ _tar.slideup( delaytime, reseton ); } else{ _tar.animate({opacity:"hide"},delaytime,reseton ); } } oldindex=index; },300 ); }); } ///自动播放函数 var setinter = function(time){ inter=setinterval(function(){ opp?index--:index++; doplay() }, !!time?time:intertime); } var setmarinter = function(time){ inter = setinterval(doplay, !!time?time:intertime); } // 处理mouseoverstop var resetinter = function(){ if( !mouseoverstop ){clearinterval(inter); setinter() } } // 前后按钮触发 var nexttrigger = function(){ if ( pnloop || index!=navobjsize-1 ){ index++; doplay(); if(!ismarq)resetinter(); } } var prevtrigger = function(){ if ( pnloop || index!=0 ){ index--; doplay(); if(!ismarq)resetinter(); } } //处理playstate var playstatefun = function(){ clearinterval(inter); ismarq?setmarinter():setinter(); playstate.removeclass("pausestate") } var pausestatefun = function(){ clearinterval(inter);playstate.addclass("pausestate"); } //自动播放 if (autoplay) { if( ismarq ){ opp?index--:index++; setmarinter(); if(mouseoverstop) conbox.hover(pausestatefun,playstatefun); }else{ setinter(); if(mouseoverstop) slider.hover( pausestatefun,playstatefun ); } } else{ if( ismarq ){ opp?index--:index++; } playstate.addclass("pausestate"); } playstate.click(function(){ playstate.hasclass("pausestate")?playstatefun():pausestatefun() }); //titcell事件 if(opts.trigger=="mouseover"){ navobj.hover(function(){ var hoverind = navobj.index(this); mst = settimeout(function(){ index=hoverind; doplay(); resetinter(); },opts.triggertime); }, function(){ cleartimeout(mst) }); }else{ navobj.click(function(){ index=navobj.index(this); doplay(); resetinter(); }) } //前后按钮事件 if (ismarq){ nextbtn.mousedown(nexttrigger); prevbtn.mousedown(prevtrigger); //前后按钮长按10倍加速 if (pnloop) { var st; var mardown = function(){ st=settimeout(function(){ clearinterval(inter); setmarinter( intertime/10^0 ) },150) } var marup = function(){ cleartimeout(st); clearinterval(inter); setmarinter() } nextbtn.mousedown(mardown); nextbtn.mouseup(marup); prevbtn.mousedown(mardown); prevbtn.mouseup(marup); } //前后按钮mouseover事件 if( opts.trigger=="mouseover" ){ nextbtn.hover(nexttrigger,function(){}); prevbtn.hover(prevtrigger,function(){}); } }else{ nextbtn.click(nexttrigger); prevbtn.click(prevtrigger); } });//each end };//slide end })(jquery); jquery.easing['jswing'] = jquery.easing['swing']; jquery.extend( jquery.easing, { def: 'easeoutquad', swing: function (x, t, b, c, d) { return jquery.easing[jquery.easing.def](x, t, b, c, d); }, easeinquad: function (x, t, b, c, d) {return c*(t/=d)*t + b;}, easeoutquad: function (x, t, b, c, d) {return -c *(t/=d)*(t-2) + b}, easeinoutquad: function (x, t, b, c, d) {if ((t/=d/2) < 1) return c/2*t*t + b;return -c/2 * ((--t)*(t-2) - 1) + b}, easeincubic: function (x, t, b, c, d) {return c*(t/=d)*t*t + b}, easeoutcubic: function (x, t, b, c, d) {return c*((t=t/d-1)*t*t + 1) + b}, easeinoutcubic: function (x, t, b, c, d) {if ((t/=d/2) < 1) return c/2*t*t*t + b;return c/2*((t-=2)*t*t + 2) + b}, easeinquart: function (x, t, b, c, d) {return c*(t/=d)*t*t*t + b}, easeoutquart: function (x, t, b, c, d) {return -c * ((t=t/d-1)*t*t*t - 1) + b}, easeinoutquart: function (x, t, b, c, d) {if ((t/=d/2) < 1) return c/2*t*t*t*t + b;return -c/2 * ((t-=2)*t*t*t - 2) + b}, easeinquint: function (x, t, b, c, d) {return c*(t/=d)*t*t*t*t + b}, easeoutquint: function (x, t, b, c, d) {return c*((t=t/d-1)*t*t*t*t + 1) + b}, easeinoutquint: function (x, t, b, c, d) {if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;return c/2*((t-=2)*t*t*t*t + 2) + b}, easeinsine: function (x, t, b, c, d) {return -c * math.cos(t/d * (math.pi/2)) + c + b}, easeoutsine: function (x, t, b, c, d) {return c * math.sin(t/d * (math.pi/2)) + b}, easeinoutsine: function (x, t, b, c, d) {return -c/2 * (math.cos(math.pi*t/d) - 1) + b}, easeinexpo: function (x, t, b, c, d) {return (t==0) ? b : c * math.pow(2, 10 * (t/d - 1)) + b}, easeoutexpo: function (x, t, b, c, d) {return (t==d) ? b+c : c * (-math.pow(2, -10 * t/d) + 1) + b}, easeinoutexpo: function (x, t, b, c, d) {if (t==0) return b;if (t==d) return b+c;if ((t/=d/2) < 1) return c/2 * math.pow(2, 10 * (t - 1)) + b;return c/2 * (-math.pow(2, -10 * --t) + 2) + b}, easeincirc: function (x, t, b, c, d) {return -c * (math.sqrt(1 - (t/=d)*t) - 1) + b}, easeoutcirc: function (x, t, b, c, d) {return c * math.sqrt(1 - (t=t/d-1)*t) + b}, easeinoutcirc: function (x, t, b, c, d) {if ((t/=d/2) < 1) return -c/2 * (math.sqrt(1 - t*t) - 1) + b;return c/2 * (math.sqrt(1 - (t-=2)*t) + 1) + b}, easeinelastic: function (x, t, b, c, d) {var s=1.70158;var p=0;var a=c;if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;if (a < math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*math.pi) * math.asin (c/a);return -(a*math.pow(2,10*(t-=1)) * math.sin( (t*d-s)*(2*math.pi)/p )) + b}, easeoutelastic: function (x, t, b, c, d) {var s=1.70158;var p=0;var a=c;if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;if (a < math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*math.pi) * math.asin (c/a);return a*math.pow(2,-10*t) * math.sin( (t*d-s)*(2*math.pi)/p ) + c + b}, easeinoutelastic: function (x, t, b, c, d) {var s=1.70158;var p=0;var a=c;if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);if (a < math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*math.pi) * math.asin (c/a);if (t < 1) return -.5*(a*math.pow(2,10*(t-=1)) * math.sin( (t*d-s)*(2*math.pi)/p )) + b;return a*math.pow(2,-10*(t-=1)) * math.sin( (t*d-s)*(2*math.pi)/p )*.5 + c + b}, easeinback: function (x, t, b, c, d, s) {if (s == undefined) s = 1.70158;return c*(t/=d)*t*((s+1)*t - s) + b}, easeoutback: function (x, t, b, c, d, s) {if (s == undefined) s = 1.70158;return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b}, easeinoutback: function (x, t, b, c, d, s) {if (s == undefined) s = 1.70158; if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b}, easeinbounce: function (x, t, b, c, d) {return c - jquery.easing.easeoutbounce (x, d-t, 0, c, d) + b}, easeoutbounce: function (x, t, b, c, d) {if ((t/=d) < (1/2.75)) { return c*(7.5625*t*t) + b;} else if (t < (2/2.75)) { return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;} else if (t < (2.5/2.75)) { return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;} else { return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;}}, easeinoutbounce: function (x, t, b, c, d) {if (t < d/2) return jquery.easing.easeinbounce (x, t*2, 0, c, d) * .5 + b;return jquery.easing.easeoutbounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;} }); //图片按比例缩放 onload="javascript:drawimage(this,89,63)" var flag = false; function drawimage(imgd, iwidth, iheight) { //参数(图片,允许的宽度,允许的高度) var image = new image(); image.src = imgd.src; if (image.width > 0 && image.height > 0) { flag = true; if (image.width / image.height >= iwidth / iheight) { if (image.width > iwidth) { imgd.width = iwidth; imgd.height = (image.height * iwidth) / image.width; } else { imgd.width = image.width; imgd.height = image.height; } imgd.alt = image.width + "×" + image.height; } else { if (image.height > iheight) { imgd.height = iheight; imgd.width = (image.width * iheight) / image.height; } else { imgd.width = image.width; imgd.height = image.height; } imgd.alt = image.width + "×" + image.height; } } } // by wangzhigang(770721020@qq.com) function showslider() { var a = $(".w_screen_bg img"), b = $(".slogan img"); a.eq(0).show().siblings().hide(); var c = 0, d = a.length; setinterval(function() { c >= d - 1 ? c = 0 : c++, a.eq(c).fadein(1e3).siblings().fadeout(1e3), b.eq(c).show().siblings().hide() }, 6e3) } var indexanimate = function() { $("#loading").hide(), showslider(); var a = "easeoutquad", b = 800, c = 0, d = 1, e = $(window), f = $(".wrapper"), g = $(".main"), h = e.width(), i = e.height(), j = $(".screen"), k = $(".screen_bg img"), l = $(".header"), m = $(".sidebar li"), n = $(".screen2 .item"), o = function() { settimeout(function() { n.eq(0).animate({ right: "50%", opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 50), settimeout(function() { n.eq(2).animate({ right: "50%", opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 100), settimeout(function() { n.eq(4).animate({ right: "50%", opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 150), settimeout(function() { n.eq(6).animate({ right: "50%", opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 200), settimeout(function() { n.eq(8).animate({ right: "50%", opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 250), settimeout(function() { n.eq(1).animate({ left: "50%", opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 50), settimeout(function() { n.eq(3).animate({ left: "50%", opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 100), settimeout(function() { n.eq(5).animate({ left: "50%", opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 150), settimeout(function() { n.eq(7).animate({ left: "50%", opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 200), settimeout(function() { n.eq(9).animate({ left: "50%", opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 250) }, p = function() { settimeout(function() { n.eq(8).animate({ right: "100%", opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 50), settimeout(function() { n.eq(6).animate({ right: "100%", opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 100), settimeout(function() { n.eq(4).animate({ right: "100%", opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 150), settimeout(function() { n.eq(2).animate({ right: "100%", opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 200), settimeout(function() { n.eq(0).animate({ right: "100%", opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 250), settimeout(function() { n.eq(9).animate({ left: "100%", opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 50), settimeout(function() { n.eq(7).animate({ left: "100%", opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 100), settimeout(function() { n.eq(5).animate({ left: "100%", opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 150), settimeout(function() { n.eq(3).animate({ left: "100%", opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 200), settimeout(function() { n.eq(1).animate({ left: "100%", opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 250) }, q = $(".room_list li"); q.length; var s = 1; q.filter(":lt(4)").css({ left: 1024, opacity: 0 }); var t = function() { settimeout(function() { q.eq(4 * s - 4).animate({ left: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 0), settimeout(function() { q.eq(4 * s - 3).animate({ left: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 100), settimeout(function() { q.eq(4 * s - 2).animate({ left: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 200), settimeout(function() { q.eq(4 * s - 1).animate({ left: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 300) }, u = function() { settimeout(function() { q.eq(4 * s - 1).animate({ left: 1024, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 0), settimeout(function() { q.eq(4 * s - 2).animate({ left: 1024, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 100), settimeout(function() { q.eq(4 * s - 3).animate({ left: 1024, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 200), settimeout(function() { q.eq(4 * s - 4).animate({ left: 1024, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 300) }; $(".room_list_tab li").on("click", function() { s = $(this).index() + 1, $(this).addclass("current").siblings().removeclass("current"), $(".room_list ul").animate({ left: 1044 * -(s - 1) }, { duration: .3 * b, queue: !1, easing: a }) }); var x, y, v = $(".food_list li"), w = 1; v.filter(":lt(5)").css({ left: 1024, opacity: 0 }); var z = function() { settimeout(function() { v.eq(5 * w - 5).animate({ left: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 0), settimeout(function() { v.eq(5 * w - 4).animate({ left: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 100), settimeout(function() { v.eq(5 * w - 3).animate({ left: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 200), settimeout(function() { v.eq(5 * w - 2).animate({ left: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 300), settimeout(function() { v.eq(5 * w - 1).animate({ left: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, 400) }, a = function() { settimeout(function() { v.eq(5 * w - 1).animate({ left: 1024, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 0), settimeout(function() { v.eq(5 * w - 2).animate({ left: 1024, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 100), settimeout(function() { v.eq(5 * w - 3).animate({ left: 1024, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 200), settimeout(function() { v.eq(5 * w - 4).animate({ left: 1024, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 300), settimeout(function() { v.eq(5 * w - 5).animate({ left: 1024, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, 400) }; v.on("mouseenter", function() { x && (cleartimeout(x), x = !1), y = $(this), x = settimeout(function() { y.find(".info").css({ width: 311 }), y.siblings().find(".info").css({ width: 0 }) }, 300) }), $(".food_list_tab li").on("click", function() { w = $(this).index() + 1, $(this).addclass("current").siblings().removeclass("current"), $(".food_list_bd").animate({ left: 1024 * -(w - 1) }, { duration: .3 * b, queue: !1, easing: a }) }); var g, b = $(".meeting_list a"), c = function() { b.eq(0).animate({ left: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }), b.eq(1).animate({ left: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }), b.eq(2).animate({ opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }), b.eq(3).animate({ right: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }), b.eq(4).animate({ right: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, d = function() { b.eq(0).animate({ left: -338, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }), b.eq(1).animate({ left: -338, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }), b.eq(2).animate({ opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }), b.eq(3).animate({ right: -338, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }), b.eq(4).animate({ right: -338, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }, e = $(".recreation_list_bd li"), f = 1; $(".recreation_list_bd .line").each(function() { g = $(this), g.css("width", (314 - g.siblings("p").find("span").width()) / 2) }), e.eq(0).css({ left: -684, opacity: 0 }), e.eq(2).css({ left: -684, opacity: 0 }), e.eq(4).css({ left: -684, opacity: 0 }), e.eq(6).css({ left: -684, opacity: 0 }), e.eq(1).css({ right: -684, opacity: 0 }), e.eq(3).css({ right: -684, opacity: 0 }), e.eq(5).css({ right: -684, opacity: 0 }), e.eq(7).css({ right: -684, opacity: 0 }); var h = function() { e.eq(8 * f - 8).animate({ left: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }), e.eq(8 * f - 6).animate({ left: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }), e.eq(8 * f - 4).animate({ left: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }), e.eq(8 * f - 2).animate({ left: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }), e.eq(8 * f - 7).animate({ right: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }), e.eq(8 * f - 5).animate({ right: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }), e.eq(8 * f - 3).animate({ right: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }), e.eq(8 * f - 1).animate({ right: 0, opacity: 1 }, { duration: .8 * b, queue: !1, easing: a }) }, i = function() { e.eq(8 * f - 8).animate({ left: -684, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }), e.eq(8 * f - 6).animate({ left: -684, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }), e.eq(8 * f - 4).animate({ left: -684, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }), e.eq(8 * f - 2).animate({ left: -684, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }), e.eq(8 * f - 7).animate({ right: -684, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }), e.eq(8 * f - 5).animate({ right: -684, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }), e.eq(8 * f - 3).animate({ right: -684, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }), e.eq(8 * f - 1).animate({ right: -684, opacity: 0 }, { duration: .8 * b, queue: !1, easing: a }) }; $(".recreation_list_tab li").on("click", function() { f = $(this).index() + 1, $(this).addclass("current").siblings().removeclass("current"), $(".recreation_list_bd").animate({ left: 1024 * -(f - 1) }, { duration: .3 * b, queue: !1, easing: a }) }); var j; $(".plaza_list_tab li").on("click", function() { j = $(this).index() + 1, $(this).addclass("current").siblings().removeclass("current"), $(".plaza_list_bd").animate({ left: 1028 * -(j - 1) }, { duration: .3 * b, queue: !1, easing: a }) }); var k = $("#j_about"), l = $(".downlist_nav"), m = !1; k.hover(function() { 0 != m && (cleartimeout(m), m = !1), m = settimeout(function() { l.slidedown({ easing: a, queue: !1 }) }, 200) }, function() { 0 != m && (cleartimeout(m), m = !1), m = settimeout(function() { l.slideup({ easing: a, queue: !1 }) }, 200) }), l.hover(function() { 0 != m && (cleartimeout(m), m = !1), m = settimeout(function() { l.slidedown({ easing: a, queue: !1 }) }, 200) }, function() { 0 != m && (cleartimeout(m), m = !1), m = settimeout(function() { l.slideup({ easing: a, queue: !1 }) }, 200) }), $(".booking").animate({ top: 20 }, { duration: 1e3, queue: !1, easing: a }), $(".slogan").animate({ "margin-top": -122 }, { duration: 1e3, queue: !1, easing: a }), j.css({ height: i }), k.elemautosize(h, i), l.css({ top: i - 80 }), n.eq(0).css("margin-top", i * -.16), n.eq(2).css("margin-top", i * -.038), n.eq(4).css("margin-top", .069 * i), n.eq(6).css("margin-top", .183 * i), n.eq(8).css("margin-top", .292 * i), n.eq(1).css("margin-top", i * -.16), n.eq(3).css("margin-top", i * -.038), n.eq(5).css("margin-top", .069 * i), n.eq(7).css("margin-top", .183 * i), n.eq(9).css("margin-top", .292 * i); var o = function() { 7 > d && (c = 1, d++, g.animate({ top: -(d - 1) * i }, { duration: b, queue: !1, easing: a, complete: function() { c = 0 } }), 1 == d ? (l.animate({ top: i - 80 }, { duration: b, queue: !1, easing: a }), l.css({ top: "auto", bottom: 80 })) : l.css({ top: 80, bottom: "auto" }), d > 1 && l.animate({ top: 0 }, { duration: b, queue: !1, easing: a }), 2 == d ? o() : p(), 3 == d ? t() : u(), 4 == d ? z() : a(), 5 == d ? c() : d(), 6 == d ? h() : i()) }, p = function() { d > 1 && (c = 1, d--, g.animate({ top: -(d - 1) * i }, { duration: b, queue: !1, easing: a, complete: function() { c = 0 } }), 1 == d ? (l.animate({ top: i - 80 }, { duration: b, queue: !1, easing: a }), l.css({ top: "auto", bottom: 80 })) : l.css({ top: 80, bottom: "auto" }), 2 == d ? o() : p(), 3 == d ? t() : u(), 4 == d ? z() : a(), 5 == d ? c() : d(), 6 == d ? h() : i()) }; if (f.on("mousewheel", function(a, b) { return c ? !1 : (0 > b ? o() : b > 0 && p(), void 0) }), m.click(function() { d = $(this).index(), o() }), document.onkeydown = function(a) { var b = a || window.event; return 40 == b.keycode ? (o(), !1) : 38 == b.keycode ? (p(), !1) : void 0 }, $(".select_div").length > 0) { var q, r, s; $(".select_div").hover(function() { $(this).find(".select_div_bd").show() }, function() { $(this).find(".select_div_bd").hide() }), $(".select_div_bd a").on("click", function() { q = $(this), r = q.html(), s = q.attr("data-id"), q.parent().siblings(".select_div_hd").html(r), q.parent().siblings(".select_div_input").val(s), q.parent().hide() }) } var t = null; $(window).on("resize", function() { t && cleartimeout(t), t = settimeout(function() { h = e.width(), i = e.height(), j.css({ height: i }), k.elemautosize(h, i), g.animate({ top: -(d - 1) * i }, { duration: b, queue: !1, easing: a, complete: function() { c = 0 } }), 1 == d && l.animate({ top: i - 80 }, { duration: b, queue: !1, easing: a }), n.eq(0).css("margin-top", i * -.16), n.eq(2).css("margin-top", i * -.038), n.eq(4).css("margin-top", .069 * i), n.eq(6).css("margin-top", .183 * i), n.eq(8).css("margin-top", .292 * i), n.eq(1).css("margin-top", i * -.16), n.eq(3).css("margin-top", i * -.038), n.eq(5).css("margin-top", .069 * i), n.eq(7).css("margin-top", .183 * i), n.eq(9).css("margin-top", .292 * i) }, 200) }) }, isload = 0; $(function() { $(".screen_md").length > 0 && settimeout(function() { 0 == isload && (isload = 1, indexanimate()) }, 3e3) }), window.onload = function() { $(".screen_md").length > 0 && 0 == isload && (isload = 1, indexanimate()) }, $(function() { if (settimeout(function() { $("#loading").hide() }, 3e3), 0 == $(".screen_md").length) { var a = $("#j_about"), b = $(".downlist_nav"), c = !1; a.hover(function() { 0 != c && (cleartimeout(c), c = !1), b.slidedown() }, function() { c = settimeout(function() { b.slideup() }, 200) }), b.hover(function() { 0 != c && (cleartimeout(c), c = !1), b.slidedown() }, function() { c = settimeout(function() { b.slideup() }, 200) }) } $plaza_slides = $(".plaza_slides"), $plaza_slides.length > 0 && $plaza_slides.slides({ container: ".plaza_slides_bd", pagination: ".plaza_slides_hd ul" }) });