/* * superslide v2.1.1 * 杞绘澗瑙e喅缃戠珯澶ч儴鍒嗙壒鏁堝睍绀洪棶棰? * 璇﹀敖淇℃伅璇风湅瀹樼綉锛歨ttp://www.superslide2.com/ * * copyright 2011-2013, 澶ц瘽涓诲腑 * * 璇峰皧閲嶅師鍒涳紝淇濈暀澶撮儴鐗堟潈 * 鍦ㄤ繚鐣欑増鏉冪殑鍓嶆彁涓嬪彲搴旂敤浜庝釜浜烘垨鍟嗕笟鐢ㄩ€? * v2.1.1锛氫慨澶嶅綋璋冪敤澶氫釜superslide锛屽苟璁剧疆returndefault:true 鏃惰繑鍥瀌efaultindex绱㈠紩閿欒 */ !function(a){a.fn.slide=function(b){return a.fn.slide.defaults={type:"slide",effect:"fade",autoplay:!1,delaytime:500,intertime:2500,triggertime:150,defaultindex:0,titcell:".hd li",maincell:".bd",targetcell:null,trigger:"mouseover",scroll:1,vis:1,titonclassname:"on",autopage:!1,prevcell:".prev",nextcell:".next",pagestatecell:".pagestate",opp:!1,pnloop:!0,easing:"swing",startfun:null,endfun:null,switchload:null,playstatecell:".playstate",mouseoverstop:!0,defaultplay:!0,returndefault:!1},this.each(function(){var a3=a.extend({},a.fn.slide.defaults,b),a6=a(this),a=a3.effect,a4=a(a3.prevcell,a6),a5=a(a3.nextcell,a6),ax=a(a3.pagestatecell,a6),ay=a(a3.playstatecell,a6),av=a(a3.titcell,a6),aw=av.size(),a1=a(a3.maincell,a6),a2=a1.children().size(),az=a3.switchload,a0=a(a3.targetcell,a6),ap=parseint(a3.defaultindex),aq=parseint(a3.delaytime),an=parseint(a3.intertime);parseint(a3.triggertime);var ao,at=parseint(a3.scroll),au=parseint(a3.vis),ar="false"==a3.autoplay||0==a3.autoplay?!1:!0,as="false"==a3.opp||0==a3.opp?!1:!0,aj="false"==a3.autopage||0==a3.autopage?!1:!0,ak="false"==a3.pnloop||0==a3.pnloop?!1:!0,ai="false"==a3.mouseoverstop||0==a3.mouseoverstop?!1:!0,ad="false"==a3.defaultplay||0==a3.defaultplay?!1:!0,ab="false"==a3.returndefault||0==a3.returndefault?!1:!0,ac=0,ag=0,ah=0,ae=0,af=a3.easing,av=null,aw=null,at=null,au=a3.titonclassname,az=av.index(a6.find("."+au)),aa=ap=-1==az?ap:az,ax=ap,ay=ap,an=a2>=au?0!=a2%at?a2%at:at:0,al="leftmarquee"==a||"topmarquee"==a?!0:!1,am=function(){a.isfunction(a3.startfun)&&a3.startfun(ap,aw,a6,a(a3.titcell,a6),a1,a0,a4,a5)},ar=function(){a.isfunction(a3.endfun)&&a3.endfun(ap,aw,a6,a(a3.titcell,a6),a1,a0,a4,a5)},as=function(){av.removeclass(au),ad&&av.eq(ax).addclass(au)};if("menu"==a3.type){return ad&&av.removeclass(au).eq(ap).addclass(au),av.hover(function(){ao=a(this).find(a3.targetcell);var c=av.index(a(this));aw=settimeout(function(){switch(ap=c,av.removeclass(au).eq(ap).addclass(au),am(),a){case"fade":ao.stop(!0,!0).animate({opacity:"show"},aq,af,ar);break;case"slidedown":ao.stop(!0,!0).animate({height:"show"},aq,af,ar)}},a3.triggertime)},function(){switch(cleartimeout(aw),a){case"fade":ao.animate({opacity:"hide"},aq,af);break;case"slidedown":ao.animate({height:"hide"},aq,af)}}),ab&&a6.hover(function(){cleartimeout(at)},function(){at=settimeout(as,aq)}),void 0}if(0==aw&&(aw=a2),al&&(aw=2),aj){if(a2>=au){if("leftloop"==a||"toploop"==a){aw=0!=a2%at?(0^a2/at)+1:a2/at}else{var ap=a2-au;aw=1+parseint(0!=ap%at?ap/at+1:ap/at),0>=aw&&(aw=1)}}else{aw=1}av.html("");var aq="";if(1==a3.autopage||"true"==a3.autopage){for(var ai=0;aw>ai;ai++){aq+="
  • "+(ai+1)+"
  • "}}else{for(var ai=0;aw>ai;ai++){aq+=a3.autopage.replace("$",ai+1)}}av.html(aq);var av=av.children()}if(a2>=au){a1.children().each(function(){a(this).width()>ah&&(ah=a(this).width(),ag=a(this).outerwidth(!0)),a(this).height()>ae&&(ae=a(this).height(),ac=a(this).outerheight(!0))});var aj=a1.children(),ah=function(){for(var c=0;au>c;c++){aj.eq(c).clone().addclass("clone").appendto(a1)}for(var c=0;an>c;c++){aj.eq(a2-c-1).clone().addclass("clone").prependto(a1)}};switch(a){case"fold":a1.css({position:"relative",width:ag,height:ac}).children().css({position:"absolute",width:ah,left:0,top:0,display:"none"});break;case"top":a1.wrap('
    ').css({top:-(ap*at)*ac,position:"relative",padding:"0",margin:"0"}).children().css({height:ae});break;case"left":a1.wrap('
    ').css({width:a2*ag,left:-(ap*at)*ag,position:"relative",overflow:"hidden",padding:"0",margin:"0"}).children().css({"float":"left",width:ah});break;case"leftloop":case"leftmarquee":ah(),a1.wrap('
    ').css({width:(a2+au+an)*ag,position:"relative",overflow:"hidden",padding:"0",margin:"0",left:-(an+ap*at)*ag}).children().css({"float":"left",width:ah});break;case"toploop":case"topmarquee":ah(),a1.wrap('
    ').css({height:(a2+au+an)*ac,position:"relative",padding:"0",margin:"0",top:-(an+ap*at)*ac}).children().css({height:ae})}}var s=function(d){var c=d*at;return d==aw?c=a2:-1==d&&0!=a2%at&&(c=-a2%at),c},ak=function(f){var g=function(j){for(var i=j;au+j>i;i++){f.eq(i).find("img["+az+"]").each(function(){var l=a(this);if(l.attr("src",l.attr(az)).removeattr(az),a1.find(".clone")[0]){for(var m=a1.children(),k=0;k=1?ap=1:0>=ap&&(ap=0):(ay=ap,ap>=aw?ap=0:0>ap&&(ap=aw-1)),am(),null!=az&&ak(a1.children()),a0[0]&&(ao=a0.eq(ap),null!=az&&ak(a0),"slidedown"==a?(a0.not(ao).stop(!0,!0).slideup(aq),ao.slidedown(aq,af,function(){a1[0]||ar()})):(a0.not(ao).stop(!0,!0).hide(),ao.animate({opacity:"show"},aq,function(){a1[0]||ar()}))),a2>=au){switch(a){case"fade":a1.children().stop(!0,!0).eq(ap).animate({opacity:"show"},aq,af,function(){ar()}).siblings().hide();break;case"fold":a1.children().stop(!0,!0).eq(ap).animate({opacity:"show"},aq,af,function(){ar()}).siblings().animate({opacity:"hide"},aq,af);break;case"top":a1.stop(!0,!1).animate({top:-ap*at*ac},aq,af,function(){ar()});break;case"left":a1.stop(!0,!1).animate({left:-ap*at*ag},aq,af,function(){ar()});break;case"leftloop":var d=ay;a1.stop(!0,!0).animate({left:-(s(ay)+an)*ag},aq,af,function(){-1>=d?a1.css("left",-(an+(aw-1)*at)*ag):d>=aw&&a1.css("left",-an*ag),ar()});break;case"toploop":var d=ay;a1.stop(!0,!0).animate({top:-(s(ay)+an)*ac},aq,af,function(){-1>=d?a1.css("top",-(an+(aw-1)*at)*ac):d>=aw&&a1.css("top",-an*ac),ar()});break;case"leftmarquee":var e=a1.css("left").replace("px","");0==ap?a1.animate({left:++e},0,function(){a1.css("left").replace("px","")>=0&&a1.css("left",-a2*ag)}):a1.animate({left:--e},0,function(){a1.css("left").replace("px","")<=-(a2+an)*ag&&a1.css("left",-an*ag)});break;case"topmarquee":var c=a1.css("top").replace("px","");0==ap?a1.animate({top:++c},0,function(){a1.css("top").replace("px","")>=0&&a1.css("top",-a2*ac)}):a1.animate({top:--c},0,function(){a1.css("top").replace("px","")<=-(a2+an)*ac&&a1.css("top",-an*ac)})}}av.removeclass(au).eq(ap).addclass(au),aa=ap,ak||(a5.removeclass("nextstop"),a4.removeclass("prevstop"),0==ap&&a4.addclass("prevstop"),ap==aw-1&&a5.addclass("nextstop")),ax.html(""+(ap+1)+"/"+aw)}};ad&&ac(!0),ab&&a6.hover(function(){cleartimeout(at)},function(){at=settimeout(function(){ap=ax,ad?ac():"slidedown"==a?ao.slideup(aq,as):ao.animate({opacity:"hide"},aq,as),aa=ap},300)});var aa=function(c){av=setinterval(function(){as?ap--:ap++,ac()},c?c:an)},ab=function(c){av=setinterval(ac,c?c:an)},af=function(){ai||(clearinterval(av),aa())},ag=function(){(ak||ap!=aw-1)&&(ap++,ac(),al||af())},ad=function(){(ak||0!=ap)&&(ap--,ac(),al||af())},ae=function(){clearinterval(av),al?ab():aa(),ay.removeclass("pausestate")},b=function(){clearinterval(av),ay.addclass("pausestate")};if(ar?al?(as?ap--:ap++,ab(),ai&&a1.hover(b,ae)):(aa(),ai&&a6.hover(b,ae)):(al&&(as?ap--:ap++),ay.addclass("pausestate")),ay.click(function(){ay.hasclass("pausestate")?ae():b()}),"mouseover"==a3.trigger?av.hover(function(){var c=av.index(this);aw=settimeout(function(){ap=c,ac(),af()},a3.triggertime)},function(){cleartimeout(aw)}):av.click(function(){ap=av.index(this),ac(),af()}),al){if(a5.mousedown(ag),a4.mousedown(ad),ak){var ao,al=function(){ao=settimeout(function(){clearinterval(av),ab(0^an/10)},150)},am=function(){cleartimeout(ao),clearinterval(av),ab()};a5.mousedown(al),a5.mouseup(am),a4.mousedown(al),a4.mouseup(am)}"mouseover"==a3.trigger&&(a5.hover(ag,function(){}),a4.hover(ad,function(){}))}else{a5.click(ag),a4.click(ad)}})}}(jquery),jquery.easing.jswing=jquery.easing.swing,jquery.extend(jquery.easing,{def:"easeoutquad",swing:function(e,c,d,a,b){return jquery.easing[jquery.easing.def](e,c,d,a,b)},easeinquad:function(e,c,d,a,b){return a*(c/=b)*c+d},easeoutquad:function(e,c,d,a,b){return -a*(c/=b)*(c-2)+d},easeinoutquad:function(e,c,d,a,b){return(c/=b/2)<1?a/2*c*c+d:-a/2*(--c*(c-2)-1)+d},easeincubic:function(e,c,d,a,b){return a*(c/=b)*c*c+d},easeoutcubic:function(e,c,d,a,b){return a*((c=c/b-1)*c*c+1)+d},easeinoutcubic:function(e,c,d,a,b){return(c/=b/2)<1?a/2*c*c*c+d:a/2*((c-=2)*c*c+2)+d},easeinquart:function(e,c,d,a,b){return a*(c/=b)*c*c*c+d},easeoutquart:function(e,c,d,a,b){return -a*((c=c/b-1)*c*c*c-1)+d},easeinoutquart:function(e,c,d,a,b){return(c/=b/2)<1?a/2*c*c*c*c+d:-a/2*((c-=2)*c*c*c-2)+d},easeinquint:function(e,c,d,a,b){return a*(c/=b)*c*c*c*c+d},easeoutquint:function(e,c,d,a,b){return a*((c=c/b-1)*c*c*c*c+1)+d},easeinoutquint:function(e,c,d,a,b){return(c/=b/2)<1?a/2*c*c*c*c*c+d:a/2*((c-=2)*c*c*c*c+2)+d},easeinsine:function(e,c,d,a,b){return -a*math.cos(c/b*(math.pi/2))+a+d},easeoutsine:function(e,c,d,a,b){return a*math.sin(c/b*(math.pi/2))+d},easeinoutsine:function(e,c,d,a,b){return -a/2*(math.cos(math.pi*c/b)-1)+d},easeinexpo:function(e,c,d,a,b){return 0==c?d:a*math.pow(2,10*(c/b-1))+d},easeoutexpo:function(e,c,d,a,b){return c==b?d+a:a*(-math.pow(2,-10*c/b)+1)+d},easeinoutexpo:function(e,c,d,a,b){return 0==c?d:c==b?d+a:(c/=b/2)<1?a/2*math.pow(2,10*(c-1))+d:a/2*(-math.pow(2,-10*--c)+2)+d},easeincirc:function(e,c,d,a,b){return -a*(math.sqrt(1-(c/=b)*c)-1)+d},easeoutcirc:function(e,c,d,a,b){return a*math.sqrt(1-(c=c/b-1)*c)+d},easeinoutcirc:function(e,c,d,a,b){return(c/=b/2)<1?-a/2*(math.sqrt(1-c*c)-1)+d:a/2*(math.sqrt(1-(c-=2)*c)+1)+d},easeinelastic:function(e,c,d,h,a){var f=1.70158,g=0,b=h;if(0==c){return d}if(1==(c/=a)){return d+h}if(g||(g=0.3*a),bc?-0.5*b*math.pow(2,10*(c-=1))*math.sin((c*a-f)*2*math.pi/g)+d:0.5*b*math.pow(2,-10*(c-=1))*math.sin((c*a-f)*2*math.pi/g)+h+d},easeinback:function(e,c,d,a,b,f){return void 0==f&&(f=1.70158),a*(c/=b)*c*((f+1)*c-f)+d},easeoutback:function(e,c,d,a,b,f){return void 0==f&&(f=1.70158),a*((c=c/b-1)*c*((f+1)*c+f)+1)+d},easeinoutback:function(e,c,d,a,b,f){return void 0==f&&(f=1.70158),(c/=b/2)<1?a/2*c*c*(((f*=1.525)+1)*c-f)+d:a/2*((c-=2)*c*(((f*=1.525)+1)*c+f)+2)+d},easeinbounce:function(e,c,d,a,b){return a-jquery.easing.easeoutbounce(e,b-c,0,a,b)+d},easeoutbounce:function(e,c,d,a,b){return(c/=b)<1/2.75?a*7.5625*c*c+d:2/2.75>c?a*(7.5625*(c-=1.5/2.75)*c+0.75)+d:2.5/2.75>c?a*(7.5625*(c-=2.25/2.75)*c+0.9375)+d:a*(7.5625*(c-=2.625/2.75)*c+0.984375)+d},easeinoutbounce:function(e,c,d,a,b){return b/2>c?0.5*jquery.easing.easeinbounce(e,2*c,0,a,b)+d:0.5*jquery.easing.easeoutbounce(e,2*c-b,0,a,b)+0.5*a+d}});