/******************************************** * revolution 5.0 extension - carousel * @version: 1.2.1 (18.11.2016) * @requires jquery.themepunch.revolution.js * @author themepunch *********************************************/ !function(a){"use strict";var b=jquery.fn.revolution,c={alias:"carousel min js",name:"revolution.extensions.carousel.min.js",min_core:"5.3.0",version:"1.2.1"};jquery.extend(!0,b,{preparecarousel:function(a,d,h,i){return"stop"!==b.compare_version(c).check&&(h=a.carousel.lastdirection=f(h,a.carousel.lastdirection),e(a),a.carousel.slide_offset_target=j(a),void(void 0!==i?g(a,h,!1,0):void 0==d?b.carouseltoevalposition(a,h):g(a,h,!1)))},carouseltoevalposition:function(a,c){var d=a.carousel;c=d.lastdirection=f(c,d.lastdirection);var e="center"===d.horizontal_align?(d.wrapwidth/2-d.slide_width/2-d.slide_globaloffset)/d.slide_width:(0-d.slide_globaloffset)/d.slide_width,h=b.simp(e,a.slideamount,!1),i=h-math.floor(h),j=0,k=-1*(math.ceil(h)-h),l=-1*(math.floor(h)-h);j=i>=.3&&"left"===c||i>=.7&&"right"===c?k:i<.3&&"left"===c||i<.7&&"right"===c?l:j,j="off"===d.infinity?h<0?h:e>a.slideamount-1?e-(a.slideamount-1):j:j,d.slide_offset_target=j*d.slide_width,0!==math.abs(d.slide_offset_target)?g(a,c,!0):b.organisecarousel(a,c)},organisecarousel:function(a,b,c,d){b=void 0===b||"down"==b||"up"==b||null===b||jquery.isemptyobject(b)?"left":b;for(var e=a.carousel,f=new array,g=e.slides.length,i=("right"===e.horizontal_align?a.width:0,0);ie.wrapwidth-e.inneroffset&&"right"==b?e.slide_offset-(e.slides.length-i)*e.slide_width:j,j=j<0-e.inneroffset-e.slide_width&&"left"==b?j+e.maxwidth:j),f[i]=j}var k=999;e.slides&&jquery.each(e.slides,function(d,h){var i=f[d];"on"===e.infinity&&(i=i>e.wrapwidth-e.inneroffset&&"left"===b?f[0]-(g-d)*e.slide_width:i,i=i<0-e.inneroffset-e.slide_width?"left"==b?i+e.maxwidth:"right"===b?f[g-1]+(d+1)*e.slide_width:i:i);var j=new object;j.left=i+e.inneroffset;var l="center"===e.horizontal_align?(math.abs(e.wrapwidth/2)-(j.left+e.slide_width/2))/e.slide_width:(e.inneroffset-j.left)/e.slide_width,n="center"===e.horizontal_align?2:1;if((c&&math.abs(l)0?1-l:math.abs(l)>e.maxvisibleitems-1?1-(math.abs(l)-(e.maxvisibleitems-1)):1;break;case"right":j.autoalpha=l>-1&&l<0?1-math.abs(l):l>e.maxvisibleitems-1?1-(math.abs(l)-(e.maxvisibleitems-1)):1}else j.autoalpha=math.abs(l)0)if("on"===e.vary_scale){j.scale=1-math.abs(e.minscale/100/math.ceil(e.maxvisibleitems/n)*l);var o=(e.slide_width-e.slide_width*j.scale)*math.abs(l)}else{j.scale=l>=1||l<=-1?1-e.minscale/100:(100-e.minscale*math.abs(l))/100;var o=(e.slide_width-e.slide_width*(1-e.minscale/100))*math.abs(l)}void 0!==e.maxrotation&&0!=math.abs(e.maxrotation)&&("on"===e.vary_rotation?(j.rotationy=math.abs(e.maxrotation)-math.abs((1-math.abs(1/math.ceil(e.maxvisibleitems/n)*l))*e.maxrotation),j.autoalpha=math.abs(j.rotationy)>90?0:j.autoalpha):j.rotationy=l>=1||l<=-1?e.maxrotation:math.abs(l)*e.maxrotation,j.rotationy=l<0?j.rotationy*-1:j.rotationy),j.x=-1*e.space*l,j.left=math.floor(j.left),j.x=math.floor(j.x),void 0!==j.scale?l<0?j.x-o:j.x+o:j.x,j.zindex=math.round(100-math.abs(5*l)),j.transformstyle="3d"!=a.parallax.type&&"3d"!=a.parallax.type?"flat":"preserve-3d",punchgs.tweenlite.set(h,j)}),d&&(a.c.find(".next-revslide").removeclass("next-revslide"),jquery(e.slides[e.focused]).addclass("next-revslide"),a.c.trigger("revolution.nextslide.waiting"));e.wrapwidth/2-e.slide_offset,e.maxwidth+e.slide_offset-e.wrapwidth/2}});var d=function(a){var b=a.carousel;b.infbackup=b.infinity,b.maxvisiblebackup=b.maxvisibleitems,b.slide_globaloffset="none",b.slide_offset=0,b.wrap=a.c.find(".tp-carousel-wrapper"),b.slides=a.c.find(".tp-revslider-slidesli"),0!==b.maxrotation&&("3d"!=a.parallax.type&&"3d"!=a.parallax.type?punchgs.tweenlite.set(b.wrap,{perspective:1200,transformstyle:"flat"}):punchgs.tweenlite.set(b.wrap,{perspective:1600,transformstyle:"preserve-3d"})),void 0!==b.border_radius&&parseint(b.border_radius,0)>0&&punchgs.tweenlite.set(a.c.find(".tp-revslider-slidesli"),{borderradius:b.border_radius})},e=function(a){void 0===a.bw&&b.setsize(a);var c=a.carousel,e=b.gethorizontaloffset(a.c,"left"),f=b.gethorizontaloffset(a.c,"right");void 0===c.wrap&&d(a),c.slide_width="on"!==c.stretch?a.gridwidth[a.curwinrange]*a.bw:a.c.width(),c.maxwidth=a.slideamount*c.slide_width,c.maxvisiblebackup>c.slides.length+1&&(c.maxvisibleitems=c.slides.length+2),c.wrapwidth=c.maxvisibleitems*c.slide_width+(c.maxvisibleitems-1)*c.space,c.wrapwidth="auto"!=a.sliderlayout?c.wrapwidth>a.c.closest(".tp-simpleresponsive").width()?a.c.closest(".tp-simpleresponsive").width():c.wrapwidth:c.wrapwidth>a.ul.width()?a.ul.width():c.wrapwidth,c.infinity=c.wrapwidth>=c.maxwidth?"off":c.infbackup,c.wrapoffset="center"===c.horizontal_align?(a.c.width()-f-e-c.wrapwidth)/2:0,c.wrapoffset="auto"!=a.sliderlayout&&a.outernav?0:c.wrapoffsetmath.abs(b)?a>0?a-math.abs(math.floor(a/b)*b):a+math.abs(math.floor(a/b)*b):a},i=function(a,b,c){var c,c,d=b-a,e=b-c-a;return d=h(d,c),e=h(e,c),math.abs(d)>math.abs(e)?e:d},j=function(a){var c=0,d=a.carousel;if(void 0!==d.positionanim&&d.positionanim.kill(),"none"==d.slide_globaloffset)d.slide_globaloffset=c="center"===d.horizontal_align?d.wrapwidth/2-d.slide_width/2:0;else{d.slide_globaloffset=d.slide_offset,d.slide_offset=0;var e=a.c.find(".processing-revslide").index(),f="center"===d.horizontal_align?(d.wrapwidth/2-d.slide_width/2-d.slide_globaloffset)/d.slide_width:(0-d.slide_globaloffset)/d.slide_width;f=b.simp(f,a.slideamount,!1),e=e>=0?e:a.c.find(".active-revslide").index(),e=e>=0?e:0,c="off"===d.infinity?f-e:-i(f,e,a.slideamount),c*=d.slide_width}return c}}(jquery);