您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

2 行
7.2 KiB

  1. (function(z){var n=jQuery.fn.revolution,b={alias:"Carousel Min JS",name:"revolution.extensions.carousel.min.js",min_core:"5.3.0",version:"1.2.1"};jQuery.extend(!0,n,{prepareCarousel:function(e,t,s,o){return n.compare_version(b).check!=="stop"&&(s=e.carousel.lastdirection=u(s,e.carousel.lastdirection),M(e),e.carousel.slide_offset_target=I(e),void(o!==void 0?m(e,s,!1,0):t==null?n.carouselToEvalPosition(e,s):m(e,s,!1)))},carouselToEvalPosition:function(e,t){var s=e.carousel;t=s.lastdirection=u(t,s.lastdirection);var o=s.horizontal_align==="center"?(s.wrapwidth/2-s.slide_width/2-s.slide_globaloffset)/s.slide_width:(0-s.slide_globaloffset)/s.slide_width,i=n.simp(o,e.slideamount,!1),r=i-Math.floor(i),d=0,h=-1*(Math.ceil(i)-i),f=-1*(Math.floor(i)-i);d=r>=.3&&t==="left"||r>=.7&&t==="right"?h:r<.3&&t==="left"||r<.7&&t==="right"?f:d,d=s.infinity==="off"?i<0?i:o>e.slideamount-1?o-(e.slideamount-1):d:d,s.slide_offset_target=d*s.slide_width,Math.abs(s.slide_offset_target)!==0?m(e,t,!0):n.organiseCarousel(e,t)},organiseCarousel:function(e,t,s,o){t=t===void 0||t=="down"||t=="up"||t===null||jQuery.isEmptyObject(t)?"left":t;for(var i=e.carousel,r=new Array,d=i.slides.length,h=(i.horizontal_align==="right"&&e.width,0);h<d;h++){var f=h*i.slide_width+i.slide_offset;i.infinity==="on"&&(f=f>i.wrapwidth-i.inneroffset&&t=="right"?i.slide_offset-(i.slides.length-h)*i.slide_width:f,f=f<0-i.inneroffset-i.slide_width&&t=="left"?f+i.maxwidth:f),r[h]=f}var v=999;i.slides&&jQuery.each(i.slides,function(p,V){var w=r[p];i.infinity==="on"&&(w=w>i.wrapwidth-i.inneroffset&&t==="left"?r[0]-(d-p)*i.slide_width:w,w=w<0-i.inneroffset-i.slide_width?t=="left"?w+i.maxwidth:t==="right"?r[d-1]+(p+1)*i.slide_width:w:w);var a=new Object;a.left=w+i.inneroffset;var l=i.horizontal_align==="center"?(Math.abs(i.wrapwidth/2)-(a.left+i.slide_width/2))/i.slide_width:(i.inneroffset-a.left)/i.slide_width,c=i.horizontal_align==="center"?2:1;if((s&&Math.abs(l)<v||l===0)&&(v=Math.abs(l),i.focused=p),a.width=i.slide_width,a.x=0,a.transformPerspective=1200,a.transformOrigin="50% "+i.vertical_align,i.fadeout==="on")if(i.vary_fade==="on")a.autoAlpha=1-Math.abs(1/Math.ceil(i.maxVisibleItems/c)*l);else switch(i.horizontal_align){case"center":a.autoAlpha=Math.abs(l)<Math.ceil(i.maxVisibleItems/c-1)?1:1-(Math.abs(l)-Math.floor(Math.abs(l)));break;case"left":a.autoAlpha=l<1&&l>0?1-l:Math.abs(l)>i.maxVisibleItems-1?1-(Math.abs(l)-(i.maxVisibleItems-1)):1;break;case"right":a.autoAlpha=l>-1&&l<0?1-Math.abs(l):l>i.maxVisibleItems-1?1-(Math.abs(l)-(i.maxVisibleItems-1)):1}else a.autoAlpha=Math.abs(l)<Math.ceil(i.maxVisibleItems/c)?1:0;if(i.minScale!==void 0&&i.minScale>0)if(i.vary_scale==="on"){a.scale=1-Math.abs(i.minScale/100/Math.ceil(i.maxVisibleItems/c)*l);var _=(i.slide_width-i.slide_width*a.scale)*Math.abs(l)}else{a.scale=l>=1||l<=-1?1-i.minScale/100:(100-i.minScale*Math.abs(l))/100;var _=(i.slide_width-i.slide_width*(1-i.minScale/100))*Math.abs(l)}i.maxRotation!==void 0&&Math.abs(i.maxRotation)!=0&&(i.vary_rotation==="on"?(a.rotationY=Math.abs(i.maxRotation)-Math.abs((1-Math.abs(1/Math.ceil(i.maxVisibleItems/c)*l))*i.maxRotation),a.autoAlpha=Math.abs(a.rotationY)>90?0:a.autoAlpha):a.rotationY=l>=1||l<=-1?i.maxRotation:Math.abs(l)*i.maxRotation,a.rotationY=l<0?a.rotationY*-1:a.rotationY),a.x=-1*i.space*l,a.left=Math.floor(a.left),a.x=Math.floor(a.x),a.scale!==void 0?l<0?a.x-_:a.x+_:a.x,a.zIndex=Math.round(100-Math.abs(5*l)),a.transformStyle=e.parallax.type!="3D"&&e.parallax.type!="3d"?"flat":"preserve-3d",punchgs.TweenLite.set(V,a)}),o&&(e.c.find(".next-revslide").removeClass("next-revslide"),jQuery(i.slides[i.focused]).addClass("next-revslide"),e.c.trigger("revolution.nextslide.waiting")),i.wrapwidth/2-i.slide_offset,i.maxwidth+i.slide_offset-i.wrapwidth/2}});var x=function(e){var t=e.carousel;t.infbackup=t.infinity,t.maxVisiblebackup=t.maxVisibleItems,t.slide_globaloffset="none",t.slide_offset=0,t.wrap=e.c.find(".tp-carousel-wrapper"),t.slides=e.c.find(".tp-revslider-slidesli"),t.maxRotation!==0&&(e.parallax.type!="3D"&&e.parallax.type!="3d"?punchgs.TweenLite.set(t.wrap,{perspective:1200,transformStyle:"flat"}):punchgs.TweenLite.set(t.wrap,{perspective:1600,transformStyle:"preserve-3d"})),t.border_radius!==void 0&&parseInt(t.border_radius,0)>0&&punchgs.TweenLite.set(e.c.find(".tp-revslider-slidesli"),{borderRadius:t.border_radius})},M=function(e){e.bw===void 0&&n.setSize(e);var t=e.carousel,s=n.getHorizontalOffset(e.c,"left"),o=n.getHorizontalOffset(e.c,"right");t.wrap===void 0&&x(e),t.slide_width=t.stretch!=="on"?e.gridwidth[e.curWinRange]*e.bw:e.c.width(),t.maxwidth=e.slideamount*t.slide_width,t.maxVisiblebackup>t.slides.length+1&&(t.maxVisibleItems=t.slides.length+2),t.wrapwidth=t.maxVisibleItems*t.slide_width+(t.maxVisibleItems-1)*t.space,t.wrapwidth=e.sliderLayout!="auto"?t.wrapwidth>e.c.closest(".tp-simpleresponsive").width()?e.c.closest(".tp-simpleresponsive").width():t.wrapwidth:t.wrapwidth>e.ul.width()?e.ul.width():t.wrapwidth,t.infinity=t.wrapwidth>=t.maxwidth?"off":t.infbackup,t.wrapoffset=t.horizontal_align==="center"?(e.c.width()-o-s-t.wrapwidth)/2:0,t.wrapoffset=e.sliderLayout!="auto"&&e.outernav?0:t.wrapoffset<s?s:t.wrapoffset;var i="hidden";e.parallax.type!="3D"&&e.parallax.type!="3d"||(i="visible"),t.horizontal_align==="right"?punchgs.TweenLite.set(t.wrap,{left:"auto",right:t.wrapoffset+"px",width:t.wrapwidth,overflow:i}):punchgs.TweenLite.set(t.wrap,{right:"auto",left:t.wrapoffset+"px",width:t.wrapwidth,overflow:i}),t.inneroffset=t.horizontal_align==="right"?t.wrapwidth-t.slide_width:0,t.realoffset=Math.abs(t.wrap.position().left),t.windhalf=jQuery(window).width()/2},u=function(e,t){return e===null||jQuery.isEmptyObject(e)?t:e===void 0?"right":e},m=function(e,t,s,o){var i=e.carousel;t=i.lastdirection=u(t,i.lastdirection);var r=new Object,d=s?punchgs.Power2.easeOut:i.easing;r.from=0,r.to=i.slide_offset_target,o=o===void 0?i.speed/1e3:o,o=s?.4:o,i.positionanim!==void 0&&i.positionanim.pause(),i.positionanim=punchgs.TweenLite.to(r,o,{from:r.to,onUpdate:function(){i.slide_offset=i.slide_globaloffset+r.from,i.slide_offset=n.simp(i.slide_offset,i.maxwidth),n.organiseCarousel(e,t,!1,!1)},onComplete:function(){i.slide_globaloffset=i.infinity==="off"?i.slide_globaloffset+i.slide_offset_target:n.simp(i.slide_globaloffset+i.slide_offset_target,i.maxwidth),i.slide_offset=n.simp(i.slide_offset,i.maxwidth),n.organiseCarousel(e,t,!1,!0);var h=jQuery(e.li[i.focused]);e.c.find(".next-revslide").removeClass("next-revslide"),s&&n.callingNewSlide(e.c,h.data("index"))},ease:d})},g=function(e,t){return Math.abs(e)>Math.abs(t)?e>0?e-Math.abs(Math.floor(e/t)*t):e+Math.abs(Math.floor(e/t)*t):e},y=function(e,t,o){var o,o,i=t-e,r=t-o-e;return i=g(i,o),r=g(r,o),Math.abs(i)>Math.abs(r)?r:i},I=function(e){var t=0,s=e.carousel;if(s.positionanim!==void 0&&s.positionanim.kill(),s.slide_globaloffset=="none")s.slide_globaloffset=t=s.horizontal_align==="center"?s.wrapwidth/2-s.slide_width/2:0;else{s.slide_globaloffset=s.slide_offset,s.slide_offset=0;var o=e.c.find(".processing-revslide").index(),i=s.horizontal_align==="center"?(s.wrapwidth/2-s.slide_width/2-s.slide_globaloffset)/s.slide_width:(0-s.slide_globaloffset)/s.slide_width;i=n.simp(i,e.slideamount,!1),o=o>=0?o:e.c.find(".active-revslide").index(),o=o>=0?o:0,t=s.infinity==="off"?i-o:-y(i,o,e.slideamount),t*=s.slide_width}return t}})(jQuery);