(function(){var t=this;t.N2_=t.N2_||{r:[],d:[]},t.N2R=t.N2R||function(){t.N2_.r.push(arguments)},t.N2D=t.N2D||function(){t.N2_.d.push(arguments)}}).call(window),N2D("SmartSliderBackgrounds",function(t,e){function i(e){this.device=null,this.slider=e,this.hasFixed=!1,this.lazyLoad=e.parameters.lazyLoad,this.lazyLoadNeighbor=e.parameters.lazyLoadNeighbor,this.deviceDeferred=t.Deferred(),this.slider.sliderElement.one("SliderDevice",t.proxy(this.onSlideDeviceChangedFirst,this)),this.slider.sliderElement.on("visibleSlidesChanged",t.proxy(this.onVisibleSlidesChanged,this)),this.slider.sliderElement.on("slideCountChanged",t.proxy(this.onVisibleSlidesChanged,this))}return i.prototype.whenWithProgress=function(e){for(var i=0,s=t.Deferred(),n=0;n').appendTo("body")),parseFloat(s.css("fontSize"))/10}var s;return{toRem:function(t){return t/i()+"rem"}}}),N2D("SmartSliderLoad",function(t,e){function i(e,i){this.parameters=t.extend({fade:1,scroll:0},i),this.deferred=t.Deferred(),this.smartSlider=e,this.spinnerCouner=0,this.id=e.sliderElement.attr("id"),this.$window=t(window),this.spinner=t("#"+this.id+"-spinner")}return i.prototype.start=function(){if(this.parameters.scroll){var e=t(window);e.on("scroll."+this.id,t.proxy(this.onScroll,this)),this.onScroll()}else if(this.parameters.fade){this.loadingArea=t("#"+this.id+"-placeholder").eq(0),this.showSpinner("fadePlaceholder");var i=this.spinner.find(".n2-ss-spinner-counter");i.length&&(i.html("0%"),this.smartSlider.backgrounds.load.progress(t.proxy(function(t,e){i.html(Math.round(t/(e+1)*100)+"%")},this))),this.showSlider()}else this.showSlider()},i.prototype.onScroll=function(){this.$window.scrollTop()+this.$window.height()>this.smartSlider.sliderElement.offset().top+100&&(this.$window.off("scroll."+this.id),this.showSlider())},i.prototype.loadLayerImages=function(){var e=t.Deferred();return this.smartSlider.sliderElement.find(".n2-ss-layers-container").n2imagesLoaded().always(function(){e.resolve()}),e},i.prototype.showSlider=function(){t.when(this.smartSlider.responsive.ready,this.smartSlider.backgrounds.load,this.loadLayerImages()).always(t.proxy(function(){this._showSlider()},this))},i.prototype._showSlider=function(e){this.smartSlider.responsive.isReadyToResize=!0,t.when.apply(t,this.smartSlider.widgetDeferreds).done(t.proxy(function(){this.smartSlider.responsive.invalidateResponsiveState=!0,this.smartSlider.responsive.doResize(),this.smartSlider.mainAnimation&&this.smartSlider.mainAnimation.setToStarterSlide(this.smartSlider.starterSlide),this.smartSlider.starterSlide.setStarterSlide(),this.smartSlider.initLayerAnimations(),this.smartSlider.sliderElement.trigger("BeforeVisible"),this.smartSlider.responsive.alignElement.addClass("n2-ss-align-visible"),this.smartSlider.sliderElement.addClass("n2-ss-loaded").removeClass("n2notransition"),this.spinner.find(".n2-ss-spinner-counter").html(""),this.removeSpinner("fadePlaceholder"),t("#"+this.id+"-placeholder").remove(),this.loadingArea=this.smartSlider.sliderElement,"function"==typeof e?e(this.deferred):this.deferred.resolve(),this.smartSlider.sliderElement.triggerHandler("Show")},this))},i.prototype.loaded=function(t){this.deferred.done(t)},i.prototype.showSpinner=function(t){0===this.spinnerCouner&&this.spinner.appendTo(this.loadingArea).css("display",""),this.spinnerCouner++},i.prototype.removeSpinner=function(t){this.spinnerCouner--,this.spinnerCouner<=0&&(this.spinner.detach(),this.spinnerCouner=0)},i}),N2D("ScrollTracker",function(t,e,i){function s(){this.started=!1,this.items=[]}return s.prototype.add=function(t,e,i,s){var n={$el:t,mode:e,onVisible:i,onHide:s,state:"unknown"};this.items.push(n),this._onScroll(n,Math.max(document.documentElement.clientHeight,window.innerHeight)),this.started||this.start()},s.prototype.start=function(){this.started||(t(window).on("scroll.scrollTracker",t.proxy(this.onScroll,this)),this.started=!0)},s.prototype.onScroll=function(t){for(var e=Math.max(document.documentElement.clientHeight,window.innerHeight),i=0;i.7*e,n=!0;"partly-visible"===t.mode?s&&(i.bottom<0||i.top>=i.height)?n=!1:!s&&(i.bottom-i.height<0||i.top-e+i.height>=0)&&(n=!1):"not-visible"===t.mode&&(n=i.top-e<0&&i.top+i.height>0),n===!1?"hidden"!==t.state&&("function"==typeof t.onHide&&t.onHide(),t.state="hidden"):"visible"!==t.state&&("function"==typeof t.onVisible&&t.onVisible(),t.state="visible")},new s}),N2D("SmartSliderApi",function(t,e){function i(){this.sliders={},this.readys={}}i.prototype.makeReady=function(t,e){if(this.sliders[t]=e,"undefined"!=typeof this.readys[t])for(var i=0;i=0&&s.element(n.eq(r))},element:function(e){var i=t(window.n2ScrollOffsetSelector).height();s.to(t(e).offset().top-i)}};return i.prototype.scroll=function(t,e){this.isClickAllowed(t)&&(t.preventDefault(),s[e].apply(window,Array.prototype.slice.call(arguments,2)))},window.n2ss=new i,i}),N2D("SmartSliderAbstract",function($,undefined){function SmartSliderAbstract(t,e){this.editor=null,this.startedDeferred=$.Deferred(),this.visibleDeferred=$.Deferred(),t instanceof $&&(t="#"+t.attr("id"));var i=t.substr(1);if(this.elementID=i,window[i]&&window[i]instanceof SmartSliderAbstract)if(window[i].__$sliderElement&&!$.contains(document.body,window[i].__$sliderElement.get(0)));else{if(window[i].sliderElement===undefined)return void console.error("Slider [#"+i+"] inited multiple times");if($.contains(document.body,window[i].sliderElement.get(0)))return void console.error("Slider [#"+i+"] embedded multiple times")}this.readyDeferred=$.Deferred(),N2D(t,$.proxy(function(){return this},this)),this.isAdmin=!!e.admin,this.id=parseInt(i.replace("n2-ss-","")),window[i]=this,e.isDelayed!==undefined&&e.isDelayed?$(window).ready($.proxy(function(){this.waitForExists(i,e)},this)):this.waitForExists(i,e)}return SmartSliderAbstract.prototype.kill=function(){this.killed=!0;var t=this.sliderElement.attr("id"),e=$("#"+t+"-placeholder");e.length?e.remove():N2R("documentReady",function(e){e("#"+t+"-placeholder").remove()});var i=this.sliderElement.closest(".n2-ss-margin");i.length?i.remove():N2R("documentReady",$.proxy(function(t){this.sliderElement.closest(".n2-ss-margin").remove()},this));var s=this.sliderElement.closest(".n2-ss-align");s.length?s.remove():N2R("documentReady",$.proxy(function(t){this.sliderElement.closest(".n2-ss-align").remove()},this)),n2ss.makeReady(this.id,this),this.readyDeferred.resolve()},SmartSliderAbstract.prototype.waitForExists=function(t,e){var i=$.Deferred(),s=function(){var e=$("#"+t);e.length?i.resolve(e):setTimeout(s,500)};i.done($.proxy(this.onSliderExists,this,t,e)),s()},SmartSliderAbstract.prototype.onSliderExists=function(t,e,i){if(this.__$sliderElement=i,"TEMPLATE"===i.prop("tagName")){var s=i.data("dependency"),n=i.data("delay"),r=$.proxy(function(){var s=$(i.html());i.replaceWith(s),this.waitForDimension($("#"+t),e),$(window).triggerHandler("n2Rocket",[this.sliderElement])},this);s&&$("#n2-ss-"+s).length?n2ss.ready(s,$.proxy(function(t){t.ready(r)},this)):n?setTimeout(r,n):r()}else this.waitForDimension(i,e)},SmartSliderAbstract.prototype.waitForDimension=function(t,e){var i=$.Deferred(),s=function(){var e=t.is(":visible");e?i.resolve():setTimeout(s,200)};s(),i.done($.proxy(this.onSliderHasDimension,this,t,e))},SmartSliderAbstract.prototype.initCSS=function(){this.parameters.css&&$('").appendTo("head")},SmartSliderAbstract.prototype.onSliderHasDimension=function($sliderElement,parameters){if(this.killed=!1,n2const.isIE?$sliderElement.attr("data-ie",n2const.isIE):n2const.isEdge&&$sliderElement.attr("data-ie",n2const.isEdge),this.slideClass=this.slideClass||"FrontendSliderSlide",this.responsive=!1,this.mainAnimationLastChangeTime=0,this.currentSlide=null,this.currentRealSlide=null,this.staticSlide=!1,this.isShuffled=!1,this.slides=[],this.visibleSlides=1,this.sliderElement=$sliderElement.data("ss",this),this.needBackgroundWrap=!1,this.blockCarousel=!1,this.parameters=$.extend({admin:!1,playWhenVisible:1,playWhenVisibleAt:.5,perspective:1e3,callbacks:"",autoplay:{},blockrightclick:!1,maintainSession:0,align:"normal",controls:{touch:"horizontal",keyboard:!1,mousewheel:!1,blockCarouselInteraction:1},hardwareAcceleration:!0,layerMode:{playOnce:0,playFirstLayer:1,mode:"skippable",inAnimation:"mainInEnd"},foreverLayerAnimation:!1,parallax:{enabled:0,mobile:0,horizontal:"mouse",vertical:"mouse",origin:"enter"},load:{},mainanimation:{},randomize:{randomize:0,randomizeFirst:0},responsive:{},lazyload:{enabled:0},postBackgroundAnimations:!1,initCallbacks:[],dynamicHeight:0,lightbox:[],lightboxDeviceImages:[],titles:[],descriptions:[],allowBGImageAttachmentFixed:1,backgroundParallax:{strength:0,tablet:0,mobile:0},particlejs:0},parameters),this.disabled={layerAnimations:!1,layerSplitTextAnimations:!1,backgroundAnimations:!1,postBackgroundAnimations:!1},n2const.isSamsungBrowser&&(this.disabled.layerSplitTextAnimations=!0,this.disabled.postBackgroundAnimations=!0),!(this.isAdmin||parameters.responsive.desktop&¶meters.responsive.tablet&¶meters.responsive.mobile)){var md=new MobileDetect(window.navigator.userAgent,801),isTablet=!!md.tablet(),isMobile=!!md.phone();if(!parameters.responsive.mobile&&isMobile||!parameters.responsive.tablet&&isTablet||!parameters.responsive.desktop&&!isTablet&&!isMobile)return void this.kill()}this.initCSS(),this.firstSlideReady=$.Deferred();try{eval(this.parameters.callbacks)}catch(e){console.error(e)}this.startVisibilityCheck(),n2ss.makeReady(this.id,this),this.widgetDeferreds=[],this.sliderElement.on("addWidget",$.proxy(this.addWidget,this)),this.isAdmin&&(this.changeTo=function(){}),this.load=new N2Classes.SmartSliderLoad(this,this.parameters.load),this.backgrounds=new N2Classes.SmartSliderBackgrounds(this),this.__initSlides(),$.when(this.overrideFirstSlide()).done($.proxy(this.onFirstSlideInitialized,this)),navigator.userAgent.match("UCBrowser")&&$("html").addClass("n2-ucbrowser")},SmartSliderAbstract.prototype.overrideFirstSlide=function(){if("undefined"!=typeof window["ss"+this.id]){if("object"==typeof window["ss"+this.id])return window["ss"+this.id].done($.proxy(function(t){null!==t&&this.changeActiveBeforeLoad(t)},this));var t="undefined"!=typeof window["ss"+this.id]?parseInt(window["ss"+this.id]):null;null!==t&&this.changeActiveBeforeLoad(t)}else if(!this.isAdmin&&this.parameters.maintainSession&&"undefined"!=typeof sessionStorage){var e=sessionStorage.getItem("ss-"+this.id);null!==e&&this.changeActiveBeforeLoad(parseInt(e)),this.sliderElement.on("mainAnimationComplete",$.proxy(function(t,e,i,s){sessionStorage.setItem("ss-"+this.id,s)},this))}return!0},SmartSliderAbstract.prototype.changeActiveBeforeLoad=function(t){t>=0&&tthis.realSlides.length-1?0:i+1]);this.startCurrentSlideIndex(),this.firstSlideReady.resolve(this.currentSlide);for(var j=0;je&&(o*=e/r),e+i>s-r&&(a+=e+i-s+r);var l=e+n.top,h=e+n.bottom;(this.isAdmin||a>=l&&l>=o||h>=o&&a>=h||o>=l&&h>=a)&&($(window).off(".n2-ss-visible"+this.id),this.visibleDeferred.resolve())},SmartSliderAbstract.prototype.visible=function(t){this.visibleDeferred.done($.proxy(t,this))},SmartSliderAbstract.prototype.isPlaying=function(){return"ended"!==this.mainAnimation.getState()},SmartSliderAbstract.prototype.focus=function(t){var e=!1;if(this.responsive.parameters.focusUser&&!t&&(e=!0),e){var i=$(window).scrollTop(),s=this.responsive.focusOffsetTop,n=this.responsive.focusOffsetBottom,r=$(window).height(),o=this.sliderElement[0].getBoundingClientRect(),a=o.top-s,l=r-o.bottom-n;if(0>=a&&0>=l);else if(a>0&&l>0);else{var h=i;if(0>a?h=l>=-a?i-s+o.top:i+n+o.bottom-r:0>l&&(h=a>=-l?i+n+o.bottom-r:i-s+o.top),h!==i)return this._scrollTo(h,Math.abs(i-h))}}return!0},SmartSliderAbstract.prototype._scrollTo=function(t,e){var i=$.Deferred();return window.nextendScrollFocus=!0,$("html, body").animate({scrollTop:t},e,$.proxy(function(){i.resolve(),setTimeout(function(){window.nextendScrollFocus=!1},100)},this)),i},SmartSliderAbstract.prototype.isChangeCarousel=function(t){return"next"===t?this.currentSlide.index+1>=this.slides.length:"previous"===t?this.currentSlide.index-1<0:!1},SmartSliderAbstract.prototype.initNotCarousel=function(){this.next=function(t,e){var i=this.currentSlide.index+1;return i=0?this.changeTo(i,!0,t,e):!1},this.isChangePossible=function(t){var e=!1;return"next"===t?(e=this.currentSlide.index+1,e>=this.slides.length&&(e=!1)):"previous"===t&&(e=this.currentSlide.index-1,0>e&&(e=!1)),e!==!1&&e!==this.currentSlide.index};var t=$.proxy(function(t){0===t?this.widgets.setState("nonCarouselFirst",!0):this.widgets.setState("nonCarouselFirst",!1),t===this.slides.length-1?this.widgets.setState("nonCarouselLast",!0):this.widgets.setState("nonCarouselLast",!1)},this);this.startedDeferred.done($.proxy(function(){t(this.currentSlide.index)},this)),this.sliderElement.on("sliderSwitchTo",function(e,i){t(i)})},SmartSliderAbstract.prototype.isChangePossibleCarousel=function(t){var e=!1;return"next"===t?(e=this.currentSlide.index+1,e>=this.slides.length&&(e=0)):"previous"===t&&(e=this.currentSlide.index-1,0>e&&(e=this.slides.length-1)),e!==!1&&e!==this.currentSlide.index},SmartSliderAbstract.prototype.initCarousel=function(){this.next=this.nextCarousel,this.previous=this.previousCarousel,this.isChangePossible=this.isChangePossibleCarousel},SmartSliderAbstract.prototype.nextCarousel=function(t,e){var i=this.currentSlide.index+1;return i>=this.slides.length&&(i=0),this.changeTo(i,!1,t,e)},SmartSliderAbstract.prototype.previousCarousel=function(t,e){var i=this.currentSlide.index-1;return 0>i&&(i=this.slides.length-1),this.changeTo(i,!0,t,e)},SmartSliderAbstract.prototype.directionalChangeToReal=function(t){this.directionalChangeTo(t)},SmartSliderAbstract.prototype.directionalChangeTo=function(t){t>this.currentSlide.index?this.changeTo(t,!1):this.changeTo(t,!0)},SmartSliderAbstract.prototype.changeTo=function(t,e,i,s){if(t=parseInt(t),t!==this.currentSlide.index){this.sliderElement.trigger("sliderSwitchTo",[t,this.getRealIndex(t)]);var n=$.now();return $.when($.when.apply($,this.backgrounds.preLoadSlides(this.getVisibleSlides(this.slides[t]))),this.focus(i)).done($.proxy(function(){if(this.mainAnimationLastChangeTime<=n){this.mainAnimationLastChangeTime=n;var r=this.mainAnimation.getState();if("ended"===r){"undefined"==typeof i&&(i=!1);var o=this.mainAnimation;"undefined"!=typeof s&&(o=s),this._changeTo(t,e,i,s),o.changeTo(this.currentSlide,this.slides[t],e,i),this._changeCurrentSlide(t)}else"initAnimation"!==r&&"playing"!==r||(this.sliderElement.off(".fastChange").one("mainAnimationComplete.fastChange",$.proxy(function(){this.changeTo.call(this,t,e,i,s)},this)),this.mainAnimation.timeScale(2*this.mainAnimation.timeScale()))}},this)),!0}return!1},SmartSliderAbstract.prototype._changeCurrentSlide=function(t){this.currentRealSlide=this.currentSlide=this.slides[t],this.sliderElement.triggerHandler("sliderChangeCurrentSlide")},SmartSliderAbstract.prototype._changeTo=function(t,e,i,s){},SmartSliderAbstract.prototype.revertTo=function(t,e){this.unsetActiveSlide(this.slides[e]),this.setActiveSlide(this.slides[t]),this._changeCurrentSlide(t),this.sliderElement.trigger("sliderSwitchTo",[t,this.getRealIndex(t)])},SmartSliderAbstract.prototype.setActiveSlide=function(t){t.$element.addClass("n2-ss-slide-active")},SmartSliderAbstract.prototype.unsetActiveSlide=function(t){t.$element.removeClass("n2-ss-slide-active")},SmartSliderAbstract.prototype.initMainAnimationWithLayerAnimation=function(){"forced"===this.parameters.layerMode.mode&&this.sliderElement.on("preChangeToPlay",$.proxy(function(t,e,i,s,n){i.handled=!0,s.$element.on("layerAnimationCompleteOut.layers",function(){s.$element.off("layerAnimationCompleteOut.layers"),e.resolve()}),s.playOut()},this)),this.sliderElement.on("mainAnimationStart",$.proxy(this.onMainAnimationStartSyncLayers,this,this.parameters.layerMode)).on("reverseModeEnabled",$.proxy(this.onMainAnimationStartSyncLayersReverse,this,this.parameters.layerMode))},SmartSliderAbstract.prototype.onMainAnimationStartSyncLayers=function(t,e,i,s,n){var r=this.slides[n].$element,o=this.slides[s].$element;"mainInStart"===t.inAnimation?r.one("mainAnimationStartIn.layers",$.proxy(function(){r.off("mainAnimationStartInCancel.layers"),r.data("slide").playIn()},this)):"mainInEnd"===t.inAnimation&&r.one("mainAnimationCompleteIn.layers",$.proxy(function(){r.off("mainAnimationStartInCancel.layers"),r.data("slide").playIn()},this)),o.on("mainAnimationCompleteOut.layers",$.proxy(function(){o.off("mainAnimationCompleteOut.layers"),"skippable"===t.mode?t.playOnce?o.data("slide").suspend():o.data("slide").reset():"forced"===t.mode&&(t.playOnce||o.data("slide").reset())},this)),r.one("mainAnimationStartInCancel.layers",function(){r.off("mainAnimationStartIn.layers"),r.off("mainAnimationCompleteIn.layers")})},SmartSliderAbstract.prototype.onMainAnimationStartSyncLayersReverse=function(t,e,i){var s=this.slides[i].$element;"mainInStart"===t.inAnimation?s.one("mainAnimationStartIn.layers",$.proxy(function(){s.data("slide").playIn()},this)):"mainInEnd"===t.inAnimation&&s.one("mainAnimationCompleteIn.layers",$.proxy(function(){this.sliderElement.off("mainAnimationComplete.layers"),s.data("slide").playIn()},this)),this.sliderElement.one("mainAnimationComplete.layers",function(){s.off("mainAnimationStartIn.layers"),s.off("mainAnimationCompleteIn.layers")})},SmartSliderAbstract.prototype.findSlideByElement=function(t){t=$(t);for(var e=0;e1},SmartSliderAbstract.prototype.initControls=function(){if(!this.parameters.admin){if(this.hasTouch())switch(this.parameters.controls.touch){case"vertical":new N2Classes.SmartSliderControlTouchVertical(this);break;case"horizontal":new N2Classes.SmartSliderControlTouchHorizontal(this)}this.parameters.controls.keyboard&&("undefined"!=typeof this.controls.touch?new N2Classes.SmartSliderControlKeyboard(this,this.controls.touch.axis):new N2Classes.SmartSliderControlKeyboard(this,"horizontal")),this.parameters.controls.mousewheel&&new N2Classes.SmartSliderControlMouseWheel(this),this.controlAutoplay=new N2Classes.SmartSliderControlAutoplay(this,this.parameters.autoplay),this.controlFullscreen=new N2Classes.SmartSliderControlFullscreen(this)}},SmartSliderAbstract.prototype.getSlideIndex=function(t){return t},SmartSliderAbstract.prototype.slideToID=function(t,e){for(var i=0;i=0&&tt?this.changeTo(t,!0):this.changeTo(t):this.changeTo(t,!e):!1},SmartSliderAbstract.prototype.startAutoplay=function(t){return"undefined"!=typeof this.controlAutoplay?(this.controlAutoplay.pauseAutoplayExtraPlayingEnded(t,"autoplayButton"),!0):!1},SmartSliderAbstract.prototype.initLayerAnimations=function(){this.staticSlide&&this.staticSlide.initLayerAnimations();for(var t=0;t0){if(this.isShuffled){for(var t=[],e=0;this.realSlides.length>e;e++)t.push(this.parameters.lightbox[this.realSlides[e].originalIndex]); this.parameters.lightbox=t}for(var i=[],s=0,n=this,e=0;e