/*!
	Zoom 1.7.18
	license: MIT
	http://www.jacklmoore.com/zoom
*/
(function(o){var t={url:!1,callback:!1,target:!1,duration:120,on:"mouseover",touch:!0,onZoomIn:!1,onZoomOut:!1,magnify:1};o.zoom=function(t,n,e,i){var u,c,a,r,m,l,s,f=o(t),h=f.css("position"),d=o(n);return t.style.position=/(absolute|fixed)/.test(h)?h:"relative",t.style.overflow="hidden",e.style.width=e.style.height="",o(e).addClass("zoomImg").css({position:"absolute",top:0,left:0,opacity:0,width:e.width*i,height:e.height*i,border:"none",maxWidth:"none",maxHeight:"none"}).appendTo(t),{init:function(){c=f.outerWidth(),u=f.outerHeight(),n===t?(r=c,a=u):(r=d.outerWidth(),a=d.outerHeight()),m=(e.width-c)/r,l=(e.height-u)/a,s=d.offset()},move:function(o){var t=o.pageX-s.left,n=o.pageY-s.top;n=Math.max(Math.min(n,a),0),t=Math.max(Math.min(t,r),0),e.style.left=t*-m+"px",e.style.top=n*-l+"px"}}},o.fn.zoom=function(n){return this.each(function(){var e=o.extend({},t,n||{}),i=e.target&&o(e.target)[0]||this,u=this,c=o(u),a=document.createElement("img"),r=o(a),m="mousemove.zoom",l=!1,s=!1;if(!e.url){var f=u.querySelector("img");if(f&&(e.url=f.getAttribute("data-src")||f.currentSrc||f.src),!e.url)return}c.one("zoom.destroy",function(o,t){c.off(".zoom"),i.style.position=o,i.style.overflow=t,a.onload=null,r.remove()}.bind(this,i.style.position,i.style.overflow)),a.onload=function(){function t(t){f.init(),f.move(t),r.stop().fadeTo(o.support.opacity?e.duration:0,1,o.isFunction(e.onZoomIn)?e.onZoomIn.call(a):!1)}function n(){r.stop().fadeTo(e.duration,0,o.isFunction(e.onZoomOut)?e.onZoomOut.call(a):!1)}var f=o.zoom(i,u,a,e.magnify);"grab"===e.on?c.on("mousedown.zoom",function(e){1===e.which&&(o(document).one("mouseup.zoom",function(){n(),o(document).off(m,f.move)}),t(e),o(document).on(m,f.move),e.preventDefault())}):"click"===e.on?c.on("click.zoom",function(e){return l?void 0:(l=!0,t(e),o(document).on(m,f.move),o(document).one("click.zoom",function(){n(),l=!1,o(document).off(m,f.move)}),!1)}):"toggle"===e.on?c.on("click.zoom",function(o){l?n():t(o),l=!l}):"mouseover"===e.on&&(f.init(),c.on("mouseenter.zoom",t).on("mouseleave.zoom",n).on(m,f.move)),e.touch&&c.on("touchstart.zoom",function(o){o.preventDefault(),s?(s=!1,n()):(s=!0,t(o.originalEvent.touches[0]||o.originalEvent.changedTouches[0]))}).on("touchmove.zoom",function(o){o.preventDefault(),f.move(o.originalEvent.touches[0]||o.originalEvent.changedTouches[0])}).on("touchend.zoom",function(o){o.preventDefault(),s&&(s=!1,n())}),o.isFunction(e.callback)&&e.callback.call(a)},a.src=e.url})},o.fn.zoom.defaults=t})(window.jQuery);

/*
     _ _      _       _
 ___| (_) ___| | __  (_)___
/ __| | |/ __| |/ /  | / __|
\__ \ | | (__|   < _ | \__ \
|___/_|_|\___|_|\_(_)/ |___/
                   |__/

 Version: 1.6.0
  Author: Ken Wheeler
 Website: http://kenwheeler.github.io
    Docs: http://kenwheeler.github.io/slick
    Repo: http://github.com/kenwheeler/slick
  Issues: http://github.com/kenwheeler/slick/issues

 */
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('<button type="button" data-role="none" role="button" tabindex="0" />').text(c+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.focussed=!1,e.interrupted=!1,e.hidden="hidden",e.paused=!0,e.positionProp=null,e.respondTo=null,e.rowCount=1,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange="visibilitychange",e.windowWidth=0,e.windowTimer=null,f=a(c).data("slick")||{},e.options=a.extend({},e.defaults,d,f),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,"undefined"!=typeof document.mozHidden?(e.hidden="mozHidden",e.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(e.hidden="webkitHidden",e.visibilityChange="webkitvisibilitychange"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.registerBreakpoints(),e.init(!0)}var b=0;return c}(),b.prototype.activateADA=function(){var a=this;a.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("data-slick-index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.animate({height:b},a.options.speed)}},b.prototype.animateSlide=function(b,c){var d={},e=this;e.animateHeight(),e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?(e.options.rtl===!0&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}})):(e.applyTransition(),b=Math.ceil(b),e.options.vertical===!1?d[e.animType]="translate3d("+b+"px, 0px, 0px)":d[e.animType]="translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.getNavTarget=function(){var b=this,c=b.options.asNavFor;return c&&null!==c&&(c=a(c).not(b.$slider)),c},b.prototype.asNavFor=function(b){var c=this,d=c.getNavTarget();null!==d&&"object"==typeof d&&d.each(function(){var c=a(this).slick("getSlick");c.unslicked||c.slideHandler(b,!0)})},b.prototype.applyTransition=function(a){var b=this,c={};b.options.fade===!1?c[b.transitionType]=b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:c[b.transitionType]="opacity "+b.options.speed+"ms "+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayClear(),a.slideCount>a.options.slidesToShow&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this,b=a.currentSlide+a.options.slidesToScroll;a.paused||a.interrupted||a.focussed||(a.options.infinite===!1&&(1===a.direction&&a.currentSlide+1===a.slideCount-1?a.direction=0:0===a.direction&&(b=a.currentSlide-a.options.slidesToScroll,a.currentSlide-1===0&&(a.direction=1))),a.slideHandler(b))},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&(b.$prevArrow=a(b.options.prevArrow).addClass("slick-arrow"),b.$nextArrow=a(b.options.nextArrow).addClass("slick-arrow"),b.slideCount>b.options.slidesToShow?(b.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.prependTo(b.options.appendArrows),b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.appendTo(b.options.appendArrows),b.options.infinite!==!0&&b.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):b.$prevArrow.add(b.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(b.$slider.addClass("slick-dotted"),d=a("<ul />").addClass(b.options.dotsClass),c=0;c<=b.getDotCount();c+=1)d.append(a("<li />").append(b.options.customPaging.call(this,b,c)));b.$dots=d.appendTo(b.options.appendDots),b.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},b.prototype.buildOut=function(){var b=this;b.$slides=b.$slider.children(b.options.slide+":not(.slick-cloned)").addClass("slick-slide"),b.slideCount=b.$slides.length,b.$slides.each(function(b,c){a(c).attr("data-slick-index",b).data("originalStyling",a(c).attr("style")||"")}),b.$slider.addClass("slick-slider"),b.$slideTrack=0===b.slideCount?a('<div class="slick-track"/>').appendTo(b.$slider):b.$slides.wrapAll('<div class="slick-track"/>').parent(),b.$list=b.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),b.$slideTrack.css("opacity",0),(b.options.centerMode===!0||b.options.swipeToSlide===!0)&&(b.options.slidesToScroll=1),a("img[data-lazy]",b.$slider).not("[src]").addClass("slick-loading"),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.updateDots(),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.options.draggable===!0&&b.$list.addClass("draggable")},b.prototype.buildRows=function(){var b,c,d,e,f,g,h,a=this;if(e=document.createDocumentFragment(),g=a.$slider.children(),a.options.rows>1){for(h=a.options.slidesPerRow*a.options.rows,f=Math.ceil(g.length/h),b=0;f>b;b++){var i=document.createElement("div");for(c=0;c<a.options.rows;c++){var j=document.createElement("div");for(d=0;d<a.options.slidesPerRow;d++){var k=b*h+(c*a.options.slidesPerRow+d);g.get(k)&&j.appendChild(g.get(k))}i.appendChild(j)}e.appendChild(i)}a.$slider.empty().append(e),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},b.prototype.checkResponsive=function(b,c){var e,f,g,d=this,h=!1,i=d.$slider.width(),j=window.innerWidth||a(window).width();if("window"===d.respondTo?g=j:"slider"===d.respondTo?g=i:"min"===d.respondTo&&(g=Math.min(j,i)),d.options.responsive&&d.options.responsive.length&&null!==d.options.responsive){f=null;for(e in d.breakpoints)d.breakpoints.hasOwnProperty(e)&&(d.originalSettings.mobileFirst===!1?g<d.breakpoints[e]&&(f=d.breakpoints[e]):g>d.breakpoints[e]&&(f=d.breakpoints[e]));null!==f?null!==d.activeBreakpoint?(f!==d.activeBreakpoint||c)&&(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):null!==d.activeBreakpoint&&(d.activeBreakpoint=null,d.options=d.originalSettings,b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b),h=f),b||h===!1||d.$slider.trigger("breakpoint",[d,h])}},b.prototype.changeSlide=function(b,c){var f,g,h,d=this,e=a(b.currentTarget);switch(e.is("a")&&b.preventDefault(),e.is("li")||(e=e.closest("li")),h=d.slideCount%d.options.slidesToScroll!==0,f=h?0:(d.slideCount-d.currentSlide)%d.options.slidesToScroll,b.data.message){case"previous":g=0===f?d.options.slidesToScroll:d.options.slidesToShow-f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide-g,!1,c);break;case"next":g=0===f?d.options.slidesToScroll:f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide+g,!1,c);break;case"index":var i=0===b.data.index?0:b.data.index||e.index()*d.options.slidesToScroll;d.slideHandler(d.checkNavigable(i),!1,c),e.children().trigger("focus");break;default:return}},b.prototype.checkNavigable=function(a){var c,d,b=this;if(c=b.getNavigableIndexes(),d=0,a>c[c.length-1])a=c[c.length-1];else for(var e in c){if(a<c[e]){a=d;break}d=c[e]}return a},b.prototype.cleanUpEvents=function(){var b=this;b.options.dots&&null!==b.$dots&&a("li",b.$dots).off("click.slick",b.changeSlide).off("mouseenter.slick",a.proxy(b.interrupt,b,!0)).off("mouseleave.slick",a.proxy(b.interrupt,b,!1)),b.$slider.off("focus.slick blur.slick"),b.options.arrows===!0&&b.slideCount>b.options.slidesToShow&&(b.$prevArrow&&b.$prevArrow.off("click.slick",b.changeSlide),b.$nextArrow&&b.$nextArrow.off("click.slick",b.changeSlide)),b.$list.off("touchstart.slick mousedown.slick",b.swipeHandler),b.$list.off("touchmove.slick mousemove.slick",b.swipeHandler),b.$list.off("touchend.slick mouseup.slick",b.swipeHandler),b.$list.off("touchcancel.slick mouseleave.slick",b.swipeHandler),b.$list.off("click.slick",b.clickHandler),a(document).off(b.visibilityChange,b.visibility),b.cleanUpSlideEvents(),b.options.accessibility===!0&&b.$list.off("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().off("click.slick",b.selectHandler),a(window).off("orientationchange.slick.slick-"+b.instanceUid,b.orientationChange),a(window).off("resize.slick.slick-"+b.instanceUid,b.resize),a("[draggable!=true]",b.$slideTrack).off("dragstart",b.preventDefault),a(window).off("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).off("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.cleanUpSlideEvents=function(){var b=this;b.$list.off("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.off("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.cleanUpRows=function(){var b,a=this;a.options.rows>1&&(b=a.$slides.children().children(),b.removeAttr("style"),a.$slider.empty().append(b))},b.prototype.clickHandler=function(a){var b=this;b.shouldClick===!1&&(a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault())},b.prototype.destroy=function(b){var c=this;c.autoPlayClear(),c.touchObject={},c.cleanUpEvents(),a(".slick-cloned",c.$slider).detach(),c.$dots&&c.$dots.remove(),c.$prevArrow&&c.$prevArrow.length&&(c.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.prevArrow)&&c.$prevArrow.remove()),c.$nextArrow&&c.$nextArrow.length&&(c.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.nextArrow)&&c.$nextArrow.remove()),c.$slides&&(c.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){a(this).attr("style",a(this).data("originalStyling"))}),c.$slideTrack.children(this.options.slide).detach(),c.$slideTrack.detach(),c.$list.detach(),c.$slider.append(c.$slides)),c.cleanUpRows(),c.$slider.removeClass("slick-slider"),c.$slider.removeClass("slick-initialized"),c.$slider.removeClass("slick-dotted"),c.unslicked=!0,b||c.$slider.trigger("destroy",[c])},b.prototype.disableTransition=function(a){var b=this,c={};c[b.transitionType]="",b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.fadeSlide=function(a,b){var c=this;c.cssTransitions===!1?(c.$slides.eq(a).css({zIndex:c.options.zIndex}),c.$slides.eq(a).animate({opacity:1},c.options.speed,c.options.easing,b)):(c.applyTransition(a),c.$slides.eq(a).css({opacity:1,zIndex:c.options.zIndex}),b&&setTimeout(function(){c.disableTransition(a),b.call()},c.options.speed))},b.prototype.fadeSlideOut=function(a){var b=this;b.cssTransitions===!1?b.$slides.eq(a).animate({opacity:0,zIndex:b.options.zIndex-2},b.options.speed,b.options.easing):(b.applyTransition(a),b.$slides.eq(a).css({opacity:0,zIndex:b.options.zIndex-2}))},b.prototype.filterSlides=b.prototype.slickFilter=function(a){var b=this;null!==a&&(b.$slidesCache=b.$slides,b.unload(),b.$slideTrack.children(this.options.slide).detach(),b.$slidesCache.filter(a).appendTo(b.$slideTrack),b.reinit())},b.prototype.focusHandler=function(){var b=this;b.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*:not(.slick-arrow)",function(c){c.stopImmediatePropagation();var d=a(this);setTimeout(function(){b.options.pauseOnFocus&&(b.focussed=d.is(":focus"),b.autoPlay())},0)})},b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){var a=this;return a.currentSlide},b.prototype.getDotCount=function(){var a=this,b=0,c=0,d=0;if(a.options.infinite===!0)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else if(a.options.centerMode===!0)d=a.slideCount;else if(a.options.asNavFor)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else d=1+Math.ceil((a.slideCount-a.options.slidesToShow)/a.options.slidesToScroll);return d-1},b.prototype.getLeft=function(a){var c,d,f,b=this,e=0;return b.slideOffset=0,d=b.$slides.first().outerHeight(!0),b.options.infinite===!0?(b.slideCount>b.options.slidesToShow&&(b.slideOffset=b.slideWidth*b.options.slidesToShow*-1,e=d*b.options.slidesToShow*-1),b.slideCount%b.options.slidesToScroll!==0&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(a>b.slideCount?(b.slideOffset=(b.options.slidesToShow-(a-b.slideCount))*b.slideWidth*-1,e=(b.options.slidesToShow-(a-b.slideCount))*d*-1):(b.slideOffset=b.slideCount%b.options.slidesToScroll*b.slideWidth*-1,e=b.slideCount%b.options.slidesToScroll*d*-1))):a+b.options.slidesToShow>b.slideCount&&(b.slideOffset=(a+b.options.slidesToShow-b.slideCount)*b.slideWidth,e=(a+b.options.slidesToShow-b.slideCount)*d),b.slideCount<=b.options.slidesToShow&&(b.slideOffset=0,e=0),b.options.centerMode===!0&&b.options.infinite===!0?b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)-b.slideWidth:b.options.centerMode===!0&&(b.slideOffset=0,b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)),c=b.options.vertical===!1?a*b.slideWidth*-1+b.slideOffset:a*d*-1+e,b.options.variableWidth===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,b.options.centerMode===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow+1),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,c+=(b.$list.width()-f.outerWidth())/2)),c},b.prototype.getOption=b.prototype.slickGetOption=function(a){var b=this;return b.options[a]},b.prototype.getNavigableIndexes=function(){var e,a=this,b=0,c=0,d=[];for(a.options.infinite===!1?e=a.slideCount:(b=-1*a.options.slidesToScroll,c=-1*a.options.slidesToScroll,e=2*a.slideCount);e>b;)d.push(b),b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d},b.prototype.getSlick=function(){return this},b.prototype.getSlideCount=function(){var c,d,e,b=this;return e=b.options.centerMode===!0?b.slideWidth*Math.floor(b.options.slidesToShow/2):0,b.options.swipeToSlide===!0?(b.$slideTrack.find(".slick-slide").each(function(c,f){return f.offsetLeft-e+a(f).outerWidth()/2>-1*b.swipeLeft?(d=f,!1):void 0}),c=Math.abs(a(d).attr("data-slick-index")-b.currentSlide)||1):b.options.slidesToScroll},b.prototype.goTo=b.prototype.slickGoTo=function(a,b){var c=this;c.changeSlide({data:{message:"index",index:parseInt(a)}},b)},b.prototype.init=function(b){var c=this;a(c.$slider).hasClass("slick-initialized")||(a(c.$slider).addClass("slick-initialized"),c.buildRows(),c.buildOut(),c.setProps(),c.startLoad(),c.loadSlider(),c.initializeEvents(),c.updateArrows(),c.updateDots(),c.checkResponsive(!0),c.focusHandler()),b&&c.$slider.trigger("init",[c]),c.options.accessibility===!0&&c.initADA(),c.options.autoplay&&(c.paused=!1,c.autoPlay())},b.prototype.initADA=function(){var b=this;b.$slides.add(b.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),b.$slideTrack.attr("role","listbox"),b.$slides.not(b.$slideTrack.find(".slick-cloned")).each(function(c){a(this).attr({role:"option","aria-describedby":"slick-slide"+b.instanceUid+c})}),null!==b.$dots&&b.$dots.attr("role","tablist").find("li").each(function(c){a(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+b.instanceUid+c,id:"slick-slide"+b.instanceUid+c})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),b.activateADA()},b.prototype.initArrowEvents=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},a.changeSlide),a.$nextArrow.off("click.slick").on("click.slick",{message:"next"},a.changeSlide))},b.prototype.initDotEvents=function(){var b=this;b.options.dots===!0&&b.slideCount>b.options.slidesToShow&&a("li",b.$dots).on("click.slick",{message:"index"},b.changeSlide),b.options.dots===!0&&b.options.pauseOnDotsHover===!0&&a("li",b.$dots).on("mouseenter.slick",a.proxy(b.interrupt,b,!0)).on("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.initSlideEvents=function(){var b=this;b.options.pauseOnHover&&(b.$list.on("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.on("mouseleave.slick",a.proxy(b.interrupt,b,!1)))},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.initSlideEvents(),b.$list.on("touchstart.slick mousedown.slick",{action:"start"},b.swipeHandler),b.$list.on("touchmove.slick mousemove.slick",{action:"move"},b.swipeHandler),b.$list.on("touchend.slick mouseup.slick",{action:"end"},b.swipeHandler),b.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},b.swipeHandler),b.$list.on("click.slick",b.clickHandler),a(document).on(b.visibilityChange,a.proxy(b.visibility,b)),b.options.accessibility===!0&&b.$list.on("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),a(window).on("orientationchange.slick.slick-"+b.instanceUid,a.proxy(b.orientationChange,b)),a(window).on("resize.slick.slick-"+b.instanceUid,a.proxy(b.resize,b)),a("[draggable!=true]",b.$slideTrack).on("dragstart",b.preventDefault),a(window).on("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).on("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.initUI=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.show(),a.$nextArrow.show()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.show()},b.prototype.keyHandler=function(a){var b=this;a.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===a.keyCode&&b.options.accessibility===!0?b.changeSlide({data:{message:b.options.rtl===!0?"next":"previous"}}):39===a.keyCode&&b.options.accessibility===!0&&b.changeSlide({data:{message:b.options.rtl===!0?"previous":"next"}}))},b.prototype.lazyLoad=function(){function g(c){a("img[data-lazy]",c).each(function(){var c=a(this),d=a(this).attr("data-lazy"),e=document.createElement("img");e.onload=function(){c.animate({opacity:0},100,function(){c.attr("src",d).animate({opacity:1},200,function(){c.removeAttr("data-lazy").removeClass("slick-loading")}),b.$slider.trigger("lazyLoaded",[b,c,d])})},e.onerror=function(){c.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),b.$slider.trigger("lazyLoadError",[b,c,d])},e.src=d})}var c,d,e,f,b=this;b.options.centerMode===!0?b.options.infinite===!0?(e=b.currentSlide+(b.options.slidesToShow/2+1),f=e+b.options.slidesToShow+2):(e=Math.max(0,b.currentSlide-(b.options.slidesToShow/2+1)),f=2+(b.options.slidesToShow/2+1)+b.currentSlide):(e=b.options.infinite?b.options.slidesToShow+b.currentSlide:b.currentSlide,f=Math.ceil(e+b.options.slidesToShow),b.options.fade===!0&&(e>0&&e--,f<=b.slideCount&&f++)),c=b.$slider.find(".slick-slide").slice(e,f),g(c),b.slideCount<=b.options.slidesToShow?(d=b.$slider.find(".slick-slide"),g(d)):b.currentSlide>=b.slideCount-b.options.slidesToShow?(d=b.$slider.find(".slick-cloned").slice(0,b.options.slidesToShow),g(d)):0===b.currentSlide&&(d=b.$slider.find(".slick-cloned").slice(-1*b.options.slidesToShow),g(d))},b.prototype.loadSlider=function(){var a=this;a.setPosition(),a.$slideTrack.css({opacity:1}),a.$slider.removeClass("slick-loading"),a.initUI(),"progressive"===a.options.lazyLoad&&a.progressiveLazyLoad()},b.prototype.next=b.prototype.slickNext=function(){var a=this;a.changeSlide({data:{message:"next"}})},b.prototype.orientationChange=function(){var a=this;a.checkResponsive(),a.setPosition()},b.prototype.pause=b.prototype.slickPause=function(){var a=this;a.autoPlayClear(),a.paused=!0},b.prototype.play=b.prototype.slickPlay=function(){var a=this;a.autoPlay(),a.options.autoplay=!0,a.paused=!1,a.focussed=!1,a.interrupted=!1},b.prototype.postSlide=function(a){var b=this;b.unslicked||(b.$slider.trigger("afterChange",[b,a]),b.animating=!1,b.setPosition(),b.swipeLeft=null,b.options.autoplay&&b.autoPlay(),b.options.accessibility===!0&&b.initADA())},b.prototype.prev=b.prototype.slickPrev=function(){var a=this;a.changeSlide({data:{message:"previous"}})},b.prototype.preventDefault=function(a){a.preventDefault()},b.prototype.progressiveLazyLoad=function(b){b=b||1;var e,f,g,c=this,d=a("img[data-lazy]",c.$slider);d.length?(e=d.first(),f=e.attr("data-lazy"),g=document.createElement("img"),g.onload=function(){e.attr("src",f).removeAttr("data-lazy").removeClass("slick-loading"),c.options.adaptiveHeight===!0&&c.setPosition(),c.$slider.trigger("lazyLoaded",[c,e,f]),c.progressiveLazyLoad()},g.onerror=function(){3>b?setTimeout(function(){c.progressiveLazyLoad(b+1)},500):(e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),c.$slider.trigger("lazyLoadError",[c,e,f]),c.progressiveLazyLoad())},g.src=f):c.$slider.trigger("allImagesLoaded",[c])},b.prototype.refresh=function(b){var d,e,c=this;e=c.slideCount-c.options.slidesToShow,!c.options.infinite&&c.currentSlide>e&&(c.currentSlide=e),c.slideCount<=c.options.slidesToShow&&(c.currentSlide=0),d=c.currentSlide,c.destroy(!0),a.extend(c,c.initials,{currentSlide:d}),c.init(),b||c.changeSlide({data:{message:"index",index:d}},!1)},b.prototype.registerBreakpoints=function(){var c,d,e,b=this,f=b.options.responsive||null;if("array"===a.type(f)&&f.length){b.respondTo=b.options.respondTo||"window";for(c in f)if(e=b.breakpoints.length-1,d=f[c].breakpoint,f.hasOwnProperty(c)){for(;e>=0;)b.breakpoints[e]&&b.breakpoints[e]===d&&b.breakpoints.splice(e,1),e--;b.breakpoints.push(d),b.breakpointSettings[d]=f[c].settings}b.breakpoints.sort(function(a,c){return b.options.mobileFirst?a-c:c-a})}},b.prototype.reinit=function(){var b=this;b.$slides=b.$slideTrack.children(b.options.slide).addClass("slick-slide"),b.slideCount=b.$slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.slideCount<=b.options.slidesToShow&&(b.currentSlide=0),b.registerBreakpoints(),b.setProps(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.cleanUpSlideEvents(),b.initSlideEvents(),b.checkResponsive(!1,!0),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.setPosition(),b.focusHandler(),b.paused=!b.options.autoplay,b.autoPlay(),b.$slider.trigger("reInit",[b])},b.prototype.resize=function(){var b=this;a(window).width()!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.unslicked||b.setPosition()},50))},b.prototype.removeSlide=b.prototype.slickRemove=function(a,b,c){var d=this;return"boolean"==typeof a?(b=a,a=b===!0?0:d.slideCount-1):a=b===!0?--a:a,d.slideCount<1||0>a||a>d.slideCount-1?!1:(d.unload(),c===!0?d.$slideTrack.children().remove():d.$slideTrack.children(this.options.slide).eq(a).remove(),d.$slides=d.$slideTrack.children(this.options.slide),d.$slideTrack.children(this.options.slide).detach(),d.$slideTrack.append(d.$slides),d.$slidesCache=d.$slides,void d.reinit())},b.prototype.setCSS=function(a){var d,e,b=this,c={};b.options.rtl===!0&&(a=-a),d="left"==b.positionProp?Math.ceil(a)+"px":"0px",e="top"==b.positionProp?Math.ceil(a)+"px":"0px",c[b.positionProp]=a,b.transformsEnabled===!1?b.$slideTrack.css(c):(c={},b.cssTransitions===!1?(c[b.animType]="translate("+d+", "+e+")",b.$slideTrack.css(c)):(c[b.animType]="translate3d("+d+", "+e+", 0px)",b.$slideTrack.css(c)))},b.prototype.setDimensions=function(){var a=this;a.options.vertical===!1?a.options.centerMode===!0&&a.$list.css({padding:"0px "+a.options.centerPadding}):(a.$list.height(a.$slides.first().outerHeight(!0)*a.options.slidesToShow),a.options.centerMode===!0&&a.$list.css({padding:a.options.centerPadding+" 0px"})),a.listWidth=a.$list.width(),a.listHeight=a.$list.height(),a.options.vertical===!1&&a.options.variableWidth===!1?(a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow),a.$slideTrack.width(Math.ceil(a.slideWidth*a.$slideTrack.children(".slick-slide").length))):a.options.variableWidth===!0?a.$slideTrack.width(5e3*a.slideCount):(a.slideWidth=Math.ceil(a.listWidth),a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0)*a.$slideTrack.children(".slick-slide").length)));var b=a.$slides.first().outerWidth(!0)-a.$slides.first().width();a.options.variableWidth===!1&&a.$slideTrack.children(".slick-slide").width(a.slideWidth-b)},b.prototype.setFade=function(){var c,b=this;b.$slides.each(function(d,e){c=b.slideWidth*d*-1,b.options.rtl===!0?a(e).css({position:"relative",right:c,top:0,zIndex:b.options.zIndex-2,opacity:0}):a(e).css({position:"relative",left:c,top:0,zIndex:b.options.zIndex-2,opacity:0})}),b.$slides.eq(b.currentSlide).css({zIndex:b.options.zIndex-1,opacity:1})},b.prototype.setHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.css("height",b)}},b.prototype.setOption=b.prototype.slickSetOption=function(){var c,d,e,f,h,b=this,g=!1;if("object"===a.type(arguments[0])?(e=arguments[0],g=arguments[1],h="multiple"):"string"===a.type(arguments[0])&&(e=arguments[0],f=arguments[1],g=arguments[2],"responsive"===arguments[0]&&"array"===a.type(arguments[1])?h="responsive":"undefined"!=typeof arguments[1]&&(h="single")),"single"===h)b.options[e]=f;else if("multiple"===h)a.each(e,function(a,c){b.options[a]=c});else if("responsive"===h)for(d in f)if("array"!==a.type(b.options.responsive))b.options.responsive=[f[d]];else{for(c=b.options.responsive.length-1;c>=0;)b.options.responsive[c].breakpoint===f[d].breakpoint&&b.options.responsive.splice(c,1),c--;b.options.responsive.push(f[d])}g&&(b.unload(),b.reinit())},b.prototype.setPosition=function(){var a=this;a.setDimensions(),a.setHeight(),a.options.fade===!1?a.setCSS(a.getLeft(a.currentSlide)):a.setFade(),a.$slider.trigger("setPosition",[a])},b.prototype.setProps=function(){var a=this,b=document.body.style;a.positionProp=a.options.vertical===!0?"top":"left","top"===a.positionProp?a.$slider.addClass("slick-vertical"):a.$slider.removeClass("slick-vertical"),(void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.msTransition)&&a.options.useCSS===!0&&(a.cssTransitions=!0),a.options.fade&&("number"==typeof a.options.zIndex?a.options.zIndex<3&&(a.options.zIndex=3):a.options.zIndex=a.defaults.zIndex),void 0!==b.OTransform&&(a.animType="OTransform",a.transformType="-o-transform",a.transitionType="OTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.MozTransform&&(a.animType="MozTransform",a.transformType="-moz-transform",a.transitionType="MozTransition",void 0===b.perspectiveProperty&&void 0===b.MozPerspective&&(a.animType=!1)),void 0!==b.webkitTransform&&(a.animType="webkitTransform",a.transformType="-webkit-transform",a.transitionType="webkitTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.msTransform&&(a.animType="msTransform",a.transformType="-ms-transform",a.transitionType="msTransition",void 0===b.msTransform&&(a.animType=!1)),void 0!==b.transform&&a.animType!==!1&&(a.animType="transform",a.transformType="transform",a.transitionType="transition"),a.transformsEnabled=a.options.useTransform&&null!==a.animType&&a.animType!==!1},b.prototype.setSlideClasses=function(a){var c,d,e,f,b=this;d=b.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),b.$slides.eq(a).addClass("slick-current"),b.options.centerMode===!0?(c=Math.floor(b.options.slidesToShow/2),b.options.infinite===!0&&(a>=c&&a<=b.slideCount-1-c?b.$slides.slice(a-c,a+c+1).addClass("slick-active").attr("aria-hidden","false"):(e=b.options.slidesToShow+a,
d.slice(e-c+1,e+c+2).addClass("slick-active").attr("aria-hidden","false")),0===a?d.eq(d.length-1-b.options.slidesToShow).addClass("slick-center"):a===b.slideCount-1&&d.eq(b.options.slidesToShow).addClass("slick-center")),b.$slides.eq(a).addClass("slick-center")):a>=0&&a<=b.slideCount-b.options.slidesToShow?b.$slides.slice(a,a+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):d.length<=b.options.slidesToShow?d.addClass("slick-active").attr("aria-hidden","false"):(f=b.slideCount%b.options.slidesToShow,e=b.options.infinite===!0?b.options.slidesToShow+a:a,b.options.slidesToShow==b.options.slidesToScroll&&b.slideCount-a<b.options.slidesToShow?d.slice(e-(b.options.slidesToShow-f),e+f).addClass("slick-active").attr("aria-hidden","false"):d.slice(e,e+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")),"ondemand"===b.options.lazyLoad&&b.lazyLoad()},b.prototype.setupInfinite=function(){var c,d,e,b=this;if(b.options.fade===!0&&(b.options.centerMode=!1),b.options.infinite===!0&&b.options.fade===!1&&(d=null,b.slideCount>b.options.slidesToShow)){for(e=b.options.centerMode===!0?b.options.slidesToShow+1:b.options.slidesToShow,c=b.slideCount;c>b.slideCount-e;c-=1)d=c-1,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d-b.slideCount).prependTo(b.$slideTrack).addClass("slick-cloned");for(c=0;e>c;c+=1)d=c,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d+b.slideCount).appendTo(b.$slideTrack).addClass("slick-cloned");b.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")})}},b.prototype.interrupt=function(a){var b=this;a||b.autoPlay(),b.interrupted=a},b.prototype.selectHandler=function(b){var c=this,d=a(b.target).is(".slick-slide")?a(b.target):a(b.target).parents(".slick-slide"),e=parseInt(d.attr("data-slick-index"));return e||(e=0),c.slideCount<=c.options.slidesToShow?(c.setSlideClasses(e),void c.asNavFor(e)):void c.slideHandler(e)},b.prototype.slideHandler=function(a,b,c){var d,e,f,g,j,h=null,i=this;return b=b||!1,i.animating===!0&&i.options.waitForAnimate===!0||i.options.fade===!0&&i.currentSlide===a||i.slideCount<=i.options.slidesToShow?void 0:(b===!1&&i.asNavFor(a),d=a,h=i.getLeft(d),g=i.getLeft(i.currentSlide),i.currentLeft=null===i.swipeLeft?g:i.swipeLeft,i.options.infinite===!1&&i.options.centerMode===!1&&(0>a||a>i.getDotCount()*i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):i.options.infinite===!1&&i.options.centerMode===!0&&(0>a||a>i.slideCount-i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):(i.options.autoplay&&clearInterval(i.autoPlayTimer),e=0>d?i.slideCount%i.options.slidesToScroll!==0?i.slideCount-i.slideCount%i.options.slidesToScroll:i.slideCount+d:d>=i.slideCount?i.slideCount%i.options.slidesToScroll!==0?0:d-i.slideCount:d,i.animating=!0,i.$slider.trigger("beforeChange",[i,i.currentSlide,e]),f=i.currentSlide,i.currentSlide=e,i.setSlideClasses(i.currentSlide),i.options.asNavFor&&(j=i.getNavTarget(),j=j.slick("getSlick"),j.slideCount<=j.options.slidesToShow&&j.setSlideClasses(i.currentSlide)),i.updateDots(),i.updateArrows(),i.options.fade===!0?(c!==!0?(i.fadeSlideOut(f),i.fadeSlide(e,function(){i.postSlide(e)})):i.postSlide(e),void i.animateHeight()):void(c!==!0?i.animateSlide(h,function(){i.postSlide(e)}):i.postSlide(e))))},b.prototype.startLoad=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.hide(),a.$nextArrow.hide()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.hide(),a.$slider.addClass("slick-loading")},b.prototype.swipeDirection=function(){var a,b,c,d,e=this;return a=e.touchObject.startX-e.touchObject.curX,b=e.touchObject.startY-e.touchObject.curY,c=Math.atan2(b,a),d=Math.round(180*c/Math.PI),0>d&&(d=360-Math.abs(d)),45>=d&&d>=0?e.options.rtl===!1?"left":"right":360>=d&&d>=315?e.options.rtl===!1?"left":"right":d>=135&&225>=d?e.options.rtl===!1?"right":"left":e.options.verticalSwiping===!0?d>=35&&135>=d?"down":"up":"vertical"},b.prototype.swipeEnd=function(a){var c,d,b=this;if(b.dragging=!1,b.interrupted=!1,b.shouldClick=b.touchObject.swipeLength>10?!1:!0,void 0===b.touchObject.curX)return!1;if(b.touchObject.edgeHit===!0&&b.$slider.trigger("edge",[b,b.swipeDirection()]),b.touchObject.swipeLength>=b.touchObject.minSwipe){switch(d=b.swipeDirection()){case"left":case"down":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide+b.getSlideCount()):b.currentSlide+b.getSlideCount(),b.currentDirection=0;break;case"right":case"up":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide-b.getSlideCount()):b.currentSlide-b.getSlideCount(),b.currentDirection=1}"vertical"!=d&&(b.slideHandler(c),b.touchObject={},b.$slider.trigger("swipe",[b,d]))}else b.touchObject.startX!==b.touchObject.curX&&(b.slideHandler(b.currentSlide),b.touchObject={})},b.prototype.swipeHandler=function(a){var b=this;if(!(b.options.swipe===!1||"ontouchend"in document&&b.options.swipe===!1||b.options.draggable===!1&&-1!==a.type.indexOf("mouse")))switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,b.options.verticalSwiping===!0&&(b.touchObject.minSwipe=b.listHeight/b.options.touchThreshold),a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var d,e,f,g,h,b=this;return h=void 0!==a.originalEvent?a.originalEvent.touches:null,!b.dragging||h&&1!==h.length?!1:(d=b.getLeft(b.currentSlide),b.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,b.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),b.options.verticalSwiping===!0&&(b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curY-b.touchObject.startY,2)))),e=b.swipeDirection(),"vertical"!==e?(void 0!==a.originalEvent&&b.touchObject.swipeLength>4&&a.preventDefault(),g=(b.options.rtl===!1?1:-1)*(b.touchObject.curX>b.touchObject.startX?1:-1),b.options.verticalSwiping===!0&&(g=b.touchObject.curY>b.touchObject.startY?1:-1),f=b.touchObject.swipeLength,b.touchObject.edgeHit=!1,b.options.infinite===!1&&(0===b.currentSlide&&"right"===e||b.currentSlide>=b.getDotCount()&&"left"===e)&&(f=b.touchObject.swipeLength*b.options.edgeFriction,b.touchObject.edgeHit=!0),b.options.vertical===!1?b.swipeLeft=d+f*g:b.swipeLeft=d+f*(b.$list.height()/b.listWidth)*g,b.options.verticalSwiping===!0&&(b.swipeLeft=d+f*g),b.options.fade===!0||b.options.touchMove===!1?!1:b.animating===!0?(b.swipeLeft=null,!1):void b.setCSS(b.swipeLeft)):void 0)},b.prototype.swipeStart=function(a){var c,b=this;return b.interrupted=!0,1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,void(b.dragging=!0))},b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).detach(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.remove(),b.$nextArrow&&b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.remove(),b.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},b.prototype.unslick=function(a){var b=this;b.$slider.trigger("unslick",[b,a]),b.destroy()},b.prototype.updateArrows=function(){var b,a=this;b=Math.floor(a.options.slidesToShow/2),a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&!a.options.infinite&&(a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===a.currentSlide?(a.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-a.options.slidesToShow&&a.options.centerMode===!1?(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-1&&a.options.centerMode===!0&&(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),a.$dots.find("li").eq(Math.floor(a.currentSlide/a.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},b.prototype.visibility=function(){var a=this;a.options.autoplay&&(document[a.hidden]?a.interrupted=!0:a.interrupted=!1)},a.fn.slick=function(){var f,g,a=this,c=arguments[0],d=Array.prototype.slice.call(arguments,1),e=a.length;for(f=0;e>f;f++)if("object"==typeof c||"undefined"==typeof c?a[f].slick=new b(a[f],c):g=a[f].slick[c].apply(a[f].slick,d),"undefined"!=typeof g)return g;return a}});

/*!
 * Fresco - A Beautiful Responsive Lightbox - v2.2.2
 * (c) 2012-2016 Nick Stakenburg
 *
 * http://www.frescojs.com
 *
 * License: http://www.frescojs.com/license
 */
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):a.Fresco=b(jQuery)}(this,function($){function baseToString(a){return"string"==typeof a?a:null==a?"":a+""}function Timers(){return this.initialize.apply(this,_slice.call(arguments))}function getURIData(a){var b={type:"image"};return $.each(Types,function(c,d){var e=d.data(a);e&&(b=e,b.type=c,b.url=a)}),b}function detectExtension(a){var b=(a||"").replace(/\?.*/g,"").match(/\.([^.]{3,4})$/);return b?b[1].toLowerCase():null}function View(){this.initialize.apply(this,_slice.call(arguments))}function Thumbnail(){this.initialize.apply(this,_slice.call(arguments))}var Fresco={};$.extend(Fresco,{version:"2.2.2"}),Fresco.Skins={fresco:{}};var Bounds={viewport:function(){var a={width:$(window).width()};if(Browser.MobileSafari||Browser.Android&&Browser.Gecko){var b=document.documentElement.clientWidth/window.innerWidth;a.height=window.innerHeight*b}else a.height=$(window).height();return a}},Browser=function(a){function b(b){var c=new RegExp(b+"([\\d.]+)").exec(a);return c?parseFloat(c[1]):!0}return{IE:!(!window.attachEvent||-1!==a.indexOf("Opera"))&&b("MSIE "),Opera:a.indexOf("Opera")>-1&&(!!window.opera&&opera.version&&parseFloat(opera.version())||7.55),WebKit:a.indexOf("AppleWebKit/")>-1&&b("AppleWebKit/"),Gecko:a.indexOf("Gecko")>-1&&-1===a.indexOf("KHTML")&&b("rv:"),MobileSafari:!!a.match(/Apple.*Mobile.*Safari/),Chrome:a.indexOf("Chrome")>-1&&b("Chrome/"),ChromeMobile:a.indexOf("CrMo")>-1&&b("CrMo/"),Android:a.indexOf("Android")>-1&&b("Android "),IEMobile:a.indexOf("IEMobile")>-1&&b("IEMobile/")}}(navigator.userAgent),_slice=Array.prototype.slice,_={isElement:function(a){return a&&1==a.nodeType},String:{capitalize:function(a){return a=baseToString(a),a&&a.charAt(0).toUpperCase()+a.slice(1)}}};!function(){function a(a){var b;if(a.originalEvent.wheelDelta?b=a.originalEvent.wheelDelta/120:a.originalEvent.detail&&(b=-a.originalEvent.detail/3),b){var c=$.Event("fresco:mousewheel");$(a.target).trigger(c,b),c.isPropagationStopped()&&a.stopPropagation(),c.isDefaultPrevented()&&a.preventDefault()}}$(document.documentElement).on("mousewheel DOMMouseScroll",a)}();var Fit={within:function(a,b){for(var c=$.extend({height:!0,width:!0},arguments[2]||{}),d=$.extend({},b),e=1,f=5,g={width:c.width,height:c.height};f>0&&(g.width&&d.width>a.width||g.height&&d.height>a.height);){var h=1,i=1;g.width&&d.width>a.width&&(h=a.width/d.width),g.height&&d.height>a.height&&(i=a.height/d.height);var e=Math.min(h,i);d={width:Math.round(b.width*e),height:Math.round(b.height*e)},f--}return d.width=Math.max(d.width,0),d.height=Math.max(d.height,0),d}};$.extend($.easing,{frescoEaseInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},frescoEaseInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},frescoEaseOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c}});var Support=function(){function a(a){return c(a,"prefix")}function b(a,b){for(var c in a)if(void 0!==d.style[a[c]])return"prefix"==b?a[c]:!0;return!1}function c(a,c){var d=a.charAt(0).toUpperCase()+a.substr(1),f=(a+" "+e.join(d+" ")+d).split(" ");return b(f,c)}var d=document.createElement("div"),e="Webkit Moz O ms Khtml".split(" ");return{canvas:function(){var a=document.createElement("canvas");return!(!a.getContext||!a.getContext("2d"))}(),css:{animation:c("animation"),transform:c("transform"),prefixed:a},svg:!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,touch:function(){try{return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}catch(a){return!1}}()}}();Support.detectMobileTouch=function(){Support.mobileTouch=Support.touch&&(Browser.MobileSafari||Browser.Android||Browser.IEMobile||Browser.ChromeMobile||!/^(Win|Mac|Linux)/.test(navigator.platform))},Support.detectMobileTouch();var ImageReady=function(){return this.initialize.apply(this,Array.prototype.slice.call(arguments))};$.extend(ImageReady.prototype,{supports:{naturalWidth:function(){return"naturalWidth"in new Image}()},initialize:function(a,b,c){return this.img=$(a)[0],this.successCallback=b,this.errorCallback=c,this.isLoaded=!1,this.options=$.extend({method:"naturalWidth",pollFallbackAfter:1e3},arguments[3]||{}),this.supports.naturalWidth&&"onload"!=this.options.method?this.img.complete&&"undefined"!=$.type(this.img.naturalWidth)?void setTimeout($.proxy(function(){this.img.naturalWidth>0?this.success():this.error()},this)):($(this.img).bind("error",$.proxy(function(){setTimeout($.proxy(function(){this.error()},this))},this)),this.intervals=[[1e3,10],[2e3,50],[4e3,100],[2e4,500]],this._ipos=0,this._time=0,this._delay=this.intervals[this._ipos][1],void this.poll()):void setTimeout($.proxy(this.fallback,this))},poll:function(){this._polling=setTimeout($.proxy(function(){if(this.img.naturalWidth>0)return void this.success();if(this._time+=this._delay,this.options.pollFallbackAfter&&this._time>=this.options.pollFallbackAfter&&!this._usedPollFallback&&(this._usedPollFallback=!0,this.fallback()),this._time>this.intervals[this._ipos][0]){if(!this.intervals[this._ipos+1])return void this.error();this._ipos++,this._delay=this.intervals[this._ipos][1]}this.poll()},this),this._delay)},fallback:function(){var a=new Image;this._fallbackImg=a,a.onload=$.proxy(function(){a.onload=function(){},this.supports.naturalWidth||(this.img.naturalWidth=a.width,this.img.naturalHeight=a.height),this.success()},this),a.onerror=$.proxy(this.error,this),a.src=this.img.src},abort:function(){this._fallbackImg&&(this._fallbackImg.onload=function(){}),this._polling&&(clearTimeout(this._polling),this._polling=null)},success:function(){this._calledSuccess||(this._calledSuccess=!0,this.isLoaded=!0,this.successCallback(this))},error:function(){this._calledError||(this._calledError=!0,this.abort(),this.errorCallback&&this.errorCallback(this))}}),$.extend(Timers.prototype,{initialize:function(){this._timers={}},set:function(a,b,c){this._timers[a]=setTimeout(b,c)},get:function(a){return this._timers[a]},clear:function(a){a?this._timers[a]&&(clearTimeout(this._timers[a]),delete this._timers[a]):this.clearAll()},clearAll:function(){$.each(this._timers,function(a,b){clearTimeout(b)}),this._timers={}}});var Type={isVideo:function(a){return/^(youtube|vimeo)$/.test(a)}},Types={image:{extensions:"bmp gif jpeg jpg png webp",detect:function(a){return $.inArray(detectExtension(a),this.extensions.split(" "))>-1},data:function(a){return this.detect()?{extension:detectExtension(a)}:!1}},vimeo:{detect:function(a){var b=/(vimeo\.com)\/([a-zA-Z0-9-_]+)(?:\S+)?$/i.exec(a);return b&&b[2]?b[2]:!1},data:function(a){var b=this.detect(a);return b?{id:b}:!1}},youtube:{detect:function(a){var b=/(youtube\.com|youtu\.be)\/watch\?(?=.*vi?=([a-zA-Z0-9-_]+))(?:\S+)?$/.exec(a);return b&&b[2]?b[2]:(b=/(youtube\.com|youtu\.be)\/(vi?\/|u\/|embed\/)?([a-zA-Z0-9-_]+)(?:\S+)?$/i.exec(a),b&&b[3]?b[3]:!1)},data:function(a){var b=this.detect(a);return b?{id:b}:!1}}},VimeoThumbnail=function(){var a=function(){return this.initialize.apply(this,_slice.call(arguments))};$.extend(a.prototype,{initialize:function(a,b,c){this.url=a,this.successCallback=b,this.errorCallback=c,this.load()},load:function(){var a=b.get(this.url);if(a)return this.successCallback(a.data.url);var c="http"+(window.location&&"https:"==window.location.protocol?"s":"")+":",d=getURIData(this.url).id;this._xhr=$.getJSON(c+"//vimeo.com/api/oembed.json?url="+c+"//vimeo.com/"+d+"&callback=?",$.proxy(function(a){if(a&&a.thumbnail_url){var a={url:a.thumbnail_url};b.set(this.url,a),this.successCallback(a.url)}else this.errorCallback()},this))},abort:function(){this._xhr&&(this._xhr.abort(),this._xhr=null)}});var b={cache:[],get:function(a){for(var b=null,c=0;c<this.cache.length;c++)this.cache[c]&&this.cache[c].url==a&&(b=this.cache[c]);return b},set:function(a,b){this.remove(a),this.cache.push({url:a,data:b})},remove:function(a){for(var b=0;b<this.cache.length;b++)this.cache[b]&&this.cache[b].url==a&&delete this.cache[b]}};return a}(),VimeoReady=function(){var a=function(){return this.initialize.apply(this,_slice.call(arguments))};$.extend(a.prototype,{initialize:function(a,b){this.url=a,this.callback=b,this.load()},load:function(){var a=b.get(this.url);if(a)return this.callback(a.data);var c="http"+(window.location&&"https:"==window.location.protocol?"s":"")+":",d=getURIData(this.url).id;this._xhr=$.getJSON(c+"//vimeo.com/api/oembed.json?url="+c+"//vimeo.com/"+d+"&maxwidth=9999999&maxheight=9999999&callback=?",$.proxy(function(a){var c={dimensions:{width:a.width,height:a.height}};b.set(this.url,c),this.callback&&this.callback(c)},this))},abort:function(){this._xhr&&(this._xhr.abort(),this._xhr=null)}});var b={cache:[],get:function(a){for(var b=null,c=0;c<this.cache.length;c++)this.cache[c]&&this.cache[c].url==a&&(b=this.cache[c]);return b},set:function(a,b){this.remove(a),this.cache.push({url:a,data:b})},remove:function(a){for(var b=0;b<this.cache.length;b++)this.cache[b]&&this.cache[b].url==a&&delete this.cache[b]}};return a}(),Options={defaults:{effects:{content:{show:0,hide:0},spinner:{show:150,hide:150},window:{show:440,hide:300},thumbnail:{show:300,delay:150},thumbnails:{slide:0}},keyboard:{left:!0,right:!0,esc:!0},loadedMethod:"naturalWidth",loop:!1,onClick:"previous-next",overflow:!1,overlay:{close:!0},preload:[1,2],position:!0,skin:"fresco",spinner:!0,spinnerDelay:300,sync:!0,thumbnails:"horizontal",ui:"outside",uiDelay:3e3,vimeo:{autoplay:1,api:1,title:1,byline:1,portrait:0,loop:0},youtube:{autoplay:1,controls:1,enablejsapi:1,hd:1,iv_load_policy:3,loop:0,modestbranding:1,rel:0,vq:"hd1080"},initialTypeOptions:{image:{},vimeo:{width:1280},youtube:{width:1280,height:720}}},create:function(a,b,c){a=a||{},c=c||{},a.skin=a.skin||this.defaults.skin;var d=a.skin?$.extend({},Fresco.Skins[a.skin]||Fresco.Skins[this.defaults.skin]):{},e=$.extend(!0,{},this.defaults,d);e.initialTypeOptions&&(b&&e.initialTypeOptions[b]&&(e=$.extend(!0,{},e.initialTypeOptions[b],e)),delete e.initialTypeOptions);var f=$.extend(!0,{},e,a);if(Support.mobileTouch&&"inside"==f.ui&&(f.ui="outside"),(!f.effects||Browser.IE&&Browser.IE<9)&&(f.effects={},$.each(this.defaults.effects,function(a,b){$.each(f.effects[a]=$.extend({},b),function(b){f.effects[a][b]=0})}),f.spinner=!1),f.keyboard&&("boolean"==$.type(f.keyboard)&&(f.keyboard={},$.each(this.defaults.keyboard,function(a,b){f.keyboard[a]=!0})),("vimeo"==b||"youtube"==b)&&$.extend(f.keyboard,{left:!1,right:!1})),!f.overflow||Support.mobileTouch?f.overflow={x:!1,y:!1}:"boolean"==$.type(f.overflow)&&(f.overflow={x:!1,y:!0}),("vimeo"==b||"youtube"==b)&&(f.overlap=!1),(Browser.IE&&Browser.IE<9||Support.mobileTouch)&&(f.thumbnail=!1,f.thumbnails=!1),"youtube"!=b&&(f.width&&!f.maxWidth&&(f.maxWidth=f.width),f.height&&!f.maxHeight&&(f.maxHeight=f.height)),!f.thumbnail&&"boolean"!=$.type(f.thumbnail)){var g=!1;switch(b){case"youtube":var h="http"+(window.location&&"https:"==window.location.protocol?"s":"")+":";g=h+"//img.youtube.com/vi/"+c.id+"/0.jpg";break;case"image":case"vimeo":g=!0}f.thumbnail=g}return f}},Overlay={initialize:function(){this.build(),this.visible=!1},build:function(){this.element=$("<div>").addClass("fr-overlay").hide().append($("<div>").addClass("fr-overlay-background")),this.element.on("click",$.proxy(function(){var a=Pages.page;a&&a.view&&a.view.options.overlay&&!a.view.options.overlay.close||Window.hide()},this)),Support.mobileTouch&&this.element.addClass("fr-mobile-touch"),this.element.on("fresco:mousewheel",function(a){a.preventDefault()})},setSkin:function(a){this.skin&&this.element.removeClass("fr-overlay-skin-"+this.skin),this.element.addClass("fr-overlay-skin-"+a),this.skin=a},attach:function(){$(document.body).append(this.element)},detach:function(){this.element.detach()},show:function(a,b){if(this.visible)return void(a&&a());this.visible=!0,this.attach(),this.max();var c=Pages.page&&Pages.page.view.options.effects.window.show||0,d=("number"==$.type(b)?b:c)||0;this.element.stop(!0).fadeTo(d,1,a)},hide:function(a,b){if(!this.visible)return void(a&&a());var c=Pages.page&&Pages.page.view.options.effects.window.hide||0,d=("number"==$.type(b)?b:c)||0;this.element.stop(!0).fadeOut(d||0,$.proxy(function(){this.detach(),this.visible=!1,a&&a()},this))},getScrollDimensions:function(){var a={};return $.each(["width","height"],function(b,c){var d=c.substr(0,1).toUpperCase()+c.substr(1),e=document.documentElement;a[c]=(Browser.IE?Math.max(e["offset"+d],e["scroll"+d]):Browser.WebKit?document.body["scroll"+d]:e["scroll"+d])||0}),a},max:function(){var a;if(Browser.MobileSafari&&Browser.WebKit&&Browser.WebKit<533.18&&(a=this.getScrollDimensions(),this.element.css(a)),Browser.IE&&Browser.IE<9){var b=Bounds.viewport();this.element.css({height:b.height,width:b.width})}Support.mobileTouch&&!a&&this.element.css({height:this.getScrollDimensions().height})}},Window={initialize:function(){this.queues=[],this.queues.hide=$({}),this.pages=[],this._tracking=[],this._first=!0,this.timers=new Timers,this.build(),this.setSkin(Options.defaults.skin)},build:function(){if(this.element=$("<div>").addClass("fr-window fr-measured").hide().append(this._box=$("<div>").addClass("fr-box").append(this._pages=$("<div>").addClass("fr-pages"))).append(this._thumbnails=$("<div>").addClass("fr-thumbnails")),Overlay.initialize(),Pages.initialize(this._pages),Thumbnails.initialize(this._thumbnails),Spinner.initialize(),UI.initialize(),this.element.addClass("fr"+(Support.mobileTouch?"":"-no")+"-mobile-touch"),this.element.addClass("fr"+(Support.svg?"":"-no")+"-svg"),Browser.IE)for(var a=7;9>=a;a++)Browser.IE<a&&this.element.addClass("fr-ltIE"+a);this.element.on("fresco:mousewheel",function(a){a.preventDefault()})},attach:function(){this._attached||($(document.body).append(this.element),this._attached=!0)},detach:function(){this._attached&&(this.element.detach(),this._attached=!1)},setSkin:function(a){this._skin&&this.element.removeClass("fr-window-skin-"+this._skin),this.element.addClass("fr-window-skin-"+a),Overlay.setSkin(a),this._skin=a},setShowingType:function(a){this._showingType!=a&&(this._showingType&&(this.element.removeClass("fr-showing-type-"+this._showingType),Type.isVideo(this._showingType)&&this.element.removeClass("fr-showing-type-video")),this.element.addClass("fr-showing-type-"+a),Type.isVideo(a)&&this.element.addClass("fr-showing-type-video"),this._showingType=a)},startObservingResize:function(){this._onWindowResizeHandler||$(window).on("resize orientationchange",this._onWindowResizeHandler=$.proxy(this._onWindowResize,this))},stopObservingResize:function(){this._onWindowResizeHandler&&($(window).off("resize orientationchange",this._onWindowResizeHandler),this._onWindowResizeHandler=null)},_onScroll:function(){Support.mobileTouch&&this.timers.set("scroll",$.proxy(this.adjustToScroll,this),0)},_onWindowResize:function(){var a;(a=Pages.page)&&(Thumbnails.fitToViewport(),this.updateBoxDimensions(),a.fitToBox(),UI.update(),UI.adjustPrevNext(null,0),Spinner.center(),Overlay.max(),UI._onWindowResize(),this._onScroll())},adjustToScroll:function(){Support.mobileTouch&&this.element.css({top:$(window).scrollTop()})},getBoxDimensions:function(){return this._boxDimensions},updateBoxDimensions:function(){var a;if(a=Pages.page){var b=Bounds.viewport(),c=Thumbnails.getDimensions(),d="horizontal"==Thumbnails._orientation;this._boxDimensions={width:d?b.width:b.width-c.width,height:d?b.height-c.height:b.height},this._boxPosition={top:0,left:d?0:c.width},this._box.css($.extend({},this._boxDimensions,this._boxPosition))}},show:function(a,b){if(this.visible)return void(a&&a());this.visible=!0,this.opening=!0,this.attach(),this.timers.clear("show-window"),this.timers.clear("hide-overlay"),this.adjustToScroll();var c=("number"==$.type(b)?b:Pages.page&&Pages.page.view.options.effects.window.show)||0,d=2;Overlay[Pages.page&&Pages.page.view.options.overlay?"show":"hide"](function(){a&&--d<1&&a()},c),this.timers.set("show-window",$.proxy(function(){this._show($.proxy(function(){this.opening=!1,a&&--d<1&&a()},this),c)},this),c>1?Math.min(.5*c,50):1)},_show:function(a,b){var c=("number"==$.type(b)?b:Pages.page&&Pages.page.view.options.effects.window.show)||0;this.element.stop(!0).fadeTo(c,1,a)},hide:function(a){if(this.view){var b=this.queues.hide;b.queue([]),this.timers.clear("show-window"),this.timers.clear("hide-overlay");var c=Pages.page?Pages.page.view.options.effects.window.hide:0;b.queue($.proxy(function(a){Pages.stop(),Spinner.hide(),a()},this)),b.queue($.proxy(function(a){UI.disable(),UI.hide(null,c),Keyboard.disable(),a()},this)),b.queue($.proxy(function(a){var b=2;this._hide(function(){--b<1&&a()},c),this.timers.set("hide-overlay",$.proxy(function(){Overlay.hide(function(){--b<1&&a()},c)},this),c>1?Math.min(.5*c,150):1),this._first=!0},this)),b.queue($.proxy(function(a){this._reset(),this.stopObservingResize(),Pages.removeAll(),Thumbnails.clear(),this.timers.clear(),this._position=-1;var b=Pages.page&&Pages.page.view.options.afterHide;"function"==$.type(b)&&b.call(Fresco),this.view=null,this.opening=!1,this.closing=!1,this.detach(),a()},this)),"function"==$.type(a)&&b.queue($.proxy(function(b){a(),b()},this))}},_hide:function(a,b){var c=("number"==$.type(b)?b:Pages.page&&Pages.page.view.options.effects.window.hide)||0;this.element.stop(!0).fadeOut(c,a)},load:function(a,b){this.views=a,this.attach(),Thumbnails.load(a),Pages.load(a),this.startObservingResize(),b&&this.setPosition(b)},setPosition:function(a,b){this._position=a,this.view=this.views[a-1],this.stopHideQueue(),this.page=Pages.show(a,$.proxy(function(){b&&b()},this))},stopHideQueue:function(){this.queues.hide.queue([])},_reset:function(){this.visible=!1,UI.hide(null,0),UI.reset()},mayPrevious:function(){return this.view&&this.view.options.loop&&this.views&&this.views.length>1||1!=this._position},previous:function(a){var b=this.mayPrevious();(a||b)&&this.setPosition(this.getSurroundingIndexes().previous)},mayNext:function(){var a=this.views&&this.views.length>1;return this.view&&this.view.options.loop&&a||a&&1!=this.getSurroundingIndexes().next},next:function(a){var b=this.mayNext();(a||b)&&this.setPosition(this.getSurroundingIndexes().next)},getSurroundingIndexes:function(){if(!this.views)return{};var a=this._position,b=this.views.length,c=1>=a?b:a-1,d=a>=b?1:a+1;return{previous:c,next:d}}},Keyboard={enabled:!1,keyCode:{left:37,right:39,esc:27},enable:function(a){this.disable(),a&&($(document).on("keydown",this._onKeyDownHandler=$.proxy(this.onKeyDown,this)).on("keyup",this._onKeyUpHandler=$.proxy(this.onKeyUp,this)),this.enabled=a)},disable:function(){this.enabled=!1,this._onKeyUpHandler&&($(document).off("keyup",this._onKeyUpHandler).off("keydown",this._onKeyDownHandler),this._onKeyUpHandler=this._onKeyDownHandler=null)},onKeyDown:function(a){if(this.enabled){var b=this.getKeyByKeyCode(a.keyCode);if(b&&(!b||!this.enabled||this.enabled[b]))switch(a.preventDefault(),a.stopPropagation(),b){case"left":Window.previous();break;case"right":Window.next()}}},onKeyUp:function(a){if(this.enabled){var b=this.getKeyByKeyCode(a.keyCode);if(b&&(!b||!this.enabled||this.enabled[b]))switch(b){case"esc":Window.hide()}}},getKeyByKeyCode:function(a){for(var b in this.keyCode)if(this.keyCode[b]==a)return b;return null}},Page=function(){function a(){return this.initialize.apply(this,_slice.call(arguments))}var b=0,c={},d=$("<div>").addClass("fr-stroke fr-stroke-top fr-stroke-horizontal").append($("<div>").addClass("fr-stroke-color")).add($("<div>").addClass("fr-stroke fr-stroke-bottom fr-stroke-horizontal").append($("<div>").addClass("fr-stroke-color"))).add($("<div>").addClass("fr-stroke fr-stroke-left fr-stroke-vertical").append($("<div>").addClass("fr-stroke-color"))).add($("<div>").addClass("fr-stroke fr-stroke-right fr-stroke-vertical").append($("<div>").addClass("fr-stroke-color")));return $.extend(a.prototype,{initialize:function(a,c,d){this.view=a,this.dimensions={width:0,height:0},this.uid=b++,this._position=c,this._total=d,this._fullClick=!1,this._visible=!1,this.queues={},this.queues.showhide=$({})},create:function(){if(!this._created){Pages.element.append(this.element=$("<div>").addClass("fr-page").append(this.container=$("<div>").addClass("fr-container")).css({opacity:0}).hide());var a=this.view.options.position&&this._total>1;if(a&&this.element.addClass("fr-has-position"),(this.view.caption||a)&&(this.element.append(this.info=$("<div>").addClass("fr-info").append($("<div>").addClass("fr-info-background")).append(d.clone(!0)).append(this.infoPadder=$("<div>").addClass("fr-info-padder"))),a&&(this.element.addClass("fr-has-position"),this.infoPadder.append(this.pos=$("<div>").addClass("fr-position").append($("<span>").addClass("fr-position-text").html(this._position+" / "+this._total)))),this.view.caption&&this.infoPadder.append(this.caption=$("<div>").addClass("fr-caption").html(this.view.caption))),this.container.append(this.background=$("<div>").addClass("fr-content-background")).append(this.content=$("<div>").addClass("fr-content")),"image"==this.view.type&&(this.content.append(this.image=$("<img>").addClass("fr-content-element").attr({src:this.view.url})),this.content.append(d.clone(!0))),a&&"outside"==this.view.options.ui&&this.container.append(this.positionOutside=$("<div>").addClass("fr-position-outside").append($("<div>").addClass("fr-position-background")).append($("<span>").addClass("fr-position-text").html(this._position+" / "+this._total))),"inside"==this.view.options.ui){this.content.append(this.previousInside=$("<div>").addClass("fr-side fr-side-previous fr-toggle-ui").append($("<div>").addClass("fr-side-button").append($("<div>").addClass("fr-side-button-background")).append($("<div>").addClass("fr-side-button-icon")))).append(this.nextInside=$("<div>").addClass("fr-side fr-side-next fr-toggle-ui").append($("<div>").addClass("fr-side-button").append($("<div>").addClass("fr-side-button-background")).append($("<div>").addClass("fr-side-button-icon")))).append(this.closeInside=$("<div>").addClass("fr-close fr-toggle-ui").append($("<div>").addClass("fr-close-background")).append($("<div>").addClass("fr-close-icon"))),(this.view.caption||a&&this.view.grouped.caption)&&(this.content.append(this.infoInside=$("<div>").addClass("fr-info fr-toggle-ui").append($("<div>").addClass("fr-info-background")).append(d.clone(!0)).append(this.infoPadderInside=$("<div>").addClass("fr-info-padder"))),a&&this.infoPadderInside.append(this.posInside=$("<div>").addClass("fr-position").append($("<span>").addClass("fr-position-text").html(this._position+" / "+this._total))),this.view.caption&&this.infoPadderInside.append(this.captionInside=$("<div>").addClass("fr-caption").html(this.view.caption))),this.view.caption||!a||this.view.grouped.caption||this.content.append(this.positionInside=$("<div>").addClass("fr-position-inside fr-toggle-ui").append($("<div>").addClass("fr-position-background")).append($("<span>").addClass("fr-position-text").html(this._position+" / "+this._total)));var b=this.view.options.loop&&this._total>1||1!=this._position,c=this.view.options.loop&&this._total>1||this._position<this._total;this.previousInside[(b?"remove":"add")+"Class"]("fr-side-disabled"),this.nextInside[(c?"remove":"add")+"Class"]("fr-side-disabled")}$.each(["x","y"],$.proxy(function(a,b){this.view.options.overflow[b]&&this.element.addClass("fr-overflow-"+b)},this)),this.element.addClass("fr-type-"+this.view.type),Type.isVideo(this.view.type)&&this.element.addClass("fr-type-video"),this._total<2&&this.element.addClass("fr-no-sides"),this._created=!0}},_getSurroundingPages:function(){var a;if(!(a=this.view.options.preload))return[];for(var b=[],c=Math.max(1,this._position-a[0]),d=Math.min(this._position+a[1],this._total),e=this._position,f=e;d>=f;f++){var g=Pages.pages[f-1];g._position!=e&&b.push(g)}for(var f=e;f>=c;f--){var g=Pages.pages[f-1];g._position!=e&&b.push(g)}return b},preloadSurroundingImages:function(){var a=this._getSurroundingPages();$.each(a,$.proxy(function(a,b){b.preload()},this))},preload:function(){this.preloading||this.preloaded||"image"!=this.view.type||!this.view.options.preload||this.loaded||(this.create(),this.preloading=!0,this.preloadReady=new ImageReady(this.image[0],$.proxy(function(a){this.loaded=!0,c[this.view.url]=!0,this.preloading=!1,this.preloaded=!0,this.dimensions={width:a.img.naturalWidth,height:a.img.naturalHeight}},this),null,{method:"naturalWidth"}))},load:function(a,b){if(this.create(),this.loaded)return void(a&&a());switch(this.abort(),this.loading=!0,this.view.options.spinner&&(this._spinnerDelay=setTimeout($.proxy(function(){Spinner.show()},this),this.view.options.spinnerDelay||0)),this.view.type){case"image":if(this.error)return void(a&&a());this.imageReady=new ImageReady(this.image[0],$.proxy(function(b){this._markAsLoaded(),this.setDimensions({width:b.img.naturalWidth,height:b.img.naturalHeight}),a&&a()},this),$.proxy(function(){this._markAsLoaded(),this.image.hide(),this.content.prepend(this.error=$("<div>").addClass("fr-error fr-content-element").append($("<div>").addClass("fr-error-icon"))),this.element.addClass("fr-has-error"),this.setDimensions({width:this.error.outerWidth(),height:this.error.outerHeight()}),this.error.css({width:"100%",height:"100%"}),a&&a()},this),{method:this.view.options.loadedMethod});break;case"vimeo":this.vimeoReady=new VimeoReady(this.view.url,$.proxy(function(b){this._markAsLoaded(),this.setDimensions({width:b.dimensions.width,height:b.dimensions.height}),a&&a()},this));break;case"youtube":this._markAsLoaded(),this.setDimensions({width:this.view.options.width,height:this.view.options.height}),a&&a()}},setDimensions:function(a){if(this.dimensions=a,this.view.options.maxWidth||this.view.options.maxHeight){var b=this.view.options,c={width:b.maxWidth?b.maxWidth:this.dimensions.width,height:b.maxHeight?b.maxHeight:this.dimensions.height};this.dimensions=Fit.within(c,this.dimensions)}},_markAsLoaded:function(){this._abortSpinnerDelay(),this.loading=!1,this.loaded=!0,c[this.view.url]=!0,Spinner.hide(null,null,this._position)},isVideo:function(){return Type.isVideo(this.view.type)},insertVideo:function(a){if(this.playerIframe||!this.isVideo())return void(a&&a());var b="http"+(window.location&&"https:"==window.location.protocol?"s":"")+":",c=$.extend({},this.view.options[this.view.type]||{}),d=$.param(c),e={vimeo:b+"//player.vimeo.com/video/{id}?{queryString}",youtube:b+"//www.youtube.com/embed/{id}?{queryString}"},f=e[this.view.type].replace("{id}",this.view._data.id).replace("{queryString}",d);this.content.prepend(this.playerIframe=$("<iframe webkitAllowFullScreen mozallowfullscreen allowFullScreen>").addClass("fr-content-element").attr({src:f,height:this._contentDimensions.height,width:this._contentDimensions.width,frameborder:0})),a&&a()},raise:function(){var a=Pages.element[0].lastChild;a&&a==this.element[0]||Pages.element.append(this.element)},show:function(a){var b=this.queues.showhide;b.queue([]),b.queue($.proxy(function(a){var b=this.view.options.spinner&&!c[this.view.url];Spinner._visible&&!b&&Spinner.hide(),Pages.stopInactive(),a()},this)),b.queue($.proxy(function(a){this.updateUI(),UI.set(this._ui),a()},this)),b.queue($.proxy(function(a){Keyboard.enable(this.view.options.keyboard),a()},this)),b.queue($.proxy(function(a){Spinner.setSkin(this.view.options.skin),this.load($.proxy(function(){this.preloadSurroundingImages(),a()},this))},this)),b.queue($.proxy(function(a){this.raise(),Window.setSkin(this.view.options.skin),UI.enable(),this.fitToBox(),Window.adjustToScroll(),a()},this)),this.isVideo()&&b.queue($.proxy(function(a){this.insertVideo($.proxy(function(){a()}))},this)),this.view.options.sync||b.queue($.proxy(function(a){Pages.hideInactive(a)},this)),b.queue($.proxy(function(a){var b=3,c=this.view.options.effects.content.show;Window.setShowingType(this.view.type),Window.visible||(c=this.view.options.effects.window.show,"function"==$.type(this.view.options.onShow)&&this.view.options.onShow.call(Fresco)),this.view.options.sync&&(b++,Pages.hideInactive(function(){--b<1&&a()})),Window.show(function(){--b<1&&a()},this.view.options.effects.window.show),this._show(function(){--b<1&&a()},c),UI.adjustPrevNext(function(){--b<1&&a()},Window._first?0:c),Window._first?(UI.show(null,0),Window._first=!1):UI.show(null,0);var d=this.view.options.afterPosition;"function"==$.type(d)&&d.call(Fresco,this._position)},this)),b.queue($.proxy(function(b){this._visible=!0,a&&a(),b()},this))},_show:function(a,b){var c=Window.visible?"number"==$.type(b)?b:this.view.options.effects.content.show:0;this.element.stop(!0).show().fadeTo(c||0,1,a)},hide:function(a,b){if(!this.element)return void(a&&a());this.removeVideo(),this.abort();var c="number"==$.type(b)?b:this.view.options.effects.content.hide;this.isVideo()&&(c=0),this.element.stop(!0).fadeTo(c,0,"frescoEaseInCubic",$.proxy(function(){this.element.hide(),this._visible=!1,Pages.removeTracking(this._position),a&&a()},this))},stop:function(){var a=this.queues.showhide;a.queue([]),this.element&&this.element.stop(!0),this.abort()},removeVideo:function(){this.playerIframe&&(this.playerIframe[0].src="//about:blank",this.playerIframe.remove(),this.playerIframe=null)},remove:function(){this.stop(),this.removeVideo(),this.element&&this.element.remove(),this._track&&(Pages.removeTracking(this._position),this._track=!1),this.preloadReady&&(this.preloadReady.abort(),this.preloadReady=null,this.preloading=null,this.preloaded=null),this._visible=!1,this.removed=!0},abort:function(){this.imageReady&&(this.imageReady.abort(),this.imageReady=null),this.vimeoReady&&(this.vimeoReady.abort(),this.vimeoReady=null),this._abortSpinnerDelay(),this.loading=!1},_abortSpinnerDelay:function(){this._spinnerDelay&&(clearTimeout(this._spinnerDelay),this._spinnerDelay=null)},_getInfoHeight:function(a){var b=this.view.options.position&&this._total>1;switch(this._ui){case"fullclick":case"inside":if(!this.view.caption&&!b)return 0;break;case"outside":if(!this.view.caption)return 0}var c="inside"==this._ui?this.infoInside:this.info;"outside"==this._ui&&(a=Math.min(a,Window._boxDimensions.width));var d,e=c[0].style.width;return("inside"==this._ui||"fullclick"==this._ui)&&(e="100%"),c.css({width:a+"px"}),d=parseFloat(c.outerHeight()),c.css({width:e}),d},_whileVisible:function(a,b){var c=[],d=Window.element.add(this.element);b&&(d=d.add(b)),$.each(d,function(a,b){var d=$(b).is(":visible");d||c.push($(b).show())});var e=this.element.hasClass("fr-no-caption");this.element.removeClass("fr-no-caption");var f=this.element.hasClass("fr-has-caption");this.element.addClass("fr-has-caption"),Window.element.css({visibility:"hidden"}),a(),Window.element.css({visibility:"visible"}),e&&this.element.addClass("fr-no-caption"),f||this.element.removeClass("fr-has-caption"),$.each(c,function(a,b){b.hide()})},updateForced:function(){this.create(),this._fullClick=this.view.options.fullClick,this._noOverflow=!1,parseInt(this.element.css("min-width"))>0&&(this._fullClick=!0),parseInt(this.element.css("min-height"))>0&&(this._noOverflow=!0)},updateUI:function(a){this.updateForced();var a=this._fullClick?"fullclick":this.view.options.ui;this._ui&&this.element.removeClass("fr-ui-"+this._ui),this.element.addClass("fr-ui-"+a),this._ui=a},fitToBox:function(){if(this.content){var a=(this.element,$.extend({},Window.getBoxDimensions())),b=$.extend({},this.dimensions),c=this.container;this.updateUI();var d={left:parseInt(c.css("padding-left")),top:parseInt(c.css("padding-top"))};if("outside"==this._ui&&this._positionOutside){var e=0;this._whileVisible($.proxy(function(){this._positionOutside.is(":visible")&&(e=this._positionOutside.outerWidth(!0))},this)),e>d.left&&(d.left=e)}a.width-=2*d.left,a.height-=2*d.top;var f,g={width:!0,height:this._noOverflow?!0:!this.view.options.overflow.y},h=Fit.within(a,b,g),i=$.extend({},h),j=(this.content,0),k="inside"==this._ui,l=k?this.infoInside:this.info,m=k?this.captionInside:this.caption,n=k?this.posInside:this.pos,o=!!m;switch(this._ui){case"outside":var p,q=$.extend({},i);this.caption&&(p=this.caption,this._whileVisible($.proxy(function(){for(var b=0,c=2;c>b;){j=this._getInfoHeight(i.width);var d=a.height-i.height;j>d&&(i=Fit.within({width:i.width,height:Math.max(i.height-(j-d),0)},i,g)),b++}j=this._getInfoHeight(i.width);var e=.5;(!this.view.options.overflow.y&&j+i.height>a.height||l&&"none"==l.css("display")||e&&j>=e*i.height)&&(o=!1,j=0,i=q)},this),p)),l&&l.css({width:i.width+"px"}),f={width:i.width,height:i.height+j};break;case"inside":if(this.caption){var p=m;this._whileVisible($.proxy(function(){j=this._getInfoHeight(i.width);var a=.45;a&&j>=a*i.height&&(o=!1,j=0)},this),p)}f=i;break;case"fullclick":var r=[];m&&r.push(m),this._whileVisible($.proxy(function(){if((m||n)&&l.css({width:"100%"}),j=this._getInfoHeight(Window._boxDimensions.width),m&&j>.5*a.height)if(o=!1,n){var b=this.caption.is(":visible");this.caption.hide(),j=this._getInfoHeight(Window._boxDimensions.width),b&&this.caption.show()}else j=0;i=Fit.within({width:a.width,height:Math.max(0,a.height-j)},i,g),f=i},this),r),this.content.css({"padding-bottom":0})}m&&m[o?"show":"hide"](),this.element[(o?"remove":"add")+"Class"]("fr-no-caption"),this.element[(o?"add":"remove")+"Class"]("fr-has-caption"),this.content.css(i),this.background.css(f),this.playerIframe&&this.playerIframe.attr(i),this.overlap={y:f.height+("fullclick"==this._ui?j:0)-Window._boxDimensions.height,x:0},this._track=!this._noOverflow&&this.view.options.overflow.y&&this.overlap.y>0,this._infoHeight=j,this._padding=d,this._contentDimensions=i,this._backgroundDimensions=f,Pages[(this._track?"set":"remove")+"Tracking"](this._position),this.position()}},position:function(){if(this.content){var a=this._contentDimensions,b=this._backgroundDimensions,c={top:.5*Window._boxDimensions.height-.5*b.height,left:.5*Window._boxDimensions.width-.5*b.width},d={top:c.top+a.height,left:c.left},e=0,f="inside"==this._ui?this.infoInside:this.info;switch(this._ui){case"fullclick":c.top=.5*(Window._boxDimensions.height-this._infoHeight)-.5*b.height,d={top:Window._boxDimensions.height-this._infoHeight,left:0,bottom:"auto"},e=this._infoHeight;break;case"inside":d={top:"auto",left:0,bottom:0}}if(this.overlap.y>0){var g=Pages.getXYP();switch(c.top=0-g.y*this.overlap.y,this._ui){case"outside":case"fullclick":d.top=Window._boxDimensions.height-this._infoHeight;break;case"inside":var h=c.top+a.height-Window._boxDimensions.height,i=-1*c.top;if(d.bottom=h,this.closeInside.css({top:i}),this._total>1){var j=Window.element.is(":visible");j||Window.element.show();var k=this.previousInside.attr("style");this.previousInside.removeAttr("style");var l=parseInt(this.previousInside.css("margin-top"));this.previousInside.attr({style:k}),j||Window.element.hide();var m=this.previousInside.add(this.nextInside),n=.5*this.overlap.y;m.css({"margin-top":l+(i-n)}),this.positionInside&&this.positionInside.css({bottom:h})}}}else"inside"==this._ui&&this.element.find(".fr-info, .fr-side, .fr-close, .fr-position-inside").removeAttr("style");f&&f.css(d),this.container.css({bottom:e}),this.content.css(c),this.background.css(c)}}}),a}(),Pages={initialize:function(a){this.element=a,this.pages=[],this.uid=1,this._tracking=[]},load:function(a){this.views=a,this.removeAll(),$.each(a,$.proxy(function(a,b){this.pages.push(new Page(b,a+1,this.views.length))},this))},show:function(a,b){var c=this.pages[a-1];this.page&&this.page.uid==c.uid||(this.page=c,Thumbnails.show(a),Window.updateBoxDimensions(),c.show($.proxy(function(){b&&b()},this)))},getPositionInActivePageGroup:function(a){var b=0;return $.each(this.pages,function(c,d){d.view.element&&d.view.element==a&&(b=c+1)}),b},getLoadingCount:function(){var a=0;return $.each(this.pages,function(b,c){c.loading&&a++}),a},removeAll:function(){$.each(this.pages,function(a,b){b.remove()}),this.pages=[]},hideInactive:function(a,b){var c=[];$.each(this.pages,$.proxy(function(a,b){b.uid!=this.page.uid&&c.push(b)},this));var d=0+c.length;return 1>d?a&&a():$.each(c,function(c,e){e.hide(function(){a&&--d<1&&a()},b)}),c.length},stopInactive:function(){$.each(this.pages,$.proxy(function(a,b){b.uid!=this.page.uid&&b.stop()},this))},stop:function(){$.each(this.pages,function(a,b){b.stop()})},handleTracking:function(a){Browser.IE&&Browser.IE<9?(this.setXY({x:a.pageX,y:a.pageY}),this.updatePositions()):this._tracking_timer=setTimeout($.proxy(function(){this.setXY({x:a.pageX,y:a.pageY}),this.updatePositions()},this),30)},clearTrackingTimer:function(){this._tracking_timer&&(clearTimeout(this._tracking_timer),this._tracking_timer=null)},startTracking:function(){Support.mobileTouch||this._handleTracking||$(document.documentElement).on("mousemove",this._handleTracking=$.proxy(this.handleTracking,this))},stopTracking:function(){!Support.mobileTouch&&this._handleTracking&&($(document.documentElement).off("mousemove",this._handleTracking),this._handleTracking=null,this.clearTrackingTimer())},setTracking:function(a){this.isTracking(a)||(this._tracking.push(this.pages[a-1]),1==this._tracking.length&&this.startTracking())},clearTracking:function(){this._tracking=[]},removeTracking:function(a){this._tracking=$.grep(this._tracking,function(b){return b._position!=a}),this._tracking.length<1&&this.stopTracking()},isTracking:function(a){var b=!1;return $.each(this._tracking,function(c,d){return d._position==a?(b=!0,!1):void 0}),b},setXY:function(a){this._xy=a},getXYP:function(a){var b=Pages.page,c=$.extend({},Window._boxDimensions),a=$.extend({},this._xy);a.y-=$(window).scrollTop(),b&&("outside"==b._ui||"fullclick"==b._ui)&&b._infoHeight>0&&(c.height-=b._infoHeight),a.y-=Window._boxPosition.top;var d={x:0,y:Math.min(Math.max(a.y/c.height,0),1)},e=20,f={x:"width",y:"height"},g={};return $.each("y".split(" "),$.proxy(function(a,b){g[b]=Math.min(Math.max(e/c[f[b]],0),1),d[b]*=1+2*g[b],d[b]-=g[b],d[b]=Math.min(Math.max(d[b],0),1)},this)),this.setXYP(d),this._xyp},setXYP:function(a){this._xyp=a},updatePositions:function(){this._tracking.length<1||$.each(this._tracking,function(a,b){b.position()})}};$.extend(View.prototype,{initialize:function(object){var options=arguments[1]||{},data={};if("string"==$.type(object))object={url:object};else if(object&&1==object.nodeType){var element=$(object);object={element:element[0],url:element.attr("href"),caption:element.data("fresco-caption"),group:element.data("fresco-group"),extension:element.data("fresco-extension"),type:element.data("fresco-type"),options:element.data("fresco-options")&&eval("({"+element.data("fresco-options")+"})")||{}}}if(object&&(object.extension||(object.extension=detectExtension(object.url)),!object.type)){var data=getURIData(object.url);object._data=data,object.type=data.type}return object._data||(object._data=getURIData(object.url)),object&&object.options?object.options=$.extend(!0,$.extend({},options),$.extend({},object.options)):object.options=$.extend({},options),object.options=Options.create(object.options,object.type,object._data),$.extend(this,object),this}});var Spinner={supported:Support.css.transform&&Support.css.animation,initialize:function(a){this.element=$("<div>").addClass("fr-spinner").hide();for(var b=1;12>=b;b++)this.element.append($("<div>").addClass("fr-spin-"+b));this.element.on("click",$.proxy(function(){Window.hide()},this)),this.element.on("fresco:mousewheel",function(a){a.preventDefault()})},setSkin:function(a){this.supported&&(this._skin&&this.element.removeClass("fr-spinner-skin-"+this._skin),this.updateDimensions(),this.element.addClass("fr-spinner-skin-"+a),this._skin=a)},updateDimensions:function(){var a=this._attached;a||this.attach(),this._dimensions={width:this.element.outerWidth(),height:this.element.outerHeight()},a||this.detach()},attach:function(){this._attached||($(document.body).append(this.element),this._attached=!0)},detach:function(){this._attached&&(this.element.detach(),this._attached=!1)},show:function(a,b){this._visible=!0,this.attach(),this.center();var c=Pages.page&&Pages.page.view.options.effects.spinner.show||0,d=("number"==$.type(b)?b:c)||0;this.element.stop(!0).fadeTo(d,1,a)},hide:function(a,b,c){this._visible=!1;var d=Pages.page&&Pages.page.view.options.effects.spinner.hide||0,e=("number"==$.type(b)?b:d)||0;this.element.stop(!0).fadeOut(e||0,$.proxy(function(){this.detach(),a&&a()},this))},center:function(){if(this.supported){this._dimensions||this.updateDimensions();var a=Pages.page,b=0;a&&"fullclick"==a._ui&&a._whileVisible(function(){b=a._getInfoHeight(Window._boxDimensions.width)}),this.element.css({top:Window._boxPosition.top+.5*Window._boxDimensions.height-.5*this._dimensions.height-.5*b,left:Window._boxPosition.left+.5*Window._boxDimensions.width-.5*this._dimensions.width})}}},_Fresco={_disabled:!1,_fallback:!0,initialize:function(){Window.initialize(),this._disabled||this.startDelegating()},startDelegating:function(){this._delegateHandler||$(document.documentElement).on("click",".fresco[href]",this._delegateHandler=$.proxy(this.delegate,this)).on("click",this._setClickXYHandler=$.proxy(this.setClickXY,this))},stopDelegating:function(){this._delegateHandler&&($(document.documentElement).off("click",".fresco[href]",this._delegateHandler).off("click",this._setClickXYHandler),this._setClickXYHandler=null,this._delegateHandler=null)},setClickXY:function(a){Pages.setXY({x:a.pageX,y:a.pageY})},delegate:function(a){if(!this._disabled){a.stopPropagation(),a.preventDefault();var b=a.currentTarget;this.setClickXY(a),_Fresco.show(b)}},show:function(object){if(this._disabled)return void this.showFallback.apply(_Fresco,_slice.call(arguments));var options=arguments[1]||{},position=arguments[2];arguments[1]&&"number"==$.type(arguments[1])&&(position=arguments[1],options={});var views=[],object_type,isElement=_.isElement(object);switch(object_type=$.type(object)){case"string":case"object":var view=new View(object,options),_dgo="data-fresco-group-options";if(view.group){if(isElement){var elements=$('.fresco[data-fresco-group="'+$(object).data("fresco-group")+'"]'),groupOptions={};elements.filter("["+_dgo+"]").each(function(i,element){$.extend(groupOptions,eval("({"+($(element).attr(_dgo)||"")+"})"))}),elements.each(function(a,b){position||b!=object||(position=a+1),views.push(new View(b,$.extend({},groupOptions,options)))})}}else{var groupOptions={};isElement&&$(object).is("["+_dgo+"]")&&($.extend(groupOptions,eval("({"+($(object).attr(_dgo)||"")+"})")),view=new View(object,$.extend({},groupOptions,options))),views.push(view)}break;case"array":$.each(object,function(a,b){var c=new View(b,options);views.push(c)})}var groupExtend={grouped:{caption:!1}},firstUI=views[0].options.ui;$.each(views,function(a,b){b.caption&&(groupExtend.grouped.caption=!0),a>0&&b.options.ui!=firstUI&&(b.options.ui=firstUI)}),$.each(views,function(a,b){b=$.extend(b,groupExtend)}),(!position||1>position)&&(position=1),position>views.length&&(position=views.length);var positionInAPG;isElement&&(positionInAPG=Pages.getPositionInActivePageGroup(object))?Window.setPosition(positionInAPG):Window.load(views,position)},showFallback:function(){function a(b){var c,d=$.type(b);if("string"==d)c=b;else if("array"==d&&b[0])c=a(b[0]);else if(_.isElement(b)&&$(b).attr("href"))var c=$(b).attr("href");else c=b.url?b.url:!1;return c}return function(b){if(this._fallback){var c=a(b);c&&(window.location.href=c)}}}()};$.extend(Fresco,{show:function(a){return _Fresco.show.apply(_Fresco,_slice.call(arguments)),this},hide:function(){return Window.hide(),this},disable:function(){return _Fresco.stopDelegating(),_Fresco._disabled=!0,this},enable:function(){return _Fresco._disabled=!1,_Fresco.startDelegating(),this},fallback:function(a){return _Fresco._fallback=a,this},setDefaultSkin:function(a){return Options.defaults.skin=a,this}}),(Browser.IE&&Browser.IE<7||"number"==$.type(Browser.Android)&&Browser.Android<3||Browser.MobileSafari&&"number"==$.type(Browser.WebKit)&&Browser.WebKit<533.18)&&(_Fresco.show=_Fresco.showFallback);var Thumbnails={initialize:function(a){this.element=a,this._thumbnails=[],this._orientation="vertical",this._vars={thumbnail:{},thumbnailFrame:{},thumbnails:{}},this.build(),this.startObserving()},build:function(){this.element.append(this.wrapper=$("<div>").addClass("fr-thumbnails-wrapper").append(this._slider=$("<div>").addClass("fr-thumbnails-slider").append(this._previous=$("<div>").addClass("fr-thumbnails-side fr-thumbnails-side-previous").append(this._previous_button=$("<div>").addClass("fr-thumbnails-side-button").append($("<div>").addClass("fr-thumbnails-side-button-background")).append($("<div>").addClass("fr-thumbnails-side-button-icon")))).append(this._thumbs=$("<div>").addClass("fr-thumbnails-thumbs").append(this._slide=$("<div>").addClass("fr-thumbnails-slide"))).append(this._next=$("<div>").addClass("fr-thumbnails-side fr-thumbnails-side-next").append(this._next_button=$("<div>").addClass("fr-thumbnails-side-button").append($("<div>").addClass("fr-thumbnails-side-button-background")).append($("<div>").addClass("fr-thumbnails-side-button-icon"))))))},startObserving:function(){this._slider.delegate(".fr-thumbnail","click",$.proxy(function(a){a.stopPropagation();var b=$(a.target).closest(".fr-thumbnail")[0],c=b&&$(b).data("fr-position");c&&(this.setActive(c),Window.setPosition(c))},this)),this._slider.bind("click",function(a){a.stopPropagation()}),this._previous.bind("click",$.proxy(this.previousPage,this)),this._next.bind("click",$.proxy(this.nextPage,this))},load:function(a){this.clear();var b="horizontal",c=!1;$.each(a,$.proxy(function(a,d){"vertical"==d.options.thumbnails&&(b="vertical"),d.options.thumbnails||(c=!0)},this)),this.setOrientation(b),this._disabledGroup=c,$.each(a,$.proxy(function(a,b){this._thumbnails.push(new Thumbnail(b,a+1))},this)),this.fitToViewport()},clear:function(){$.each(this._thumbnails,function(a,b){b.remove()}),this._thumbnails=[],this._position=-1,this._page=-1},setOrientation:function(a){this._orientation&&Window.element.removeClass("fr-thumbnails-"+this._orientation),Window.element.addClass("fr-thumbnails-"+a),this._orientation=a},disable:function(){Window.element.removeClass("fr-thumbnails-enabled").addClass("fr-thumbnails-disabled"),this._disabled=!0},enable:function(){Window.element.removeClass("fr-thumbnails-disabled").addClass("fr-thumbnails-enabled"),this._disabled=!1},enabled:function(){return!this._disabled},disabled:function(){return this._disabled},updateVars:function(){var a=Window.element,b=this._vars,c=this._orientation,d="horizontal"==c,e=d?"top":"left",f=d?"left":"top",g=d?"bottom":"left",h=d?"top":"right",i=d?"width":"height",j=d?"height":"width",k={left:"right",right:"left",top:"bottom",bottom:"top"};this.element.removeClass("fr-thumbnails-measured");var l=a.is(":visible");if(l||a.show(),this.disabled()&&this.enable(),!this.element.is(":visible")||this._thumbnails.length<2||this._disabledGroup)return this.disable(),$.extend(this._vars.thumbnails,{width:0,height:0}),l||a.hide(),void this.element.addClass("fr-thumbnails-measured");this.enable();var m=this._previous,n=this._next,o=this._thumbs,p=Bounds.viewport(),q=this.element["inner"+_.String.capitalize(j)](),r=parseInt(this._thumbs.css("padding-"+e))||0,s=Math.max(q-2*r,0),t=parseInt(this._thumbs.css("padding-"+f))||0,u=(parseInt(this.element.css("margin-"+g))||0)+(parseInt(this.element.css("margin-"+h))||0);$.extend(b.thumbnails,{height:q+u,width:p[d?"width":"height"],paddingTop:r}),$.extend(b.thumbnail,{height:s,width:s}),$.extend(b.thumbnailFrame,{width:s+2*t,height:q}),b.sides={previous:{width:n["inner"+_.String.capitalize(i)](),marginLeft:parseInt(m.css("margin-"+f))||0,marginRight:parseInt(m.css("margin-"+k[f]))||0},next:{width:n["inner"+_.String.capitalize(i)](),marginLeft:parseInt(n.css("margin-"+f))||0,marginRight:parseInt(n.css("margin-"+k[f]))||0}};var v=p[i],w=b.thumbnailFrame.width,o=this._thumbnails.length;b.thumbnails.width=v,b.sides.enabled=o*w/v>1;var x=v,y=b.sides,z=y.previous,A=y.next,B=z.marginLeft+z.width+z.marginRight+A.marginLeft+A.width+A.marginRight;b.sides.enabled&&(x-=B),x=Math.floor(x/w)*w;var C=o*w;x>C&&(x=C);var D=x+(b.sides.enabled?B:0);b.ipp=x/w,this._mode="page",b.ipp<=1&&(x=v,D=v,b.sides.enabled=!1,this._mode="center"),b.pages=Math.ceil(o*w/x),b.wrapper={width:D+1,height:q},b.thumbs={width:x,height:q},b.slide={width:o*w+1,height:q},l||a.hide(),this.element.addClass("fr-thumbnails-measured")},hide:function(){this.disable(),this.thumbnails.hide(),this._visible=!1},getDimensions:function(){var a="horizontal"==this._orientation;return{width:a?this._vars.thumbnails.width:this._vars.thumbnails.height,height:a?this._vars.thumbnails.height:this._vars.thumbnails.width}},fitToViewport:function(){if(this.updateVars(),!this.disabled()){var a=$.extend({},this._vars),b="horizontal"==this._orientation;$.each(this._thumbnails,function(a,b){b.resize()}),this._previous[a.sides.enabled?"show":"hide"](),this._next[a.sides.enabled?"show":"hide"](),this._thumbs.css({width:a.thumbs[b?"width":"height"],height:a.thumbs[b?"height":"width"]}),this._slide.css({width:a.slide[b?"width":"height"],height:a.slide[b?"height":"width"]});var c={width:a.wrapper[b?"width":"height"],height:a.wrapper[b?"height":"width"]};c["margin-"+(b?"left":"top")]=Math.round(-.5*a.wrapper.width)+"px",c["margin-"+(b?"top":"left")]=0,this.wrapper.css(c),this._position&&this.moveTo(this._position,!0)}},moveToPage:function(a){if(!(1>a||a>this._vars.pages||a==this._page)){var b=this._vars.ipp*(a-1)+1;this.moveTo(b)}},previousPage:function(){this.moveToPage(this._page-1)},nextPage:function(){this.moveToPage(this._page+1)},show:function(a){var b=this._position<0;1>a&&(a=1);var c=this._thumbnails.length;a>c&&(a=c),this._position=a,this.setActive(a),("page"!=this._mode||this._page!=Math.ceil(a/this._vars.ipp))&&this.moveTo(a,b)},moveTo:function(a,b){if(this.updateVars(),!this.disabled()){var c,d="horizontal"==this._orientation,e=Bounds.viewport()[d?"width":"height"],f=.5*e,g=this._vars.thumbnailFrame.width;if("page"==this._mode){var h=Math.ceil(a/this._vars.ipp);this._page=h,c=-1*(g*(this._page-1)*this._vars.ipp);var i="fr-thumbnails-side-button-disabled";this._previous_button[(2>h?"add":"remove")+"Class"](i),this._next_button[(h>=this._vars.pages?"add":"remove")+"Class"](i)}else c=f+-1*(g*(a-1)+.5*g);var h=Pages.page,j={},k={};j[d?"top":"left"]=0,k[d?"left":"top"]=c+"px",this._slide.stop(!0).css(j).animate(k,b?0:h?h.view.options.effects.thumbnails.slide||0:0,$.proxy(function(){this.loadCurrentPage()},this))}},loadCurrentPage:function(){var a,b;if(this._position&&this._vars.thumbnailFrame.width&&!(this._thumbnails.length<1)){if("page"==this._mode){if(this._page<1)return;a=(this._page-1)*this._vars.ipp+1,b=Math.min(a-1+this._vars.ipp,this._thumbnails.length)}else{var c=("horizontal"==this._orientation,Math.ceil(this._vars.thumbnails.width/this._vars.thumbnailFrame.width));a=Math.max(Math.floor(Math.max(this._position-.5*c,0)),1),b=Math.ceil(Math.min(this._position+.5*c)),this._thumbnails.length<b&&(b=this._thumbnails.length)}for(var d=a;b>=d;d++)this._thumbnails[d-1].load()}},setActive:function(a){this._slide.find(".fr-thumbnail-active").removeClass("fr-thumbnail-active");var b=a&&this._thumbnails[a-1];b&&b.activate()},refresh:function(){this._position&&this.setPosition(this._position)}};$.extend(Thumbnail.prototype,{initialize:function(a,b){this.view=a,this._dimension={},this._position=b,this.preBuild()},preBuild:function(){this.thumbnail=$("<div>").addClass("fr-thumbnail").data("fr-position",this._position)},build:function(){if(!this.thumbnailFrame){var a=this.view.options;Thumbnails._slide.append(this.thumbnailFrame=$("<div>").addClass("fr-thumbnail-frame").append(this.thumbnail.append(this.thumbnailWrapper=$("<div>").addClass("fr-thumbnail-wrapper")))),"image"==this.view.type&&this.thumbnail.addClass("fr-load-thumbnail").data("thumbnail",{view:this.view,src:a.thumbnail||this.view.url});var b=a.thumbnail&&a.thumbnail.icon;b&&this.thumbnail.append($("<div>").addClass("fr-thumbnail-icon fr-thumbnail-icon-"+b));var c;this.thumbnail.append(c=$("<div>").addClass("fr-thumbnail-overlay").append($("<div>").addClass("fr-thumbnail-overlay-background")).append(this.loading=$("<div>").addClass("fr-thumbnail-loading").append($("<div>").addClass("fr-thumbnail-loading-background")).append(this.spinner=$("<div>").addClass("fr-thumbnail-spinner").hide().append($("<div>").addClass("fr-thumbnail-spinner-spin")))).append($("<div>").addClass("fr-thumbnail-overlay-border"))),this.thumbnail.append($("<div>").addClass("fr-thumbnail-state")),this.resize()}},remove:function(){this.thumbnailFrame&&(this.thumbnailFrame.remove(),this.thumbnailFrame=null,this.image=null),this.ready&&(this.ready.abort(),this.ready=null),this.vimeoThumbnail&&(this.vimeoThumbnail.abort(),this.vimeoThumbnail=null),this._loading=!1,this._removed=!0,this.view=null,this._clearDelay()},load:function(){if(!(this._loaded||this._loading||this._removed)){this.thumbnailWrapper||this.build(),this._loading=!0;var a=this.view.options.thumbnail,b=a&&"boolean"==$.type(a)?this.view.url:a||this.view.url;if(this._url=b,b)if("vimeo"==this.view.type)if(b==a)this._url=b,this._load(this._url);else switch(this.view.type){case"vimeo":this.vimeoThumbnail=new VimeoThumbnail(this.view.url,$.proxy(function(a){this._url=a,this._load(a)},this),$.proxy(function(){this._error()},this))}else this._load(this._url)}},activate:function(){this.thumbnail.addClass("fr-thumbnail-active")},_load:function(a){this.thumbnailWrapper.prepend(this.image=$("<img>").addClass("fr-thumbnail-image").attr({src:a}).css({opacity:1e-4})),this.fadeInSpinner(),this.ready=new ImageReady(this.image[0],$.proxy(function(a){var b=a.img;this.thumbnailFrame&&this._loading&&(this._loaded=!0,this._loading=!1,this._dimensions={width:b.naturalWidth,height:b.naturalHeight},this.resize(),this.show())},this),$.proxy(function(){this._error()},this),{method:this.view.options.loadedMethod})},_error:function(){this._loaded=!0,this._loading=!1,this.thumbnail.addClass("fr-thumbnail-error"),this.image&&this.image.hide(),this.thumbnailWrapper.append($("<div>").addClass("fr-thumbnail-image")),this.show()},fadeInSpinner:function(){if(Spinner.supported&&this.view.options.spinner){this._clearDelay();var a=this.view.options.effects.thumbnail;this._delay=setTimeout($.proxy(function(){this.spinner.stop(!0).fadeTo(a.show||0,1)},this),this.view.options.spinnerDelay||0)}},show:function(){this._clearDelay();var a=this.view.options.effects.thumbnail;this.loading.stop(!0).delay(a.delay).fadeTo(a.show,0)},_clearDelay:function(){this._delay&&(clearTimeout(this._delay),this._delay=null)},resize:function(){if(this.thumbnailFrame){var a="horizontal"==Thumbnails._orientation;if(this.thumbnailFrame.css({width:Thumbnails._vars.thumbnailFrame[a?"width":"height"],height:Thumbnails._vars.thumbnailFrame[a?"height":"width"]}),this.thumbnailFrame.css({top:a?0:Thumbnails._vars.thumbnailFrame.width*(this._position-1),left:a?Thumbnails._vars.thumbnailFrame.width*(this._position-1):0}),this.thumbnailWrapper){var b=Thumbnails._vars.thumbnail;if(this.thumbnail.css({width:b.width,height:b.height,"margin-top":Math.round(-.5*b.height),"margin-left":Math.round(-.5*b.width),"margin-bottom":0,"margin-right":0}),this._dimensions){var c,d={width:b.width,height:b.height},e=Math.max(d.width,d.height),f=$.extend({},this._dimensions);if(f.width>d.width&&f.height>d.height){c=Fit.within(d,f);var g=1,h=1;c.width<d.width&&(g=d.width/c.width),c.height<d.height&&(h=d.height/c.height);var i=Math.max(g,h);i>1&&(c.width*=i,c.height*=i),$.each("width height".split(" "),function(a,b){c[b]=Math.round(c[b])})}else c=Fit.within(this._dimensions,f.width<d.width||f.height<d.height?{width:e,height:e}:d);var j=Math.round(.5*d.width-.5*c.width),k=Math.round(.5*d.height-.5*c.height);this.image.removeAttr("style").css($.extend({},c,{top:k,left:j}))}}}}});var UI={_modes:["fullclick","outside","inside"],_ui:!1,_validClickTargetSelector:[".fr-content-element",".fr-content",".fr-content > .fr-stroke",".fr-content > .fr-stroke .fr-stroke-color"].join(", "),initialize:function(a){$.each(this._modes,$.proxy(function(a,b){this[b].initialize()},this)),Window.element.addClass("fr-ui-inside-hidden fr-ui-fullclick-hidden")},set:function(a){this._ui&&(Window.element.removeClass("fr-window-ui-"+this._ui),Overlay.element.removeClass("fr-overlay-ui-"+this._ui)),Window.element.addClass("fr-window-ui-"+a),Overlay.element.addClass("fr-overlay-ui-"+a),this._enabled&&this._ui&&this._ui!=a&&(this[this._ui].disable(),this[a].enable(),UI[a].show()),this._ui=a},_onWindowResize:function(){Support.mobileTouch&&this.show()},enable:function(){$.each(this._modes,$.proxy(function(a,b){UI[b][b==this._ui?"enable":"disable"]()},this)),this._enabled=!0},disable:function(){$.each(this._modes,$.proxy(function(a,b){UI[b].disable()},this)),this._enabled=!1},adjustPrevNext:function(a,b){UI[this._ui].adjustPrevNext(a,b)},show:function(a,b){UI[this._ui].show(a,b)},hide:function(a,b){UI[this._ui].hide(a,b)},reset:function(){$.each(this._modes,$.proxy(function(a,b){UI[b].reset()},this))},update:function(){var a=Pages.page;a&&this.set(a._ui)}};return UI.fullclick={initialize:function(){this.build(),this._scrollLeft=-1},build:function(){Window._box.append(this._previous=$("<div>").addClass("fr-side fr-side-previous fr-side-previous-fullclick fr-toggle-ui").append($("<div>").addClass("fr-side-button").append($("<div>").addClass("fr-side-button-background")).append($("<div>").addClass("fr-side-button-icon")))).append(this._next=$("<div>").addClass("fr-side fr-side-next fr-side-next-fullclick fr-toggle-ui").append($("<div>").addClass("fr-side-button").append($("<div>").addClass("fr-side-button-background")).append($("<div>").addClass("fr-side-button-icon")))).append(this._close=$("<div>").addClass("fr-close fr-close-fullclick").append($("<div>").addClass("fr-close-background")).append($("<div>").addClass("fr-close-icon"))),Browser.IE&&Browser.IE<=7&&this._previous.add(this._next).add(this._close).hide(),this._close.on("click",$.proxy(function(a){a.preventDefault(),Window.hide()},this)),this._previous.on("click",$.proxy(function(a){Window.previous(),this._onMouseMove(a)},this)),this._next.on("click",$.proxy(function(a){Window.next(),this._onMouseMove(a)},this))},enable:function(){this.bind()},disable:function(){this.unbind()},reset:function(){Window.timers.clear("ui-fullclick"),this._x=-1,this._y=-1,this._scrollLeft=-1,this.resetPrevNext(),this._onMouseLeave()},resetPrevNext:function(){var a=this._previous.add(this._next);a.stop(!0).removeAttr("style")},bind:function(){this._onMouseUpHandler||(this.unbind(),Window._pages.on("mouseup",".fr-container",this._onMouseUpHandler=$.proxy(this._onMouseUp,this)),Support.mobileTouch||(Window.element.on("mouseenter",this._showHandler=$.proxy(this.show,this)).on("mouseleave",this._hideHandler=$.proxy(this.hide,this)),Window.element.on("mousemove",this._mousemoveHandler=$.proxy(function(a){var b=a.pageX,c=a.pageY;this._hoveringSideButton||c==this._y&&b==this._x||(this._x=b,this._y=c,this.show(),this.startTimer())},this)),Window._pages.on("mousemove",".fr-container",this._onMouseMoveHandler=$.proxy(this._onMouseMove,this)).on("mouseleave",".fr-container",this._onMouseLeaveHandler=$.proxy(this._onMouseLeave,this)).on("mouseenter",".fr-container",this._onMouseEnterHandler=$.proxy(this._onMouseEnter,this)),Window.element.on("mouseenter",".fr-side",this._onSideMouseEnterHandler=$.proxy(this._onSideMouseEnter,this)).on("mouseleave",".fr-side",this._onSideMouseLeaveHandler=$.proxy(this._onSideMouseLeave,this)),$(window).on("scroll",this._onScrollHandler=$.proxy(this._onScroll,this))))},unbind:function(){this._onMouseUpHandler&&(Window._pages.off("mouseup",".fr-container",this._onMouseUpHandler),this._onMouseUpHandler=null,this._showHandler&&(Window.element.off("mouseenter",this._showHandler).off("mouseleave",this._hideHandler).off("mousemove",this._mousemoveHandler),Window._pages.off("mousemove",".fr-container",this._onMouseMoveHandler).off("mouseleave",".fr-container",this._onMouseLeaveHandler).off("mouseenter",".fr-container",this._onMouseEnterHandler),Window.element.off("mouseenter",".fr-side",this._onSideMouseEnterHandler).off("mouseleave",".fr-side",this._onSideMouseLeaveHandler),$(window).off("scroll",this._onScrollHandler),this._showHandler=null))},adjustPrevNext:function(a,b){var c=Pages.page;if(!c)return void(a&&a());var d=Window.element.is(":visible");d||Window.element.show();var e=this._previous.attr("style");this._previous.removeAttr("style");var f=parseInt(this._previous.css("margin-top"));this._previous.attr({style:e}),d||Window.element.hide();var g=c._infoHeight||0,h=this._previous.add(this._next),i={"margin-top":f-.5*g},j="number"==$.type(b)?b:Pages.page&&Pages.page.view.options.effects.content.show||0;this.opening&&(j=0),h.stop(!0).animate(i,j,a),this._previous[(Window.mayPrevious()?"remove":"add")+"Class"]("fr-side-disabled"),this._next[(Window.mayNext()?"remove":"add")+"Class"]("fr-side-disabled"),h[(c._total<2?"add":"remove")+"Class"]("fr-side-hidden"),a&&a()},_onScroll:function(){this._scrollLeft=$(window).scrollLeft()},_onMouseMove:function(a){if(!Support.mobileTouch){var b=this._getEventSide(a),c=_.String.capitalize(b),d=b?Window["may"+c]():!1;if(b!=this._hoveringSide||d!=this._mayClickHoveringSide)switch(this._hoveringSide=b,this._mayClickHoveringSide=d,Window._box[(d?"add":"remove")+"Class"]("fr-hovering-clickable"),b){case"previous":Window._box.addClass("fr-hovering-previous").removeClass("fr-hovering-next");break;case"next":Window._box.addClass("fr-hovering-next").removeClass("fr-hovering-previous")}}},_onMouseLeave:function(a){Window._box.removeClass("fr-hovering-clickable fr-hovering-previous fr-hovering-next"),this._hoveringSide=!1},_onMouseUp:function(a){if(!(a.which>1)){if(1==Pages.pages.length)return void Window.hide();var b=this._getEventSide(a);Window[b](),this._onMouseMove(a)}},_onMouseEnter:function(a){this._onMouseMove(a)},_getEventSide:function(a){var b=(this._scrollLeft>-1?this._scrollLeft:this._scrollLeft=$(window).scrollLeft(),a.pageX-Window._boxPosition.left-this._scrollLeft),c=Window._boxDimensions.width;return.5*c>b?"previous":"next"},_onSideMouseEnter:function(a){this._hoveringSideButton=!0,this._hoveringSide=this._getEventSide(a),this._mayClickHoveringSide=Window["may"+_.String.capitalize(this._hoveringSide)](),this.clearTimer()},_onSideMouseLeave:function(a){this._hoveringSideButton=!1,this._hoveringSide=!1,this._mayClickHoveringSide=!1,this.startTimer()},show:function(a){return this._visible?(this.startTimer(),void("function"==$.type(a)&&a())):(this._visible=!0,this.startTimer(),Window.element.addClass("fr-visible-fullclick-ui").removeClass("fr-hidden-fullclick-ui"),Browser.IE&&Browser.IE<=7&&this._previous.add(this._next).add(this._close).show(),void("function"==$.type(a)&&a()))},hide:function(a){var b=Pages.page&&Pages.page.view.type;return!this._visible||b&&("youtube"==b||"vimeo"==b)?void("function"==$.type(a)&&a()):(this._visible=!1,Window.element.removeClass("fr-visible-fullclick-ui").addClass("fr-hidden-fullclick-ui"),void("function"==$.type(a)&&a()))},clearTimer:function(){Support.mobileTouch||Window.timers.clear("ui-fullclick")},startTimer:function(){Support.mobileTouch||(this.clearTimer(),Window.timers.set("ui-fullclick",$.proxy(function(){this.hide()},this),Window.view?Window.view.options.uiDelay:0))}},UI.inside={initialize:function(){},enable:function(){this.bind()},disable:function(){this.unbind()},bind:function(){this._onMouseUpHandler||(this.unbind(),Window._pages.on("mouseup",".fr-content",this._onMouseUpHandler=$.proxy(this._onMouseUp,this)),Window._pages.on("click",".fr-content .fr-close",$.proxy(function(a){a.preventDefault(),Window.hide()},this)).on("click",".fr-content .fr-side-previous",$.proxy(function(a){Window.previous(),this._onMouseMove(a)},this)).on("click",".fr-content .fr-side-next",$.proxy(function(a){Window.next(),this._onMouseMove(a)},this)),Window.element.on("click",".fr-container, .fr-thumbnails, .fr-thumbnails-wrapper",this._delegateOverlayCloseHandler=$.proxy(this._delegateOverlayClose,this)),Support.mobileTouch||(Window.element.on("mouseenter",".fr-content",this._showHandler=$.proxy(this.show,this)).on("mouseleave",".fr-content",this._hideHandler=$.proxy(this.hide,this)),Window.element.on("mousemove",".fr-content",this._mousemoveHandler=$.proxy(function(a){var b=a.pageX,c=a.pageY;this._hoveringSideButton||c==this._y&&b==this._x||(this._x=b,this._y=c,this.show(),this.startTimer())},this)),Window._pages.on("mousemove",".fr-info, .fr-close",$.proxy(function(a){a.stopPropagation(),this._onMouseLeave(a)},this)),Window._pages.on("mousemove",".fr-info",$.proxy(function(a){this.clearTimer()},this)),Window._pages.on("mousemove",".fr-content",this._onMouseMoveHandler=$.proxy(this._onMouseMove,this)).on("mouseleave",".fr-content",this._onMouseLeaveHandler=$.proxy(this._onMouseLeave,this)).on("mouseenter",".fr-content",this._onMouseEnterHandler=$.proxy(this._onMouseEnter,this)),Window.element.on("mouseenter",".fr-side",this._onSideMouseEnterHandler=$.proxy(this._onSideMouseEnter,this)).on("mouseleave",".fr-side",this._onSideMouseLeaveHandler=$.proxy(this._onSideMouseLeave,this)),$(window).on("scroll",this._onScrollHandler=$.proxy(this._onScroll,this))))},unbind:function(){this._onMouseUpHandler&&(Window._pages.off("mouseup",".fr-content",this._onMouseUpHandler),this._onMouseUpHandler=null,Window._pages.off("click",".fr-content .fr-close").off("click",".fr-content .fr-side-previous").off("click",".fr-content .fr-side-next"),Window.element.off("click",".fr-container, .fr-thumbnails, .fr-thumbnails-wrapper",this._delegateOverlayCloseHandler),this._showHandler&&(Window.element.off("mouseenter",".fr-content",this._showHandler).off("mouseleave",".fr-content",this._hideHandler).off("mousemove",".fr-content",this._mousemoveHandler),Window._pages.off("mousemove",".fr-info, .fr-close"),Window._pages.off("mousemove",".fr-info"),Window._pages.off("mousemove",".fr-content-element",this._onMouseMoveHandler).off("mouseleave",".fr-content",this._onMouseLeaveHandler).off("mouseenter",".fr-content",this._onMouseEnterHandler),Window.element.off("mouseenter",".fr-side",this._onSideMouseEnterHandler).off("mouseleave",".fr-side",this._onSideMouseLeaveHandler),$(window).off("scroll",this._onScrollHandler),this._showHandler=null))},reset:function(){Window.timers.clear("ui-fullclick"),this._x=-1,this._y=-1,this._scrollLeft=-1,this._hoveringSide=!1,this._onMouseLeave()},adjustPrevNext:function(a){a&&a()},_onScroll:function(){this._scrollLeft=$(window).scrollLeft()},_delegateOverlayClose:function(a){var b=Pages.page;b&&b.view.options.overlay&&!b.view.options.overlay.close||$(a.target).is(".fr-container, .fr-thumbnails, .fr-thumbnails-wrapper")&&(a.preventDefault(),a.stopPropagation(),Window.hide())},_onMouseMove:function(a){if(!Support.mobileTouch){var b=this._getEventSide(a),c=_.String.capitalize(b),d=b?Window["may"+c]():!1;if((1==Pages.pages.length||Pages.page&&"close"==Pages.page.view.options.onClick)&&(b=!1),b!=this._hoveringSide||d!=this._mayClickHoveringSide)if(this._hoveringSide=b,this._mayClickHoveringSide=d,b)switch(Window._box[(d?"add":"remove")+"Class"]("fr-hovering-clickable"),b){case"previous":Window._box.addClass("fr-hovering-previous").removeClass("fr-hovering-next");break;case"next":Window._box.addClass("fr-hovering-next").removeClass("fr-hovering-previous")}else Window._box.removeClass("fr-hovering-clickable fr-hovering-previous fr-hovering-next")}},_onMouseLeave:function(a){Window._box.removeClass("fr-hovering-clickable fr-hovering-previous fr-hovering-next"),this._hoveringSide=!1},_onMouseUp:function(a){if(!(a.which>1)&&$(a.target).is(UI._validClickTargetSelector)){if(1==Pages.pages.length||Pages.page&&"close"==Pages.page.view.options.onClick)return void Window.hide();var b=this._getEventSide(a);Window[b](),this._onMouseMove(a)}},_onMouseEnter:function(a){this._onMouseMove(a)},_getEventSide:function(a){var b=(this._scrollLeft>-1?this._scrollLeft:this._scrollLeft=$(window).scrollLeft(),a.pageX-Window._boxPosition.left-this._scrollLeft),c=Window._boxDimensions.width;return.5*c>b?"previous":"next"},_onSideMouseEnter:function(a){this._hoveringSideButton=!0,this._hoveringSide=this._getEventSide(a),this._mayClickHoveringSide=Window["may"+_.String.capitalize(this._hoveringSide)](),this.clearTimer()},_onSideMouseLeave:function(a){this._hoveringSideButton=!1,this._hoveringSide=!1,this._mayClickHoveringSide=!1,this.startTimer()},show:function(a){return this._visible?(this.startTimer(),void("function"==$.type(a)&&a())):(this._visible=!0,this.startTimer(),Window.element.addClass("fr-visible-inside-ui").removeClass("fr-hidden-inside-ui"),void("function"==$.type(a)&&a()))},hide:function(a){return this._visible?(this._visible=!1,Window.element.removeClass("fr-visible-inside-ui").addClass("fr-hidden-inside-ui"),void("function"==$.type(a)&&a())):void("function"==$.type(a)&&a())},clearTimer:function(){Support.mobileTouch||Window.timers.clear("ui-inside")},startTimer:function(){Support.mobileTouch||(this.clearTimer(),Window.timers.set("ui-inside",$.proxy(function(){this.hide()},this),Window.view?Window.view.options.uiDelay:0))}},UI.outside={initialize:function(){this.build(),this._scrollLeft=-1},build:function(){Window._box.append(this._previous=$("<div>").addClass("fr-side fr-side-previous fr-side-previous-outside").append($("<div>").addClass("fr-side-button").append($("<div>").addClass("fr-side-button-background")).append($("<div>").addClass("fr-side-button-icon")))).append(this._next=$("<div>").addClass("fr-side fr-side-next fr-side-next-outside").append($("<div>").addClass("fr-side-button").append($("<div>").addClass("fr-side-button-background")).append($("<div>").addClass("fr-side-button-icon")))).append(this._close=$("<div>").addClass("fr-close fr-close-outside").append($("<div>").addClass("fr-close-background")).append($("<div>").addClass("fr-close-icon"))),Browser.IE&&Browser.IE<=7&&this._previous.add(this._next).add(this._close).hide(),this._close.on("click",$.proxy(function(a){a.preventDefault(),Window.hide()},this)),this._previous.on("click",$.proxy(function(a){Window.previous(),this._onMouseMove(a)},this)),this._next.on("click",$.proxy(function(a){Window.next(),this._onMouseMove(a)},this))},enable:function(){this.bind()},disable:function(){this.unbind()},reset:function(){Window.timers.clear("ui-outside"),this._x=-1,this._y=-1,this._scrollLeft=-1,this._onMouseLeave()},bind:function(){this._onMouseUpHandler||(this.unbind(),Window.element.on("mouseup",".fr-content",this._onMouseUpHandler=$.proxy(this._onMouseUp,this)),Window.element.on("click",".fr-container, .fr-thumbnails, .fr-thumbnails-wrapper",this._delegateOverlayCloseHandler=$.proxy(this._delegateOverlayClose,this)),Support.mobileTouch||(Window._pages.on("mousemove",".fr-content",this._onMouseMoveHandler=$.proxy(this._onMouseMove,this)).on("mouseleave",".fr-content",this._onMouseLeaveHandler=$.proxy(this._onMouseLeave,this)).on("mouseenter",".fr-content",this._onMouseEnterHandler=$.proxy(this._onMouseEnter,this)),Window.element.on("mouseenter",".fr-side",this._onSideMouseEnterHandler=$.proxy(this._onSideMouseEnter,this)).on("mouseleave",".fr-side",this._onSideMouseLeaveHandler=$.proxy(this._onSideMouseLeave,this)),$(window).on("scroll",this._onScrollHandler=$.proxy(this._onScroll,this))))},unbind:function(){this._onMouseUpHandler&&(Window.element.off("mouseup",".fr-content",this._onMouseUpHandler),this._onMouseUpHandler=null,Window.element.off("click",".fr-container, .fr-thumbnails, .fr-thumbnails-wrapper",this._delegateOverlayCloseHandler),this._onMouseMoveHandler&&(Window._pages.off("mousemove",".fr-content",this._onMouseMoveHandler).off("mouseleave",".fr-content",this._onMouseLeaveHandler).off("mouseenter",".fr-content",this._onMouseEnterHandler),Window.element.off("mouseenter",".fr-side",this._onSideMouseEnterHandler).off("mouseleave",".fr-side",this._onSideMouseLeaveHandler),$(window).off("scroll",this._onScrollHandler),this._onMouseMoveHandler=null))},adjustPrevNext:function(a,b){var c=Pages.page;if(!c)return void(a&&a());var d=this._previous.add(this._next);this._previous[(Window.mayPrevious()?"remove":"add")+"Class"]("fr-side-disabled"),this._next[(Window.mayNext()?"remove":"add")+"Class"]("fr-side-disabled"),d[(c._total<2?"add":"remove")+"Class"]("fr-side-hidden"),a&&a()},_onScroll:function(){this._scrollLeft=$(window).scrollLeft()},_delegateOverlayClose:function(a){var b=Pages.page;b&&b.view.options.overlay&&!b.view.options.overlay.close||$(a.target).is(".fr-container, .fr-thumbnails, .fr-thumbnails-wrapper")&&(a.preventDefault(),a.stopPropagation(),Window.hide())},_onMouseMove:function(a){if(!Support.mobileTouch){var b=this._getEventSide(a),c=_.String.capitalize(b),d=b?Window["may"+c]():!1;if((1==Pages.pages.length||Pages.page&&"close"==Pages.page.view.options.onClick)&&(b=!1),b!=this._hoveringSide||d!=this._mayClickHoveringSide)if(this._hoveringSide=b,this._mayClickHoveringSide=d,b)switch(Window._box[(d?"add":"remove")+"Class"]("fr-hovering-clickable"),b){case"previous":Window._box.addClass("fr-hovering-previous").removeClass("fr-hovering-next");break;case"next":Window._box.addClass("fr-hovering-next").removeClass("fr-hovering-previous")}else Window._box.removeClass("fr-hovering-clickable fr-hovering-previous fr-hovering-next")}},_onMouseLeave:function(a){Window._box.removeClass("fr-hovering-clickable fr-hovering-previous fr-hovering-next"),this._hoveringSide=!1},_onMouseUp:function(a){if(!(a.which>1)&&$(a.target).is(UI._validClickTargetSelector)){if(1==Pages.pages.length||Pages.page&&"close"==Pages.page.view.options.onClick)return void Window.hide();var b=this._getEventSide(a);Window[b](),this._onMouseMove(a)}},_onMouseEnter:function(a){this._onMouseMove(a)},_getEventSide:function(a){var b=(this._scrollLeft>-1?this._scrollLeft:this._scrollLeft=$(window).scrollLeft(),a.pageX-Window._boxPosition.left-this._scrollLeft),c=Window._boxDimensions.width;return.5*c>b?"previous":"next"},show:function(){Browser.IE&&Browser.IE<=7&&this._previous.add(this._next).add(this._close).show()},hide:function(){},_onSideMouseEnter:function(a){this._hoveringSideButton=!0,this._hoveringSide=this._getEventSide(a),this._mayClickHoveringSide=Window["may"+_.String.capitalize(this._hoveringSide)]()},_onSideMouseLeave:function(a){this._hoveringSideButton=!1,this._hoveringSide=!1,this._mayClickHoveringSide=!1},clearTimer:function(){}},$(document).ready(function(a){_Fresco.initialize()}),Fresco});