/*! * - v1.6.2 * Homepage: https://bqworks.net/slider-pro/ * Author: bqworks * Author URL: https://bqworks.net/ */ !function(c,p){"use strict";p.SliderPro={modules:[],addModule:function(t,i){this.modules.push(t),p.extend(n.prototype,i)}};var m=p.SliderPro.namespace="SliderPro",n=function(t,i){this.instance=t,this.$slider=p(this.instance),this.$slides=null,this.$slidesMask=null,this.$slidesContainer=null,this.slides=[],this.slidesOrder=[],this.options=i,this.settings={},this.originalSettings={},this.originalGotoSlide=null,this.selectedSlideIndex=0,this.previousSlideIndex=0,this.middleSlidePosition=0,this.supportedAnimation=null,this.vendorPrefix=null,this.transitionEvent=null,this.positionProperty=null,this.sizeProperty=null,this.isIE=null,this.slidesPosition=0,this.slidesSize=0,this.averageSlideSize=0,this.slideWidth=0,this.slideHeight=0,this.previousSlideWidth=0,this.previousSlideHeight=0,this.previousWindowWidth=0,this.previousWindowHeight=0,this.allowResize=!0,this.uniqueId=(new Date).valueOf(),this.breakpoints=[],this.currentBreakpoint=-1,this.shuffledIndexes=[],this.timers={},this._init()};n.prototype={_init:function(){var e=this;this.supportedAnimation=g.getSupportedAnimation(),this.vendorPrefix=g.getVendorPrefix(),this.transitionEvent=g.getTransitionEvent(),this.isIE=g.checkIE(),this.$slider.removeClass("sp-no-js"),c.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&this.$slider.addClass("ios");var t=/(msie) ([\w.]+)/.exec(c.navigator.userAgent.toLowerCase());this.isIE&&this.$slider.addClass("ie"),null!==t&&this.$slider.addClass("ie"+parseInt(t[2],10)),this.$slidesContainer=p('
').appendTo(this.$slider),this.$slidesMask=p('
').appendTo(this.$slidesContainer),this.$slides=this.$slider.find(".sp-slides").appendTo(this.$slidesMask),this.$slider.find(".sp-slide").appendTo(this.$slides);var i=p.SliderPro.modules;if(void 0!==i)for(var s=0;s=i.size?1:-1})}if(this.selectedSlideIndex=this.settings.startSlide,!0===this.settings.shuffle){var h=this.$slides.find(".sp-slide"),r=[];h.each(function(t){e.shuffledIndexes.push(t)});for(var l=this.shuffledIndexes.length-1;0this.breakpoints[this.breakpoints.length-1].size&&-1!==this.currentBreakpoint)this.currentBreakpoint=-1,this._setProperties(this.originalSettings,!1);else for(var i=0,e=this.breakpoints.length;ithis.$slider.parent().width()||this.$slider.width()!==this.$slidesMask.width())&&(this.previousSlideWidth=this.slideWidth,this.previousSlideHeight=this.slideHeight,this._resizeSlides(),this.$slidesMask.css({width:this.slideWidth,height:this.slideHeight}),!0===this.settings.autoHeight?setTimeout(function(){t._resizeHeight()},1):this.$slidesMask.css(this.vendorPrefix+"transition",""),"auto"!==this.settings.visibleSize&&("horizontal"===this.settings.orientation?("fullWidth"===this.settings.forceSize||"fullWindow"===this.settings.forceSize?(this.$slider.css("margin",0),this.$slider.css({width:p(c).width(),"max-width":"",marginLeft:-this.$slider.offset().left})):this.$slider.css({width:this.settings.visibleSize,"max-width":"100%",marginLeft:0}),this.$slidesMask.css("width",this.$slider.width())):("fullWindow"===this.settings.forceSize?this.$slider.css({height:p(c).height(),"max-height":""}):this.$slider.css({height:this.settings.visibleSize,"max-height":"100%"}),this.$slidesMask.css("height",this.$slider.height()))),this._resetSlidesPosition(),this._calculateSlidesSize(),this.trigger({type:"sliderResize"}),p.isFunction(this.settings.sliderResize)&&this.settings.sliderResize.call(this,{type:"sliderResize"}))},_resizeSlides:function(){var e=this.slideWidth,s=this.slideHeight;!0===this.settings.autoSlideSize?"horizontal"===this.settings.orientation?e="auto":"vertical"===this.settings.orientation&&(s="auto"):!0===this.settings.autoHeight&&(s="auto"),p.each(this.slides,function(t,i){i.setSize(e,s)})},_resizeHeight:function(){var t=this.getSlideAt(this.selectedSlideIndex);this._resizeHeightTo(t.getSize().height)},gotoSlide:function(t){var i,e;t!==this.selectedSlideIndex&&void 0!==this.slides[t]&&((i=this).previousSlideIndex=this.selectedSlideIndex,this.selectedSlideIndex=t,this.$slides.find(".sp-selected").removeClass("sp-selected"),this.$slides.find(".sp-slide").eq(this.selectedSlideIndex).addClass("sp-selected"),!0===this.settings.loop&&(this._updateSlidesOrder(),this._updateSlidesPosition()),!0===this.settings.autoHeight&&this._resizeHeight(),e=!0===this.settings.centerSelectedSlide&&"auto"!==this.settings.visibleSize?Math.round((parseInt(this.$slidesMask.css(this.sizeProperty),10)-this.getSlideAt(this.selectedSlideIndex).getSize()[this.sizeProperty])/2):0,e=-parseInt(this.$slides.find(".sp-slide").eq(this.selectedSlideIndex).css(this.positionProperty),10)+e,this._moveTo(e,!1,function(){i._resetSlidesPosition(),i.trigger({type:"gotoSlideComplete",index:t,previousIndex:i.previousSlideIndex}),p.isFunction(i.settings.gotoSlideComplete)&&i.settings.gotoSlideComplete.call(i,{type:"gotoSlideComplete",index:t,previousIndex:i.previousSlideIndex})}),this.trigger({type:"gotoSlide",index:t,previousIndex:this.previousSlideIndex}),p.isFunction(this.settings.gotoSlide)&&this.settings.gotoSlide.call(this,{type:"gotoSlide",index:t,previousIndex:this.previousSlideIndex}))},nextSlide:function(){var t=this.selectedSlideIndex>=this.getTotalSlides()-1?0:this.selectedSlideIndex+1;this.gotoSlide(t)},previousSlide:function(){var t=this.selectedSlideIndex<=0?this.getTotalSlides()-1:this.selectedSlideIndex-1;this.gotoSlide(t)},_moveTo:function(t,i,e){var s,n,o=this,a={};t!==this.slidesPosition&&(this.slidesPosition=t,"css-3d"!==this.supportedAnimation&&"css-2d"!==this.supportedAnimation||!1!==this.isIE?(a["margin-"+this.positionProperty]=t,void 0!==i&&!0===i?this.$slides.css(a):(this.$slides.addClass("sp-animated"),this.$slides.animate(a,this.settings.slideAnimationDuration,function(){o.$slides.removeClass("sp-animated"),"function"==typeof e&&e()}))):(n="horizontal"===this.settings.orientation?t:0,t="horizontal"===this.settings.orientation?0:t,"css-3d"===this.supportedAnimation?a[this.vendorPrefix+"transform"]="translate3d("+n+"px, "+t+"px, 0)":a[this.vendorPrefix+"transform"]="translate("+n+"px, "+t+"px)",void 0!==i&&!0===i?s="":(this.$slides.addClass("sp-animated"),s=this.vendorPrefix+"transform "+this.settings.slideAnimationDuration/1e3+"s",this.$slides.on(this.transitionEvent,function(t){t.target===t.currentTarget&&(o.$slides.off(o.transitionEvent),o.$slides.removeClass("sp-animated"),"function"==typeof e&&e())})),a[this.vendorPrefix+"transition"]=s,this.$slides.css(a)))},_stopMovement:function(){var t,i,e,s={};"css-3d"!==this.supportedAnimation&&"css-2d"!==this.supportedAnimation||!1!==this.isIE?(this.$slides.stop(),this.slidesPosition=parseInt(this.$slides.css("margin-"+this.positionProperty),10)):(t=-1!==(i=this.$slides.css(this.vendorPrefix+"transform")).indexOf("matrix3d")?"matrix3d":"matrix",e=i.replace(t,"").match(/-?[0-9\.]+/g),i="matrix3d"==t?parseInt(e[12],10):parseInt(e[4],10),e="matrix3d"==t?parseInt(e[13],10):parseInt(e[5],10),"css-3d"===this.supportedAnimation?s[this.vendorPrefix+"transform"]="translate3d("+i+"px, "+e+"px, 0)":s[this.vendorPrefix+"transform"]="translate("+i+"px, "+e+"px)",s[this.vendorPrefix+"transition"]="",this.$slides.css(s),this.$slides.off(this.transitionEvent),this.slidesPosition="horizontal"===this.settings.orientation?i:e),this.$slides.removeClass("sp-animated")},_resizeHeightTo:function(t){var i=this,t={height:t};"css-3d"===this.supportedAnimation||"css-2d"===this.supportedAnimation?(t[this.vendorPrefix+"transition"]="height "+this.settings.heightAnimationDuration/1e3+"s",this.$slidesMask.off(this.transitionEvent),this.$slidesMask.on(this.transitionEvent,function(t){t.target===t.currentTarget&&(i.$slidesMask.off(i.transitionEvent),i.trigger({type:"resizeHeightComplete"}),p.isFunction(i.settings.resizeHeightComplete)&&i.settings.resizeHeightComplete.call(i,{type:"resizeHeightComplete"}))}),this.$slidesMask.css(t)):this.$slidesMask.stop().animate(t,this.settings.heightAnimationDuration,function(t){i.trigger({type:"resizeHeightComplete"}),p.isFunction(i.settings.resizeHeightComplete)&&i.settings.resizeHeightComplete.call(i,{type:"resizeHeightComplete"})})},destroy:function(){this.$slider.removeData("sliderPro"),this.$slider.removeAttr("style"),this.$slides.removeAttr("style"),this.off("update."+m),p(c).off("resize."+this.uniqueId+"."+m);var t,i=p.SliderPro.modules;if(void 0!==i)for(var e=0;e').prependTo(this.$slide),(0!==this.$mainImage.parent("a").length?this.$mainImage.parent("a"):this.$mainImage).appendTo(this.$imageContainer)),this.hasImages=0!==this.$slide.find("img").length},setSize:function(t,i){this.width=t,this.height=i,this.$slide.css({width:this.width,height:this.height}),!0===this.hasMainImage&&(this.$imageContainer.css({width:this.settings.width,height:this.settings.height}),void 0===this.$mainImage.attr("data-src")&&this.resizeMainImage())},getSize:function(){var t,i=this;if(!0===this.hasImages&&!1===this.areImagesLoaded&&!1===this.areImagesLoading&&(this.areImagesLoading=!0,"complete"!==g.checkImagesStatus(this.$slide)))return g.checkImagesComplete(this.$slide,function(){i.areImagesLoaded=!0,i.areImagesLoading=!1,i.trigger({type:"imagesLoaded."+m,index:i.index})}),{width:this.settings.width,height:this.settings.height};return{width:(t=this.calculateSize()).width,height:t.height}},calculateSize:function(){var n=this.$slide.width(),o=this.$slide.height();return this.$slide.children().each(function(t,i){var e,s=p(i);!0!==s.is(":hidden")&&(e=i.getBoundingClientRect(),i=s.position().top+(e.bottom-e.top),e=s.position().left+(e.right-e.left),o=this.$slide.width()/this.$slide.height()?this.$mainImage.css({width:"100%",height:"auto"}):this.$mainImage.css({width:"auto",height:"100%"}):"exact"===this.settings.imageScaleMode&&this.$mainImage.css({width:"100%",height:"100%"}),!0===this.settings.centerImage&&this.$mainImage.css({marginLeft:.5*(this.$imageContainer.width()-this.$mainImage.width()),marginTop:.5*(this.$imageContainer.height()-this.$mainImage.height())}))},destroy:function(){this.$slide.removeAttr("style"),this.$slide.removeAttr("data-init"),this.$slide.removeAttr("data-index"),this.$slide.removeAttr("data-loaded"),!0===this.hasMainImage&&(this.$slide.find(".sp-image").removeAttr("style").appendTo(this.$slide),this.$slide.find(".sp-image-container").remove())},getIndex:function(){return this.index},setIndex:function(t){this.index=t,this.$slide.attr("data-index",this.index)},on:function(t,i){return this.$slide.on(t,i)},off:function(t){return this.$slide.off(t)},trigger:function(t){return this.$slide.triggerHandler(t)}},c.SliderPro=n,c.SliderProSlide=o,p.fn.sliderPro=function(e){var s=Array.prototype.slice.call(arguments,1);return this.each(function(){var t,i;void 0===p(this).data("sliderPro")?(i=new n(this,e),p(this).data("sliderPro",i)):void 0!==e&&("function"==typeof(t=p(this).data("sliderPro"))[e]?t[e].apply(t,s):void 0!==t.settings[e]?((i={})[e]=s[0],t._setProperties(i)):"object"==typeof e?t._setProperties(e):p.error(e+" does not exist in sliderPro."))})};var g={supportedAnimation:null,vendorPrefix:null,transitionEvent:null,isIE:null,getSupportedAnimation:function(){if(null!==this.supportedAnimation)return this.supportedAnimation;var t,i=(document.body||document.documentElement).style;return!0==(void 0!==i.transition||void 0!==i.WebkitTransition||void 0!==i.MozTransition||void 0!==i.OTransition)?(void 0===(t=document.createElement("div")).style.WebkitPerspective&&void 0===t.style.perspective||(this.supportedAnimation="css-3d"),"css-3d"===this.supportedAnimation&&void 0!==t.styleWebkitPerspective&&((i=document.createElement("style")).textContent="@media (transform-3d),(-webkit-transform-3d){#test-3d{left:9px;position:absolute;height:5px;margin:0;padding:0;border:0;}}",document.getElementsByTagName("head")[0].appendChild(i),t.id="test-3d",document.body.appendChild(t),9===t.offsetLeft&&5===t.offsetHeight||(this.supportedAnimation=null),i.parentNode.removeChild(i),t.parentNode.removeChild(t)),null!==this.supportedAnimation||void 0===t.style["-webkit-transform"]&&void 0===t.style.transform||(this.supportedAnimation="css-2d")):this.supportedAnimation="javascript",this.supportedAnimation},getVendorPrefix:function(){if(null!==this.vendorPrefix)return this.vendorPrefix;var t=document.createElement("div"),i=["Webkit","Moz","ms","O"];if("transform"in t.style)return this.vendorPrefix="",this.vendorPrefix;for(var e=0;e').insertAfter(this.$slidesContainer)),null===this.$thumbnails&&(0!==this.$slider.find(".sp-thumbnails").length?(this.$thumbnails=this.$slider.find(".sp-thumbnails").appendTo(this.$thumbnailsContainer),!0===this.settings.shuffle&&(e=this.$thumbnails.find(".sp-thumbnail"),s=[],r.each(this.shuffledIndexes,function(t,i){i=r(e[i]);0!==i.parent("a").length&&(i=i.parent("a")),s.push(i)}),this.$thumbnails.empty().append(s))):this.$thumbnails=r('
').appendTo(this.$thumbnailsContainer)),this.$slides.find(".sp-thumbnail").each(function(t){var i=r(this),e=i.parents(".sp-slide").index(),s=n.$thumbnails.find(".sp-thumbnail").length-1;0!==i.parent("a").length&&(i=i.parent("a")),sthis.$slider.parent().width()&&("fullWidth"===this.settings.forceSize||"fullWindow"===this.settings.forceSize?this.$slider.css("max-width",r(e).width()-this.$thumbnailsContainer.outerWidth(!0)):this.$slider.css("max-width",this.$slider.parent().width()-this.$thumbnailsContainer.outerWidth(!0)),this.$slidesMask.css("width",this.$slider.width()),"vertical"===this.settings.orientation&&(this.slideWidth=this.$slider.width(),this._resizeSlides()),this._resetSlidesPosition()),this.thumbnailsContainerSize=Math.min(this.$slidesMask.height(),this.thumbnailsSize),this.$thumbnailsContainer.css("height",this.thumbnailsContainerSize)),t=this.thumbnailsSize<=this.thumbnailsContainerSize||0===this.$thumbnails.find(".sp-selected-thumbnail").length?0:Math.max(-this.thumbnails[this.selectedThumbnailIndex].getPosition()[this.thumbnailsPositionProperty],this.thumbnailsContainerSize-this.thumbnailsSize),"top"===this.settings.thumbnailsPosition?this.$slider.css({paddingTop:this.$thumbnailsContainer.outerHeight(!0),paddingLeft:"",paddingRight:""}):"bottom"===this.settings.thumbnailsPosition?this.$slider.css({paddingTop:"",paddingLeft:"",paddingRight:""}):"left"===this.settings.thumbnailsPosition?this.$slider.css({paddingTop:"",paddingLeft:this.$thumbnailsContainer.outerWidth(!0),paddingRight:""}):"right"===this.settings.thumbnailsPosition&&this.$slider.css({paddingTop:"",paddingLeft:"",paddingRight:this.$thumbnailsContainer.outerWidth(!0)}),this._moveThumbnailsTo(t,!0))},_gotoThumbnail:function(t){var i,e,s,n;!1!==this.isThumbnailScroller&&void 0!==this.thumbnails[t]&&(n=this.selectedThumbnailIndex,i=this.thumbnailsPosition,this.selectedThumbnailIndex=t,this.$thumbnails.find(".sp-selected-thumbnail").removeClass("sp-selected-thumbnail"),this.$thumbnails.find(".sp-thumbnail-container").eq(this.selectedThumbnailIndex).addClass("sp-selected-thumbnail"),!0===this.settings.rightToLeft&&"horizontal"===this.thumbnailsOrientation?this.selectedThumbnailIndex>=n?(t=this.selectedThumbnailIndex===this.thumbnails.length-1?this.selectedThumbnailIndex:this.selectedThumbnailIndex+1,(t=this.thumbnails[t]).getPosition().left<-this.thumbnailsPosition&&(i=-t.getPosition().left)):this.selectedThumbnailIndexs&&(i=this.thumbnailsPosition-(e.getPosition().right-s))):this.selectedThumbnailIndex>=n?(e=this.selectedThumbnailIndex===this.thumbnails.length-1?this.selectedThumbnailIndex:this.selectedThumbnailIndex+1,s=this.thumbnails[e],e="horizontal"===this.thumbnailsOrientation?s.getPosition().right:s.getPosition().bottom,(s=-this.thumbnailsPosition+this.thumbnailsContainerSize)').appendTo(this.$thumbnails),(0!==this.$thumbnail.parent("a").length?this.$thumbnail.parent("a"):this.$thumbnail).appendTo(this.$thumbnailContainer),this.$thumbnailContainer.on("click."+s,function(){t.trigger({type:"thumbnailClick."+s,index:t.index})})},setSize:function(t,i){this.width=t,this.height=i,this.$thumbnailContainer.css({width:this.width,height:this.height}),this.$thumbnail.is("img")&&void 0===this.$thumbnail.attr("data-src")&&this.resizeImage()},getSize:function(){return{width:this.$thumbnailContainer.outerWidth(!0),height:this.$thumbnailContainer.outerHeight(!0)}},getPosition:function(){return{left:this.$thumbnailContainer.position().left+parseInt(this.$thumbnailContainer.css("marginLeft"),10),right:this.$thumbnailContainer.position().left+parseInt(this.$thumbnailContainer.css("marginLeft"),10)+this.$thumbnailContainer.outerWidth(),top:this.$thumbnailContainer.position().top+parseInt(this.$thumbnailContainer.css("marginTop"),10),bottom:this.$thumbnailContainer.position().top+parseInt(this.$thumbnailContainer.css("marginTop"),10)+this.$thumbnailContainer.outerHeight()}},setIndex:function(t){this.index=t,this.$thumbnail.attr("data-index",this.index)},resizeImage:function(){var t=this;!1!==this.isImageLoaded?(this.$thumbnail=this.$thumbnailContainer.find(".sp-thumbnail"),this.$thumbnail.width()/this.$thumbnail.height()<=this.width/this.height?this.$thumbnail.css({width:"100%",height:"auto"}):this.$thumbnail.css({width:"auto",height:"100%"}),this.$thumbnail.css({marginLeft:.5*(this.$thumbnailContainer.width()-this.$thumbnail.width()),marginTop:.5*(this.$thumbnailContainer.height()-this.$thumbnail.height())})):SliderProUtils.checkImagesComplete(this.$thumbnailContainer,function(){t.isImageLoaded=!0,t.resizeImage()})},destroy:function(){this.$thumbnailContainer.off("click."+s),this.$thumbnail.removeAttr("data-init"),this.$thumbnail.removeAttr("data-index"),(0!==this.$thumbnail.parent("a").length?this.$thumbnail.parent("a"):this.$thumbnail).insertBefore(this.$thumbnailContainer),this.$thumbnailContainer.remove()},on:function(t,i){return this.$thumbnailContainer.on(t,i)},off:function(t){return this.$thumbnailContainer.off(t)},trigger:function(t){return this.$thumbnailContainer.triggerHandler(t)}},r.SliderPro.addModule("Thumbnails",t)}(window,jQuery),function(n){"use strict";var t="ConditionalImages."+n.SliderPro.namespace,i={previousImageSize:null,currentImageSize:null,isRetinaScreen:!1,initConditionalImages:function(){this.currentImageSize=this.previousImageSize="default",this.isRetinaScreen=void 0!==this._isRetina&&!0===this._isRetina(),this.on("update."+t,n.proxy(this._conditionalImagesOnUpdate,this)),this.on("sliderResize."+t,n.proxy(this._conditionalImagesOnResize,this))},_conditionalImagesOnUpdate:function(){n.each(this.slides,function(t,i){i.$slide.find("img:not([ data-default ])").each(function(){var t=n(this);void 0!==t.attr("data-src")?t.attr("data-default",t.attr("data-src")):t.attr("data-default",t.attr("src"))})})},_conditionalImagesOnResize:function(){var s;this.slideWidth<=this.settings.smallSize?this.currentImageSize="small":this.slideWidth<=this.settings.mediumSize?this.currentImageSize="medium":this.slideWidth<=this.settings.largeSize?this.currentImageSize="large":this.currentImageSize="default",this.previousImageSize!==this.currentImageSize&&(n.each((s=this).slides,function(t,e){e.$slide.find("img").each(function(){var t=n(this),i="";!0===s.isRetinaScreen&&void 0!==t.attr("data-retina"+s.currentImageSize)?(i=t.attr("data-retina"+s.currentImageSize),void 0!==t.attr("data-retina")&&t.attr("data-retina")!==i&&t.attr("data-retina",i)):(!1===s.isRetinaScreen||!0===s.isRetinaScreen&&void 0===t.attr("data-retina"))&&void 0!==t.attr("data-"+s.currentImageSize)&&(i=t.attr("data-"+s.currentImageSize),void 0!==t.attr("data-src")&&t.attr("data-src")!==i&&t.attr("data-src",i)),""!==i&&void 0===t.attr("data-src")&&t.attr("src")!==i&&s._loadConditionalImage(t,i,function(t){t.hasClass("sp-image")&&(e.$mainImage=t,e.resizeMainImage(!0))})})}),this.previousImageSize=this.currentImageSize)},_loadConditionalImage:function(t,i,e){var s=n(new Image);s.attr("class",t.attr("class")),s.attr("style",t.attr("style")),n.each(t.data(),function(t,i){s.attr("data-"+t,i)}),void 0!==t.attr("width")&&s.attr("width",t.attr("width")),void 0!==t.attr("height")&&s.attr("height",t.attr("height")),void 0!==t.attr("alt")&&s.attr("alt",t.attr("alt")),void 0!==t.attr("title")&&s.attr("title",t.attr("title")),s.attr("src",i),s.insertAfter(t),t.remove(),t=null,"function"==typeof e&&e(s)},destroyConditionalImages:function(){this.off("update."+t),this.off("sliderResize."+t)},conditionalImagesDefaults:{smallSize:480,mediumSize:768,largeSize:1024}};n.SliderPro.addModule("ConditionalImages",i)}((window,jQuery)),function(t,o){"use strict";var i="Retina."+o.SliderPro.namespace,e={initRetina:function(){!1!==this._isRetina()&&(this.on("sliderResize."+i,o.proxy(this._checkRetinaImages,this)),0!==this.$slider.find(".sp-thumbnail").length&&this.on("update.Thumbnails."+i,o.proxy(this._checkRetinaThumbnailImages,this)))},_isRetina:function(){return 2<=t.devicePixelRatio||!(!t.matchMedia||!t.matchMedia("(-webkit-min-device-pixel-ratio: 2),(min-resolution: 2dppx)").matches)},_checkRetinaImages:function(){var s=this;o.each(this.slides,function(t,i){var e=i.$slide;void 0===e.attr("data-retina-loaded")&&(e.attr("data-retina-loaded",!0),e.find("img[data-retina]").each(function(){var t=o(this);void 0!==t.attr("data-src")?t.attr("data-src",t.attr("data-retina")):s._loadRetinaImage(t,function(t){t.hasClass("sp-image")&&(i.$mainImage=t,i.resizeMainImage(!0))})}))})},_checkRetinaThumbnailImages:function(){var s=this;o.each(this.thumbnails,function(t,i){var e=i.$thumbnailContainer;void 0===e.attr("data-retina-loaded")&&(e.attr("data-retina-loaded",!0),e.find("img[data-retina]").each(function(){var t=o(this);void 0!==t.attr("data-src")?t.attr("data-src",t.attr("data-retina")):s._loadRetinaImage(t,function(t){t.hasClass("sp-thumbnail")&&i.resizeImage()})}))})},_loadRetinaImage:function(t,i){var e,s=!1,n="";void 0!==t.attr("data-retina")&&(s=!0,n=t.attr("data-retina")),void 0!==t.attr("data-src")&&(!1===s&&(n=t.attr("data-src")),t.removeAttr("data-src")),""!==n&&((e=o(new Image)).attr("class",t.attr("class")),e.attr("style",t.attr("style")),o.each(t.data(),function(t,i){e.attr("data-"+t,i)}),void 0!==t.attr("width")&&e.attr("width",t.attr("width")),void 0!==t.attr("height")&&e.attr("height",t.attr("height")),void 0!==t.attr("alt")&&e.attr("alt",t.attr("alt")),void 0!==t.attr("title")&&e.attr("title",t.attr("title")),e.insertAfter(t),t.remove(),t=null,e.attr("src",n),"function"==typeof i&&i(e))},destroyRetina:function(){this.off("update."+i),this.off("update.Thumbnails."+i)}};o.SliderPro.addModule("Retina",e)}(window,jQuery),function(n){"use strict";var t="LazyLoading."+n.SliderPro.namespace,i={allowLazyLoadingCheck:!0,initLazyLoading:function(){this.on("sliderResize."+t,n.proxy(this._lazyLoadingOnResize,this)),this.on("gotoSlide."+t,n.proxy(this._checkAndLoadVisibleImages,this)),this.on("thumbnailsUpdate."+t+" thumbnailsMoveComplete."+t,n.proxy(this._checkAndLoadVisibleThumbnailImages,this))},_lazyLoadingOnResize:function(){var t=this;!1!==this.allowLazyLoadingCheck&&(this.allowLazyLoadingCheck=!1,this._checkAndLoadVisibleImages(),0!==this.$slider.find(".sp-thumbnail").length&&this._checkAndLoadVisibleThumbnailImages(),setTimeout(function(){t.allowLazyLoadingCheck=!0},500))},_checkAndLoadVisibleImages:function(){var s,t,i,e;0!==this.$slider.find(".sp-slide:not([ data-loaded ])").length&&(t=!0===(s=this).settings.loop?this.middleSlidePosition:this.selectedSlideIndex,e=Math.ceil((parseInt(this.$slidesMask.css(this.sizeProperty),10)-this.averageSlideSize)/2/this.averageSlideSize),i=!0===this.settings.centerSelectedSlide?Math.max(t-e-1,0):Math.max(t-1,0),e=!0===this.settings.centerSelectedSlide?Math.min(t+e+1,this.getTotalSlides()-1):Math.min(t+2*e+1,this.getTotalSlides()-1),e=this.slidesOrder.slice(i,e+1),n.each(e,function(t,i){var e=s.slides[i],i=e.$slide;void 0===i.attr("data-loaded")&&(i.attr("data-loaded",!0),i.find("img[ data-src ]").each(function(){var t=n(this);s._loadImage(t,function(t){t.hasClass("sp-image")&&(e.$mainImage=t,e.resizeMainImage(!0))})}))}))},_checkAndLoadVisibleThumbnailImages:function(){var s,t,i;0!==this.$slider.find(".sp-thumbnail-container:not([ data-loaded ])").length&&(i=(s=this).thumbnailsSize/this.thumbnails.length,t=Math.floor(Math.abs(this.thumbnailsPosition/i)),i=Math.floor((-this.thumbnailsPosition+this.thumbnailsContainerSize)/i),i=this.thumbnails.slice(t,i+1),n.each(i,function(t,i){var e=i.$thumbnailContainer;void 0===e.attr("data-loaded")&&(e.attr("data-loaded",!0),e.find("img[ data-src ]").each(function(){var t=n(this);s._loadImage(t,function(){i.resizeImage()})}))}))},_loadImage:function(t,i){var e=n(new Image);e.attr("class",t.attr("class")),e.attr("style",t.attr("style")),n.each(t.data(),function(t,i){e.attr("data-"+t,i)}),void 0!==t.attr("width")&&e.attr("width",t.attr("width")),void 0!==t.attr("height")&&e.attr("height",t.attr("height")),void 0!==t.attr("alt")&&e.attr("alt",t.attr("alt")),void 0!==t.attr("title")&&e.attr("title",t.attr("title")),e.attr("src",t.attr("data-src")),e.removeAttr("data-src"),e.insertAfter(t),t.remove(),t=null,"function"==typeof i&&i(e)},destroyLazyLoading:function(){this.off("update."+t),this.off("gotoSlide."+t),this.off("sliderResize."+t),this.off("thumbnailsUpdate."+t),this.off("thumbnailsMoveComplete."+t)}};n.SliderPro.addModule("LazyLoading",i)}((window,jQuery)),function(t,h){"use strict";var s="Layers."+h.SliderPro.namespace,i={layersGotoSlideReference:null,waitForLayersTimer:null,initLayers:function(){this.on("update."+s,h.proxy(this._layersOnUpdate,this)),this.on("sliderResize."+s,h.proxy(this._layersOnResize,this)),this.on("gotoSlide."+s,h.proxy(this._layersOnGotoSlide,this))},_layersOnUpdate:function(t){var i=this;h.each(this.slides,function(t,i){i.$slide;this.$slide.find(".sp-layer:not([ data-layer-init ])").each(function(){var t=new n(h(this));void 0===i.layers&&(i.layers=[]),i.layers.push(t),!1===h(this).hasClass("sp-static")&&(void 0===i.animatedLayers&&(i.animatedLayers=[]),i.animatedLayers.push(t))})}),!0===this.settings.waitForLayers&&(clearTimeout(this.waitForLayersTimer),this.waitForLayersTimer=setTimeout(function(){i.layersGotoSlideReference=i.gotoSlide,i.gotoSlide=i._layersGotoSlide},1)),setTimeout(function(){i.showLayers(i.selectedSlideIndex)},1)},_layersOnResize:function(){var t,e,i=this.settings.autoScaleLayers;!1!==this.settings.autoScaleLayers&&(-1===this.settings.autoScaleReference?"string"==typeof this.settings.width&&-1!==this.settings.width.indexOf("%")?i=!1:t=parseInt(this.settings.width,10):t=this.settings.autoScaleReference,e=!0===i&&this.slideWidthMath.abs(i)&&(this.allowOppositeScrolling=!1),!0!==this.allowOppositeScrolling&&(t.preventDefault(),!1===this.settings.loop&&(this.slidesPosition>this.touchStartPosition&&0===this.selectedSlideIndex||this.slidesPosition').appendTo(this.$slider),this._updateCaptionContent()),this.$slides.find(".sp-caption").each(function(){t(this).css("display","none")})},_updateCaptionContent:function(){var t=this,i=this.$slider.find(".sp-slide").eq(this.selectedSlideIndex).find(".sp-caption"),e=0!==i.length?i.html():"";!0===this.settings.fadeCaption?""!==this.captionContent?(0===parseFloat(this.$captionContainer.css("opacity"),10)&&(this.$captionContainer.css(this.vendorPrefix+"transition",""),this.$captionContainer.css("opacity",1)),this._fadeCaptionTo(0,function(){""!==(t.captionContent=e)?(t.$captionContainer.html(t.captionContent),t._fadeCaptionTo(1)):t.$captionContainer.empty()})):(this.captionContent=e,this.$captionContainer.html(this.captionContent),this.$captionContainer.css("opacity",0),this._fadeCaptionTo(1)):(this.captionContent=e,this.$captionContainer.html(this.captionContent))},_fadeCaptionTo:function(i,e){var s=this;"css-3d"===this.supportedAnimation||"css-2d"===this.supportedAnimation?(setTimeout(function(){var t={opacity:i};t[s.vendorPrefix+"transition"]="opacity "+s.settings.captionFadeDuration/1e3+"s",s.$captionContainer.css(t)},1),this.$captionContainer.on(this.transitionEvent,function(t){t.target===t.currentTarget&&(s.$captionContainer.off(s.transitionEvent),s.$captionContainer.css(s.vendorPrefix+"transition",""),"function"==typeof e&&e())})):this.$captionContainer.stop().animate({opacity:i},this.settings.captionFadeDuration,function(){"function"==typeof e&&e()})},destroyCaption:function(){this.off("update."+i),this.off("gotoSlide."+i),this.$captionContainer.remove(),this.$slider.find(".sp-caption").each(function(){t(this).css("display","")})},captionDefaults:{fadeCaption:!0,captionFadeDuration:500}};t.SliderPro.addModule("Caption",e)}((window,jQuery)),function(s,t){"use strict";var i="DeepLinking."+t.SliderPro.namespace,e={initDeepLinking:function(){var e=this;this.on("init."+i,function(){e._gotoHash(s.location.hash)}),this.on("gotoSlide."+i,function(t){var i;!0===e.settings.updateHash&&(void 0===(i=e.$slider.find(".sp-slide").eq(t.index).attr("id"))&&(i=t.index),s.location.hash=e.$slider.attr("id")+"/"+i)}),t(s).on("hashchange."+this.uniqueId+"."+i,function(){e._gotoHash(s.location.hash)})},_parseHash:function(t){if(""!==t){var i=(t=t.substring(1)).split("/").pop(),t=t.slice(0,-i.toString().length-1);if(this.$slider.attr("id")===t)return{sliderID:t,slideId:i}}return!1},_gotoHash:function(t){var i=this._parseHash(t);!1!==i&&(t=i.slideId,i=parseInt(t,10),isNaN(i)?-1!==(t=this.$slider.find(".sp-slide#"+t).index())&&t!==this.selectedSlideIndex&&this.gotoSlide(t):i!==this.selectedSlideIndex&&this.gotoSlide(i))},destroyDeepLinking:function(){this.off("init."+i),this.off("gotoSlide."+i),t(s).off("hashchange."+this.uniqueId+"."+i)},deepLinkingDefaults:{updateHash:!1}};t.SliderPro.addModule("DeepLinking",e)}(window,jQuery),function(i){"use strict";var e="Autoplay."+i.SliderPro.namespace,t={autoplayTimer:null,isTimerRunning:!1,isTimerPaused:!1,initAutoplay:function(){this.on("update."+e,i.proxy(this._autoplayOnUpdate,this))},_autoplayOnUpdate:function(t){!0===this.settings.autoplay?(this.on("gotoSlide."+e,i.proxy(this._autoplayOnGotoSlide,this)),this.on("mouseenter."+e,i.proxy(this._autoplayOnMouseEnter,this)),this.on("mouseleave."+e,i.proxy(this._autoplayOnMouseLeave,this)),this.startAutoplay()):(this.off("gotoSlide."+e),this.off("mouseenter."+e),this.off("mouseleave."+e),this.stopAutoplay())},_autoplayOnGotoSlide:function(t){!0===this.isTimerRunning&&this.stopAutoplay(),!1===this.isTimerPaused&&this.startAutoplay()},_autoplayOnMouseEnter:function(t){!this.isTimerRunning||"pause"!==this.settings.autoplayOnHover&&"stop"!==this.settings.autoplayOnHover||(this.stopAutoplay(),this.isTimerPaused=!0)},_autoplayOnMouseLeave:function(t){!0===this.settings.autoplay&&!1===this.isTimerRunning&&"stop"!==this.settings.autoplayOnHover&&(this.startAutoplay(),this.isTimerPaused=!1)},startAutoplay:function(){var t=this;this.isTimerRunning=!0,this.autoplayTimer=setTimeout(function(){"normal"===t.settings.autoplayDirection?t.nextSlide():"backwards"===t.settings.autoplayDirection&&t.previousSlide()},this.settings.autoplayDelay)},stopAutoplay:function(){this.isTimerRunning=!1,this.isTimerPaused=!1,clearTimeout(this.autoplayTimer)},destroyAutoplay:function(){clearTimeout(this.autoplayTimer),this.off("update."+e),this.off("gotoSlide."+e),this.off("mouseenter."+e),this.off("mouseleave."+e)},autoplayDefaults:{autoplay:!0,autoplayDelay:5e3,autoplayDirection:"normal",autoplayOnHover:"pause"}};i.SliderPro.addModule("Autoplay",t)}((window,jQuery)),function(t){"use strict";var s="Keyboard."+t.SliderPro.namespace,i={initKeyboard:function(){var i=this,e=!1;!1!==this.settings.keyboard&&(this.$slider.on("focus."+s,function(){e=!0}),this.$slider.on("blur."+s,function(){e=!1}),t(document).on("keydown."+this.uniqueId+"."+s,function(t){!0===i.settings.keyboardOnlyOnFocus&&!1===e||(37===t.which?i.previousSlide():39===t.which?i.nextSlide():13!==t.which||0!==(t=i.$slider.find(".sp-slide").eq(i.selectedSlideIndex).find(".sp-image-container a")).length&&t[0].click())}))},destroyKeyboard:function(){this.$slider.off("focus."+s),this.$slider.off("blur."+s),t(document).off("keydown."+this.uniqueId+"."+s)},keyboardDefaults:{keyboard:!0,keyboardOnlyOnFocus:!1}};t.SliderPro.addModule("Keyboard",i)}((window,jQuery)),function(t){"use strict";var i="MouseWheel."+t.SliderPro.namespace;t.SliderPro.addModule("MouseWheel",{mouseWheelEventType:"",initMouseWheel:function(){var e=this;!1!==this.settings.mouseWheel&&("onwheel"in document?this.mouseWheelEventType="wheel":"onmousewheel"in document?this.mouseWheelEventType="mousewheel":"onDomMouseScroll"in document?this.mouseWheelEventType="DomMouseScroll":"onMozMousePixelScroll"in document&&(this.mouseWheelEventType="MozMousePixelScroll"),this.on(this.mouseWheelEventType+"."+i,function(t){t.preventDefault();var i,t=t.originalEvent;void 0!==t.detail&&(i=t.detail),void 0!==t.wheelDelta&&(i=t.wheelDelta),void 0!==t.deltaY&&(i=-1*t.deltaY),e.thumbnailsPosition+i<0&&e.thumbnailsPosition+i>e.thumbnailsContainerSize-e.thumbnailsSize?e._moveThumbnailsTo(e.thumbnailsPosition+i,!0):0<=e.thumbnailsPosition+i?e._moveThumbnailsTo(0,!0):e.thumbnailsPosition+i').appendTo(this.$slider),this.$fullScreenButton.on("click."+i,t.proxy(this._onFullScreenButtonClick,this)),document.addEventListener("fullscreenchange",t.proxy(this._onFullScreenChange,this)),document.addEventListener("mozfullscreenchange",t.proxy(this._onFullScreenChange,this)),document.addEventListener("webkitfullscreenchange",t.proxy(this._onFullScreenChange,this)),document.addEventListener("MSFullscreenChange",t.proxy(this._onFullScreenChange,this))},_removeFullScreen:function(){null!==this.$fullScreenButton&&(this.$fullScreenButton.off("click."+i),this.$fullScreenButton.remove(),this.$fullScreenButton=null,document.removeEventListener("fullscreenchange",this._onFullScreenChange),document.removeEventListener("mozfullscreenchange",this._onFullScreenChange),document.removeEventListener("webkitfullscreenchange",this._onFullScreenChange),document.removeEventListener("MSFullscreenChange",this._onFullScreenChange))},_onFullScreenButtonClick:function(){!1===this.isFullScreen?this.instance.requestFullScreen?this.instance.requestFullScreen():this.instance.mozRequestFullScreen?this.instance.mozRequestFullScreen():this.instance.webkitRequestFullScreen?this.instance.webkitRequestFullScreen():this.instance.msRequestFullscreen&&this.instance.msRequestFullscreen():document.exitFullScreen?document.exitFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},_onFullScreenChange:function(){this.isFullScreen=!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement),!0===this.isFullScreen?(this.sizeBeforeFullScreen={forceSize:this.settings.forceSize,autoHeight:this.settings.autoHeight},this.$slider.addClass("sp-full-screen"),this.settings.forceSize="fullWindow",this.settings.autoHeight=!1):(this.$slider.css("margin",""),this.$slider.removeClass("sp-full-screen"),this.settings.forceSize=this.sizeBeforeFullScreen.forceSize,this.settings.autoHeight=this.sizeBeforeFullScreen.autoHeight),this.resize()},destroyFullScreen:function(){this.off("update."+i),this._removeFullScreen()},fullScreenDefaults:{fullScreen:!1,fadeFullScreen:!0}};t.SliderPro.addModule("FullScreen",e)}((window,jQuery)),function(e){"use strict";var s="Buttons."+e.SliderPro.namespace,t={$buttons:null,initButtons:function(){this.on("update."+s,e.proxy(this._buttonsOnUpdate,this))},_buttonsOnUpdate:function(){this.$buttons=this.$slider.find(".sp-buttons"),!0===this.settings.buttons&&1').appendTo(this.$slider);for(var t=0;t').appendTo(this.$buttons);this.$buttons.on("click."+s,".sp-button",function(){i.gotoSlide(e(this).index())}),this.$buttons.find(".sp-button").eq(this.selectedSlideIndex).addClass("sp-selected-button"),this.on("gotoSlide."+s,function(t){i.$buttons.find(".sp-selected-button").removeClass("sp-selected-button"),i.$buttons.find(".sp-button").eq(t.index).addClass("sp-selected-button")}),this.$slider.addClass("sp-has-buttons")},_adjustButtons:function(){this.$buttons.empty();for(var t=0;t').appendTo(this.$buttons);this.$buttons.find(".sp-selected-button").removeClass("sp-selected-button"),this.$buttons.find(".sp-button").eq(this.selectedSlideIndex).addClass("sp-selected-button")},_removeButtons:function(){this.$buttons.off("click."+s,".sp-button"),this.off("gotoSlide."+s),this.$buttons.remove(),this.$slider.removeClass("sp-has-buttons")},destroyButtons:function(){this._removeButtons(),this.off("update."+s)},buttonsDefaults:{buttons:!0}};e.SliderPro.addModule("Buttons",t)}((window,jQuery)),function(i){"use strict";var e="Arrows."+i.SliderPro.namespace,t={$arrows:null,$previousArrow:null,$nextArrow:null,initArrows:function(){this.on("update."+e,i.proxy(this._arrowsOnUpdate,this)),this.on("gotoSlide."+e,i.proxy(this._checkArrowsVisibility,this))},_arrowsOnUpdate:function(){var t=this;!0===this.settings.arrows&&null===this.$arrows?(this.$arrows=i('
').appendTo(this.$slidesContainer),this.$previousArrow=i('
').appendTo(this.$arrows),this.$nextArrow=i('
').appendTo(this.$arrows),this.$previousArrow.on("click."+e,function(){t.previousSlide()}),this.$nextArrow.on("click."+e,function(){t.nextSlide()}),this._checkArrowsVisibility()):!1===this.settings.arrows&&null!==this.$arrows&&this._removeArrows(),!0===this.settings.arrows&&(!0===this.settings.fadeArrows?this.$arrows.addClass("sp-fade-arrows"):!1===this.settings.fadeArrows&&this.$arrows.removeClass("sp-fade-arrows"))},_checkArrowsVisibility:function(){!1!==this.settings.arrows&&!0!==this.settings.loop&&(0===this.selectedSlideIndex?this.$previousArrow.css("display","none"):this.$previousArrow.css("display","block"),this.selectedSlideIndex===this.getTotalSlides()-1?this.$nextArrow.css("display","none"):this.$nextArrow.css("display","block"))},_removeArrows:function(){null!==this.$arrows&&(this.$previousArrow.off("click."+e),this.$nextArrow.off("click."+e),this.$arrows.remove(),this.$arrows=null)},destroyArrows:function(){this._removeArrows(),this.off("update."+e),this.off("gotoSlide."+e)},arrowsDefaults:{arrows:!1,fadeArrows:!0}};i.SliderPro.addModule("Arrows",t)}((window,jQuery)),function(s){"use strict";var n="ThumbnailTouchSwipe."+s.SliderPro.namespace,t={thumbnailTouchStartPoint:{x:0,y:0},thumbnailTouchEndPoint:{x:0,y:0},thumbnailTouchDistance:{x:0,y:0},thumbnailTouchStartPosition:0,isThumbnailTouchMoving:!1,isThumbnailTouchSwipe:!1,thumbnailTouchSwipeEvents:{startEvent:"",moveEvent:"",endEvent:""},thumbnailPreviousStartEvent:"",initThumbnailTouchSwipe:function(){this.on("update."+n,s.proxy(this._thumbnailTouchSwipeOnUpdate,this))},_thumbnailTouchSwipeOnUpdate:function(){!1!==this.isThumbnailScroller&&!0===this.settings.thumbnailTouchSwipe&&!1===this.isThumbnailTouchSwipe&&(this.isThumbnailTouchSwipe=!0,this.thumbnailTouchSwipeEvents.startEvent="touchstart."+n+" mousedown."+n,this.thumbnailTouchSwipeEvents.moveEvent="touchmove."+n+" mousemove."+n,this.thumbnailTouchSwipeEvents.endEvent="touchend."+this.uniqueId+"."+n+" mouseup."+this.uniqueId+"."+n,this.$thumbnails.on(this.thumbnailTouchSwipeEvents.startEvent,s.proxy(this._onThumbnailTouchStart,this)),this.$thumbnails.on("dragstart."+n,function(t){t.preventDefault()}),this.$thumbnails.addClass("sp-grab"),s.each(this.thumbnails,function(t,i){i.off("thumbnailClick")}))},_onThumbnailTouchStart:function(t){var i;"mousedown"!==t.type||"touchstart"!==this.thumbnailPreviousStartEvent?(this.thumbnailPreviousStartEvent=t.type,1<=s(t.target).closest(".sp-selectable").length||(i=void 0!==t.originalEvent.touches?t.originalEvent.touches[0]:t.originalEvent,void 0===t.originalEvent.touches&&t.preventDefault(),s(t.target).parents(".sp-thumbnail-container").find("a").one("click."+n,function(t){t.preventDefault()}),this.thumbnailTouchStartPoint.x=i.pageX||i.clientX,this.thumbnailTouchStartPoint.y=i.pageY||i.clientY,this.thumbnailTouchStartPosition=this.thumbnailsPosition,this.thumbnailTouchDistance.x=this.thumbnailTouchDistance.y=0,this.$thumbnails.hasClass("sp-animated")&&(this.isThumbnailTouchMoving=!0,this._stopThumbnailsMovement(),this.thumbnailTouchStartPosition=this.thumbnailsPosition),this.$thumbnails.on(this.thumbnailTouchSwipeEvents.moveEvent,s.proxy(this._onThumbnailTouchMove,this)),s(document).on(this.thumbnailTouchSwipeEvents.endEvent,s.proxy(this._onThumbnailTouchEnd,this)),this.$thumbnails.removeClass("sp-grab").addClass("sp-grabbing"),this.$thumbnailsContainer.addClass("sp-swiping"))):this.thumbnailPreviousStartEvent=t.type},_onThumbnailTouchMove:function(t){var i=void 0!==t.originalEvent.touches?t.originalEvent.touches[0]:t.originalEvent;this.isThumbnailTouchMoving=!0,this.thumbnailTouchEndPoint.x=i.pageX||i.clientX,this.thumbnailTouchEndPoint.y=i.pageY||i.clientY,this.thumbnailTouchDistance.x=this.thumbnailTouchEndPoint.x-this.thumbnailTouchStartPoint.x,this.thumbnailTouchDistance.y=this.thumbnailTouchEndPoint.y-this.thumbnailTouchStartPoint.y;var e,s="horizontal"===this.thumbnailsOrientation?this.thumbnailTouchDistance.x:this.thumbnailTouchDistance.y,i="horizontal"===this.thumbnailsOrientation?this.thumbnailTouchDistance.y:this.thumbnailTouchDistance.x;Math.abs(s)>Math.abs(i)&&(t.preventDefault(),0<=this.thumbnailsPosition?s=(e=-this.thumbnailTouchStartPosition)+.2*(s-e):this.thumbnailsPosition<=-this.thumbnailsSize+this.thumbnailsContainerSize&&(s=.2*(s+(e=this.thumbnailsSize-this.thumbnailsContainerSize+this.thumbnailTouchStartPosition))-e),this._moveThumbnailsTo(this.thumbnailTouchStartPosition+s,!0))},_onThumbnailTouchEnd:function(t){var i,e=this;"horizontal"===this.thumbnailsOrientation?this.thumbnailTouchDistance.x:this.thumbnailTouchDistance.y;this.$thumbnails.off(this.thumbnailTouchSwipeEvents.moveEvent),s(document).off(this.thumbnailTouchSwipeEvents.endEvent),this.$thumbnails.removeClass("sp-grabbing").addClass("sp-grab"),!1===this.isThumbnailTouchMoving||!0===this.isThumbnailTouchMoving&&Math.abs(this.thumbnailTouchDistance.x)<10&&Math.abs(this.thumbnailTouchDistance.y)<10?(i=(s(t.target).hasClass("sp-thumbnail-container")?s(t.target):s(t.target).parents(".sp-thumbnail-container")).index(),0!==s(t.target).parents("a").length?(s(t.target).parents("a").off("click."+n),this.$thumbnailsContainer.removeClass("sp-swiping")):i!==this.selectedThumbnailIndex&&-1!==i&&this.gotoSlide(i)):(this.isThumbnailTouchMoving=!1,s(t.target).parents(".sp-thumbnail").one("click",function(t){t.preventDefault()}),setTimeout(function(){e.$thumbnailsContainer.removeClass("sp-swiping")},1),0').appendTo(this.$thumbnailsContainer),this.$previousThumbnailArrow=e('
').appendTo(this.$thumbnailArrows),this.$nextThumbnailArrow=e('
').appendTo(this.$thumbnailArrows),this.$previousThumbnailArrow.on("click."+s,function(){var t=Math.min(0,i.thumbnailsPosition+i.thumbnailsContainerSize);i._moveThumbnailsTo(t)}),this.$nextThumbnailArrow.on("click."+s,function(){var t=Math.max(i.thumbnailsContainerSize-i.thumbnailsSize,i.thumbnailsPosition-i.thumbnailsContainerSize);i._moveThumbnailsTo(t)})):!1===this.settings.thumbnailArrows&&null!==this.$thumbnailArrows&&this._removeThumbnailArrows(),!0===this.settings.thumbnailArrows&&(!0===this.settings.fadeThumbnailArrows?this.$thumbnailArrows.addClass("sp-fade-thumbnail-arrows"):!1===this.settings.fadeThumbnailArrows&&this.$thumbnailArrows.removeClass("sp-fade-thumbnail-arrows"),this._checkThumbnailArrowsVisibility()))},_checkThumbnailArrowsVisibility:function(){0===this.thumbnailsPosition?this.$previousThumbnailArrow.css("display","none"):this.$previousThumbnailArrow.css("display","block"),this.thumbnailsPosition===this.thumbnailsContainerSize-this.thumbnailsSize?this.$nextThumbnailArrow.css("display","none"):this.$nextThumbnailArrow.css("display","block")},_removeThumbnailArrows:function(){null!==this.$thumbnailArrows&&(this.$previousThumbnailArrow.off("click."+s),this.$nextThumbnailArrow.off("click."+s),this.$thumbnailArrows.remove(),this.$thumbnailArrows=null)},destroyThumbnailArrows:function(){this._removeThumbnailArrows(),this.off("update."+s),this.off("sliderResize."+s),this.off("thumbnailsMoveComplete."+s)},thumbnailArrowsDefaults:{thumbnailArrows:!1,fadeThumbnailArrows:!0}};e.SliderPro.addModule("ThumbnailArrows",t)}((window,jQuery)),function(l){"use strict";var s="Video."+l.SliderPro.namespace,t={firstInit:!1,initVideo:function(){this.on("update."+s,l.proxy(this._videoOnUpdate,this)),this.on("gotoSlide."+s,l.proxy(this._videoOnGotoSlide,this)),this.on("gotoSlideComplete."+s,l.proxy(this._videoOnGotoSlideComplete,this))},_videoOnUpdate:function(){var i=this;this.$slider.find(".sp-video").not("a, [data-video-init]").each(function(){var t=l(this);i._initVideo(t)}),this.$slider.find("a.sp-video").not("[data-video-preinit]").each(function(){var t=l(this);i._preinitVideo(t)}),!1===this.firstInit&&(this.firstInit=!0,this._videoOnGotoSlideComplete({index:this.selectedSlideIndex,previousIndex:-1}))},_initVideo:function(i){var e=this;i.attr("data-video-init",!0).videoController(),i.on("videoPlay."+s,function(){"stopAutoplay"===e.settings.playVideoAction&&void 0!==e.stopAutoplay&&(e.stopAutoplay(),e.settings.autoplay=!1);var t={type:"videoPlay",video:i};e.trigger(t),l.isFunction(e.settings.videoPlay)&&e.settings.videoPlay.call(e,t)}),i.on("videoPause."+s,function(){"startAutoplay"===e.settings.pauseVideoAction&&void 0!==e.startAutoplay&&(e.stopAutoplay(),e.startAutoplay(),e.settings.autoplay=!0);var t={type:"videoPause",video:i};e.trigger(t),l.isFunction(e.settings.videoPause)&&e.settings.videoPause.call(e,t)}),i.on("videoEnded."+s,function(){"startAutoplay"===e.settings.endVideoAction&&void 0!==e.startAutoplay?(e.stopAutoplay(),e.startAutoplay(),e.settings.autoplay=!0):"nextSlide"===e.settings.endVideoAction?e.nextSlide():"replayVideo"===e.settings.endVideoAction&&i.videoController("replay");var t={type:"videoEnd",video:i};e.trigger(t),l.isFunction(e.settings.videoEnd)&&e.settings.videoEnd.call(e,t)})},_preinitVideo:function(h){var r=this;h.attr("data-video-preinit",!0),h.on("click."+s,function(t){var i,e,s,n,o,a;r.$slider.hasClass("sp-swiping")||(t.preventDefault(),n=h.attr("href"),o=h.children("img").attr("width")||h.children("img").width(),a=h.children("img").attr("height")||h.children("img").height(),-1!==n.indexOf("youtube")||-1!==n.indexOf("youtu.be")?i="youtube":-1!==n.indexOf("vimeo")&&(i="vimeo"),t=n.match("youtube"===i?/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/:/http:\/\/(www\.)?vimeo.com\/(\d+)/),e=t[2],s="youtube"===i?"//www.youtube.com/embed/"+e+"?enablejsapi=1&wmode=opaque":"//player.vimeo.com/video/"+e,void 0!==(n=n.split("?")[1])&&(n=n.split("&"),l.each(n,function(t,i){-1===i.indexOf(e)&&(s+="&"+i)})),a=l("").attr({src:s,width:o,height:a,class:h.attr("class"),frameborder:0,allowfullscreen:"allowfullscreen"}).insertBefore(h),r._initVideo(a),a.videoController("play"),h.css("display","none"))})},_videoOnGotoSlide:function(t){var i=this.$slides.find(".sp-slide").eq(t.previousIndex).find(".sp-video[data-video-init]");-1!==t.previousIndex&&0!==i.length&&("stopVideo"===this.settings.leaveVideoAction?i.videoController("stop"):"pauseVideo"===this.settings.leaveVideoAction?i.videoController("pause"):"removeVideo"===this.settings.leaveVideoAction&&(0!==i.siblings("a.sp-video").length?(i.siblings("a.sp-video").css("display",""),i.videoController("destroy"),i.remove()):i.videoController("stop")))},_videoOnGotoSlideComplete:function(t){var i;"playVideo"===this.settings.reachVideoAction&&t.index===this.selectedSlideIndex&&(i=this.$slides.find(".sp-slide").eq(t.index).find(".sp-video[data-video-init]"),t=this.$slides.find(".sp-slide").eq(t.index).find(".sp-video[data-video-preinit]"),0!==i.length?i.videoController("play"):0!==t.length&&t.trigger("click."+s),0===i.length&&0===t.length||"stopAutoplay"!==this.settings.playVideoAction||void 0===this.stopAutoplay||(this.stopAutoplay(),this.settings.autoplay=!1))},destroyVideo:function(){this.$slider.find(".sp-video[ data-video-preinit ]").each(function(){var t=l(this);t.removeAttr("data-video-preinit"),t.off("click."+s)}),this.$slider.find(".sp-video[ data-video-init ]").each(function(){var t=l(this);t.removeAttr("data-video-init"),t.off("Video"),t.videoController("destroy")}),this.off("update."+s),this.off("gotoSlide."+s),this.off("gotoSlideComplete."+s)},videoDefaults:{reachVideoAction:"none",leaveVideoAction:"pauseVideo",playVideoAction:"stopAutoplay",pauseVideoAction:"none",endVideoAction:"none",videoPlay:function(){},videoPause:function(){},videoEnd:function(){}}};l.SliderPro.addModule("Video",t)}((window,jQuery)),function(o){"use strict";function s(t,i){this.$video=o(t),this.options=i,this.settings={},this.player=null,this._init()}var t=!!window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g);s.prototype={_init:function(){this.settings=o.extend({},this.defaults,this.options);var t,s=this,i=o.VideoController.players,n=this.$video.attr("id");for(t in i)if(void 0!==i[t]&&i[t].isType(this.$video)){this.player=new i[t](this.$video);break}null!==this.player&&o.each(["ready","start","play","pause","ended"],function(t,i){var e="video"+i.charAt(0).toUpperCase()+i.slice(1);s.player.on(i,function(){s.trigger({type:e,video:n}),o.isFunction(s.settings[e])&&s.settings[e].call(s,{type:e,video:n})})})},play:function(){!0==t&&!1===this.player.isStarted()||"playing"===this.player.getState()||this.player.play()},stop:function(){!0==t&&!1===this.player.isStarted()||"stopped"===this.player.getState()||this.player.stop()},pause:function(){!0==t&&!1===this.player.isStarted()||"paused"===this.player.getState()||this.player.pause()},replay:function(){!0==t&&!1===this.player.isStarted()||this.player.replay()},on:function(t,i){return this.$video.on(t,i)},off:function(t){return this.$video.off(t)},trigger:function(t){return this.$video.triggerHandler(t)},destroy:function(){!0===this.player.isStarted()&&this.stop(),this.player.off("ready"),this.player.off("start"),this.player.off("play"),this.player.off("pause"),this.player.off("ended"),this.$video.removeData("videoController")},defaults:{videoReady:function(){},videoStart:function(){},videoPlay:function(){},videoPause:function(){},videoEnded:function(){}}},o.VideoController={players:{},addPlayer:function(t,i){this.players[t]=i}},o.fn.videoController=function(i){var e=Array.prototype.slice.call(arguments,1);return this.each(function(){var t;void 0===o(this).data("videoController")?(t=new s(this,i),o(this).data("videoController",t)):void 0!==i&&("function"==typeof(t=o(this).data("videoController"))[i]?t[i].apply(t,e):o.error(i+" does not exist in videoController."))})};function n(t){this.$video=t,this.player=null,this.ready=!1,this.started=!1,this.state="",this.events=o({}),this._init()}var e={youtubeAPIAdded:!(n.prototype={_init:function(){},play:function(){},pause:function(){},stop:function(){},replay:function(){},isType:function(){},isReady:function(){return this.ready},isStarted:function(){return this.started},getState:function(){return this.state},on:function(t,i){return this.events.on(t,i)},off:function(t){return this.events.off(t)},trigger:function(t){return this.events.triggerHandler(t)}}),youtubeVideos:[]},i=function(t){var i;this.init=!1,void 0!==(window.YT&&window.YT.Player)?n.call(this,t):(e.youtubeVideos.push({video:t,scope:this}),!1===e.youtubeAPIAdded&&(e.youtubeAPIAdded=!0,(i=document.createElement("script")).src="//www.youtube.com/player_api",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(i,t),window.onYouTubePlayerAPIReady=function(){o.each(e.youtubeVideos,function(t,i){n.call(i.scope,i.video)})}))};i.prototype=new n,o.VideoController.addPlayer("YoutubeVideo",i.prototype.constructor=i),i.isType=function(t){if(t.is("iframe")){t=t.attr("src");if(-1!==t.indexOf("youtube.com")||-1!==t.indexOf("youtu.be"))return!0}return!1},i.prototype._init=function(){this.init=!0,this._setup()},i.prototype._setup=function(){var i=this;this.player=new YT.Player(this.$video[0],{events:{onReady:function(){i.trigger({type:"ready"}),i.ready=!0},onStateChange:function(t){switch(t.data){case YT.PlayerState.PLAYING:!1===i.started&&(i.started=!0,i.trigger({type:"start"})),i.state="playing",i.trigger({type:"play"});break;case YT.PlayerState.PAUSED:i.state="paused",i.trigger({type:"pause"});break;case YT.PlayerState.ENDED:i.state="ended",i.trigger({type:"ended"})}}}})},i.prototype.play=function(){var t,i=this;!0===this.ready?this.player.playVideo():t=setInterval(function(){!0===i.ready&&(clearInterval(t),i.player.playVideo())},100)},i.prototype.pause=function(){!0==t?this.stop():this.player.pauseVideo()},i.prototype.stop=function(){this.player.seekTo(1),this.player.stopVideo(),this.state="stopped"},i.prototype.replay=function(){this.player.seekTo(1),this.player.playVideo()};var a={vimeoAPIAdded:!(i.prototype.on=function(t,i){var e,s=this;!0===this.init?n.prototype.on.call(this,t,i):e=setInterval(function(){!0===s.init&&(clearInterval(e),n.prototype.on.call(s,t,i))},100)}),vimeoVideos:[]},i=function(t){var i,e;this.init=!1,void 0!==window.Vimeo?n.call(this,t):(a.vimeoVideos.push({video:t,scope:this}),!1===a.vimeoAPIAdded&&(a.vimeoAPIAdded=!0,(i=document.createElement("script")).src="//player.vimeo.com/api/player.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(i,t),e=setInterval(function(){void 0!==window.Vimeo&&(clearInterval(e),o.each(a.vimeoVideos,function(t,i){n.call(i.scope,i.video)}))},100)))};i.prototype=new n,o.VideoController.addPlayer("VimeoVideo",i.prototype.constructor=i),i.isType=function(t){if(t.is("iframe")&&-1!==t.attr("src").indexOf("vimeo.com"))return!0;return!1},i.prototype._init=function(){this.init=!0,this._setup()},i.prototype._setup=function(){var t=this;this.player=new Vimeo.Player(this.$video[0]),t.ready=!0,t.trigger({type:"ready"}),t.player.on("play",function(){!1===t.started&&(t.started=!0,t.trigger({type:"start"})),t.state="playing",t.trigger({type:"play"})}),t.player.on("pause",function(){t.state="paused",t.trigger({type:"pause"})}),t.player.on("ended",function(){t.state="ended",t.trigger({type:"ended"})})},i.prototype.play=function(){var t,i=this;!0===this.ready?this.player.play():t=setInterval(function(){!0===i.ready&&(clearInterval(t),i.player.play())},100)},i.prototype.pause=function(){this.player.pause()},i.prototype.stop=function(){var t=this;this.player.setCurrentTime(0).then(function(){t.player.pause(),t.state="stopped"})},i.prototype.replay=function(){var t=this;this.player.setCurrentTime(0).then(function(){t.player.play()})},i.prototype.on=function(t,i){var e,s=this;!0===this.init?n.prototype.on.call(this,t,i):e=setInterval(function(){!0===s.init&&(clearInterval(e),n.prototype.on.call(s,t,i))},100)};i=function(t){n.call(this,t)};i.prototype=new n,o.VideoController.addPlayer("HTML5Video",i.prototype.constructor=i),i.isType=function(t){return!(!t.is("video")||!1!==t.hasClass("video-js")||!1!==t.hasClass("sublime"))},i.prototype._init=function(){var t=this;this.player=this.$video[0];var i=setInterval(function(){4===t.player.readyState&&(clearInterval(i),t.ready=!0,t.trigger({type:"ready"}),t.player.addEventListener("play",function(){!1===t.started&&(t.started=!0,t.trigger({type:"start"})),t.state="playing",t.trigger({type:"play"})}),t.player.addEventListener("pause",function(){t.state="paused",t.trigger({type:"pause"})}),t.player.addEventListener("ended",function(){t.state="ended",t.trigger({type:"ended"})}))},100)},i.prototype.play=function(){var t,i=this;!0===this.ready?this.player.play():t=setInterval(function(){!0===i.ready&&(clearInterval(t),i.player.play())},100)},i.prototype.pause=function(){this.player.pause()},i.prototype.stop=function(){this.player.currentTime=0,this.player.pause(),this.state="stopped"},i.prototype.replay=function(){this.player.currentTime=0,this.player.play()};i=function(t){n.call(this,t)};i.prototype=new n,o.VideoController.addPlayer("VideoJSVideo",i.prototype.constructor=i),i.isType=function(t){return!(void 0===t.attr("data-videojs-id")&&!t.hasClass("video-js")||"undefined"==typeof videojs)},i.prototype._init=function(){var t=this,i=this.$video.hasClass("video-js")?this.$video.attr("id"):this.$video.attr("data-videojs-id");this.player=videojs(i),this.player.ready(function(){t.ready=!0,t.trigger({type:"ready"}),t.player.on("play",function(){!1===t.started&&(t.started=!0,t.trigger({type:"start"})),t.state="playing",t.trigger({type:"play"})}),t.player.on("pause",function(){t.state="paused",t.trigger({type:"pause"})}),t.player.on("ended",function(){t.state="ended",t.trigger({type:"ended"})})})},i.prototype.play=function(){this.player.play()},i.prototype.pause=function(){this.player.pause()},i.prototype.stop=function(){this.player.currentTime(0),this.player.pause(),this.state="stopped"},i.prototype.replay=function(){this.player.currentTime(0),this.player.play()};i=function(t){n.call(this,t)};i.prototype=new n,o.VideoController.addPlayer("SublimeVideo",i.prototype.constructor=i),i.isType=function(t){return!(!t.hasClass("sublime")||"undefined"==typeof sublime)},i.prototype._init=function(){var t=this;sublime.ready(function(){t.player=sublime.player(t.$video.attr("id")),t.ready=!0,t.trigger({type:"ready"}),t.player.on("play",function(){!1===t.started&&(t.started=!0,t.trigger({type:"start"})),t.state="playing",t.trigger({type:"play"})}),t.player.on("pause",function(){t.state="paused",t.trigger({type:"pause"})}),t.player.on("stop",function(){t.state="stopped",t.trigger({type:"stop"})}),t.player.on("end",function(){t.state="ended",t.trigger({type:"ended"})})})},i.prototype.play=function(){this.player.play()},i.prototype.pause=function(){this.player.pause()},i.prototype.stop=function(){this.player.stop()},i.prototype.replay=function(){this.player.stop(),this.player.play()};i=function(t){n.call(this,t)};i.prototype=new n,o.VideoController.addPlayer("JWPlayerVideo",i.prototype.constructor=i),i.isType=function(t){return!(void 0===t.attr("data-jwplayer-id")&&!t.hasClass("jwplayer")&&0===t.find("object[data*='jwplayer']").length||"undefined"==typeof jwplayer)},i.prototype._init=function(){var t,i=this;this.$video.hasClass("jwplayer")?t=this.$video.attr("id"):void 0!==this.$video.attr("data-jwplayer-id")?t=this.$video.attr("data-jwplayer-id"):0!==this.$video.find("object[data*='jwplayer']").length&&(t=this.$video.find("object").attr("id")),this.player=jwplayer(t),this.player.onReady(function(){i.ready=!0,i.trigger({type:"ready"}),i.player.onPlay(function(){!1===i.started&&(i.started=!0,i.trigger({type:"start"})),i.state="playing",i.trigger({type:"play"})}),i.player.onPause(function(){i.state="paused",i.trigger({type:"pause"})}),i.player.onComplete(function(){i.state="ended",i.trigger({type:"ended"})})})},i.prototype.play=function(){this.player.play(!0)},i.prototype.pause=function(){this.player.pause(!0)},i.prototype.stop=function(){this.player.stop(),this.state="stopped"},i.prototype.replay=function(){this.player.seek(0),this.player.play(!0)}}(jQuery);