/** * Swiper 6.1.2 * Most modern mobile touch slider and framework with hardware accelerated transitions * http://swiperjs.com * * Copyright 2014-2020 Vladimir Kharlampidi * * Released under the MIT License * * Released on: August 17, 2020 */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Swiper=t()}(this,(function(){"use strict";function e(e,t){for(var i=0;i0&&s(e[a],t[a])}))}var a={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function r(){var e="undefined"!=typeof document?document:{};return s(e,a),e}var n={document:a,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function l(){var e="undefined"!=typeof window?window:{};return s(e,n),e}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function p(e,t,i){return(p=h()?Reflect.construct:function(e,t,i){var s=[null];s.push.apply(s,t);var a=new(Function.bind.apply(e,s));return i&&d(a,i.prototype),a}).apply(null,arguments)}function u(e){var t="function"==typeof Map?new Map:void 0;return(u=function(e){if(null===e||(i=e,-1===Function.toString.call(i).indexOf("[native code]")))return e;var i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,s)}function s(){return p(e,arguments,o(this).constructor)}return s.prototype=Object.create(e.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),d(s,e)})(e)}var c=function(e){var t,i;function s(t){var i,s,a;return i=e.call.apply(e,[this].concat(t))||this,s=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i),a=s.__proto__,Object.defineProperty(s,"__proto__",{get:function(){return a},set:function(e){a.__proto__=e}}),i}return i=e,(t=s).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i,s}(u(Array));function v(e){void 0===e&&(e=[]);var t=[];return e.forEach((function(e){Array.isArray(e)?t.push.apply(t,v(e)):t.push(e)})),t}function f(e,t){return Array.prototype.filter.call(e,t)}function m(e,t){var i=l(),s=r(),a=[];if(!t&&e instanceof c)return e;if(!e)return new c(a);if("string"==typeof e){var n=e.trim();if(n.indexOf("<")>=0&&n.indexOf(">")>=0){var o="div";0===n.indexOf("0})).length>0},toggleClass:function(){for(var e=arguments.length,t=new Array(e),i=0;i=0;c-=1){var v=u[c];r&&v.listener===r||r&&v.listener&&v.listener.dom7proxy&&v.listener.dom7proxy===r?(p.removeEventListener(d,v.proxyListener,n),u.splice(c,1)):r||(p.removeEventListener(d,v.proxyListener,n),u.splice(c,1))}}return this},trigger:function(){for(var e=l(),t=arguments.length,i=new Array(t),s=0;s0})),h.dispatchEvent(p),h.dom7EventData=[],delete h.dom7EventData}}return this},transitionEnd:function(e){var t=this;return e&&t.on("transitionend",(function i(s){s.target===this&&(e.call(this,s),t.off("transitionend",i))})),this},outerWidth:function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},styles:function(){var e=l();return this[0]?e.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){var e=l(),t=r(),i=this[0],s=i.getBoundingClientRect(),a=t.body,n=i.clientTop||a.clientTop||0,o=i.clientLeft||a.clientLeft||0,d=i===e?e.scrollY:i.scrollTop,h=i===e?e.scrollX:i.scrollLeft;return{top:s.top+d-n,left:s.left+h-o}}return null},css:function(e,t){var i,s=l();if(1===arguments.length){if("string"!=typeof e){for(i=0;it-1)return m([]);if(e<0){var i=t+e;return m(i<0?[]:[this[i]])}return m([this[e]])},append:function(){for(var e,t=r(),i=0;i=0;i-=1)this[t].insertBefore(a.childNodes[i],this[t].childNodes[0])}else if(e instanceof c)for(i=0;i0?e?this[0].nextElementSibling&&m(this[0].nextElementSibling).is(e)?m([this[0].nextElementSibling]):m([]):this[0].nextElementSibling?m([this[0].nextElementSibling]):m([]):m([])},nextAll:function(e){var t=[],i=this[0];if(!i)return m([]);for(;i.nextElementSibling;){var s=i.nextElementSibling;e?m(s).is(e)&&t.push(s):t.push(s),i=s}return m(t)},prev:function(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&m(t.previousElementSibling).is(e)?m([t.previousElementSibling]):m([]):t.previousElementSibling?m([t.previousElementSibling]):m([])}return m([])},prevAll:function(e){var t=[],i=this[0];if(!i)return m([]);for(;i.previousElementSibling;){var s=i.previousElementSibling;e?m(s).is(e)&&t.push(s):t.push(s),i=s}return m(t)},parent:function(e){for(var t=[],i=0;i6&&(s=s.split(", ").map((function(e){return e.replace(",",".")})).join(", ")),a=new r.WebKitCSSMatrix("none"===s?"":s)):i=(a=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(s=r.WebKitCSSMatrix?a.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(s=r.WebKitCSSMatrix?a.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),s||0}function C(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object}function S(){for(var e=Object(arguments.length<=0?void 0:arguments[0]),t=1;t=0,observer:"MutationObserver"in e||"WebkitMutationObserver"in e,passiveListener:function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassiveListener",null,i)}catch(e){}return t}(),gestures:"ongesturestart"in e}}()),g}function P(e){return void 0===e&&(e={}),w||(w=function(e){var t=(void 0===e?{}:e).userAgent,i=z(),s=l(),a=s.navigator.platform,r=t||s.navigator.userAgent,n={ios:!1,android:!1},o=s.screen.width,d=s.screen.height,h=r.match(/(Android);?[\s\/]+([\d.]+)?/),p=r.match(/(iPad).*OS\s([\d_]+)/),u=r.match(/(iPod)(.*OS\s([\d_]+))?/),c=!p&&r.match(/(iPhone\sOS|iOS)\s([\d_]+)/),v="Win32"===a,f="MacIntel"===a;return!p&&f&&i.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768"].indexOf(o+"x"+d)>=0&&((p=r.match(/(Version)\/([\d.]+)/))||(p=[0,1,"13_0_0"]),f=!1),h&&!v&&(n.os="android",n.android=!0),(p||c||u)&&(n.os="ios",n.ios=!0),n}(e)),w}function k(){return b||(b=function(){var e,t=l();return{isEdge:!!t.navigator.userAgent.match(/Edge/g),isSafari:(e=t.navigator.userAgent.toLowerCase(),e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)}}()),b}Object.keys(y).forEach((function(e){m.fn[e]=y[e]}));var $={name:"resize",create:function(){var e=this;S(e,{resize:{resizeHandler:function(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler:function(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init:function(e){var t=l();t.addEventListener("resize",e.resize.resizeHandler),t.addEventListener("orientationchange",e.resize.orientationChangeHandler)},destroy:function(e){var t=l();t.removeEventListener("resize",e.resize.resizeHandler),t.removeEventListener("orientationchange",e.resize.orientationChangeHandler)}}},L={attach:function(e,t){void 0===t&&(t={});var i=l(),s=this,a=new(i.MutationObserver||i.WebkitMutationObserver)((function(e){if(1!==e.length){var t=function(){s.emit("observerUpdate",e[0])};i.requestAnimationFrame?i.requestAnimationFrame(t):i.setTimeout(t,0)}else s.emit("observerUpdate",e[0])}));a.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),s.observer.observers.push(a)},init:function(){if(this.support.observer&&this.params.observer){if(this.params.observeParents)for(var e=this.$el.parents(),t=0;t0||s.isTouched&&s.isMoved)))if(a.noSwiping&&d.closest(a.noSwipingSelector?a.noSwipingSelector:"."+a.noSwipingClass)[0])this.allowClick=!0;else if(!a.swipeHandler||d.closest(a.swipeHandler)[0]){n.currentX="touchstart"===o.type?o.targetTouches[0].pageX:o.pageX,n.currentY="touchstart"===o.type?o.targetTouches[0].pageY:o.pageY;var h=n.currentX,p=n.currentY,u=a.edgeSwipeDetection||a.iOSEdgeSwipeDetection,c=a.edgeSwipeThreshold||a.iOSEdgeSwipeThreshold;if(!u||!(h<=c||h>=i.screen.width-c)){if(S(s,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),n.startX=h,n.startY=p,s.touchStartTime=x(),this.allowClick=!0,this.updateSize(),this.swipeDirection=void 0,a.threshold>0&&(s.allowThresholdMove=!1),"touchstart"!==o.type){var v=!0;d.is(s.formElements)&&(v=!1),t.activeElement&&m(t.activeElement).is(s.formElements)&&t.activeElement!==d[0]&&t.activeElement.blur();var f=v&&this.allowTouchMove&&a.touchStartPreventDefault;(a.touchStartForcePreventDefault||f)&&o.preventDefault()}this.emit("touchStart",o)}}}}function A(e){var t=r(),i=this.touchEventsData,s=this.params,a=this.touches,n=this.rtlTranslate,l=e;if(l.originalEvent&&(l=l.originalEvent),i.isTouched){if(!i.isTouchEvent||"touchmove"===l.type){var o="touchmove"===l.type&&l.targetTouches&&(l.targetTouches[0]||l.changedTouches[0]),d="touchmove"===l.type?o.pageX:l.pageX,h="touchmove"===l.type?o.pageY:l.pageY;if(l.preventedByNestedSwiper)return a.startX=d,void(a.startY=h);if(!this.allowTouchMove)return this.allowClick=!1,void(i.isTouched&&(S(a,{startX:d,startY:h,currentX:d,currentY:h}),i.touchStartTime=x()));if(i.isTouchEvent&&s.touchReleaseOnEdges&&!s.loop)if(this.isVertical()){if(ha.startY&&this.translate>=this.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(da.startX&&this.translate>=this.minTranslate())return;if(i.isTouchEvent&&t.activeElement&&l.target===t.activeElement&&m(l.target).is(i.formElements))return i.isMoved=!0,void(this.allowClick=!1);if(i.allowTouchCallbacks&&this.emit("touchMove",l),!(l.targetTouches&&l.targetTouches.length>1)){a.currentX=d,a.currentY=h;var p=a.currentX-a.startX,u=a.currentY-a.startY;if(!(this.params.threshold&&Math.sqrt(Math.pow(p,2)+Math.pow(u,2))=25&&(c=180*Math.atan2(Math.abs(u),Math.abs(p))/Math.PI,i.isScrolling=this.isHorizontal()?c>s.touchAngle:90-c>s.touchAngle);if(i.isScrolling&&this.emit("touchMoveOpposite",l),void 0===i.startMoving&&(a.currentX===a.startX&&a.currentY===a.startY||(i.startMoving=!0)),i.isScrolling)i.isTouched=!1;else if(i.startMoving){this.allowClick=!1,!s.cssMode&&l.cancelable&&l.preventDefault(),s.touchMoveStopPropagation&&!s.nested&&l.stopPropagation(),i.isMoved||(s.loop&&this.loopFix(),i.startTranslate=this.getTranslate(),this.setTransition(0),this.animating&&this.$wrapperEl.trigger("webkitTransitionEnd transitionend"),i.allowMomentumBounce=!1,!s.grabCursor||!0!==this.allowSlideNext&&!0!==this.allowSlidePrev||this.setGrabCursor(!0),this.emit("sliderFirstMove",l)),this.emit("sliderMove",l),i.isMoved=!0;var v=this.isHorizontal()?p:u;a.diff=v,v*=s.touchRatio,n&&(v=-v),this.swipeDirection=v>0?"prev":"next",i.currentTranslate=v+i.startTranslate;var f=!0,g=s.resistanceRatio;if(s.touchReleaseOnEdges&&(g=0),v>0&&i.currentTranslate>this.minTranslate()?(f=!1,s.resistance&&(i.currentTranslate=this.minTranslate()-1+Math.pow(-this.minTranslate()+i.startTranslate+v,g))):v<0&&i.currentTranslatei.startTranslate&&(i.currentTranslate=i.startTranslate),s.threshold>0){if(!(Math.abs(v)>s.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,a.startX=a.currentX,a.startY=a.currentY,i.currentTranslate=i.startTranslate,void(a.diff=this.isHorizontal()?a.currentX-a.startX:a.currentY-a.startY)}s.followFinger&&!s.cssMode&&((s.freeMode||s.watchSlidesProgress||s.watchSlidesVisibility)&&(this.updateActiveIndex(),this.updateSlidesClasses()),s.freeMode&&(0===i.velocities.length&&i.velocities.push({position:a[this.isHorizontal()?"startX":"startY"],time:i.touchStartTime}),i.velocities.push({position:a[this.isHorizontal()?"currentX":"currentY"],time:x()})),this.updateProgress(i.currentTranslate),this.setTranslate(i.currentTranslate))}}}}}else i.startMoving&&i.isScrolling&&this.emit("touchMoveOpposite",l)}function D(e){var t=this,i=t.touchEventsData,s=t.params,a=t.touches,r=t.rtlTranslate,n=t.$wrapperEl,l=t.slidesGrid,o=t.snapGrid,d=e;if(d.originalEvent&&(d=d.originalEvent),i.allowTouchCallbacks&&t.emit("touchEnd",d),i.allowTouchCallbacks=!1,!i.isTouched)return i.isMoved&&s.grabCursor&&t.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);s.grabCursor&&i.isMoved&&i.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var h,p=x(),u=p-i.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(d),t.emit("tap click",d),u<300&&p-i.lastClickTime<300&&t.emit("doubleTap doubleClick",d)),i.lastClickTime=x(),E((function(){t.destroyed||(t.allowClick=!0)})),!i.isTouched||!i.isMoved||!t.swipeDirection||0===a.diff||i.currentTranslate===i.startTranslate)return i.isTouched=!1,i.isMoved=!1,void(i.startMoving=!1);if(i.isTouched=!1,i.isMoved=!1,i.startMoving=!1,h=s.followFinger?r?t.translate:-t.translate:-i.currentTranslate,!s.cssMode)if(s.freeMode){if(h<-t.minTranslate())return void t.slideTo(t.activeIndex);if(h>-t.maxTranslate())return void(t.slides.length1){var c=i.velocities.pop(),v=i.velocities.pop(),f=c.position-v.position,m=c.time-v.time;t.velocity=f/m,t.velocity/=2,Math.abs(t.velocity)150||x()-c.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=s.freeModeMomentumVelocityRatio,i.velocities.length=0;var g=1e3*s.freeModeMomentumRatio,w=t.velocity*g,b=t.translate+w;r&&(b=-b);var y,T,C=!1,S=20*Math.abs(t.velocity)*s.freeModeMomentumBounceRatio;if(bt.minTranslate())s.freeModeMomentumBounce?(b-t.minTranslate()>S&&(b=t.minTranslate()+S),y=t.minTranslate(),C=!0,i.allowMomentumBounce=!0):b=t.minTranslate(),s.loop&&s.centeredSlides&&(T=!0);else if(s.freeModeSticky){for(var M,z=0;z-b){M=z;break}b=-(b=Math.abs(o[M]-b)=s.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var $=0,L=t.slidesSizesGrid[0],I=0;I=l[I]&&h=l[I]&&($=I,L=l[l.length-1]-l[l.length-2])}var A=(h-l[$])/L,D=$s.longSwipesMs){if(!s.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(A>=s.longSwipesRatio?t.slideTo($+D):t.slideTo($)),"prev"===t.swipeDirection&&(A>1-s.longSwipesRatio?t.slideTo($+D):t.slideTo($))}else{if(!s.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(d.target===t.navigation.nextEl||d.target===t.navigation.prevEl)?d.target===t.navigation.nextEl?t.slideTo($+D):t.slideTo($):("next"===t.swipeDirection&&t.slideTo($+D),"prev"===t.swipeDirection&&t.slideTo($))}}}function G(){var e=this.params,t=this.el;if(!t||0!==t.offsetWidth){e.breakpoints&&this.setBreakpoint();var i=this.allowSlideNext,s=this.allowSlidePrev,a=this.snapGrid;this.allowSlideNext=!0,this.allowSlidePrev=!0,this.updateSize(),this.updateSlides(),this.updateSlidesClasses(),("auto"===e.slidesPerView||e.slidesPerView>1)&&this.isEnd&&!this.isBeginning&&!this.params.centeredSlides?this.slideTo(this.slides.length-1,0,!1,!0):this.slideTo(this.activeIndex,0,!1,!0),this.autoplay&&this.autoplay.running&&this.autoplay.paused&&this.autoplay.run(),this.allowSlidePrev=s,this.allowSlideNext=i,this.params.watchOverflow&&a!==this.snapGrid&&this.checkOverflow()}}function N(e){this.allowClick||(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}function B(){var e=this.wrapperEl,t=this.rtlTranslate;this.previousTranslate=this.translate,this.isHorizontal()?this.translate=t?e.scrollWidth-e.offsetWidth-e.scrollLeft:-e.scrollLeft:this.translate=-e.scrollTop,-0===this.translate&&(this.translate=0),this.updateActiveIndex(),this.updateSlidesClasses();var i=this.maxTranslate()-this.minTranslate();(0===i?0:(this.translate-this.minTranslate())/i)!==this.progress&&this.updateProgress(t?-this.translate:this.translate),this.emit("setTranslate",this.translate,!1)}var H=!1;function X(){}var Y={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,slidesPerGroupSkip:0,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1},V={modular:{useParams:function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(i){var s=t.modules[i];s.params&&S(e,s.params)}))},useModules:function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(i){var s=t.modules[i],a=e[i]||{};s.on&&t.on&&Object.keys(s.on).forEach((function(e){t.on(e,s.on[e])})),s.create&&s.create.bind(t)(a)}))}},eventsEmitter:{on:function(e,t,i){var s=this;if("function"!=typeof t)return s;var a=i?"unshift":"push";return e.split(" ").forEach((function(e){s.eventsListeners[e]||(s.eventsListeners[e]=[]),s.eventsListeners[e][a](t)})),s},once:function(e,t,i){var s=this;if("function"!=typeof t)return s;function a(){s.off(e,a),a.__emitterProxy&&delete a.__emitterProxy;for(var i=arguments.length,r=new Array(i),n=0;n=0&&this.eventsAnyListeners.splice(t,1),this},off:function(e,t){var i=this;return i.eventsListeners?(e.split(" ").forEach((function(e){void 0===t?i.eventsListeners[e]=[]:i.eventsListeners[e]&&i.eventsListeners[e].forEach((function(s,a){(s===t||s.__emitterProxy&&s.__emitterProxy===t)&&i.eventsListeners[e].splice(a,1)}))})),i):i},emit:function(){var e,t,i,s=this;if(!s.eventsListeners)return s;for(var a=arguments.length,r=new Array(a),n=0;n=0&&(b=parseFloat(b.replace("%",""))/100*s),this.virtualSize=-b,a?d.css({marginLeft:"",marginTop:""}):d.css({marginRight:"",marginBottom:""}),t.slidesPerColumn>1&&(T=Math.floor(h/t.slidesPerColumn)===h/this.params.slidesPerColumn?h:Math.ceil(h/t.slidesPerColumn)*t.slidesPerColumn,"auto"!==t.slidesPerView&&"row"===t.slidesPerColumnFill&&(T=Math.max(T,t.slidesPerView*t.slidesPerColumn)));for(var M,z=t.slidesPerColumn,P=T/z,k=Math.floor(h/t.slidesPerColumn),$=0;$1){var I=void 0,O=void 0,A=void 0;if("row"===t.slidesPerColumnFill&&t.slidesPerGroup>1){var D=Math.floor($/(t.slidesPerGroup*t.slidesPerColumn)),G=$-t.slidesPerColumn*t.slidesPerGroup*D,N=0===D?t.slidesPerGroup:Math.min(Math.ceil((h-D*z*t.slidesPerGroup)/z),t.slidesPerGroup);I=(O=G-(A=Math.floor(G/N))*N+D*t.slidesPerGroup)+A*T/z,L.css({"-webkit-box-ordinal-group":I,"-moz-box-ordinal-group":I,"-ms-flex-order":I,"-webkit-order":I,order:I})}else"column"===t.slidesPerColumnFill?(A=$-(O=Math.floor($/z))*z,(O>k||O===k&&A===z-1)&&(A+=1)>=z&&(A=0,O+=1)):O=$-(A=Math.floor($/P))*P;L.css("margin-"+(this.isHorizontal()?"top":"left"),0!==A&&t.spaceBetween&&t.spaceBetween+"px")}if("none"!==L.css("display")){if("auto"===t.slidesPerView){var B=e.getComputedStyle(L[0],null),H=L[0].style.transform,X=L[0].style.webkitTransform;if(H&&(L[0].style.transform="none"),X&&(L[0].style.webkitTransform="none"),t.roundLengths)C=this.isHorizontal()?L.outerWidth(!0):L.outerHeight(!0);else if(this.isHorizontal()){var Y=parseFloat(B.getPropertyValue("width")||0),V=parseFloat(B.getPropertyValue("padding-left")||0),F=parseFloat(B.getPropertyValue("padding-right")||0),W=parseFloat(B.getPropertyValue("margin-left")||0),R=parseFloat(B.getPropertyValue("margin-right")||0),q=B.getPropertyValue("box-sizing");C=q&&"border-box"===q?Y+W+R:Y+V+F+W+R}else{var j=parseFloat(B.getPropertyValue("height")||0),_=parseFloat(B.getPropertyValue("padding-top")||0),U=parseFloat(B.getPropertyValue("padding-bottom")||0),K=parseFloat(B.getPropertyValue("margin-top")||0),Z=parseFloat(B.getPropertyValue("margin-bottom")||0),J=B.getPropertyValue("box-sizing");C=J&&"border-box"===J?j+K+Z:j+_+U+K+Z}H&&(L[0].style.transform=H),X&&(L[0].style.webkitTransform=X),t.roundLengths&&(C=Math.floor(C))}else C=(s-(t.slidesPerView-1)*b)/t.slidesPerView,t.roundLengths&&(C=Math.floor(C)),d[$]&&(this.isHorizontal()?d[$].style.width=C+"px":d[$].style.height=C+"px");d[$]&&(d[$].swiperSlideSize=C),c.push(C),t.centeredSlides?(y=y+C/2+E/2+b,0===E&&0!==$&&(y=y-s/2-b),0===$&&(y=y-s/2-b),Math.abs(y)<.001&&(y=0),t.roundLengths&&(y=Math.floor(y)),x%t.slidesPerGroup==0&&p.push(y),u.push(y)):(t.roundLengths&&(y=Math.floor(y)),(x-Math.min(this.params.slidesPerGroupSkip,x))%this.params.slidesPerGroup==0&&p.push(y),u.push(y),y=y+C+b),this.virtualSize+=C+b,E=C,x+=1}}if(this.virtualSize=Math.max(this.virtualSize,s)+m,a&&r&&("slide"===t.effect||"coverflow"===t.effect)&&i.css({width:this.virtualSize+t.spaceBetween+"px"}),t.setWrapperSize&&(this.isHorizontal()?i.css({width:this.virtualSize+t.spaceBetween+"px"}):i.css({height:this.virtualSize+t.spaceBetween+"px"})),t.slidesPerColumn>1&&(this.virtualSize=(C+t.spaceBetween)*T,this.virtualSize=Math.ceil(this.virtualSize/t.slidesPerColumn)-t.spaceBetween,this.isHorizontal()?i.css({width:this.virtualSize+t.spaceBetween+"px"}):i.css({height:this.virtualSize+t.spaceBetween+"px"}),t.centeredSlides)){M=[];for(var Q=0;Q1&&p.push(this.virtualSize-s)}if(0===p.length&&(p=[0]),0!==t.spaceBetween&&(this.isHorizontal()?a?d.filter(v).css({marginLeft:b+"px"}):d.filter(v).css({marginRight:b+"px"}):d.filter(v).css({marginBottom:b+"px"})),t.centeredSlides&&t.centeredSlidesBounds){var se=0;c.forEach((function(e){se+=e+(t.spaceBetween?t.spaceBetween:0)}));var ae=(se-=t.spaceBetween)-s;p=p.map((function(e){return e<0?-f:e>ae?ae+m:e}))}if(t.centerInsufficientSlides){var re=0;if(c.forEach((function(e){re+=e+(t.spaceBetween?t.spaceBetween:0)})),(re-=t.spaceBetween)1)if(this.params.centeredSlides)this.visibleSlides.each((function(e){i.push(e)}));else for(t=0;tthis.slides.length)break;i.push(this.slides.eq(a)[0])}else i.push(this.slides.eq(this.activeIndex)[0]);for(t=0;ts?r:s}s&&this.$wrapperEl.css("height",s+"px")},updateSlidesOffset:function(){for(var e=this.slides,t=0;t=0&&o1&&d<=this.size||o<=0&&d>=this.size)&&(this.visibleSlides.push(n),this.visibleSlidesIndexes.push(r),i.eq(r).addClass(t.slideVisibleClass))}n.progress=s?-l:l}this.visibleSlides=m(this.visibleSlides)}},updateProgress:function(e){if(void 0===e){var t=this.rtlTranslate?-1:1;e=this&&this.translate&&this.translate*t||0}var i=this.params,s=this.maxTranslate()-this.minTranslate(),a=this.progress,r=this.isBeginning,n=this.isEnd,l=r,o=n;0===s?(a=0,r=!0,n=!0):(r=(a=(e-this.minTranslate())/s)<=0,n=a>=1),S(this,{progress:a,isBeginning:r,isEnd:n}),(i.watchSlidesProgress||i.watchSlidesVisibility||i.centeredSlides&&i.autoHeight)&&this.updateSlidesProgress(e),r&&!l&&this.emit("reachBeginning toEdge"),n&&!o&&this.emit("reachEnd toEdge"),(l&&!r||o&&!n)&&this.emit("fromEdge"),this.emit("progress",a)},updateSlidesClasses:function(){var e,t=this.slides,i=this.params,s=this.$wrapperEl,a=this.activeIndex,r=this.realIndex,n=this.virtual&&i.virtual.enabled;t.removeClass(i.slideActiveClass+" "+i.slideNextClass+" "+i.slidePrevClass+" "+i.slideDuplicateActiveClass+" "+i.slideDuplicateNextClass+" "+i.slideDuplicatePrevClass),(e=n?this.$wrapperEl.find("."+i.slideClass+'[data-swiper-slide-index="'+a+'"]'):t.eq(a)).addClass(i.slideActiveClass),i.loop&&(e.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+r+'"]').addClass(i.slideDuplicateActiveClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+r+'"]').addClass(i.slideDuplicateActiveClass));var l=e.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass);i.loop&&0===l.length&&(l=t.eq(0)).addClass(i.slideNextClass);var o=e.prevAll("."+i.slideClass).eq(0).addClass(i.slidePrevClass);i.loop&&0===o.length&&(o=t.eq(-1)).addClass(i.slidePrevClass),i.loop&&(l.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass),o.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass)),this.emitSlidesClasses()},updateActiveIndex:function(e){var t,i=this.rtlTranslate?this.translate:-this.translate,s=this.slidesGrid,a=this.snapGrid,r=this.params,n=this.activeIndex,l=this.realIndex,o=this.snapIndex,d=e;if(void 0===d){for(var h=0;h=s[h]&&i=s[h]&&i=s[h]&&(d=h);r.normalizeSlideIndex&&(d<0||void 0===d)&&(d=0)}if(a.indexOf(i)>=0)t=a.indexOf(i);else{var p=Math.min(r.slidesPerGroupSkip,d);t=p+Math.floor((d-p)/r.slidesPerGroup)}if(t>=a.length&&(t=a.length-1),d!==n){var u=parseInt(this.slides.eq(d).attr("data-swiper-slide-index")||d,10);S(this,{snapIndex:t,realIndex:u,previousIndex:n,activeIndex:d}),this.emit("activeIndexChange"),this.emit("snapIndexChange"),l!==u&&this.emit("realIndexChange"),(this.initialized||this.params.runCallbacksOnInit)&&this.emit("slideChange")}else t!==o&&(this.snapIndex=t,this.emit("snapIndexChange"))},updateClickedSlide:function(e){var t=this.params,i=m(e.target).closest("."+t.slideClass)[0],s=!1;if(i)for(var a=0;ad?d:s&&ea?"next":is?"next":i=l.length&&(v=l.length-1),(h||n.initialSlide||0)===(d||0)&&i&&a.emit("beforeSlideChangeStart");var f,m=-l[v];if(a.updateProgress(m),n.normalizeSlideIndex)for(var g=0;g=Math.floor(100*o[g])&&(r=g);if(a.initialized&&r!==h){if(!a.allowSlideNext&&ma.translate&&m>a.maxTranslate()&&(h||0)!==r)return!1}if(f=r>h?"next":r=e&&(u=e)})),void 0!==u&&(d=n.indexOf(u))<0&&(d=this.activeIndex-1),this.slideTo(d,e,t,i)},slideReset:function(e,t,i){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,i)},slideToClosest:function(e,t,i,s){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===s&&(s=.5);var a=this.activeIndex,r=Math.min(this.params.slidesPerGroupSkip,a),n=r+Math.floor((a-r)/this.params.slidesPerGroup),l=this.rtlTranslate?this.translate:-this.translate;if(l>=this.snapGrid[n]){var o=this.snapGrid[n];l-o>(this.snapGrid[n+1]-o)*s&&(a+=this.params.slidesPerGroup)}else{var d=this.snapGrid[n-1];l-d<=(this.snapGrid[n]-d)*s&&(a-=this.params.slidesPerGroup)}return a=Math.max(a,0),a=Math.min(a,this.slidesGrid.length-1),this.slideTo(a,e,t,i)},slideToClickedSlide:function(){var e,t=this,i=t.params,s=t.$wrapperEl,a="auto"===i.slidesPerView?t.slidesPerViewDynamic():i.slidesPerView,r=t.clickedIndex;if(i.loop){if(t.animating)return;e=parseInt(m(t.clickedSlide).attr("data-swiper-slide-index"),10),i.centeredSlides?rt.slides.length-t.loopedSlides+a/2?(t.loopFix(),r=s.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),E((function(){t.slideTo(r)}))):t.slideTo(r):r>t.slides.length-a?(t.loopFix(),r=s.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),E((function(){t.slideTo(r)}))):t.slideTo(r)}else t.slideTo(r)}},loop:{loopCreate:function(){var e=this,t=r(),i=e.params,s=e.$wrapperEl;s.children("."+i.slideClass+"."+i.slideDuplicateClass).remove();var a=s.children("."+i.slideClass);if(i.loopFillGroupWithBlank){var n=i.slidesPerGroup-a.length%i.slidesPerGroup;if(n!==i.slidesPerGroup){for(var l=0;la.length&&(e.loopedSlides=a.length);var d=[],h=[];a.each((function(t,i){var s=m(t);i=a.length-e.loopedSlides&&d.push(t),s.attr("data-swiper-slide-index",i)}));for(var p=0;p=0;u-=1)s.prepend(m(d[u].cloneNode(!0)).addClass(i.slideDuplicateClass))},loopFix:function(){this.emit("beforeLoopFix");var e,t=this.activeIndex,i=this.slides,s=this.loopedSlides,a=this.allowSlidePrev,r=this.allowSlideNext,n=this.snapGrid,l=this.rtlTranslate;this.allowSlidePrev=!0,this.allowSlideNext=!0;var o=-n[t]-this.getTranslate();if(t=i.length-s){e=-i.length+t+s,e+=s,this.slideTo(e,0,!1,!0)&&0!==o&&this.setTranslate((l?-this.translate:this.translate)-o)}this.allowSlidePrev=a,this.allowSlideNext=r,this.emit("loopFix")},loopDestroy:function(){var e=this.$wrapperEl,t=this.params,i=this.slides;e.children("."+t.slideClass+"."+t.slideDuplicateClass+",."+t.slideClass+"."+t.slideBlankClass).remove(),i.removeAttr("data-swiper-slide-index")}},grabCursor:{setGrabCursor:function(e){if(!(this.support.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked||this.params.cssMode)){var t=this.el;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"}},unsetGrabCursor:function(){this.support.touch||this.params.watchOverflow&&this.isLocked||this.params.cssMode||(this.el.style.cursor="")}},manipulation:{appendSlide:function(e){var t=this.$wrapperEl,i=this.params;if(i.loop&&this.loopDestroy(),"object"==typeof e&&"length"in e)for(var s=0;s=r)this.appendSlide(t);else{for(var n=a>e?a+1:a,l=[],o=r-1;o>=e;o-=1){var d=this.slides.eq(o);d.remove(),l.unshift(d)}if("object"==typeof t&&"length"in t){for(var h=0;he?a+t.length:a}else i.append(t);for(var p=0;p1,p=d.slidesPerColumn>1;h&&!p?(r.removeClass(a.containerModifierClass+"multirow "+a.containerModifierClass+"multirow-column"),this.emitContainerClasses()):!h&&p&&(r.addClass(a.containerModifierClass+"multirow"),"column"===d.slidesPerColumnFill&&r.addClass(a.containerModifierClass+"multirow-column"),this.emitContainerClasses());var u=d.direction&&d.direction!==a.direction,c=a.loop&&(d.slidesPerView!==a.slidesPerView||u);u&&t&&this.changeDirection(),S(this.params,d),S(this,{allowTouchMove:this.params.allowTouchMove,allowSlideNext:this.params.allowSlideNext,allowSlidePrev:this.params.allowSlidePrev}),this.currentBreakpoint=l,c&&t&&(this.loopDestroy(),this.loopCreate(),this.updateSlides(),this.slideTo(e-s+this.loopedSlides,0,!1)),this.emit("breakpoint",d)}}},getBreakpoint:function(e){var t=l();if(e){var i=!1,s=Object.keys(e).map((function(e){if("string"==typeof e&&0===e.indexOf("@")){var i=parseFloat(e.substr(1));return{value:t.innerHeight*i,point:e}}return{value:e,point:e}}));s.sort((function(e,t){return parseInt(e.value,10)-parseInt(t.value,10)}));for(var a=0;a0&&e.slidesOffsetBefore+e.spaceBetween*(this.slides.length-1)+this.slides[0].offsetWidth*this.slides.length;e.slidesOffsetBefore&&e.slidesOffsetAfter&&i?this.isLocked=i<=this.size:this.isLocked=1===this.snapGrid.length,this.allowSlideNext=!this.isLocked,this.allowSlidePrev=!this.isLocked,t!==this.isLocked&&this.emit(this.isLocked?"lock":"unlock"),t&&t!==this.isLocked&&(this.isEnd=!1,this.navigation&&this.navigation.update())}},classes:{addClasses:function(){var e=this.classNames,t=this.params,i=this.rtl,s=this.$el,a=this.device,r=[];r.push("initialized"),r.push(t.direction),t.freeMode&&r.push("free-mode"),t.autoHeight&&r.push("autoheight"),i&&r.push("rtl"),t.slidesPerColumn>1&&(r.push("multirow"),"column"===t.slidesPerColumnFill&&r.push("multirow-column")),a.android&&r.push("android"),a.ios&&r.push("ios"),t.cssMode&&r.push("css-mode"),r.forEach((function(i){e.push(t.containerModifierClass+i)})),s.addClass(e.join(" ")),this.emitContainerClasses()},removeClasses:function(){var e=this.$el,t=this.classNames;e.removeClass(t.join(" ")),this.emitContainerClasses()}},images:{loadImage:function(e,t,i,s,a,r){var n,o=l();function d(){r&&r()}m(e).parent("picture")[0]||e.complete&&a?d():t?((n=new o.Image).onload=d,n.onerror=d,s&&(n.sizes=s),i&&(n.srcset=i),t&&(n.src=t)):d()},preloadImages:function(){var e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(var i=0;i1){var d=[];return o.each((function(e){var s=S({},i,{el:e});d.push(new t(s))})),d}var h,p,u;return e.swiper=n,e&&e.shadowRoot&&e.shadowRoot.querySelector?(h=m(e.shadowRoot.querySelector("."+n.params.wrapperClass))).children=function(e){return o.children(e)}:h=o.children("."+n.params.wrapperClass),S(n,{$el:o,el:e,$wrapperEl:h,wrapperEl:h[0],classNames:[],slides:m(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===n.params.direction},isVertical:function(){return"vertical"===n.params.direction},rtl:"rtl"===e.dir.toLowerCase()||"rtl"===o.css("direction"),rtlTranslate:"horizontal"===n.params.direction&&("rtl"===e.dir.toLowerCase()||"rtl"===o.css("direction")),wrongRTL:"-webkit-box"===h.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:n.params.allowSlideNext,allowSlidePrev:n.params.allowSlidePrev,touchEvents:(p=["touchstart","touchmove","touchend","touchcancel"],u=["mousedown","mousemove","mouseup"],n.support.pointerEvents&&(u=["pointerdown","pointermove","pointerup"]),n.touchEventsTouch={start:p[0],move:p[1],end:p[2],cancel:p[3]},n.touchEventsDesktop={start:u[0],move:u[1],end:u[2]},n.support.touch||!n.params.simulateTouch?n.touchEventsTouch:n.touchEventsDesktop),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,formElements:"input, select, option, textarea, button, video, label",lastClickTime:x(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:n.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),n.useModules(),n.emit("_swiper"),n.params.init&&n.init(),n}}var i,s,a,r=t.prototype;return r.emitContainerClasses=function(){var e=this;if(e.params._emitClasses&&e.el){var t=e.el.className.split(" ").filter((function(t){return 0===t.indexOf("swiper-container")||0===t.indexOf(e.params.containerModifierClass)}));e.emit("_containerClasses",t.join(" "))}},r.emitSlidesClasses=function(){var e=this;e.params._emitClasses&&e.el&&e.slides.each((function(t){var i=t.className.split(" ").filter((function(t){return 0===t.indexOf("swiper-slide")||0===t.indexOf(e.params.slideClass)}));e.emit("_slideClass",t,i.join(" "))}))},r.slidesPerViewDynamic=function(){var e=this.params,t=this.slides,i=this.slidesGrid,s=this.size,a=this.activeIndex,r=1;if(e.centeredSlides){for(var n,l=t[a].swiperSlideSize,o=a+1;os&&(n=!0));for(var d=a-1;d>=0;d-=1)t[d]&&!n&&(r+=1,(l+=t[d].swiperSlideSize)>s&&(n=!0))}else for(var h=a+1;h1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0))||s(),i.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}function s(){var t=e.rtlTranslate?-1*e.translate:e.translate,i=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(i),e.updateActiveIndex(),e.updateSlidesClasses()}},r.changeDirection=function(e,t){void 0===t&&(t=!0);var i=this.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(this.$el.removeClass(""+this.params.containerModifierClass+i).addClass(""+this.params.containerModifierClass+e),this.emitContainerClasses(),this.params.direction=e,this.slides.each((function(t){"vertical"===e?t.style.width="":t.style.height=""})),this.emit("changeDirection"),t&&this.update()),this},r.init=function(){this.initialized||(this.emit("beforeInit"),this.params.breakpoints&&this.setBreakpoint(),this.addClasses(),this.params.loop&&this.loopCreate(),this.updateSize(),this.updateSlides(),this.params.watchOverflow&&this.checkOverflow(),this.params.grabCursor&&this.setGrabCursor(),this.params.preloadImages&&this.preloadImages(),this.params.loop?this.slideTo(this.params.initialSlide+this.loopedSlides,0,this.params.runCallbacksOnInit):this.slideTo(this.params.initialSlide,0,this.params.runCallbacksOnInit),this.attachEvents(),this.initialized=!0,this.emit("init"))},r.destroy=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var i,s=this,a=s.params,r=s.$el,n=s.$wrapperEl,l=s.slides;return void 0===s.params||s.destroyed||(s.emit("beforeDestroy"),s.initialized=!1,s.detachEvents(),a.loop&&s.loopDestroy(),t&&(s.removeClasses(),r.removeAttr("style"),n.removeAttr("style"),l&&l.length&&l.removeClass([a.slideVisibleClass,a.slideActiveClass,a.slideNextClass,a.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),s.emit("destroy"),Object.keys(s.eventsListeners).forEach((function(e){s.off(e)})),!1!==e&&(s.$el[0].swiper=null,i=s,Object.keys(i).forEach((function(e){try{i[e]=null}catch(e){}try{delete i[e]}catch(e){}}))),s.destroyed=!0),null},t.extendDefaults=function(e){S(F,e)},t.installModule=function(e){t.prototype.modules||(t.prototype.modules={});var i=e.name||Object.keys(t.prototype.modules).length+"_"+x();t.prototype.modules[i]=e},t.use=function(e){return Array.isArray(e)?(e.forEach((function(e){return t.installModule(e)})),t):(t.installModule(e),t)},i=t,a=[{key:"extendedDefaults",get:function(){return F}},{key:"defaults",get:function(){return Y}}],(s=null)&&e(i.prototype,s),a&&e(i,a),t}();W.use([$,I]);var R={update:function(e){var t=this,i=t.params,s=i.slidesPerView,a=i.slidesPerGroup,r=i.centeredSlides,n=t.params.virtual,l=n.addSlidesBefore,o=n.addSlidesAfter,d=t.virtual,h=d.from,p=d.to,u=d.slides,c=d.slidesGrid,v=d.renderSlide,f=d.offset;t.updateActiveIndex();var m,g,w,b=t.activeIndex||0;m=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",r?(g=Math.floor(s/2)+a+o,w=Math.floor(s/2)+a+l):(g=s+(a-1)+o,w=a+l);var y=Math.max((b||0)-w,0),E=Math.min((b||0)+g,u.length-1),x=(t.slidesGrid[y]||0)-(t.slidesGrid[0]||0);function T(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if(S(t.virtual,{from:y,to:E,offset:x,slidesGrid:t.slidesGrid}),h===y&&p===E&&!e)return t.slidesGrid!==c&&x!==f&&t.slides.css(m,x+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:x,from:y,to:E,slides:function(){for(var e=[],t=y;t<=E;t+=1)e.push(u[t]);return e}()}),void(t.params.virtual.renderExternalUpdate&&T());var C=[],M=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(var z=h;z<=p;z+=1)(zE)&&t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+z+'"]').remove();for(var P=0;P=y&&P<=E&&(void 0===p||e?M.push(P):(P>p&&M.push(P),P'+e+"");return s.attr("data-swiper-slide-index")||s.attr("data-swiper-slide-index",t),i.cache&&(this.virtual.cache[t]=s),s},appendSlide:function(e){if("object"==typeof e&&"length"in e)for(var t=0;t=0;i-=1)this.virtual.slides.splice(e[i],1),this.params.virtual.cache&&delete this.virtual.cache[e[i]],e[i]0&&0===this.$el.parents("."+this.params.slideActiveClass).length)return;var m=t.innerWidth,g=t.innerHeight,w=this.$el.offset();s&&(w.left-=this.$el[0].scrollLeft);for(var b=[[w.left,w.top],[w.left+this.width,w.top],[w.left,w.top+this.height],[w.left+this.width,w.top+this.height]],y=0;y=0&&E[0]<=m&&E[1]>=0&&E[1]<=g&&(f=!0)}if(!f)return}this.isHorizontal()?((d||h||p||u)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),((h||u)&&!s||(d||p)&&s)&&this.slideNext(),((d||p)&&!s||(h||u)&&s)&&this.slidePrev()):((d||h||c||v)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),(h||v)&&this.slideNext(),(d||c)&&this.slidePrev()),this.emit("keyPress",n)}},enable:function(){var e=r();this.keyboard.enabled||(m(e).on("keydown",this.keyboard.handle),this.keyboard.enabled=!0)},disable:function(){var e=r();this.keyboard.enabled&&(m(e).off("keydown",this.keyboard.handle),this.keyboard.enabled=!1)}},_={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}},create:function(){M(this,{keyboard:t({enabled:!1},j)})},on:{init:function(e){e.params.keyboard.enabled&&e.keyboard.enable()},destroy:function(e){e.keyboard.enabled&&e.keyboard.disable()}}};var U={lastScrollTime:x(),lastEventBeforeSnap:void 0,recentWheelEvents:[],event:function(){return l().navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){var e=r(),t="onwheel"in e;if(!t){var i=e.createElement("div");i.setAttribute("onwheel","return;"),t="function"==typeof i.onwheel}return!t&&e.implementation&&e.implementation.hasFeature&&!0!==e.implementation.hasFeature("","")&&(t=e.implementation.hasFeature("Events.wheel","3.0")),t}()?"wheel":"mousewheel"},normalize:function(e){var t=0,i=0,s=0,a=0;return"detail"in e&&(i=e.detail),"wheelDelta"in e&&(i=-e.wheelDelta/120),"wheelDeltaY"in e&&(i=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=i,i=0),s=10*t,a=10*i,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(s=e.deltaX),e.shiftKey&&!s&&(s=a,a=0),(s||a)&&e.deltaMode&&(1===e.deltaMode?(s*=40,a*=40):(s*=800,a*=800)),s&&!t&&(t=s<1?-1:1),a&&!i&&(i=a<1?-1:1),{spinX:t,spinY:i,pixelX:s,pixelY:a}},handleMouseEnter:function(){this.mouseEntered=!0},handleMouseLeave:function(){this.mouseEntered=!1},handle:function(e){var t=e,i=this,s=i.params.mousewheel;i.params.cssMode&&t.preventDefault();var a=i.$el;if("container"!==i.params.mousewheel.eventsTarget&&(a=m(i.params.mousewheel.eventsTarget)),!i.mouseEntered&&!a[0].contains(t.target)&&!s.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);var r=0,n=i.rtlTranslate?-1:1,l=U.normalize(t);if(s.forceToAxis)if(i.isHorizontal()){if(!(Math.abs(l.pixelX)>Math.abs(l.pixelY)))return!0;r=-l.pixelX*n}else{if(!(Math.abs(l.pixelY)>Math.abs(l.pixelX)))return!0;r=-l.pixelY}else r=Math.abs(l.pixelX)>Math.abs(l.pixelY)?-l.pixelX*n:-l.pixelY;if(0===r)return!0;if(s.invert&&(r=-r),i.params.freeMode){var o={time:x(),delta:Math.abs(r),direction:Math.sign(r)},d=i.mousewheel.lastEventBeforeSnap,h=d&&o.time=i.minTranslate()&&(p=i.minTranslate()),p<=i.maxTranslate()&&(p=i.maxTranslate()),i.setTransition(0),i.setTranslate(p),i.updateProgress(),i.updateActiveIndex(),i.updateSlidesClasses(),(!u&&i.isBeginning||!c&&i.isEnd)&&i.updateSlidesClasses(),i.params.freeModeSticky){clearTimeout(i.mousewheel.timeout),i.mousewheel.timeout=void 0;var v=i.mousewheel.recentWheelEvents;v.length>=15&&v.shift();var f=v.length?v[v.length-1]:void 0,g=v[0];if(v.push(o),f&&(o.delta>f.delta||o.direction!==f.direction))v.splice(0);else if(v.length>=15&&o.time-g.time<500&&g.delta-o.delta>=1&&o.delta<=6){var w=r>0?.8:.2;i.mousewheel.lastEventBeforeSnap=o,v.splice(0),i.mousewheel.timeout=E((function(){i.slideToClosest(i.params.speed,!0,void 0,w)}),0)}i.mousewheel.timeout||(i.mousewheel.timeout=E((function(){i.mousewheel.lastEventBeforeSnap=o,v.splice(0),i.slideToClosest(i.params.speed,!0,void 0,.5)}),500))}if(h||i.emit("scroll",t),i.params.autoplay&&i.params.autoplayDisableOnInteraction&&i.autoplay.stop(),p===i.minTranslate()||p===i.maxTranslate())return!0}}else{var b={time:x(),delta:Math.abs(r),direction:Math.sign(r),raw:e},y=i.mousewheel.recentWheelEvents;y.length>=2&&y.shift();var T=y.length?y[y.length-1]:void 0;if(y.push(b),T?(b.direction!==T.direction||b.delta>T.delta||b.time>T.time+150)&&i.mousewheel.animateSlider(b):i.mousewheel.animateSlider(b),i.mousewheel.releaseScroll(b))return!0}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1},animateSlider:function(e){var t=l();return!(this.params.mousewheel.thresholdDelta&&e.delta=6&&x()-this.mousewheel.lastScrollTime<60||(e.direction<0?this.isEnd&&!this.params.loop||this.animating||(this.slideNext(),this.emit("scroll",e.raw)):this.isBeginning&&!this.params.loop||this.animating||(this.slidePrev(),this.emit("scroll",e.raw)),this.mousewheel.lastScrollTime=(new t.Date).getTime(),!1)))},releaseScroll:function(e){var t=this.params.mousewheel;if(e.direction<0){if(this.isEnd&&!this.params.loop&&t.releaseOnEdges)return!0}else if(this.isBeginning&&!this.params.loop&&t.releaseOnEdges)return!0;return!1},enable:function(){var e=U.event();if(this.params.cssMode)return this.wrapperEl.removeEventListener(e,this.mousewheel.handle),!0;if(!e)return!1;if(this.mousewheel.enabled)return!1;var t=this.$el;return"container"!==this.params.mousewheel.eventsTarget&&(t=m(this.params.mousewheel.eventsTarget)),t.on("mouseenter",this.mousewheel.handleMouseEnter),t.on("mouseleave",this.mousewheel.handleMouseLeave),t.on(e,this.mousewheel.handle),this.mousewheel.enabled=!0,!0},disable:function(){var e=U.event();if(this.params.cssMode)return this.wrapperEl.addEventListener(e,this.mousewheel.handle),!0;if(!e)return!1;if(!this.mousewheel.enabled)return!1;var t=this.$el;return"container"!==this.params.mousewheel.eventsTarget&&(t=m(this.params.mousewheel.eventsTarget)),t.off(e,this.mousewheel.handle),this.mousewheel.enabled=!1,!0}},K={update:function(){var e=this.params.navigation;if(!this.params.loop){var t=this.navigation,i=t.$nextEl,s=t.$prevEl;s&&s.length>0&&(this.isBeginning?s.addClass(e.disabledClass):s.removeClass(e.disabledClass),s[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](e.lockClass)),i&&i.length>0&&(this.isEnd?i.addClass(e.disabledClass):i.removeClass(e.disabledClass),i[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](e.lockClass))}},onPrevClick:function(e){e.preventDefault(),this.isBeginning&&!this.params.loop||this.slidePrev()},onNextClick:function(e){e.preventDefault(),this.isEnd&&!this.params.loop||this.slideNext()},init:function(){var e,t,i=this.params.navigation;(i.nextEl||i.prevEl)&&(i.nextEl&&(e=m(i.nextEl),this.params.uniqueNavElements&&"string"==typeof i.nextEl&&e.length>1&&1===this.$el.find(i.nextEl).length&&(e=this.$el.find(i.nextEl))),i.prevEl&&(t=m(i.prevEl),this.params.uniqueNavElements&&"string"==typeof i.prevEl&&t.length>1&&1===this.$el.find(i.prevEl).length&&(t=this.$el.find(i.prevEl))),e&&e.length>0&&e.on("click",this.navigation.onNextClick),t&&t.length>0&&t.on("click",this.navigation.onPrevClick),S(this.navigation,{$nextEl:e,nextEl:e&&e[0],$prevEl:t,prevEl:t&&t[0]}))},destroy:function(){var e=this.navigation,t=e.$nextEl,i=e.$prevEl;t&&t.length&&(t.off("click",this.navigation.onNextClick),t.removeClass(this.params.navigation.disabledClass)),i&&i.length&&(i.off("click",this.navigation.onPrevClick),i.removeClass(this.params.navigation.disabledClass))}},Z={update:function(){var e=this.rtl,t=this.params.pagination;if(t.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var i,s=this.virtual&&this.params.virtual.enabled?this.virtual.slides.length:this.slides.length,a=this.pagination.$el,r=this.params.loop?Math.ceil((s-2*this.loopedSlides)/this.params.slidesPerGroup):this.snapGrid.length;if(this.params.loop?((i=Math.ceil((this.activeIndex-this.loopedSlides)/this.params.slidesPerGroup))>s-1-2*this.loopedSlides&&(i-=s-2*this.loopedSlides),i>r-1&&(i-=r),i<0&&"bullets"!==this.params.paginationType&&(i=r+i)):i=void 0!==this.snapIndex?this.snapIndex:this.activeIndex||0,"bullets"===t.type&&this.pagination.bullets&&this.pagination.bullets.length>0){var n,l,o,d=this.pagination.bullets;if(t.dynamicBullets&&(this.pagination.bulletSize=d.eq(0)[this.isHorizontal()?"outerWidth":"outerHeight"](!0),a.css(this.isHorizontal()?"width":"height",this.pagination.bulletSize*(t.dynamicMainBullets+4)+"px"),t.dynamicMainBullets>1&&void 0!==this.previousIndex&&(this.pagination.dynamicBulletIndex+=i-this.previousIndex,this.pagination.dynamicBulletIndex>t.dynamicMainBullets-1?this.pagination.dynamicBulletIndex=t.dynamicMainBullets-1:this.pagination.dynamicBulletIndex<0&&(this.pagination.dynamicBulletIndex=0)),n=i-this.pagination.dynamicBulletIndex,o=((l=n+(Math.min(d.length,t.dynamicMainBullets)-1))+n)/2),d.removeClass(t.bulletActiveClass+" "+t.bulletActiveClass+"-next "+t.bulletActiveClass+"-next-next "+t.bulletActiveClass+"-prev "+t.bulletActiveClass+"-prev-prev "+t.bulletActiveClass+"-main"),a.length>1)d.each((function(e){var s=m(e),a=s.index();a===i&&s.addClass(t.bulletActiveClass),t.dynamicBullets&&(a>=n&&a<=l&&s.addClass(t.bulletActiveClass+"-main"),a===n&&s.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),a===l&&s.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next"))}));else{var h=d.eq(i),p=h.index();if(h.addClass(t.bulletActiveClass),t.dynamicBullets){for(var u=d.eq(n),c=d.eq(l),v=n;v<=l;v+=1)d.eq(v).addClass(t.bulletActiveClass+"-main");if(this.params.loop)if(p>=d.length-t.dynamicMainBullets){for(var f=t.dynamicMainBullets;f>=0;f-=1)d.eq(d.length-f).addClass(t.bulletActiveClass+"-main");d.eq(d.length-t.dynamicMainBullets-1).addClass(t.bulletActiveClass+"-prev")}else u.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),c.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next");else u.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),c.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next")}}if(t.dynamicBullets){var g=Math.min(d.length,t.dynamicMainBullets+4),w=(this.pagination.bulletSize*g-this.pagination.bulletSize)/2-o*this.pagination.bulletSize,b=e?"right":"left";d.css(this.isHorizontal()?b:"top",w+"px")}}if("fraction"===t.type&&(a.find("."+t.currentClass).text(t.formatFractionCurrent(i+1)),a.find("."+t.totalClass).text(t.formatFractionTotal(r))),"progressbar"===t.type){var y;y=t.progressbarOpposite?this.isHorizontal()?"vertical":"horizontal":this.isHorizontal()?"horizontal":"vertical";var E=(i+1)/r,x=1,T=1;"horizontal"===y?x=E:T=E,a.find("."+t.progressbarFillClass).transform("translate3d(0,0,0) scaleX("+x+") scaleY("+T+")").transition(this.params.speed)}"custom"===t.type&&t.renderCustom?(a.html(t.renderCustom(this,i+1,r)),this.emit("paginationRender",a[0])):this.emit("paginationUpdate",a[0]),a[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](t.lockClass)}},render:function(){var e=this.params.pagination;if(e.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var t=this.virtual&&this.params.virtual.enabled?this.virtual.slides.length:this.slides.length,i=this.pagination.$el,s="";if("bullets"===e.type){for(var a=this.params.loop?Math.ceil((t-2*this.loopedSlides)/this.params.slidesPerGroup):this.snapGrid.length,r=0;r";i.html(s),this.pagination.bullets=i.find("."+e.bulletClass)}"fraction"===e.type&&(s=e.renderFraction?e.renderFraction.call(this,e.currentClass,e.totalClass):' / ',i.html(s)),"progressbar"===e.type&&(s=e.renderProgressbar?e.renderProgressbar.call(this,e.progressbarFillClass):'',i.html(s)),"custom"!==e.type&&this.emit("paginationRender",this.pagination.$el[0])}},init:function(){var e=this,t=e.params.pagination;if(t.el){var i=m(t.el);0!==i.length&&(e.params.uniqueNavElements&&"string"==typeof t.el&&i.length>1&&(i=e.$el.find(t.el)),"bullets"===t.type&&t.clickable&&i.addClass(t.clickableClass),i.addClass(t.modifierClass+t.type),"bullets"===t.type&&t.dynamicBullets&&(i.addClass(""+t.modifierClass+t.type+"-dynamic"),e.pagination.dynamicBulletIndex=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&i.addClass(t.progressbarOppositeClass),t.clickable&&i.on("click","."+t.bulletClass,(function(t){t.preventDefault();var i=m(this).index()*e.params.slidesPerGroup;e.params.loop&&(i+=e.loopedSlides),e.slideTo(i)})),S(e.pagination,{$el:i,el:i[0]}))}},destroy:function(){var e=this.params.pagination;if(e.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var t=this.pagination.$el;t.removeClass(e.hiddenClass),t.removeClass(e.modifierClass+e.type),this.pagination.bullets&&this.pagination.bullets.removeClass(e.bulletActiveClass),e.clickable&&t.off("click","."+e.bulletClass)}}},J={setTranslate:function(){if(this.params.scrollbar.el&&this.scrollbar.el){var e=this.scrollbar,t=this.rtlTranslate,i=this.progress,s=e.dragSize,a=e.trackSize,r=e.$dragEl,n=e.$el,l=this.params.scrollbar,o=s,d=(a-s)*i;t?(d=-d)>0?(o=s-d,d=0):-d+s>a&&(o=a+d):d<0?(o=s+d,d=0):d+s>a&&(o=a-d),this.isHorizontal()?(r.transform("translate3d("+d+"px, 0, 0)"),r[0].style.width=o+"px"):(r.transform("translate3d(0px, "+d+"px, 0)"),r[0].style.height=o+"px"),l.hide&&(clearTimeout(this.scrollbar.timeout),n[0].style.opacity=1,this.scrollbar.timeout=setTimeout((function(){n[0].style.opacity=0,n.transition(400)}),1e3))}},setTransition:function(e){this.params.scrollbar.el&&this.scrollbar.el&&this.scrollbar.$dragEl.transition(e)},updateSize:function(){if(this.params.scrollbar.el&&this.scrollbar.el){var e=this.scrollbar,t=e.$dragEl,i=e.$el;t[0].style.width="",t[0].style.height="";var s,a=this.isHorizontal()?i[0].offsetWidth:i[0].offsetHeight,r=this.size/this.virtualSize,n=r*(a/this.size);s="auto"===this.params.scrollbar.dragSize?a*r:parseInt(this.params.scrollbar.dragSize,10),this.isHorizontal()?t[0].style.width=s+"px":t[0].style.height=s+"px",i[0].style.display=r>=1?"none":"",this.params.scrollbar.hide&&(i[0].style.opacity=0),S(e,{trackSize:a,divider:r,moveDivider:n,dragSize:s}),e.$el[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](this.params.scrollbar.lockClass)}},getPointerPosition:function(e){return this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientX:e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientY:e.clientY},setDragPosition:function(e){var t,i=this.scrollbar,s=this.rtlTranslate,a=i.$el,r=i.dragSize,n=i.trackSize,l=i.dragStartPos;t=(i.getPointerPosition(e)-a.offset()[this.isHorizontal()?"left":"top"]-(null!==l?l:r/2))/(n-r),t=Math.max(Math.min(t,1),0),s&&(t=1-t);var o=this.minTranslate()+(this.maxTranslate()-this.minTranslate())*t;this.updateProgress(o),this.setTranslate(o),this.updateActiveIndex(),this.updateSlidesClasses()},onDragStart:function(e){var t=this.params.scrollbar,i=this.scrollbar,s=this.$wrapperEl,a=i.$el,r=i.$dragEl;this.scrollbar.isTouched=!0,this.scrollbar.dragStartPos=e.target===r[0]||e.target===r?i.getPointerPosition(e)-e.target.getBoundingClientRect()[this.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),s.transition(100),r.transition(100),i.setDragPosition(e),clearTimeout(this.scrollbar.dragTimeout),a.transition(0),t.hide&&a.css("opacity",1),this.params.cssMode&&this.$wrapperEl.css("scroll-snap-type","none"),this.emit("scrollbarDragStart",e)},onDragMove:function(e){var t=this.scrollbar,i=this.$wrapperEl,s=t.$el,a=t.$dragEl;this.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,t.setDragPosition(e),i.transition(0),s.transition(0),a.transition(0),this.emit("scrollbarDragMove",e))},onDragEnd:function(e){var t=this.params.scrollbar,i=this.scrollbar,s=this.$wrapperEl,a=i.$el;this.scrollbar.isTouched&&(this.scrollbar.isTouched=!1,this.params.cssMode&&(this.$wrapperEl.css("scroll-snap-type",""),s.transition("")),t.hide&&(clearTimeout(this.scrollbar.dragTimeout),this.scrollbar.dragTimeout=E((function(){a.css("opacity",0),a.transition(400)}),1e3)),this.emit("scrollbarDragEnd",e),t.snapOnRelease&&this.slideToClosest())},enableDraggable:function(){if(this.params.scrollbar.el){var e=r(),t=this.scrollbar,i=this.touchEventsTouch,s=this.touchEventsDesktop,a=this.params,n=this.support,l=t.$el[0],o=!(!n.passiveListener||!a.passiveListeners)&&{passive:!1,capture:!1},d=!(!n.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};n.touch?(l.addEventListener(i.start,this.scrollbar.onDragStart,o),l.addEventListener(i.move,this.scrollbar.onDragMove,o),l.addEventListener(i.end,this.scrollbar.onDragEnd,d)):(l.addEventListener(s.start,this.scrollbar.onDragStart,o),e.addEventListener(s.move,this.scrollbar.onDragMove,o),e.addEventListener(s.end,this.scrollbar.onDragEnd,d))}},disableDraggable:function(){if(this.params.scrollbar.el){var e=r(),t=this.scrollbar,i=this.touchEventsTouch,s=this.touchEventsDesktop,a=this.params,n=this.support,l=t.$el[0],o=!(!n.passiveListener||!a.passiveListeners)&&{passive:!1,capture:!1},d=!(!n.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};n.touch?(l.removeEventListener(i.start,this.scrollbar.onDragStart,o),l.removeEventListener(i.move,this.scrollbar.onDragMove,o),l.removeEventListener(i.end,this.scrollbar.onDragEnd,d)):(l.removeEventListener(s.start,this.scrollbar.onDragStart,o),e.removeEventListener(s.move,this.scrollbar.onDragMove,o),e.removeEventListener(s.end,this.scrollbar.onDragEnd,d))}},init:function(){if(this.params.scrollbar.el){var e=this.scrollbar,t=this.$el,i=this.params.scrollbar,s=m(i.el);this.params.uniqueNavElements&&"string"==typeof i.el&&s.length>1&&1===t.find(i.el).length&&(s=t.find(i.el));var a=s.find("."+this.params.scrollbar.dragClass);0===a.length&&(a=m('
'),s.append(a)),S(e,{$el:s,el:s[0],$dragEl:a,dragEl:a[0]}),i.draggable&&e.enableDraggable()}},destroy:function(){this.scrollbar.disableDraggable()}},Q={setTransform:function(e,t){var i=this.rtl,s=m(e),a=i?-1:1,r=s.attr("data-swiper-parallax")||"0",n=s.attr("data-swiper-parallax-x"),l=s.attr("data-swiper-parallax-y"),o=s.attr("data-swiper-parallax-scale"),d=s.attr("data-swiper-parallax-opacity");if(n||l?(n=n||"0",l=l||"0"):this.isHorizontal()?(n=r,l="0"):(l=r,n="0"),n=n.indexOf("%")>=0?parseInt(n,10)*t*a+"%":n*t*a+"px",l=l.indexOf("%")>=0?parseInt(l,10)*t+"%":l*t+"px",null!=d){var h=d-(d-1)*(1-Math.abs(t));s[0].style.opacity=h}if(null==o)s.transform("translate3d("+n+", "+l+", 0px)");else{var p=o-(o-1)*(1-Math.abs(t));s.transform("translate3d("+n+", "+l+", 0px) scale("+p+")")}},setTranslate:function(){var e=this,t=e.$el,i=e.slides,s=e.progress,a=e.snapGrid;t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t){e.parallax.setTransform(t,s)})),i.each((function(t,i){var r=t.progress;e.params.slidesPerGroup>1&&"auto"!==e.params.slidesPerView&&(r+=Math.ceil(i/2)-s*(a.length-1)),r=Math.min(Math.max(r,-1),1),m(t).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t){e.parallax.setTransform(t,r)}))}))},setTransition:function(e){void 0===e&&(e=this.params.speed);this.$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t){var i=m(t),s=parseInt(i.attr("data-swiper-parallax-duration"),10)||e;0===e&&(s=0),i.transition(s)}))}},ee={getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var t=e.targetTouches[0].pageX,i=e.targetTouches[0].pageY,s=e.targetTouches[1].pageX,a=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(s-t,2)+Math.pow(a-i,2))},onGestureStart:function(e){var t=this.support,i=this.params.zoom,s=this.zoom,a=s.gesture;if(s.fakeGestureTouched=!1,s.fakeGestureMoved=!1,!t.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;s.fakeGestureTouched=!0,a.scaleStart=ee.getDistanceBetweenTouches(e)}a.$slideEl&&a.$slideEl.length||(a.$slideEl=m(e.target).closest("."+this.params.slideClass),0===a.$slideEl.length&&(a.$slideEl=this.slides.eq(this.activeIndex)),a.$imageEl=a.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),a.$imageWrapEl=a.$imageEl.parent("."+i.containerClass),a.maxRatio=a.$imageWrapEl.attr("data-swiper-zoom")||i.maxRatio,0!==a.$imageWrapEl.length)?(a.$imageEl&&a.$imageEl.transition(0),this.zoom.isScaling=!0):a.$imageEl=void 0},onGestureChange:function(e){var t=this.support,i=this.params.zoom,s=this.zoom,a=s.gesture;if(!t.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;s.fakeGestureMoved=!0,a.scaleMove=ee.getDistanceBetweenTouches(e)}a.$imageEl&&0!==a.$imageEl.length?(t.gestures?s.scale=e.scale*s.currentScale:s.scale=a.scaleMove/a.scaleStart*s.currentScale,s.scale>a.maxRatio&&(s.scale=a.maxRatio-1+Math.pow(s.scale-a.maxRatio+1,.5)),s.scales.touchesStart.x))return void(s.isTouched=!1);if(!this.isHorizontal()&&(Math.floor(s.minY)===Math.floor(s.startY)&&s.touchesCurrent.ys.touchesStart.y))return void(s.isTouched=!1)}e.cancelable&&e.preventDefault(),e.stopPropagation(),s.isMoved=!0,s.currentX=s.touchesCurrent.x-s.touchesStart.x+s.startX,s.currentY=s.touchesCurrent.y-s.touchesStart.y+s.startY,s.currentXs.maxX&&(s.currentX=s.maxX-1+Math.pow(s.currentX-s.maxX+1,.8)),s.currentYs.maxY&&(s.currentY=s.maxY-1+Math.pow(s.currentY-s.maxY+1,.8)),a.prevPositionX||(a.prevPositionX=s.touchesCurrent.x),a.prevPositionY||(a.prevPositionY=s.touchesCurrent.y),a.prevTime||(a.prevTime=Date.now()),a.x=(s.touchesCurrent.x-a.prevPositionX)/(Date.now()-a.prevTime)/2,a.y=(s.touchesCurrent.y-a.prevPositionY)/(Date.now()-a.prevTime)/2,Math.abs(s.touchesCurrent.x-a.prevPositionX)<2&&(a.x=0),Math.abs(s.touchesCurrent.y-a.prevPositionY)<2&&(a.y=0),a.prevPositionX=s.touchesCurrent.x,a.prevPositionY=s.touchesCurrent.y,a.prevTime=Date.now(),i.$imageWrapEl.transform("translate3d("+s.currentX+"px, "+s.currentY+"px,0)")}}},onTouchEnd:function(){var e=this.zoom,t=e.gesture,i=e.image,s=e.velocity;if(t.$imageEl&&0!==t.$imageEl.length){if(!i.isTouched||!i.isMoved)return i.isTouched=!1,void(i.isMoved=!1);i.isTouched=!1,i.isMoved=!1;var a=300,r=300,n=s.x*a,l=i.currentX+n,o=s.y*r,d=i.currentY+o;0!==s.x&&(a=Math.abs((l-i.currentX)/s.x)),0!==s.y&&(r=Math.abs((d-i.currentY)/s.y));var h=Math.max(a,r);i.currentX=l,i.currentY=d;var p=i.width*e.scale,u=i.height*e.scale;i.minX=Math.min(t.slideWidth/2-p/2,0),i.maxX=-i.minX,i.minY=Math.min(t.slideHeight/2-u/2,0),i.maxY=-i.minY,i.currentX=Math.max(Math.min(i.currentX,i.maxX),i.minX),i.currentY=Math.max(Math.min(i.currentY,i.maxY),i.minY),t.$imageWrapEl.transition(h).transform("translate3d("+i.currentX+"px, "+i.currentY+"px,0)")}},onTransitionEnd:function(){var e=this.zoom,t=e.gesture;t.$slideEl&&this.previousIndex!==this.activeIndex&&(t.$imageEl&&t.$imageEl.transform("translate3d(0,0,0) scale(1)"),t.$imageWrapEl&&t.$imageWrapEl.transform("translate3d(0,0,0)"),e.scale=1,e.currentScale=1,t.$slideEl=void 0,t.$imageEl=void 0,t.$imageWrapEl=void 0)},toggle:function(e){var t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in:function(e){var t,i,s,a,r,n,l,o,d,h,p,u,c,v,f,m,g=this.zoom,w=this.params.zoom,b=g.gesture,y=g.image;(b.$slideEl||(this.params.virtual&&this.params.virtual.enabled&&this.virtual?b.$slideEl=this.$wrapperEl.children("."+this.params.slideActiveClass):b.$slideEl=this.slides.eq(this.activeIndex),b.$imageEl=b.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),b.$imageWrapEl=b.$imageEl.parent("."+w.containerClass)),b.$imageEl&&0!==b.$imageEl.length)&&(b.$slideEl.addClass(""+w.zoomedSlideClass),void 0===y.touchesStart.x&&e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,i="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=y.touchesStart.x,i=y.touchesStart.y),g.scale=b.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,g.currentScale=b.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,e?(f=b.$slideEl[0].offsetWidth,m=b.$slideEl[0].offsetHeight,s=b.$slideEl.offset().left+f/2-t,a=b.$slideEl.offset().top+m/2-i,l=b.$imageEl[0].offsetWidth,o=b.$imageEl[0].offsetHeight,d=l*g.scale,h=o*g.scale,c=-(p=Math.min(f/2-d/2,0)),v=-(u=Math.min(m/2-h/2,0)),(r=s*g.scale)c&&(r=c),(n=a*g.scale)v&&(n=v)):(r=0,n=0),b.$imageWrapEl.transition(300).transform("translate3d("+r+"px, "+n+"px,0)"),b.$imageEl.transition(300).transform("translate3d(0,0,0) scale("+g.scale+")"))},out:function(){var e=this.zoom,t=this.params.zoom,i=e.gesture;i.$slideEl||(this.params.virtual&&this.params.virtual.enabled&&this.virtual?i.$slideEl=this.$wrapperEl.children("."+this.params.slideActiveClass):i.$slideEl=this.slides.eq(this.activeIndex),i.$imageEl=i.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),i.$imageWrapEl=i.$imageEl.parent("."+t.containerClass)),i.$imageEl&&0!==i.$imageEl.length&&(e.scale=1,e.currentScale=1,i.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),i.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),i.$slideEl.removeClass(""+t.zoomedSlideClass),i.$slideEl=void 0)},toggleGestures:function(e){var t=this.zoom,i=t.slideSelector,s=t.passiveListener;this.$wrapperEl[e]("gesturestart",i,t.onGestureStart,s),this.$wrapperEl[e]("gesturechange",i,t.onGestureChange,s),this.$wrapperEl[e]("gestureend",i,t.onGestureEnd,s)},enableGestures:function(){this.zoom.gesturesEnabled||(this.zoom.gesturesEnabled=!0,this.zoom.toggleGestures("on"))},disableGestures:function(){this.zoom.gesturesEnabled&&(this.zoom.gesturesEnabled=!1,this.zoom.toggleGestures("off"))},enable:function(){var e=this.support,t=this.zoom;if(!t.enabled){t.enabled=!0;var i=!("touchstart"!==this.touchEvents.start||!e.passiveListener||!this.params.passiveListeners)&&{passive:!0,capture:!1},s=!e.passiveListener||{passive:!1,capture:!0},a="."+this.params.slideClass;this.zoom.passiveListener=i,this.zoom.slideSelector=a,e.gestures?(this.$wrapperEl.on(this.touchEvents.start,this.zoom.enableGestures,i),this.$wrapperEl.on(this.touchEvents.end,this.zoom.disableGestures,i)):"touchstart"===this.touchEvents.start&&(this.$wrapperEl.on(this.touchEvents.start,a,t.onGestureStart,i),this.$wrapperEl.on(this.touchEvents.move,a,t.onGestureChange,s),this.$wrapperEl.on(this.touchEvents.end,a,t.onGestureEnd,i),this.touchEvents.cancel&&this.$wrapperEl.on(this.touchEvents.cancel,a,t.onGestureEnd,i)),this.$wrapperEl.on(this.touchEvents.move,"."+this.params.zoom.containerClass,t.onTouchMove,s)}},disable:function(){var e=this.zoom;if(e.enabled){var t=this.support;this.zoom.enabled=!1;var i=!("touchstart"!==this.touchEvents.start||!t.passiveListener||!this.params.passiveListeners)&&{passive:!0,capture:!1},s=!t.passiveListener||{passive:!1,capture:!0},a="."+this.params.slideClass;t.gestures?(this.$wrapperEl.off(this.touchEvents.start,this.zoom.enableGestures,i),this.$wrapperEl.off(this.touchEvents.end,this.zoom.disableGestures,i)):"touchstart"===this.touchEvents.start&&(this.$wrapperEl.off(this.touchEvents.start,a,e.onGestureStart,i),this.$wrapperEl.off(this.touchEvents.move,a,e.onGestureChange,s),this.$wrapperEl.off(this.touchEvents.end,a,e.onGestureEnd,i),this.touchEvents.cancel&&this.$wrapperEl.off(this.touchEvents.cancel,a,e.onGestureEnd,i)),this.$wrapperEl.off(this.touchEvents.move,"."+this.params.zoom.containerClass,e.onTouchMove,s)}}},te={loadInSlide:function(e,t){void 0===t&&(t=!0);var i=this,s=i.params.lazy;if(void 0!==e&&0!==i.slides.length){var a=i.virtual&&i.params.virtual.enabled?i.$wrapperEl.children("."+i.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):i.slides.eq(e),r=a.find("."+s.elementClass+":not(."+s.loadedClass+"):not(."+s.loadingClass+")");!a.hasClass(s.elementClass)||a.hasClass(s.loadedClass)||a.hasClass(s.loadingClass)||r.push(a[0]),0!==r.length&&r.each((function(e){var r=m(e);r.addClass(s.loadingClass);var n=r.attr("data-background"),l=r.attr("data-src"),o=r.attr("data-srcset"),d=r.attr("data-sizes"),h=r.parent("picture");i.loadImage(r[0],l||n,o,d,!1,(function(){if(null!=i&&i&&(!i||i.params)&&!i.destroyed){if(n?(r.css("background-image",'url("'+n+'")'),r.removeAttr("data-background")):(o&&(r.attr("srcset",o),r.removeAttr("data-srcset")),d&&(r.attr("sizes",d),r.removeAttr("data-sizes")),h.length&&h.children("source").each((function(e){var t=m(e);t.attr("data-srcset")&&(t.attr("srcset",t.attr("data-srcset")),t.removeAttr("data-srcset"))})),l&&(r.attr("src",l),r.removeAttr("data-src"))),r.addClass(s.loadedClass).removeClass(s.loadingClass),a.find("."+s.preloaderClass).remove(),i.params.loop&&t){var e=a.attr("data-swiper-slide-index");if(a.hasClass(i.params.slideDuplicateClass)){var p=i.$wrapperEl.children('[data-swiper-slide-index="'+e+'"]:not(.'+i.params.slideDuplicateClass+")");i.lazy.loadInSlide(p.index(),!1)}else{var u=i.$wrapperEl.children("."+i.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');i.lazy.loadInSlide(u.index(),!1)}}i.emit("lazyImageReady",a[0],r[0]),i.params.autoHeight&&i.updateAutoHeight()}})),i.emit("lazyImageLoad",a[0],r[0])}))}},load:function(){var e=this,t=e.$wrapperEl,i=e.params,s=e.slides,a=e.activeIndex,r=e.virtual&&i.virtual.enabled,n=i.lazy,l=i.slidesPerView;function o(e){if(r){if(t.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return!0}else if(s[e])return!0;return!1}function d(e){return r?m(e).attr("data-swiper-slide-index"):m(e).index()}if("auto"===l&&(l=0),e.lazy.initialImageLoaded||(e.lazy.initialImageLoaded=!0),e.params.watchSlidesVisibility)t.children("."+i.slideVisibleClass).each((function(t){var i=r?m(t).attr("data-swiper-slide-index"):m(t).index();e.lazy.loadInSlide(i)}));else if(l>1)for(var h=a;h1||n.loadPrevNextAmount&&n.loadPrevNextAmount>1){for(var p=n.loadPrevNextAmount,u=l,c=Math.min(a+u+Math.max(p,u),s.length),v=Math.max(a-Math.max(u,p),0),f=a+l;f0&&e.lazy.loadInSlide(d(w));var b=t.children("."+i.slidePrevClass);b.length>0&&e.lazy.loadInSlide(d(b))}}},ie={LinearSpline:function(e,t){var i,s,a,r,n,l=function(e,t){for(s=-1,i=e.length;i-s>1;)e[a=i+s>>1]<=t?s=a:i=a;return i};return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(n=l(this.x,e),r=n-1,(e-this.x[r])*(this.y[n]-this.y[r])/(this.x[n]-this.x[r])+this.y[r]):0},this},getInterpolateFunction:function(e){this.controller.spline||(this.controller.spline=this.params.loop?new ie.LinearSpline(this.slidesGrid,e.slidesGrid):new ie.LinearSpline(this.snapGrid,e.snapGrid))},setTranslate:function(e,t){var i,s,a=this,r=a.controller.control,n=a.constructor;function l(e){var t=a.rtlTranslate?-a.translate:a.translate;"slide"===a.params.controller.by&&(a.controller.getInterpolateFunction(e),s=-a.controller.spline.interpolate(-t)),s&&"container"!==a.params.controller.by||(i=(e.maxTranslate()-e.minTranslate())/(a.maxTranslate()-a.minTranslate()),s=(t-a.minTranslate())*i+e.minTranslate()),a.params.controller.inverse&&(s=e.maxTranslate()-s),e.updateProgress(s),e.setTranslate(s,a),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(r))for(var o=0;o0&&(this.isBeginning?(this.a11y.disableEl(i),this.a11y.makeElNotFocusable(i)):(this.a11y.enableEl(i),this.a11y.makeElFocusable(i))),t&&t.length>0&&(this.isEnd?(this.a11y.disableEl(t),this.a11y.makeElNotFocusable(t)):(this.a11y.enableEl(t),this.a11y.makeElFocusable(t)))}},updatePagination:function(){var e=this,t=e.params.a11y;e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.bullets.each((function(i){var s=m(i);e.a11y.makeElFocusable(s),e.a11y.addElRole(s,"button"),e.a11y.addElLabel(s,t.paginationBulletMessage.replace(/\{\{index\}\}/,s.index()+1))}))},init:function(){this.$el.append(this.a11y.liveRegion);var e,t,i=this.params.a11y;this.navigation&&this.navigation.$nextEl&&(e=this.navigation.$nextEl),this.navigation&&this.navigation.$prevEl&&(t=this.navigation.$prevEl),e&&(this.a11y.makeElFocusable(e),this.a11y.addElRole(e,"button"),this.a11y.addElLabel(e,i.nextSlideMessage),e.on("keydown",this.a11y.onEnterKey)),t&&(this.a11y.makeElFocusable(t),this.a11y.addElRole(t,"button"),this.a11y.addElLabel(t,i.prevSlideMessage),t.on("keydown",this.a11y.onEnterKey)),this.pagination&&this.params.pagination.clickable&&this.pagination.bullets&&this.pagination.bullets.length&&this.pagination.$el.on("keydown","."+this.params.pagination.bulletClass,this.a11y.onEnterKey)},destroy:function(){var e,t;this.a11y.liveRegion&&this.a11y.liveRegion.length>0&&this.a11y.liveRegion.remove(),this.navigation&&this.navigation.$nextEl&&(e=this.navigation.$nextEl),this.navigation&&this.navigation.$prevEl&&(t=this.navigation.$prevEl),e&&e.off("keydown",this.a11y.onEnterKey),t&&t.off("keydown",this.a11y.onEnterKey),this.pagination&&this.params.pagination.clickable&&this.pagination.bullets&&this.pagination.bullets.length&&this.pagination.$el.off("keydown","."+this.params.pagination.bulletClass,this.a11y.onEnterKey)}},ae={init:function(){var e=l();if(this.params.history){if(!e.history||!e.history.pushState)return this.params.history.enabled=!1,void(this.params.hashNavigation.enabled=!0);var t=this.history;t.initialized=!0,t.paths=ae.getPathValues(this.params.url),(t.paths.key||t.paths.value)&&(t.scrollToSlide(0,t.paths.value,this.params.runCallbacksOnInit),this.params.history.replaceState||e.addEventListener("popstate",this.history.setHistoryPopState))}},destroy:function(){var e=l();this.params.history.replaceState||e.removeEventListener("popstate",this.history.setHistoryPopState)},setHistoryPopState:function(){this.history.paths=ae.getPathValues(this.params.url),this.history.scrollToSlide(this.params.speed,this.history.paths.value,!1)},getPathValues:function(e){var t=l(),i=(e?new URL(e):t.location).pathname.slice(1).split("/").filter((function(e){return""!==e})),s=i.length;return{key:i[s-2],value:i[s-1]}},setHistory:function(e,t){var i=l();if(this.history.initialized&&this.params.history.enabled){var s;s=this.params.url?new URL(this.params.url):i.location;var a=this.slides.eq(t),r=ae.slugify(a.attr("data-history"));s.pathname.includes(e)||(r=e+"/"+r);var n=i.history.state;n&&n.value===r||(this.params.history.replaceState?i.history.replaceState({value:r},null,r):i.history.pushState({value:r},null,r))}},slugify:function(e){return e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,t,i){if(t)for(var s=0,a=this.slides.length;s'),i.append(e)),e.css({height:a+"px"})):0===(e=t.find(".swiper-cube-shadow")).length&&(e=m('
'),t.append(e)));for(var c=0;c-1&&(u=90*f+90*b,n&&(u=90*-f-90*b)),v.transform(T),d.slideShadows){var C=h?v.find(".swiper-slide-shadow-left"):v.find(".swiper-slide-shadow-top"),S=h?v.find(".swiper-slide-shadow-right"):v.find(".swiper-slide-shadow-bottom");0===C.length&&(C=m('
'),v.append(C)),0===S.length&&(S=m('
'),v.append(S)),C.length&&(C[0].style.opacity=Math.max(-b,0)),S.length&&(S[0].style.opacity=Math.max(b,0))}}if(i.css({"-webkit-transform-origin":"50% 50% -"+l/2+"px","-moz-transform-origin":"50% 50% -"+l/2+"px","-ms-transform-origin":"50% 50% -"+l/2+"px","transform-origin":"50% 50% -"+l/2+"px"}),d.shadow)if(h)e.transform("translate3d(0px, "+(a/2+d.shadowOffset)+"px, "+-a/2+"px) rotateX(90deg) rotateZ(0deg) scale("+d.shadowScale+")");else{var M=Math.abs(u)-90*Math.floor(Math.abs(u)/90),z=1.5-(Math.sin(2*M*Math.PI/360)/2+Math.cos(2*M*Math.PI/360)/2),P=d.shadowScale,k=d.shadowScale/z,$=d.shadowOffset;e.transform("scale3d("+P+", 1, "+k+") translate3d(0px, "+(r/2+$)+"px, "+-r/2/k+"px) rotateX(-90deg)")}var L=o.isSafari||o.isWebView?-l/2:0;i.transform("translate3d(0px,0,"+L+"px) rotateX("+(this.isHorizontal()?0:u)+"deg) rotateY("+(this.isHorizontal()?-u:0)+"deg)")},setTransition:function(e){var t=this.$el;this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),this.params.cubeEffect.shadow&&!this.isHorizontal()&&t.find(".swiper-cube-shadow").transition(e)}},de={setTranslate:function(){for(var e=this.slides,t=this.rtlTranslate,i=0;i'),s.append(d)),0===h.length&&(h=m('
'),s.append(h)),d.length&&(d[0].style.opacity=Math.max(-a,0)),h.length&&(h[0].style.opacity=Math.max(a,0))}s.transform("translate3d("+l+"px, "+o+"px, 0px) rotateX("+n+"deg) rotateY("+r+"deg)")}},setTransition:function(e){var t=this,i=t.slides,s=t.activeIndex,a=t.$wrapperEl;if(i.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.virtualTranslate&&0!==e){var r=!1;i.eq(s).transitionEnd((function(){if(!r&&t&&!t.destroyed){r=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],i=0;i'),u.append(C)),0===S.length&&(S=m('
'),u.append(S)),C.length&&(C[0].style.opacity=v>0?v:0),S.length&&(S[0].style.opacity=-v>0?-v:0)}}},setTransition:function(e){this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}},pe={init:function(){var e=this.params.thumbs;if(this.thumbs.initialized)return!1;this.thumbs.initialized=!0;var t=this.constructor;return e.swiper instanceof t?(this.thumbs.swiper=e.swiper,S(this.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),S(this.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):C(e.swiper)&&(this.thumbs.swiper=new t(S({},e.swiper,{watchSlidesVisibility:!0,watchSlidesProgress:!0,slideToClickedSlide:!1})),this.thumbs.swiperCreated=!0),this.thumbs.swiper.$el.addClass(this.params.thumbs.thumbsContainerClass),this.thumbs.swiper.on("tap",this.thumbs.onThumbClick),!0},onThumbClick:function(){var e=this.thumbs.swiper;if(e){var t=e.clickedIndex,i=e.clickedSlide;if(!(i&&m(i).hasClass(this.params.thumbs.slideThumbActiveClass)||null==t)){var s;if(s=e.params.loop?parseInt(m(e.clickedSlide).attr("data-swiper-slide-index"),10):t,this.params.loop){var a=this.activeIndex;this.slides.eq(a).hasClass(this.params.slideDuplicateClass)&&(this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft,a=this.activeIndex);var r=this.slides.eq(a).prevAll('[data-swiper-slide-index="'+s+'"]').eq(0).index(),n=this.slides.eq(a).nextAll('[data-swiper-slide-index="'+s+'"]').eq(0).index();s=void 0===r?n:void 0===n?r:n-athis.previousIndex?"next":"prev"}else n=(r=this.realIndex)>this.previousIndex?"next":"prev";a&&(r+="next"===n?s:-1*s),t.visibleSlidesIndexes&&t.visibleSlidesIndexes.indexOf(r)<0&&(t.params.centeredSlides?r=r>l?r-Math.floor(i/2)+1:r+Math.floor(i/2)-1:r>l&&(r=r-i+1),t.slideTo(r,e?0:void 0))}var h=1,p=this.params.thumbs.slideThumbActiveClass;if(this.params.slidesPerView>1&&!this.params.centeredSlides&&(h=this.params.slidesPerView),this.params.thumbs.multipleActiveThumbs||(h=1),h=Math.floor(h),t.slides.removeClass(p),t.params.loop||t.params.virtual&&t.params.virtual.enabled)for(var u=0;u0&&!m(t.target).hasClass(e.params.pagination.bulletClass)&&(!0===e.pagination.$el.hasClass(e.params.pagination.hiddenClass)?e.emit("paginationShow"):e.emit("paginationHide"),e.pagination.$el.toggleClass(e.params.pagination.hiddenClass))}}},{name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create:function(){M(this,{scrollbar:t({isTouched:!1,timeout:null,dragTimeout:null},J)})},on:{init:function(e){e.scrollbar.init(),e.scrollbar.updateSize(),e.scrollbar.setTranslate()},update:function(e){e.scrollbar.updateSize()},resize:function(e){e.scrollbar.updateSize()},observerUpdate:function(e){e.scrollbar.updateSize()},setTranslate:function(e){e.scrollbar.setTranslate()},setTransition:function(e,t){e.scrollbar.setTransition(t)},destroy:function(e){e.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create:function(){M(this,{parallax:t({},Q)})},on:{beforeInit:function(e){e.params.parallax.enabled&&(e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},init:function(e){e.params.parallax.enabled&&e.parallax.setTranslate()},setTranslate:function(e){e.params.parallax.enabled&&e.parallax.setTranslate()},setTransition:function(e,t){e.params.parallax.enabled&&e.parallax.setTransition(t)}}},{name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var e=this;M(e,{zoom:t({enabled:!1,scale:1,currentScale:1,isScaling:!1,gesture:{$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0}},ee)});var i=1;Object.defineProperty(e.zoom,"scale",{get:function(){return i},set:function(t){if(i!==t){var s=e.zoom.gesture.$imageEl?e.zoom.gesture.$imageEl[0]:void 0,a=e.zoom.gesture.$slideEl?e.zoom.gesture.$slideEl[0]:void 0;e.emit("zoomChange",t,s,a)}i=t}})},on:{init:function(e){e.params.zoom.enabled&&e.zoom.enable()},destroy:function(e){e.zoom.disable()},touchStart:function(e,t){e.zoom.enabled&&e.zoom.onTouchStart(t)},touchEnd:function(e,t){e.zoom.enabled&&e.zoom.onTouchEnd(t)},doubleTap:function(e,t){e.params.zoom.enabled&&e.zoom.enabled&&e.params.zoom.toggle&&e.zoom.toggle(t)},transitionEnd:function(e){e.zoom.enabled&&e.params.zoom.enabled&&e.zoom.onTransitionEnd()},slideChange:function(e){e.zoom.enabled&&e.params.zoom.enabled&&e.params.cssMode&&e.zoom.onTransitionEnd()}}},{name:"lazy",params:{lazy:{enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create:function(){M(this,{lazy:t({initialImageLoaded:!1},te)})},on:{beforeInit:function(e){e.params.lazy.enabled&&e.params.preloadImages&&(e.params.preloadImages=!1)},init:function(e){e.params.lazy.enabled&&!e.params.loop&&0===e.params.initialSlide&&e.lazy.load()},scroll:function(e){e.params.freeMode&&!e.params.freeModeSticky&&e.lazy.load()},resize:function(e){e.params.lazy.enabled&&e.lazy.load()},scrollbarDragMove:function(e){e.params.lazy.enabled&&e.lazy.load()},transitionStart:function(e){e.params.lazy.enabled&&(e.params.lazy.loadOnTransitionStart||!e.params.lazy.loadOnTransitionStart&&!e.lazy.initialImageLoaded)&&e.lazy.load()},transitionEnd:function(e){e.params.lazy.enabled&&!e.params.lazy.loadOnTransitionStart&&e.lazy.load()},slideChange:function(e){e.params.lazy.enabled&&e.params.cssMode&&e.lazy.load()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){M(this,{controller:t({control:this.params.controller.control},ie)})},on:{update:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},resize:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},observerUpdate:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},setTranslate:function(e,t,i){e.controller.control&&e.controller.setTranslate(t,i)},setTransition:function(e,t,i){e.controller.control&&e.controller.setTransition(t,i)}}},{name:"a11y",params:{a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}"}},create:function(){M(this,{a11y:t(t({},se),{},{liveRegion:m('')})})},on:{init:function(e){e.params.a11y.enabled&&(e.a11y.init(),e.a11y.updateNavigation())},toEdge:function(e){e.params.a11y.enabled&&e.a11y.updateNavigation()},fromEdge:function(e){e.params.a11y.enabled&&e.a11y.updateNavigation()},paginationUpdate:function(e){e.params.a11y.enabled&&e.a11y.updatePagination()},destroy:function(e){e.params.a11y.enabled&&e.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,replaceState:!1,key:"slides"}},create:function(){M(this,{history:t({},ae)})},on:{init:function(e){e.params.history.enabled&&e.history.init()},destroy:function(e){e.params.history.enabled&&e.history.destroy()},transitionEnd:function(e){e.history.initialized&&e.history.setHistory(e.params.history.key,e.activeIndex)},slideChange:function(e){e.history.initialized&&e.params.cssMode&&e.history.setHistory(e.params.history.key,e.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){M(this,{hashNavigation:t({initialized:!1},re)})},on:{init:function(e){e.params.hashNavigation.enabled&&e.hashNavigation.init()},destroy:function(e){e.params.hashNavigation.enabled&&e.hashNavigation.destroy()},transitionEnd:function(e){e.hashNavigation.initialized&&e.hashNavigation.setHash()},slideChange:function(e){e.hashNavigation.initialized&&e.params.cssMode&&e.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){M(this,{autoplay:t(t({},ne),{},{running:!1,paused:!1})})},on:{init:function(e){e.params.autoplay.enabled&&(e.autoplay.start(),r().addEventListener("visibilitychange",e.autoplay.onVisibilityChange))},beforeTransitionStart:function(e,t,i){e.autoplay.running&&(i||!e.params.autoplay.disableOnInteraction?e.autoplay.pause(t):e.autoplay.stop())},sliderFirstMove:function(e){e.autoplay.running&&(e.params.autoplay.disableOnInteraction?e.autoplay.stop():e.autoplay.pause())},touchEnd:function(e){e.params.cssMode&&e.autoplay.paused&&!e.params.autoplay.disableOnInteraction&&e.autoplay.run()},destroy:function(e){e.autoplay.running&&e.autoplay.stop(),r().removeEventListener("visibilitychange",e.autoplay.onVisibilityChange)}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){M(this,{fadeEffect:t({},le)})},on:{beforeInit:function(e){if("fade"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"fade");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};S(e.params,t),S(e.originalParams,t)}},setTranslate:function(e){"fade"===e.params.effect&&e.fadeEffect.setTranslate()},setTransition:function(e,t){"fade"===e.params.effect&&e.fadeEffect.setTransition(t)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){M(this,{cubeEffect:t({},oe)})},on:{beforeInit:function(e){if("cube"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"cube"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};S(e.params,t),S(e.originalParams,t)}},setTranslate:function(e){"cube"===e.params.effect&&e.cubeEffect.setTranslate()},setTransition:function(e,t){"cube"===e.params.effect&&e.cubeEffect.setTransition(t)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){M(this,{flipEffect:t({},de)})},on:{beforeInit:function(e){if("flip"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"flip"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};S(e.params,t),S(e.originalParams,t)}},setTranslate:function(e){"flip"===e.params.effect&&e.flipEffect.setTranslate()},setTransition:function(e,t){"flip"===e.params.effect&&e.flipEffect.setTransition(t)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}},create:function(){M(this,{coverflowEffect:t({},he)})},on:{beforeInit:function(e){"coverflow"===e.params.effect&&(e.classNames.push(e.params.containerModifierClass+"coverflow"),e.classNames.push(e.params.containerModifierClass+"3d"),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},setTranslate:function(e){"coverflow"===e.params.effect&&e.coverflowEffect.setTranslate()},setTransition:function(e,t){"coverflow"===e.params.effect&&e.coverflowEffect.setTransition(t)}}},{name:"thumbs",params:{thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){M(this,{thumbs:t({swiper:null,initialized:!1},pe)})},on:{beforeInit:function(e){var t=e.params.thumbs;t&&t.swiper&&(e.thumbs.init(),e.thumbs.update(!0))},slideChange:function(e){e.thumbs.swiper&&e.thumbs.update()},update:function(e){e.thumbs.swiper&&e.thumbs.update()},resize:function(e){e.thumbs.swiper&&e.thumbs.update()},observerUpdate:function(e){e.thumbs.swiper&&e.thumbs.update()},setTransition:function(e,t){var i=e.thumbs.swiper;i&&i.setTransition(t)},beforeDestroy:function(e){var t=e.thumbs.swiper;t&&e.thumbs.swiperCreated&&t&&t.destroy()}}}];return W.use(ue),W})); (function($) { "use strict"; /* --------------------------------------------------------------------------- * Global vars * --------------------------------------------------------------------------- */ var scrollticker; // Scroll Timer | don't need to set this in every scroll var rtl = $('body').hasClass('rtl'); var simple = $('body').hasClass('style-simple'); var top_bar_top = '61px'; var header_H = 0; var pretty = false; var mobile_init_W = 1240; window.elementorFrontendConfig = { "environmentMode" : { "edit" : false, "wpPreview" : false }, "i18n" : { "shareOnFacebook" : "Share on Facebook", "shareOnTwitter" : "Share on Twitter", "pinIt" : "Pin it", "downloadImage" : "Download image" }, "is_rtl" : false, "breakpoints" : { "xs" : 0, "sm" : 480, "md" : 768, "lg" : 960, "xl" : 1440, "xxl" : 1600 }, "settings" : { "page" : [], "general" : { "elementor_stretched_section_container" : "#Wrapper", "elementor_global_image_lightbox" : "yes", "elementor_lightbox_enable_counter" : "yes", "elementor_lightbox_enable_fullscreen" : "yes", "elementor_lightbox_enable_zoom" : "yes", "elementor_lightbox_enable_share" : "yes", "elementor_lightbox_title_src" : "title", "elementor_lightbox_description_src" : "description" }, "editorPreferences" : [] } }; !function(t){"use strict";if("function"==typeof define&&define.amd)define(["jquery"],t);else if("object"==typeof exports)t(require("jquery"));else{if("undefined"==typeof jQuery)throw"jquery-numerator requires jQuery to be loaded first";t(jQuery)}}(function(t){var e="numerator",i={easing:"swing",duration:500,delimiter:void 0,rounding:0,toValue:void 0,fromValue:void 0,queue:!1,onStart:function(){},onStep:function(){},onProgress:function(){},onComplete:function(){}};function n(n,s){this.element=n,this.settings=t.extend({},i,s),this._defaults=i,this._name=e,this.init()}n.prototype={init:function(){this.parseElement(),this.setValue()},parseElement:function(){var e=t.trim(t(this.element).text());this.settings.fromValue=this.settings.fromValue||this.format(e)},setValue:function(){var e=this;t({value:e.settings.fromValue}).animate({value:e.settings.toValue},{duration:parseInt(e.settings.duration,10),easing:e.settings.easing,start:e.settings.onStart,step:function(i,n){t(e.element).text(e.format(i)),e.settings.onStep(i,n)},progress:e.settings.onProgress,complete:e.settings.onComplete})},format:function(t){return t=parseInt(this.settings.rounding)<1?parseInt(t,10):parseFloat(t).toFixed(parseInt(this.settings.rounding)),this.settings.delimiter?this.delimit(t):t},delimit:function(t){if(t=t.toString(),this.settings.rounding&&parseInt(this.settings.rounding,10)>0){var e=t.substring(t.length-(this.settings.rounding+1),t.length),i=t.substring(0,t.length-(this.settings.rounding+1));return this.addDelimiter(i)+e}return this.addDelimiter(t)},addDelimiter:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.settings.delimiter)}},t.fn[e]=function(i){return this.each(function(){t.data(this,"plugin_"+e)&&t.data(this,"plugin_"+e,null),t.data(this,"plugin_"+e,new n(this,i))})}}); /* --------------------------------------------------------------------------- * Helper Item * --------------------------------------------------------------------------- */ jQuery('.helper .link.toggle').click(function(e) { e.preventDefault(); var el = jQuery(this); var id = el.attr('data-rel'); var parent = el.closest('.helper'); if (el.hasClass('active')) { el.removeClass('active'); parent.find('.helper_content > .item-' + id).removeClass('active').slideUp(200); } else { parent.find('.links > .link.active').removeClass('active'); parent.find('.helper_content > .item.active').slideUp(200) el.addClass('active'); parent.find('.helper_content > .item-' + id).addClass('active').slideDown(200); } setTimeout(function() { mfn_sidebar(); }, 200); }); "use strict"; jQuery(window).bind("debouncedresize", function() { iframesHeight(); // Isotope | Relayout jQuery('.masonry.isotope').isotope(); jQuery('.masonry.gallery').isotope('layout'); // Zoom Box | Vertical Align zoomBoxVerticalAlign(); }); /* --------------------------------------------------------------------------- * Zoom Box | Vertical Align * --------------------------------------------------------------------------- */ function zoomBoxVerticalAlign() { jQuery('body:not(.style-simple) .zoom_box').each(function() { var el = jQuery(this); var elH = el.height(); var desc = el.find('.desc_wrap'); var descH = desc.height(); var padding = (elH - descH) / 2; desc.css('padding-top', padding + 'px'); }); } zoomBoxVerticalAlign(); /* --------------------------------------------------------------------------- * Iframe height * --------------------------------------------------------------------------- */ function iframeHeight(item, ratio) { var itemW = item.width(); var itemH = itemW * ratio; if (itemH < 147) itemH = 147; item.height(itemH); } function iframesHeight() { iframeHeight(jQuery(".blog_wrapper .post-photo-wrapper .mfn-jplayer, .blog_wrapper .post-photo-wrapper iframe, .post-related .mfn-jplayer, .post-related iframe, .blog_slider_ul .mfn-jplayer, .blog_slider_ul iframe"), 0.78); // blog - list iframeHeight(jQuery(".single-post .single-photo-wrapper .mfn-jplayer, .single-post .single-photo-wrapper iframe"), 0.4); // blog - single iframeHeight(jQuery(".section-portfolio-header .mfn-jplayer, .section-portfolio-header iframe"), 0.4); // portfolio - single } iframesHeight(); /* --------------------------------------------------------------------------- * Sticky header * --------------------------------------------------------------------------- */ var topBarTop = '61px'; var mfn_header_height = 0; // header height function mfn_stickyH() { if (jQuery('body').hasClass('header-below')) { // header below slider mfn_header_height = jQuery('.mfn-main-slider').innerHeight() + jQuery('#Header').innerHeight(); } else { // default mfn_header_height = jQuery('#Top_bar').innerHeight() + jQuery('#Action_bar').innerHeight(); } } // init function mfn_sticky() { if (jQuery('body').hasClass('sticky-header')) { var start_y = mfn_header_height; var window_y = jQuery(window).scrollTop(); if (window_y > start_y) { if (!(jQuery('#Top_bar').hasClass('is-sticky'))) { jQuery('.header-classic .header_placeholder').css('height', jQuery('#Top_bar').innerHeight() - jQuery('#Action_bar').innerHeight()); jQuery('.header-stack .header_placeholder').css('height', 71); jQuery('.header-below .header_placeholder').css('height', jQuery('#Top_bar').innerHeight()); jQuery('.minimalist-header .header_placeholder').css('height', jQuery('#Top_bar').innerHeight()); jQuery('#Top_bar').addClass('is-sticky').css('top', -60).animate({ 'top': jQuery('#wpadminbar').innerHeight() }, 300); } } else { if (jQuery('#Top_bar').hasClass('is-sticky')) { jQuery('.header_placeholder').css('height', 0); jQuery('#Top_bar').removeClass('is-sticky').css('top', topBarTop); } } } } /* --------------------------------------------------------------------------- * Sidebar height * --------------------------------------------------------------------------- */ function mfn_sidebar() { if (jQuery('.with_aside .four.columns').length) { var maxH = jQuery('#Content .sections_group').height() - 20 jQuery('.with_aside .four.columns .widget-area').each(function() { jQuery(this).css('min-height', 0); if (jQuery(this).height() > maxH) { maxH = jQuery(this).height(); } }); jQuery('.with_aside .four.columns .widget-area').css('min-height', maxH + 'px'); } } /* --------------------------------------------------------------------------- * Equal Wraps | Height * --------------------------------------------------------------------------- */ function mfn_equalH_wrap() { jQuery('.section.equal-height-wrap .section_wrapper').each(function() { var maxH = 0; jQuery('> .wrap', jQuery(this)).each(function() { jQuery(this).css('height', 'auto'); if (jQuery(this).innerHeight() > maxH) { maxH = jQuery(this).innerHeight(); } }); jQuery('> .wrap', jQuery(this)).css('height', maxH + 'px'); }); } /* --------------------------------------------------------------------------- * Equal Items | Height * --------------------------------------------------------------------------- */ function mfn_equalH() { jQuery('.section.equal-height .mcb-wrap-inner').each(function() { var maxH = 0; jQuery('> .column', jQuery(this)).each(function() { jQuery(this).css('height', 'auto'); if (jQuery(this).height() > maxH) { maxH = jQuery(this).height(); } }); jQuery('> .column', jQuery(this)).css('height', maxH + 'px'); }); } /* --------------------------------------------------------------------------- * Overlay menu * --------------------------------------------------------------------------- */ jQuery('.overlay-menu-toggle').click(function(e) { e.preventDefault(); jQuery(this).toggleClass('focus'); jQuery('#Overlay').stop(true, true).fadeToggle(500); var menuH = jQuery('#Overlay nav').height() / 2; jQuery('#Overlay nav').css('margin-top', '-' + menuH + 'px'); }); /* --------------------------------------------------------------------------- * Sliding Footer | Height * --------------------------------------------------------------------------- */ function mfn_footer() { if (jQuery('.footer-fixed #Footer, .footer-sliding #Footer').length) { var footerH = jQuery('#Footer').height(); jQuery('#Content').css('margin-bottom', footerH + 'px'); } } /* --------------------------------------------------------------------------- * Header width * --------------------------------------------------------------------------- */ function mfn_header() { var rightW = jQuery('.top_bar_right').innerWidth(); var parentW = jQuery('#Top_bar .one').innerWidth() - 10; var leftW = parentW - rightW; jQuery('.top_bar_left, .menu > li > ul.mfn-megamenu ').width(leftW); } /* --------------------------------------------------------------------------- * Full Screen Section * --------------------------------------------------------------------------- */ function mfn_sectionH() { var windowH = jQuery(window).height(); // FIX | next/prev section var offset = 0; if( $( '.section.full-screen:not(.hide-desktop)' ).length > 1 ){ offset = 5; } $( '.section.full-screen' ).each( function(){ var section = $( this ); var wrapper = $( '.section_wrapper', section ); section .css( 'padding', 0 ) .css( 'min-height', windowH + offset ); var padding = ( windowH + offset - wrapper.height() ) / 2; if( padding < 50 ) padding = 50; wrapper .css( 'padding-top', padding + 10 ) // 20 = column margin-bottom / 2 .css( 'padding-bottom', padding - 10 ); }); } /* --------------------------------------------------------------------------- * Admin Bar & WooCommerce Store Notice * --------------------------------------------------------------------------- */ function adminBarH(){ var height = 0; // WP adminbar if( $( 'body' ).hasClass( 'admin-bar' ) ){ height += $( '#wpadminbar' ).innerHeight(); } // WC demo store if( $( 'body' ).hasClass( 'woocommerce-demo-store' ) ){ height += $( 'body > p.demo_store' ).innerHeight(); } return height; } /* --------------------------------------------------------------------------- * Into | Full Screen * --------------------------------------------------------------------------- */ function mfn_introH(){ var windowH = $(window).height() - $('#Header_wrapper').height() - adminBarH(); $('#Intro.full-screen').each(function(){ var el = $(this); var inner = $( '.intro-inner', el ); el.css( 'padding', 0 ).css( 'min-height', windowH ); var padding = ( windowH - inner.height() ) / 2; inner.css( 'padding-top', padding ).css( 'padding-bottom', padding ); }); } /* --------------------------------------------------------------------------- * # Hash smooth navigation * --------------------------------------------------------------------------- */ function hashNav() { // # window.location.hash var hash = window.location.hash; if (hash && jQuery(hash).length) { var stickyH = jQuery('.sticky-header #Top_bar').innerHeight(); var tabsHeaderH = jQuery(hash).siblings('.ui-tabs-nav').innerHeight(); jQuery('html, body').animate({ scrollTop: jQuery(hash).offset().top - stickyH - tabsHeaderH }, 500); } } /* --------------------------------------------------------------------------- * One Page | Scroll Active * --------------------------------------------------------------------------- */ function onePageActive(){ if( $('body').hasClass('one-page') ){ var stickyH = $('.sticky-header #Top_bar').innerHeight(); var windowT = $(window).scrollTop(); var start = windowT + stickyH + $('#wpadminbar').innerHeight() + 1; var first = false; $('div[data-id]').each(function(){ if( $(this).visible( true ) ){ if( !first ){ first = $(this); } else if( ( $(this).offset().top < start ) && ( $(this).offset().top > first.offset().top ) ) { first = $(this); } } if( first ){ var newActive = first.attr('data-id'); var active = '[data-hash="'+ newActive +'"]'; if( newActive ){ var menu = $('#menu'); menu.find('li').removeClass('current-menu-item current-menu-parent current-menu-ancestor current_page_item current_page_parent current_page_ancestor'); $( active, menu ) .closest('li').addClass('current-menu-item') .closest('.menu > li').addClass('current-menu-item'); } } }); } } /* --------------------------------------------------------------------------- * niceScroll | Padding right fix for short content * --------------------------------------------------------------------------- */ function niceScrollFix() { var el = jQuery('body > .nicescroll-rails'); if (el.length) { if (el.is(":visible")) { jQuery('body').addClass('nice-scroll'); } else { jQuery('body').removeClass('nice-scroll'); } } } jQuery(window).load(function(){ mfn_equalH_wrap(); mfn_equalH(); }); /* -------------------------------------------------------------------------------------------------------------------------- * jQuery(document).ready * ----------------------------------------------------------------------------------------------------------------------- */ jQuery(document).ready(function() { topBarTop = parseInt(jQuery('#Top_bar').css('top'), 10); if (topBarTop < 0) topBarTop = 61; topBarTop = topBarTop + 'px'; /* --------------------------------------------------------------------------- * Content sliders * --------------------------------------------------------------------------- */ mfnSliderContent(); mfnSliderOffer(); mfnSliderOfferThumb(); mfnSliderBlog(); mfnSliderClients(); mfnSliderPortfolio(); mfnSliderShop(); mfnSliderTestimonials(); //mfn_equalH_wrap(); //mfn_equalH(); /* --------------------------------------------------------------------------- * Retina Logo * --------------------------------------------------------------------------- */ function retinaLogo(){ if( window.devicePixelRatio > 1 ){ var el = ''; var src = ''; var height = ''; var parent = $( '#Top_bar #logo' ); var parentH = parent.data( 'height' ); var maxH = { sticky : { init : 35, no_padding : 60, overflow : 110 }, mobile : { mini : 50, mini_no_padding : 60 }, mobile_sticky : { init : 50, no_padding : 60, overflow : 80 } }; $( '#Top_bar #logo img' ).each( function( index ){ el = $( this ); src = el.data( 'retina' ); height = el.height(); // main ----- if( el.hasClass( 'logo-main' ) ){ if( $( 'body' ).hasClass( 'logo-overflow' ) ){ // do nothing } else if( height > parentH ){ height = parentH; } } // sticky ----- if( el.hasClass( 'logo-sticky' ) ){ if( $( 'body' ).hasClass( 'logo-overflow' ) ){ if( height > maxH.sticky.overflow ){ height = maxH.sticky.overflow; } } else if( $( 'body' ).hasClass( 'logo-no-sticky-padding' ) ){ if( height > maxH.sticky.no_padding ){ height = maxH.sticky.no_padding; } } else if( height > maxH.sticky.init ){ height = maxH.sticky.init; } } // mobile ----- if( el.hasClass( 'logo-mobile' ) ){ if( $( 'body' ).hasClass( 'mobile-header-mini' ) ){ if( parent.data( 'padding' ) > 0 ){ if( height > maxH.mobile.mini ){ height = maxH.mobile.mini; } } else { if( height > maxH.mobile.mini_no_padding ){ height = maxH.mobile.mini_no_padding; } } } } // mobile-sticky ----- if( el.hasClass( 'logo-mobile-sticky' ) ){ if( $( 'body' ).hasClass( 'logo-no-sticky-padding' ) ){ if( height > maxH.mobile_sticky.no_padding ){ height = maxH.mobile_sticky.no_padding; } } else if( height > maxH.mobile_sticky.init ){ height = maxH.mobile_sticky.init; } } // SET if( src ){ el.parent().addClass( 'retina' ); el.attr( 'src', src ).css( 'max-height', height + 'px' ); } }); } } retinaLogo(); /* --------------------------------------------------------------------------- * Responsive menu * --------------------------------------------------------------------------- */ jQuery('.responsive-menu-toggle').click(function(e) { e.preventDefault(); var el = jQuery(this) var menu = jQuery('#Top_bar #menu'); var menuWrap = menu.closest('.menu_wrapper'); el.toggleClass('active'); if (el.hasClass('is-sticky') && el.hasClass('active')) { var top = 0; if (menuWrap.length) top = menuWrap.offset().top; jQuery('body,html').animate({ scrollTop: top }, 200); } menu.stop(true, true).slideToggle(200); }); /* --------------------------------------------------------------------------- * Menu | Responsive | Side Slide * --------------------------------------------------------------------------- */ function sideSlide(){ var slide = $( '#Side_slide' ); var overlay = $( '#body_overlay' ); var ss_mobile_init_W = mobile_init_W; var pos = 'right'; // constructor ---------- var constructor = function(){ if( ! slide.hasClass( 'enabled' ) ){ $( 'nav#menu' ).detach().appendTo( '#Side_slide .menu_wrapper' ); slide.addClass( 'enabled' ); } }; // destructor ---------- var destructor = function(){ if( slide.hasClass( 'enabled' ) ){ close(); $( 'nav#menu' ).detach().prependTo( '#Top_bar .menu_wrapper' ); slide.removeClass( 'enabled' ); } }; // reload ---------- var reload = function(){ if( ( $(document).width() < ss_mobile_init_W ) ){ constructor(); } else { destructor(); } }; // init ---------- var init = function(){ if( slide.hasClass( 'left' ) ){ pos = 'left'; } if( $( 'body' ).hasClass( 'header-simple' ) ){ ss_mobile_init_W = 9999; } reload(); }; // reset to default ---------- var reset = function( time ){ $( '.lang-active.active', slide ).removeClass('active').children('i').attr('class','icon-down-open-mini'); $( '.lang-wrapper', slide ).fadeOut(0); $( '.icon.search.active', slide ).removeClass('active'); $( '.search-wrapper', slide ).fadeOut(0); $( '.menu_wrapper, .social', slide ).fadeIn( time ); }; // menu button ---------- var button = function(){ // show if( pos == 'left' ){ slide.animate({ 'left':0 },300); $('body').animate({ 'right':-125 },300); } else { slide.animate({ 'right':0 },300); $('body').animate({ 'left':-125 },300); } overlay.fadeIn(300); // reset reset(0); }; // close ---------- var close = function(){ if( pos == 'left' ){ slide.animate({ 'left':-250 },300); $('body').animate({ 'right':0 },300); } else { slide.animate({ 'right':-250 },300); $('body').animate({ 'left':0 },300); } overlay.fadeOut(300); }; // search ---------- $( '.icon.search', slide ).on( 'click', function(e){ e.preventDefault(); var el = $(this); if( el.hasClass('active') ){ $( '.search-wrapper', slide ).fadeOut(0); $( '.menu_wrapper, .social', slide ).fadeIn(300); } else { $( '.search-wrapper', slide ).fadeIn(300); $( '.menu_wrapper, .social', slide ).fadeOut(0); $( '.lang-active.active', slide ).removeClass('active').children('i').attr('class','icon-down-open-mini'); $( '.lang-wrapper', slide ).fadeOut(0); } el.toggleClass('active'); }); // search form submit ---------- $( 'a.submit', slide ).on( 'click', function(e){ e.preventDefault(); $('#side-form').submit(); }); // lang menu ---------- $( '.lang-active', slide ).on( 'click', function(e){ e.preventDefault(); var el = $(this); if( el.hasClass('active') ){ $( '.lang-wrapper', slide ).fadeOut(0); $( '.menu_wrapper, .social', slide ).fadeIn(300); el.children('i').attr('class','icon-down-open-mini'); } else { $( '.lang-wrapper', slide ).fadeIn(300); $( '.menu_wrapper, .social', slide ).fadeOut(0); el.children('i').attr('class','icon-up-open-mini'); $( '.icon.search.active', slide ).removeClass('active'); $( '.search-wrapper', slide ).fadeOut(0); } el.toggleClass('active'); }); // init, click, debouncedresize ---------- // init init(); // click | menu button $( '.responsive-menu-toggle' ).off( 'click' ); $( '.responsive-menu-toggle' ).on( 'click', function(e){ e.preventDefault(); button(); }); // click | close overlay.on( 'click', function(e){ close(); }); $( '.close', slide ).on( 'click', function(e){ e.preventDefault(); close(); }); // click | below search or languages menu $( slide ).on( 'click', function(e){ if( $( e.target ).is( slide ) ){ reset(300); } }); // debouncedresize $( window ).on( 'debouncedresize', reload ); } if( $( 'body' ).hasClass( 'mobile-side-slide' ) ){ sideSlide(); } /* --------------------------------------------------------------------------- * Menu | mfnMenu * --------------------------------------------------------------------------- */ function mainMenu(){ var mm_mobile_init_W = mobile_init_W; if( $( 'body' ).hasClass( 'header-simple' ) || $( '#Header_creative.dropdown' ).length ){ mm_mobile_init_W = 9999; } $( '#menu > ul.menu' ).mfnMenu({ addLast : true, arrows : true, mobileInit : mm_mobile_init_W, }); $( '#secondary-menu > ul.secondary-menu' ).mfnMenu({ mobileInit : mm_mobile_init_W, }); } mainMenu(); mfn_stickyH() mfn_sticky(); /* --------------------------------------------------------------------------- * Menu | OnePage - remove active * Works with .scroll class * Since 4.8 replaced with admin option: Page Options / One Page [function: onePageMenu()] * --------------------------------------------------------------------------- */ function onePageScroll() { if (!jQuery('body').hasClass('one-page')) { var menu = jQuery('#menu'); if (menu.find('li.scroll').length > 1) { menu.find('li.current-menu-item:not(:first)').removeClass('current-menu-item currenet-menu-parent current-menu-ancestor current_page_item current_page_parent current_page_ancestor'); // menu item click menu.find('a').click(function() { jQuery(this).closest('li').siblings('li').removeClass('current-menu-item currenet-menu-parent current-menu-ancestor current_page_item current_page_parent current_page_ancestor'); jQuery(this).closest('li').addClass('current-menu-item'); }); } } } onePageScroll(); /* --------------------------------------------------------------------------- * One Page | Menu with Active on Scroll * --------------------------------------------------------------------------- function onePageMenu() { if (jQuery('body').hasClass('one-page')) { var menu = jQuery('#menu'); // remove active menu.find('li').removeClass('current-menu-item currenet-menu-parent current-menu-ancestor current_page_item current_page_parent current_page_ancestor'); // add attr [data-hash] jQuery('a[href]', menu).each(function() { // data-hash var url = jQuery(this).attr('href'); var hash = '#' + url.split('#')[1]; if (hash && jQuery(hash).length) { // check if element with specified ID exists jQuery(this).attr('data-hash', hash); jQuery(hash).attr('data-id', hash); } }); // click jQuery('#menu a[data-hash]').click(function(e) { e.preventDefault(); // only with: body.one-page // active menu.find('li').removeClass('current-menu-item'); jQuery(this).closest('li').addClass('current-menu-item'); var hash = jQuery(this).attr('data-hash'); var stickyH = 0; var tabsHeaderH = jQuery(hash).siblings('.ui-tabs-nav').innerHeight(); // FIX | sticky top bar height var topBar = jQuery('.sticky-header #Top_bar'); if (topBar.hasClass('is-sticky')) { stickyH = jQuery('.sticky-header #Top_bar').innerHeight(); } else { topBar.addClass('is-sticky'); stickyH = jQuery('.sticky-header #Top_bar').innerHeight(); topBar.removeClass('is-sticky'); } // FIX | responsive var responsive = jQuery('.responsive-menu-toggle'); if (responsive.length) { if (responsive.is(":visible")) { stickyH = 0; } } jQuery('html, body').animate({ scrollTop: jQuery(hash).offset().top - stickyH - tabsHeaderH }, 500); }); } }; onePageMenu(); */ /* --------------------------------------------------------------------------- * Menu | One Page | Active on Scroll & Click * --------------------------------------------------------------------------- */ function onePageMenu(){ if( $('body').hasClass('one-page') ){ var menu = $('#menu'); // add attr [data-hash] & [data-id] ---------- $('a[href]', menu).each(function(){ var url = $(this).attr( 'href' ); if( url && url.split('#')[1] ){ // data-hash var hash = '#' + url.split('#')[1]; if( hash && $(hash).length ){ // check if element with specified ID exists $(this).attr( 'data-hash', hash ); $(hash).attr( 'data-id', hash ); } // Visual Composer var vcHash = '#' + url.split('#')[1]; var vcClass = '.vc_row.' + url.split('#')[1]; if( vcClass && $(vcClass).length ){ // check if element with specified Class exists $(this).attr( 'data-hash', vcHash ); $(vcClass).attr( 'data-id', vcHash ); } } }); // active ---------- var hash; var activeSelector = '.menu > li.current-menu-item, .menu > li.current-menu-parent, .menu > li.current-menu-ancestor, .menu > li.current-page-ancestor, .menu > li.current_page_item, .menu > li.current_page_parent, .menu > li.current_page_ancestor'; if( $( activeSelector, menu ).length ){ // remove duplicated $( activeSelector, menu ) .not(':first').removeClass( 'current-menu-item current-menu-parent current-menu-ancestor current-page-ancestor current_page_item current_page_parent current_page_ancestor' ); // remove if 1st link to section & section is not visible hash = $( activeSelector, menu ).find('a[data-hash]').attr( 'data-hash' ); if( hash ){ hash = '[data-id="'+ hash +'"]'; if( $(hash).length && $( hash ).visible( true ) ){ // do nothing } else { $( activeSelector, menu ).removeClass( 'current-menu-item current-menu-parent current-menu-ancestor current-page-ancestor current_page_item current_page_parent current_page_ancestor' ) .closest('.menu > li').removeClass( 'current-menu-item current-menu-parent current-menu-ancestor current-page-ancestor current_page_item current_page_parent current_page_ancestor' ); } } else { // do nothing } } else { // add to first if none is active var first = $( '.menu > li:first-child', menu ); var firstA = first.children('a'); if( firstA.attr( 'data-hash' ) ){ hash = firstA.attr( 'data-hash' ); hash = '[data-id="'+ hash +'"]'; var wpadminbarH = $('#wpadminbar').innerHeight() * 1; if( $(hash).length && ( $(hash).offset().top == wpadminbarH ) ){ first.addClass( 'current-menu-item' ); } } } // click ---------- $('#menu a[data-hash]').click(function(e){ e.preventDefault(); // only with: body.one-page // active menu.find('li').removeClass('current-menu-item'); $(this) .closest('li').addClass('current-menu-item') .closest('.menu > li').addClass('current-menu-item'); var hash = $(this).attr('data-hash'); hash = '[data-id="'+ hash +'"]'; // mobile - sticky header - close menu if( $(window).width() < 768 ){ $('.responsive-menu-toggle').removeClass('active'); $('#Top_bar #menu').hide(); } // offset var headerFixedAbH = $('.header-fixed.ab-show #Action_bar').innerHeight(); var tabsHeaderH = $(hash).siblings('.ui-tabs-nav').innerHeight(); var offset = headerFixedAbH - tabsHeaderH - $('#wpadminbar').innerHeight(); // sticky height var stickyH = fixStickyHeaderH(); // FIX | Header below | 1st section if( $( 'body' ).hasClass( 'header-below' ) && $( '#Content' ).length ){ if( $( hash ).offset().top < ( $( '#Content' ).offset().top + 60 ) ){ stickyH = -1; } } // animate scroll $( 'html, body' ).animate({ scrollTop: $( hash ).offset().top - offset - stickyH }, 500); }); } } onePageMenu(); /* --------------------------------------------------------------------------- * FIX | Header | Sticky | Height * --------------------------------------------------------------------------- */ function fixStickyHeaderH(){ var stickyH = 0; // FIX | sticky top bar height var topBar = $('.sticky-header #Top_bar'); if( topBar.hasClass('is-sticky') ){ stickyH = $('.sticky-header #Top_bar').innerHeight(); } else { topBar.addClass('is-sticky'); stickyH = $('.sticky-header #Top_bar').innerHeight(); topBar.removeClass('is-sticky'); } // FIX | responsive var responsive = $('.responsive-menu-toggle'); if( responsive.length ){ if( responsive.is(":visible") ){ stickyH = 0; } } return stickyH; } /* --------------------------------------------------------------------------- * Creative Header * --------------------------------------------------------------------------- */ var cHeader = 'body:not(.header-open) #Header_creative'; var cHeaderEl = jQuery(cHeader); var cHeaderCurrnet; function creativeHeader() { jQuery('.creative-menu-toggle').click(function(e) { e.preventDefault(); cHeaderEl.addClass('active') if (jQuery('body').hasClass('header-rtl')) { cHeaderEl.animate({ 'right': -1 }, 500); } else { cHeaderEl.animate({ 'left': -1 }, 500); } cHeaderEl.find('.creative-wrapper').fadeIn(500); cHeaderEl.find('.creative-menu-toggle, .creative-social').fadeOut(500); }); } creativeHeader(); jQuery(document).on('mouseenter', cHeader, function() { cHeaderCurrnet = 1; }) jQuery(document).on('mouseleave', cHeader, function() { cHeaderCurrnet = null; setTimeout(function() { if (!cHeaderCurrnet) { cHeaderEl.removeClass('active'); if (jQuery('body').hasClass('header-rtl')) { cHeaderEl.animate({ 'right': -200 }, 500); } else { cHeaderEl.animate({ 'left': -200 }, 500); } cHeaderEl.find('.creative-wrapper').fadeOut(500); cHeaderEl.find('.creative-menu-toggle, .creative-social').fadeIn(500); } }, 1000); }); /* --------------------------------------------------------------------------- * Maintenance * --------------------------------------------------------------------------- */ jQuery('.downcount').each(function() { var el = jQuery(this); el.downCount({ date: el.attr('data-date'), offset: el.attr('data-offset') }); }); /* --------------------------------------------------------------------------- * Tooltip Image * --------------------------------------------------------------------------- */ jQuery('.tooltip-img').hover(function() { jQuery(this).find('.tooltip-content').stop(true, true).show(); }, function() { jQuery(this).find('.tooltip-content').stop(true, true).hide(); }); /* --------------------------------------------------------------------------- * Popup Contact * --------------------------------------------------------------------------- */ jQuery("#popup_contact > a.button").click(function(e) { e.preventDefault(); jQuery(this).parent().toggleClass('focus'); }); /* --------------------------------------------------------------------------- * niceScroll * --------------------------------------------------------------------------- */ if (jQuery('body').hasClass('nice-scroll-on') && jQuery(window).width() > 767 && !navigator.userAgent.match(/(Android|iPod|iPhone|iPad|IEMobile|Opera Mini)/)) { jQuery('html').niceScroll({ autohidemode: false, cursorborder: 0, cursorborderradius: 5, cursorcolor: '#222222', cursorwidth: 10, horizrailenabled: false, mousescrollstep: (window.mfn_nicescroll) ? window.mfn_nicescroll : 40, scrollspeed: 60 }); jQuery('body').removeClass('nice-scroll-on').addClass('nice-scroll'); niceScrollFix(); } /* --------------------------------------------------------------------------- * WP Gallery * --------------------------------------------------------------------------- */ jQuery('.gallery-icon > a').wrap('
').prepend('
').attr('rel', 'prettyphoto[gallery]').attr('data-rel', 'prettyphoto[gallery]').children('img').css('height', 'auto').css('width', '100%'); /* --------------------------------------------------------------------------- * PrettyPhoto * --------------------------------------------------------------------------- */ if ((typeof(window.mfn_prettyphoto) !== 'undefined' && !window.mfn_prettyphoto.disable)) { jQuery('a[rel^="prettyphoto"],a.woocommerce-main-image.zoom, .prettyphoto, a[data-rel^="prettyPhoto[product-gallery]"]').prettyPhoto({ default_width: window.mfn_prettyphoto.width ? window.mfn_prettyphoto.width : 500, default_height: window.mfn_prettyphoto.height ? window.mfn_prettyphoto.height : 344, show_title: false, deeplinking: false, social_tools: false }); } /* --------------------------------------------------------------------------- * Intro | Scroll v arrow * --------------------------------------------------------------------------- */ jQuery('#Intro .intro-next').click(function(){ var intro = jQuery(this).closest('#Intro'); if( intro.next().length ){ jQuery('html, body').animate({ scrollTop: intro.next().offset().top - fixStickyHeaderH() - jQuery('#wpadminbar').innerHeight() }, 500); } }); /* --------------------------------------------------------------------------- * Black & White * --------------------------------------------------------------------------- */ jQuery('.greyscale .image_wrapper > a, .greyscale .client_wrapper .gs-wrapper, .greyscale.portfolio-photo a').has('img').BlackAndWhite({ hoverEffect: true, intensity: 1 // opacity: 0, 0.1, ... 1 }); /* --------------------------------------------------------------------------- * Sliding Top * --------------------------------------------------------------------------- */ jQuery(".sliding-top-control").click(function(e) { e.preventDefault(); jQuery('#Sliding-top .widgets_wrapper').slideToggle(); jQuery('#Sliding-top').toggleClass('active'); }); /* --------------------------------------------------------------------------- * Header Search * --------------------------------------------------------------------------- */ jQuery("#search_button, #Top_bar .icon_close").click(function(e) { e.preventDefault(); jQuery('#Top_bar .search_wrapper').fadeToggle(); }); /* --------------------------------------------------------------------------- * Alert * --------------------------------------------------------------------------- */ jQuery('.alert .close').click(function(e) { e.preventDefault(); jQuery(this).closest('.alert').hide(300); }); /* --------------------------------------------------------------------------- * Buttons - mark Buttons with Icon & Label * --------------------------------------------------------------------------- */ jQuery('a.button_js').each(function() { var btn = jQuery(this); if (btn.find('.button_icon').length && btn.find('.button_label').length) { btn.addClass('kill_the_icon'); } }); /* --------------------------------------------------------------------------- * Posts sticky navigation * --------------------------------------------------------------------------- */ jQuery('.fixed-nav').appendTo('body'); /* --------------------------------------------------------------------------- * Feature List * --------------------------------------------------------------------------- */ jQuery('.feature_list ul li:nth-child(4n):not(:last-child)').after('
'); /* --------------------------------------------------------------------------- * IE fixes * --------------------------------------------------------------------------- */ function checkIE() { // IE 9 var ua = window.navigator.userAgent; var msie = ua.indexOf("MSIE "); if (msie > 0 && parseInt(ua.substring(msie + 5, ua.indexOf(".", msie))) == 9) { jQuery("body").addClass("ie"); } } checkIE(); /* --------------------------------------------------------------------------- * Parallax Backgrounds * --------------------------------------------------------------------------- */ var ua = navigator.userAgent, isMobileWebkit = /WebKit/.test(ua) && /Mobile/.test(ua); if (!isMobileWebkit && jQuery(window).width() >= 768) { $.stellar({ horizontalScrolling: false, responsive: true }); } /* --------------------------------------------------------------------------- * Ajax | Load More * --------------------------------------------------------------------------- */ jQuery('.pager_load_more').click(function(e) { e.preventDefault(); var el = jQuery(this); var pager = el.closest('.pager_lm'); var href = el.attr('href'); // index | for many items on the page var index = jQuery('.lm_wrapper').index(el.closest('.isotope_wrapper').find('.lm_wrapper')); el.fadeOut(50); pager.addClass('loading'); $.get(href, function(data) { // content var content = jQuery('.lm_wrapper:eq(' + index + ')', data).wrapInner('').html(); if (jQuery('.lm_wrapper:eq(' + index + ')').hasClass('isotope')) { // isotope jQuery('.lm_wrapper:eq(' + index + ')').append(jQuery(content)).isotope('reloadItems').isotope({ sortBy: 'original-order' }); } else { // default jQuery(content).hide().appendTo('.lm_wrapper:eq(' + index + ')').fadeIn(1000); } // next page link href = jQuery('.pager_load_more:eq(' + index + ')', data).attr('href'); pager.removeClass('loading'); if (href) { el.fadeIn(); el.attr('href', href); } // refresh some staff ------------------------------- mfn_jPlayer(); iframesHeight(); mfn_sidebar(); // isotope fix: second resize jQuery('.lm_wrapper.isotope').imagesLoaded().progress( function() { jQuery('.lm_wrapper.isotope').isotope('layout'); }); // setTimeout(function(){ // $('.lm_wrapper.isotope').isotope( 'layout'); // },1000); }); }); /* --------------------------------------------------------------------------- * Blog & Portfolio filters * --------------------------------------------------------------------------- */ jQuery('.filters_buttons .open').click(function(e) { e.preventDefault(); var type = jQuery(this).closest('li').attr('class'); jQuery('.filters_wrapper').show(200); jQuery('.filters_wrapper ul.' + type).show(200); jQuery('.filters_wrapper ul:not(.' + type + ')').hide(); }); jQuery('.filters_wrapper .close a').click(function(e) { e.preventDefault(); jQuery('.filters_wrapper').hide(200); }); /* --------------------------------------------------------------------------- * Portfolio List - next/prev buttons * --------------------------------------------------------------------------- */ jQuery('.portfolio_next_js').click(function(e) { e.preventDefault(); var stickyH = jQuery('#Top_bar.is-sticky').innerHeight(); var item = jQuery(this).closest('.portfolio-item').next(); if (item.length) { jQuery('html, body').animate({ scrollTop: item.offset().top - stickyH }, 500); } }); jQuery('.portfolio_prev_js').click(function(e) { e.preventDefault(); var stickyH = jQuery('#Top_bar.is-sticky').innerHeight(); var item = jQuery(this).closest('.portfolio-item').prev(); if (item.length) { jQuery('html, body').animate({ scrollTop: item.offset().top - stickyH }, 500); } }); /* --------------------------------------------------------------------------- * Tabs * --------------------------------------------------------------------------- */ if (typeof(tabs) !== 'undefined') { jQuery(".jq-tabs").tabs(); } /* --------------------------------------------------------------------------- * Smooth scroll * --------------------------------------------------------------------------- */ jQuery('li.scroll > a, a.scroll').click(function() { var url = jQuery(this).attr('href'); var hash = '#' + url.split('#')[1]; var stickyH = jQuery('.sticky-header #Top_bar').innerHeight(); var tabsHeaderH = jQuery(hash).siblings('.ui-tabs-nav').innerHeight(); if (hash && jQuery(hash).length) { jQuery('html, body').animate({ scrollTop: jQuery(hash).offset().top - stickyH - tabsHeaderH }, 500); } }); /* --------------------------------------------------------------------------- * Muffin Accordion & FAQ * --------------------------------------------------------------------------- */ jQuery('.mfn-acc').each(function() { var el = jQuery(this); if (el.hasClass('openAll')) { // show all ----------- el.find('.question').addClass("active").children(".answer").show(); } else { // show one ----------- var active_tab = el.attr('data-active-tab'); if (el.hasClass('open1st')) active_tab = 1; if (active_tab) { el.find('.question').eq(active_tab - 1).addClass("active").children(".answer").show(); } } }); jQuery(".mfn-acc .question > .title").click(function() { if (jQuery(this).parent().hasClass("active")) { jQuery(this).parent().removeClass("active").children(".answer").slideToggle(200); } else { if (!jQuery(this).closest('.mfn-acc').hasClass('toggle')) { jQuery(this).parents(".mfn-acc").children().each(function() { if (jQuery(this).hasClass("active")) { jQuery(this).removeClass("active").children(".answer").slideToggle(200); } }); } jQuery(this).parent().addClass("active"); jQuery(this).next(".answer").slideToggle(200); } }); /* --------------------------------------------------------------------------- * jPlayer * --------------------------------------------------------------------------- */ function mfn_jPlayer() { jQuery('.mfn-jplayer').each(function() { var m4v = jQuery(this).attr('data-m4v'); var poster = jQuery(this).attr('data-img'); var swfPath = jQuery(this).attr('data-swf'); var cssSelectorAncestor = '#' + jQuery(this).closest('.mfn-jcontainer').attr('id'); jQuery(this).jPlayer({ ready: function() { jQuery(this).jPlayer('setMedia', { m4v: m4v, poster: poster }); }, play: function() { // To avoid both jPlayers playing together. jQuery(this).jPlayer('pauseOthers'); }, size: { cssClass: 'jp-video-360p', width: '100%', height: '360px' }, swfPath: swfPath, supplied: 'm4v', cssSelectorAncestor: cssSelectorAncestor, wmode: 'opaque' }); }); } mfn_jPlayer(); /* --------------------------------------------------------------------------- * Go to top * --------------------------------------------------------------------------- */ jQuery('#back_to_top').click(function() { jQuery('body,html').animate({ scrollTop: 0 }, 500); return false; }); /* --------------------------------------------------------------------------- * Section navigation * --------------------------------------------------------------------------- */ jQuery('.section .section-nav').click(function() { var el = jQuery(this); var section = el.closest('.section'); if (el.hasClass('prev')) { // Previous Section ------------- if (section.prev().length) { jQuery('html, body').animate({ scrollTop: section.prev().offset().top }, 500); } } else { // Next Section ----------------- if (section.next().length) { jQuery('html, body').animate({ scrollTop: section.next().offset().top }, 500); } } }); /* --------------------------------------------------------------------------- * WooCommerce * --------------------------------------------------------------------------- */ function addToCart() { jQuery('body').on('click', '.add_to_cart_button', function() { jQuery(this).closest('.product').addClass('adding-to-cart').removeClass('added-to-cart'); }); jQuery('body').bind('added_to_cart', function() { jQuery('.adding-to-cart').removeClass('adding-to-cart').addClass('added-to-cart'); }); } addToCart(); /* --------------------------------------------------------------------------- * Iframe height * --------------------------------------------------------------------------- */ function iframeHeight(item, ratio) { var itemW = item.width(); var itemH = itemW * ratio; if (itemH < 147) itemH = 147; item.height(itemH); } function iframesHeight() { iframeHeight(jQuery(".blog_wrapper .post-photo-wrapper .mfn-jplayer, .blog_wrapper .post-photo-wrapper iframe, .post-related .mfn-jplayer, .post-related iframe, .blog_slider_ul .mfn-jplayer, .blog_slider_ul iframe"), 0.78); // blog - list iframeHeight(jQuery(".single-post .single-photo-wrapper .mfn-jplayer, .single-post .single-photo-wrapper iframe"), 0.4); // blog - single iframeHeight(jQuery(".section-portfolio-header .mfn-jplayer, .section-portfolio-header iframe"), 0.4); // portfolio - single } iframesHeight(); /* --------------------------------------------------------------------------- * Debouncedresize * --------------------------------------------------------------------------- */ jQuery(window).bind("debouncedresize", function() { iframesHeight(); jQuery('.masonry.isotope,.isotope').isotope(); // carouFredSel wrapper Height set mfn_carouFredSel_height(); // Sidebar Height mfn_sidebar(); // Sliding Footer | Height mfn_footer(); // Header Width mfn_header(); // Full Screen Section mfn_sectionH(); // Full Screen Intro mfn_introH(); // niceScroll | Padding right fix for short content niceScrollFix(); }); /* --------------------------------------------------------------------------- * Isotope * --------------------------------------------------------------------------- */ // Isotope | Fiters function isotopeFilter(domEl, isoWrapper) { var filter = domEl.attr('data-rel'); isoWrapper.isotope({ filter: filter }); } // Isotope | Fiters | Click jQuery('.isotope-filters .filters_wrapper').find('li:not(.close) a').click(function(e) { e.preventDefault(); var filters = jQuery(this).closest('.isotope-filters'); var parent = filters.attr('data-parent'); if (parent) { parent = filters.closest('.' + parent); var isoWrapper = parent.find('.isotope').first() } else { var isoWrapper = jQuery('.isotope'); } filters.find('li').removeClass('current-cat'); jQuery(this).closest('li').addClass('current-cat'); isotopeFilter(jQuery(this), isoWrapper); }); // Isotope | Fiters | Reset jQuery('.isotope-filters .filters_buttons').find('li.reset a').click(function(e) { e.preventDefault(); jQuery('.isotope-filters .filters_wrapper').find('li').removeClass('current-cat'); isotopeFilter(jQuery(this), jQuery('.isotope')); }); // carouFredSel wrapper | Height mfn_carouFredSel_height(); // Sidebar | Height mfn_sidebar(); // Sliding Footer | Height mfn_footer(); // Header | Width mfn_header(); // Full Screen Section mfn_sectionH(); // Navigation | Hash hashNav(); // Equal Columns | Height //mfn_equalH(); }); /* -------------------------------------------------------------------------------------------------------------------------- * jQuery(window).scroll * ----------------------------------------------------------------------------------------------------------------------- */ jQuery(window).scroll(function() { mfn_stickyH(); mfn_sticky(); onePageActive(); }); /* -------------------------------------------------------------------------------------------------------------------------- * jQuery(window).load * ----------------------------------------------------------------------------------------------------------------------- */ jQuery(window).load(function() { /* --------------------------------------------------------------------------- * Isotope * --------------------------------------------------------------------------- */ // Portfolio - Isotope jQuery('.portfolio_wrapper .isotope:not(.masonry-flat)').isotope({ itemSelector: '.portfolio-item', layoutMode: 'fitRows' }); // Portfolio - Masonry Flat jQuery('.portfolio_wrapper .masonry-flat').isotope({ itemSelector: '.portfolio-item', masonry: { columnWidth: 1 } }); // Blog & Portfolio - Masonry jQuery('.masonry.isotope').isotope({ itemSelector: '.isotope-item', layoutMode: 'masonry' }); // Blog & Portfolio - Masonry $('.isotope.masonry, .isotope.masonry-hover, .isotope.masonry-minimal').isotope({ itemSelector : '.isotope-item', layoutMode : 'masonry', }); /* --------------------------------------------------------------------------- * Chart * --------------------------------------------------------------------------- */ jQuery('.chart').waypoint({ offset: '100%', triggerOnce: true, handler: function() { var color = jQuery(this).attr('data-color'); jQuery(this).easyPieChart({ animate: 1000, barColor: color, lineCap: 'circle', lineWidth: 8, size: 140, scaleColor: false, trackColor: '#f8f8f8' }); } }); /* --------------------------------------------------------------------------- * Skills * --------------------------------------------------------------------------- */ jQuery('.bars_list').waypoint({ offset: '100%', triggerOnce: true, handler: function() { jQuery(this).addClass('hover'); } }); /* --------------------------------------------------------------------------- * Progress Icons * --------------------------------------------------------------------------- */ jQuery('.progress_icons').waypoint({ offset: '100%', triggerOnce: true, handler: function() { var el = jQuery(this); var active = el.attr('data-active'); var color = el.attr('data-color'); var icon = el.find('.progress_icon'); var timeout = 200; // timeout in milliseconds icon.each(function(i) { if (i < active) { var time = (i + 1) * timeout; setTimeout(function() { jQuery(icon[i]).addClass('themebg').css('background-color', color); }, time); } }); } }); /* --------------------------------------------------------------------------- * Animate Math [counter, quick_fact, etc.] * --------------------------------------------------------------------------- */ jQuery('.animate-math .number').waypoint({ offset: '100%', triggerOnce: true, handler: function() { var el = jQuery(this); var duration = Math.floor((Math.random() * 1000) + 1000); var to = el.attr('data-to'); jQuery({ property: 0 }).animate({ property: to }, { duration: duration, easing: 'linear', step: function() { el.text(Math.floor(this.property)); }, complete: function() { el.text(this.property); } }); } }); // carouFredSel wrapper | Height mfn_carouFredSel_height(); // Sidebar | Height mfn_sidebar(); // Sliding Footer | Height mfn_footer(); // Header | Width mfn_header(); // Full Screen Section mfn_sectionH(); // Navigation | Hash hashNav(); // niceScroll | Padding right fix for short content niceScrollFix(); }); /* -------------------------------------------------------------------------------------------------------------------------- * jQuery(document).mouseup * ----------------------------------------------------------------------------------------------------------------------- */ jQuery(document).mouseup(function(e) { // search if (jQuery("#searchform").has(e.target).length === 0) { if (jQuery("#searchform").hasClass('focus')) { jQuery(this).find('.icon_close').click(); } } }); /* --------------------------------------------------------------------------- * Sliders configuration * --------------------------------------------------------------------------- */ // carouFredSel wrapper Height set ------------------------------------------- function mfn_carouFredSel_height() { jQuery('.caroufredsel_wrapper > ul').each(function() { var el = jQuery(this); var maxH = 0; el.children('li').each(function() { if (jQuery(this).innerHeight() > maxH) { maxH = jQuery(this).innerHeight(); } }); // console.log(maxH); el.closest('.caroufredsel_wrapper').height(maxH); }); } // --- Portfolio ------------------------------------------------------------- // Slick Slider | Auto responsive ----------------------------------------- function slickAutoResponsive( slider, max, size ){ if( ! max ) max = 5; if( ! size ) size = 380; var width = slider.width(); var count = Math.ceil( width / size ); if( count < 1 ) count = 1; if( count > max ) count = max; return count; } // --- Slider ---------------------------------------------------------------- function mfnSliderContent(){ $('.content_slider_ul').each(function(){ if($(this).hasClass("carouFredSel")){ if( $(this).closest('.content_slider').hasClass('carousel') ){ var style = { min:1, max:6}; } else { var style = 1; } // Init carouFredSel $( this ).carouFredSel({ circular : true, responsive : true, items : { width : 380, visible : style }, scroll : { duration : 500, easing : 'swing' }, prev : { button : function(){ return $(this).closest('.content_slider').find('.slider_prev'); } }, next : { button : function(){ return $(this).closest('.content_slider').find('.slider_next'); } }, pagination : { container : function(){ return $(this).closest('.content_slider').find('.slider_pagination'); } }, auto : { play : window.mfn_sliders.slider ? true : false, timeoutDuration : window.mfn_sliders.slider ? window.mfn_sliders.slider : 2500, }, swipe : { onTouch : true, onMouse : true, onBefore : function(){ $(this).find('a').addClass('disable'); $(this).find('li').trigger('mouseleave'); }, onAfter : function(){ $(this).find('a').removeClass('disable'); } } }); // Disable accidental clicks while swiping $(this).on('click', 'a.disable', function() { return false; }); }else{ var pager = function( el, i ){ return ''+ i +''; }; var slider = $(this); var count = 1; var centerMode = false; if( slider.closest( '.content_slider' ).hasClass( 'carousel' ) ){ count = slickAutoResponsive( slider ); $(window).bind( 'debouncedresize', function(){ slider.slick( 'slickSetOption', 'slidesToShow', slickAutoResponsive( slider ), false ); slider.slick( 'slickSetOption', 'slidesToScroll', slickAutoResponsive( slider ), true ); }); } if( slider.closest( '.content_slider' ).hasClass( 'center' ) ){ centerMode = true; } if(slider.siblings( '.slider_prev' ).length){ slider.slick({ cssEase : 'cubic-bezier(.4,0,.2,1)', dots : true, infinite : true, touchThreshold : 10, speed : 300, centerMode : centerMode, centerPadding : '20%', prevArrow : slider.siblings( '.slider_prev' ), nextArrow : slider.siblings( '.slider_next' ), adaptiveHeight : true, appendDots : slider.siblings( '.slider_pager' ), customPaging : pager, rtl : rtl ? true : false, autoplay : false, /*window.mfn_sliders.slider ? true : false,*/ autoplaySpeed : window.mfn_sliders.slider ? window.mfn_sliders.slider : 5000, slidesToShow : count, slidesToScroll : count }); } else{ slider.slick({ cssEase : 'cubic-bezier(.4,0,.2,1)', dots : true, infinite : true, touchThreshold : 10, speed : 300, centerMode : centerMode, centerPadding : '20%', prevArrow : '', nextArrow : '', adaptiveHeight : true, appendDots : slider.siblings( '.slider_pager' ), customPaging : pager, rtl : rtl ? true : false, autoplay : false, /*window.mfn_sliders.slider ? true : false,*/ autoplaySpeed : window.mfn_sliders.slider ? window.mfn_sliders.slider : 5000, slidesToShow : count, slidesToScroll : count }); } } }); } /*function mfnSliderContent() { jQuery('.content_slider_ul').each(function() { if (jQuery(this).closest('.content_slider').hasClass('carousel')) { var style = { min: 1, max: 6 }; } else { var style = 1; } // Init carouFredSel jQuery(this).carouFredSel({ circular: true, responsive: true, items: { width: 380, visible: style }, scroll: { duration: 500, easing: 'swing' }, prev: { button: function() { return jQuery(this).closest('.content_slider').find('.slider_prev'); } }, next: { button: function() { return jQuery(this).closest('.content_slider').find('.slider_next'); } }, pagination: { container: function() { return jQuery(this).closest('.content_slider').find('.slider_pagination'); } }, auto: { play: window.mfn_sliders.slider ? true : false, timeoutDuration: window.mfn_sliders.slider ? window.mfn_sliders.slider : 2500, }, swipe: { onTouch: true, onMouse: true, onBefore: function() { jQuery(this).find('a').addClass('disable'); jQuery(this).find('li').trigger('mouseleave'); }, onAfter: function() { jQuery(this).find('a').removeClass('disable'); } } }) // Disable accidental clicks while swiping jQuery(this).on('click', 'a.disable', function() { return false; }); });; }*/ // --- Testimonials ---------------------------------------------------------------- function mfnSliderTestimonials(){ var pager = function( el, i ){ var img = $( el.$slides[i] ).find('.single-photo-img').html(); return ''+ img +''; }; $('.testimonials_slider_ul').each(function(){ var slider = $(this); slider.slick({ cssEase : 'ease-out', dots : true, infinite : true, touchThreshold : 10, speed : 300, prevArrow : '', nextArrow : '', adaptiveHeight : true, appendDots : slider.siblings( '.slider_pager' ), customPaging : pager, autoplay : window.mfn_sliders.testimonials ? true : false, autoplaySpeed : window.mfn_sliders.testimonials ? window.mfn_sliders.testimonials : 5000, slidesToShow : 1, slidesToScroll : 1 }); }); } // --- Offer ----------------------------------------------------------------- function mfnSliderOffer() { $('.offer_ul').each( function(){ var slider = $(this); slider.slick({ cssEase : 'ease-out', dots : false, infinite : true, touchThreshold : 10, speed : 300, prevArrow : '', nextArrow : '', adaptiveHeight : true, //customPaging : pager, rtl : rtl ? true : false, autoplay : window.mfn_sliders.offer ? true : false, autoplaySpeed : window.mfn_sliders.offer ? window.mfn_sliders.offer : 5000, slidesToShow : 1, slidesToScroll : 1 }); // Pagination | Show (css) slider.siblings('.slider_pagination').addClass('show'); // Pager | Set slide number after change slider.on( 'afterChange', function( event, slick, currentSlide, nextSlide ){ slider.siblings('.slider_pagination').find('.current').text( currentSlide + 1 ); }); }); } function mfnSliderOfferThumb_Pager(nr) { var thumb = jQuery(this).closest('.offer_thumb').find('.offer_thumb_li.id_' + nr + ' .thumbnail img').attr('src'); return '' + nr + ''; } function mfnSliderOfferThumb() { jQuery('.offer_thumb_ul').each(function() { // Init carouFredSel jQuery(this).carouFredSel({ circular: true, responsive: true, items: { visible: 1, width: 100 }, pagination: { container: jQuery(this).closest('.offer_thumb').find('.slider_pagination'), anchorBuilder: mfnSliderOfferThumb_Pager }, scroll: { duration: 500, easing: 'swing', onAfter: function() { jQuery(this).closest('.offer_thumb').find('.current').text(jQuery(this).triggerHandler("currentPosition") + 1); } }, auto: { play: window.mfn_sliders.offer ? true : false, timeoutDuration: window.mfn_sliders.offer ? window.mfn_sliders.offer : 2500, }, swipe: { onTouch: true, onMouse: true, onBefore: function() { jQuery(this).find('a').addClass('disable'); jQuery(this).find('li').trigger('mouseleave'); }, onAfter: function() { jQuery(this).find('a').removeClass('disable'); jQuery(this).closest('.offer_thumb').find('.current').text(jQuery(this).triggerHandler("currentPosition") + 1); } } }); // Disable accidental clicks while swiping jQuery(this).on('click', 'a.disable', function() { return false; }); }); } // --- Blog ------------------------------------------------------------------ function mfnSliderBlog() { jQuery('.blog_slider_ul').each(function() { // Init carouFredSel jQuery(this).carouFredSel({ circular: true, responsive: true, items: { width: 380, visible: { min: 1, max: 4 } }, scroll: { duration: 500, easing: 'swing' }, prev: { button: function() { return jQuery(this).closest('.blog_slider').find('.slider_prev'); } }, next: { button: function() { return jQuery(this).closest('.blog_slider').find('.slider_next'); } }, pagination: { container: function() { return jQuery(this).closest('.blog_slider').find('.slider_pagination'); } }, auto: { play: window.mfn_sliders.blog ? true : false, timeoutDuration: window.mfn_sliders.blog ? window.mfn_sliders.blog : 2500, }, swipe: { onTouch: true, onMouse: true, onBefore: function() { jQuery(this).find('a').addClass('disable'); jQuery(this).find('li').trigger('mouseleave'); }, onAfter: function() { jQuery(this).find('a').removeClass('disable'); } } }); // Disable accidental clicks while swiping jQuery(this).on('click', 'a.disable', function() { return false; }); }); } // --- Clients ------------------------------------------------------------------ function mfnSliderClients() { jQuery('.clients_slider_ul').each(function() { // Init carouFredSel jQuery(this).carouFredSel({ circular: true, responsive: true, items: { width: 380, visible: { min: 1, max: 4 } }, scroll: { duration: 500, easing: 'swing' }, prev: { button: function() { return jQuery(this).closest('.clients_slider').find('.slider_prev'); } }, next: { button: function() { return jQuery(this).closest('.clients_slider').find('.slider_next'); } }, pagination: { container: function() { return jQuery(this).closest('.clients_slider').find('.slider_pagination'); } }, auto: { play: window.mfn_sliders.clients ? true : false, timeoutDuration: window.mfn_sliders.clients ? window.mfn_sliders.clients : 2500, }, swipe: { onTouch: true, onMouse: true, onBefore: function() { jQuery(this).find('a').addClass('disable'); jQuery(this).find('li').trigger('mouseleave'); }, onAfter: function() { jQuery(this).find('a').removeClass('disable'); } } }); // Disable accidental clicks while swiping jQuery(this).on('click', 'a.disable', function() { return false; }); }); } // --- Shop ------------------------------------------------------------------ function mfnSliderShop() { jQuery('.shop_slider_ul').each(function() { // Init carouFredSel jQuery(this).carouFredSel({ circular: true, responsive: true, items: { width: 380, visible: { min: 1, max: 4 } }, scroll: { duration: 500, easing: 'swing' }, prev: { button: function() { return jQuery(this).closest('.shop_slider').find('.slider_prev'); } }, next: { button: function() { return jQuery(this).closest('.shop_slider').find('.slider_next'); } }, pagination: { container: function() { return jQuery(this).closest('.shop_slider').find('.slider_pagination'); } }, auto: { play: window.mfn_sliders.shop ? true : false, timeoutDuration: window.mfn_sliders.shop ? window.mfn_sliders.shop : 2500, }, swipe: { onTouch: true, onMouse: true, onBefore: function() { jQuery(this).find('a').addClass('disable'); jQuery(this).find('li').trigger('mouseleave'); }, onAfter: function() { jQuery(this).find('a').removeClass('disable'); } } }); // Disable accidental clicks while swiping jQuery(this).on('click', 'a.disable', function() { // return false; }); }); } // --- Portfolio ------------------------------------------------------------- function mfnSliderPortfolio() { /* $('.portfolio_slider_ul').each(function(){ var slider = $(this); slider.slick({ cssEase : 'ease-out', dots : false, infinite : true, touchThreshold : 10, speed : 300, prevArrow : '', nextArrow : '', autoplay : window.mfn_sliders.portfolio ? true : false, autoplaySpeed : window.mfn_sliders.portfolio ? window.mfn_sliders.portfolio : 5000, slidesToShow : slickAutoResponsive( slider ), slidesToScroll : slickAutoResponsive( slider ) }); // Bind | debouncedresize $(window).bind( 'debouncedresize', function(){ slider.slick( 'slickSetOption', 'slidesToShow', slickAutoResponsive( slider ), false ); slider.slick( 'slickSetOption', 'slidesToScroll', slickAutoResponsive( slider ), true ); }); // prettyPhoto | disable on dragstart slider.on( 'dragstart', '.slick-slide a[rel="prettyphoto"]', function( event ){ if( pretty ){ $(this).addClass( 'unbind-pretty' ).unbind( 'click.prettyphoto' ); } }); // prettyPhoto | enable after change slider.on( 'afterChange', function( event, slick, currentSlide, nextSlide ){ if( pretty ){ $( 'a.unbind-pretty[rel="prettyphoto"]', slider ).prettyPhoto( pretty ).removeClass( 'unbind-pretty' ); } }); }); */ $('.portfolio_slider_ul').each(function(){ var slider = $(this); var size = 380; var scroll = 5; if( slider.closest( '.portfolio_slider' ).data( 'size' ) ){ size = slider.closest( '.portfolio_slider' ).data( 'size' ); } if( slider.closest( '.portfolio_slider' ).data( 'size' ) ){ scroll = slider.closest( '.portfolio_slider' ).data( 'scroll' ); } slider.slick({ cssEase : 'ease-out', dots : false, infinite : true, touchThreshold : 10, speed : 300, prevArrow : '', nextArrow : '', rtl : rtl ? true : false, autoplay : window.mfn_sliders.portfolio ? true : false, autoplaySpeed : window.mfn_sliders.portfolio ? window.mfn_sliders.portfolio : 5000, slidesToShow : slickAutoResponsive( slider, 5, size ), slidesToScroll : slickAutoResponsive( slider, scroll, size ) }); // Bind | debouncedresize $( window ).bind( 'debouncedresize', function(){ slider.slick( 'slickSetOption', 'slidesToShow', slickAutoResponsive( slider, 5, size ), false ); slider.slick( 'slickSetOption', 'slidesToScroll', slickAutoResponsive( slider, scroll, size ), true ); }); }); } window.mfn_nicescroll = 25; window.mfn_prettyphoto = { disable: 0, width: 0, height: 0 }; window.mfn_sliders = { blog: 0, clients: 0, offer: 10000, portfolio: 0, shop: 0, slider: 6000, testimonials: 7000 }; jQuery(document).ready(function($) { jQuery('.masonry.isotope,.isotope').isotope(); jQuery('#configurator .control').click(function(e) { e.preventDefault(); if (jQuery('#configurator').hasClass('active')) { jQuery('#configurator').removeClass('active').animate({ 'right': -272 }, 500); } else { jQuery('#configurator').addClass('active').animate({ 'right': -1 }, 500); } }); jQuery('#mfn-demo-panel .control').click(function(e) { e.preventDefault(); if (jQuery('#mfn-demo-panel').hasClass('active')) { jQuery('#mfn-demo-panel').removeClass('active').animate({ 'right': -367 }, 500); } else { jQuery('#mfn-demo-panel').addClass('active').animate({ 'right': -1 }, 500); } }); demosSliderH(); /* --------------------------------------------------------------------------- * niceScroll * --------------------------------------------------------------------------- */ jQuery(".demos-slider").niceScroll({ autohidemode: false, cursorborder: 0, cursorborderradius: 5, cursorcolor: '#222222', cursorwidth: 0, horizrailenabled: false, mousescrollstep: 40, scrollspeed: 60 }); /* --------------------------------------------------------------------------- * Parallax Backgrounds * --------------------------------------------------------------------------- */ if (typeof stellar !== 'undefined' && $.isFunction(stellar)) { var ua = navigator.userAgent, isMobileWebkit = /WebKit/.test(ua) && /Mobile/.test(ua); if (!isMobileWebkit && jQuery(window).width() >= 768) { if (window.mfn_parallax == 'stellar') { // Stellar jQuery.stellar({ horizontalScrolling: false, responsive: true }); } else { // Enllax jQuery(window).enllax(); } } else { jQuery('.section[data-enllax-ratio], .section[data-stellar-ratio]').css('background-attachment', 'scroll'); jQuery('div[data-enllax-ratio], div[data-stellar-ratio]').css( 'background-attachment' , 'scroll' ); } } }); })(jQuery); function demosSliderH() { var panel = jQuery('#mfn-demo-panel'); var panelH = panel.height() - panel.find('.header').height(); jQuery(".demos-slider").height(panelH); } (function($){ "use strict"; $(function(){ /** * Switch Style */ function switch_style(){ var el = $( '.demo-switch' ); // load if( $( 'body' ).hasClass( 'style-simple' ) ){ $( 'a.simple', el ).addClass( 'active' ); } else { $( 'a.default', el ).addClass( 'active' ); } // click $( 'a', el ).on( 'click', function(e){ e.preventDefault(); var style = $( this ).attr( 'data-style' ); $( 'body' ).removeClass( 'style-default style-simple' ).addClass( 'style-'+ style ); $( 'a', el ).removeClass( 'active' ); $( 'a.' + style , el ).addClass( 'active' ); }); } switch_style(); var wc_checkout_coupons = { init: function() { $( document.body ).on( 'click', 'a.showcoupon', this.show_coupon_form ); $( document.body ).on( 'click', '.woocommerce-remove-coupon', this.remove_coupon ); $( 'form.checkout_coupon' ).hide().submit( this.submit ); }, show_coupon_form: function() { $( '.checkout_coupon' ).slideToggle( 400, function() { $( '.checkout_coupon' ).find( ':input:eq(0)' ).focus(); }); return false; }, submit: function() { var $form = $( this ); if ( $form.is( '.processing' ) ) { return false; } $form.addClass( 'processing' ).block({ message: null, overlayCSS: { background: '#fff', opacity: 0.6 } }); var data = { security: wc_checkout_params.apply_coupon_nonce, coupon_code: $form.find( 'input[name="coupon_code"]' ).val() }; $.ajax({ type: 'POST', url: wc_checkout_params.wc_ajax_url.toString().replace( '%%endpoint%%', 'apply_coupon' ), data: data, success: function( code ) { $( '.woocommerce-error, .woocommerce-message' ).remove(); $form.removeClass( 'processing' ).unblock(); if ( code ) { $form.before( code ); $form.slideUp(); $( document.body ).trigger( 'update_checkout', { update_shipping_method: false } ); } }, dataType: 'html' }); return false; }, remove_coupon: function( e ) { e.preventDefault(); var container = $( this ).parents( '.woocommerce-checkout-review-order' ), coupon = $( this ).data( 'coupon' ); container.addClass( 'processing' ).block({ message: null, overlayCSS: { background: '#fff', opacity: 0.6 } }); var data = { security: wc_checkout_params.remove_coupon_nonce, coupon: coupon }; $.ajax({ type: 'POST', url: wc_checkout_params.wc_ajax_url.toString().replace( '%%endpoint%%', 'remove_coupon' ), data: data, success: function( code ) { $( '.woocommerce-error, .woocommerce-message' ).remove(); container.removeClass( 'processing' ).unblock(); if ( code ) { $( 'form.woocommerce-checkout' ).before( code ); $( document.body ).trigger( 'update_checkout', { update_shipping_method: false } ); // Remove coupon code from coupon field $( 'form.checkout_coupon' ).find( 'input[name="coupon_code"]' ).val( '' ); } }, error: function ( jqXHR ) { if ( wc_checkout_params.debug_mode ) { /* jshint devel: true */ console.log( jqXHR.responseText ); } }, dataType: 'html' }); } }; var wc_checkout_login_form = { init: function() { $( document.body ).on( 'click', 'a.showlogin', this.show_login_form ); }, show_login_form: function() { $( 'form.login, form.woocommerce-form--login' ).slideToggle(); return false; } }; wc_checkout_coupons.init(); wc_checkout_login_form.init(); }); })(jQuery); jQuery(window).load(function(){ jQuery('.isotope').isotope('layout'); /* --------------------------------------------------------------------------- * TwentyTwenty [ before_after ] * --------------------------------------------------------------------------- */ jQuery('.before_after.twentytwenty-container').twentytwenty(); });