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

  Author: Ken Wheeler
 Website: http://kenwheeler.github.io
    Date: 03/23/14
    Docs: http://kenwheeler.github.io/slick
    Repo: http://github.com/kenwheeler/slick
  Issues: http://github.com/kenwheeler/slick/issues

 */

/* global window, document, define, jQuery, setInterval, clearInterval */
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";var c,b=window.Slick||{};c=function(a,b){return function(){return a.apply(b,arguments)}},b=function(){function b(b,d){var f,g,e=this;if(e.defaults={accessibility:!0,autoplay:!1,autoplaySpeed:3e3,cssEase:"ease",dots:!1,draggable:!0,fade:!1,easing:"linear",arrows:!0,infinite:!0,onBeforeChange:null,onAfterChange:null,pauseOnHover:!0,responsive:null,slide:"div",slidesToShow:1,slidesToScroll:1,speed:300,swipe:!0,touchMove:!0,touchThreshold:5,vertical:!1},e.initials={animating:!1,autoPlayTimer:null,currentSlide:0,currentLeft:null,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},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.paused=!1,e.positionProp=null,e.slider=a(b),e.slidesCache=null,e.cssTransitions=!1,e.windowWidth=0,e.windowTimer=null,e.options=a.extend({},e.defaults,d),e.originalSettings=e.options,f=e.options.responsive||null,f&&f.length>-1){for(g in f)f.hasOwnProperty(g)&&(e.breakpoints.push(f[g].breakpoint),e.breakpointSettings[f[g].breakpoint]=f[g].settings);e.breakpoints.sort(function(a,b){return b-a})}e.autoPlay=c(e.autoPlay,e),e.autoPlayClear=c(e.autoPlayClear,e),e.changeSlide=c(e.changeSlide,e),e.setPosition=c(e.setPosition,e),e.swipeHandler=c(e.swipeHandler,e),e.dragHandler=c(e.dragHandler,e),e.keyHandler=c(e.keyHandler,e),e.autoPlayIterator=c(e.autoPlayIterator,e),e.init()}return b}(),b.prototype.init=function(){var b=this;a(b.slider).hasClass("slick-initialized")||(a(b.slider).addClass("slick-initialized"),b.buildOut(),b.setProps(),b.startLoad(),b.loadSlider(),b.initializeEvents(),b.checkResponsive())},b.prototype.addSlide=function(b){var c=this;c.unload(),a(b).appendTo(c.slideTrack),c.slides=c.slideTrack.children(this.options.slide),c.slideTrack.children(this.options.slide).remove(),c.slideTrack.append(c.slides),c.reinit()},b.prototype.removeSlide=function(b){var c=this;return c.unload(),c.slideCount<1?!1:(a(c.slideTrack.children(this.options.slide).get(b)).remove(),c.slides=c.slideTrack.children(this.options.slide),c.slideTrack.children(this.options.slide).remove(),c.slideTrack.append(c.slides),c.reinit(),void 0)},b.prototype.filterSlides=function(a){var b=this;null!==a&&(b.unload(),b.slideTrack.children(this.options.slide).remove(),b.slidesCache.filter(a).appendTo(b.slideTrack),b.reinit())},b.prototype.unfilterSlides=function(){var a=this;null!==a.slidesCache&&(a.unload(),a.slideTrack.children(this.options.slide).remove(),a.slidesCache.appendTo(a.slideTrack),a.reinit())},b.prototype.applyTransition=function(b){var d,e,c=this;d="all "+c.options.speed+"ms "+c.options.cssEase,e=c.options.vertical===!1?c.listWidth/2+" 50%":"",c.options.fade===!1?c.slideTrack.css({transition:d,transformOrigin:e}):a(c.slides.get(b)).css({transition:d})},b.prototype.disableTransition=function(b){var c=this;c.options.fade===!1?c.slideTrack.css({transition:"",transformOrigin:""}):a(c.slides.get(b)).css({transition:""})},b.prototype.autoPlay=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer),a.slideCount>=a.options.slidesToShow&&a.paused!==!0&&(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;a.options.infinite===!1?1===a.direction?(a.currentSlide+1===a.slideCount-1&&(a.direction=0),a.slideHandler(a.currentSlide+a.options.slidesToScroll)):(0===a.currentSlide-1&&(a.direction=1),a.slideHandler(a.currentSlide-a.options.slidesToScroll)):a.slideHandler(a.currentSlide+a.options.slidesToScroll)},b.prototype.checkResponsive=function(){var c,d,b=this;if(b.originalSettings.responsive&&b.originalSettings.responsive.length>-1&&null!==b.originalSettings.responsive){d=null;for(c in b.breakpoints)b.breakpoints.hasOwnProperty(c)&&a(window).width()<b.breakpoints[c]&&(d=b.breakpoints[c]);null!==d?null!==b.activeBreakpoint?d!==b.activeBreakpoint&&(b.activeBreakpoint=d,b.options=a.extend({},b.defaults,b.breakpointSettings[d]),b.refresh()):(b.activeBreakpoint=d,b.options=a.extend({},b.defaults,b.breakpointSettings[d]),b.refresh()):null!==b.activeBreakpoint&&(b.activeBreakpoint=null,b.options=a.extend({},b.defaults,b.originalSettings),b.refresh())}},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.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(),a.options.autoplay===!0&&a.autoPlay()},b.prototype.loadSlider=function(){var b=this;b.setPosition(),b.slideTrack.css({opacity:1}),"complete"!==document.readyState?a(window).load(function(){b.slider.removeClass("slick-loading"),b.initUI()}):(b.slider.removeClass("slick-loading"),b.initUI())},b.prototype.setValues=function(){var a=this;a.listWidth=a.list.width(),a.listHeight=a.list.height(),a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow)},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&b.slideCount>b.options.slidesToShow&&(b.prevArrow=a('<a href="javascript:void(0)" tabIndex="-1">Previous</a>').appendTo(b.slider).addClass("slick-prev"),b.nextArrow=a('<a href="javascript:void(0)" tabIndex="-1">Next</a>').appendTo(b.slider).addClass("slick-next"),b.options.infinite!==!0&&b.prevArrow.addClass("slick-disabled"))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(d='<ul class="slick-dots">',c=1;c<=b.slideCount;c+=1)d+='<li><a href="javascript:void(0)" tabIndex="-1">'+c+"</a></li>";if(d+="</ul>",b.dots=a(d).appendTo(b.slider),b.options.slidesToScroll>1)for(b.dots.find("li").hide(),c=0;c<b.slideCount;)a(b.dots.find("li").get(c)).show(),c+=b.options.slidesToScroll;b.dots.find("li").first().addClass("slick-active")}},b.prototype.setupInfinite=function(){var c,d,b=this;if(b.options.infinite===!0&&b.options.fade===!1){for(d=null,c=b.slideCount;c>b.slideCount-b.options.slidesToShow;c-=1)d=c-1,a(b.slides[d]).clone().prependTo(b.slideTrack).addClass("slick-cloned");for(c=0;c<b.options.slidesToShow;c+=1)d=c,a(b.slides[d]).clone().appendTo(b.slideTrack).addClass("slick-cloned")}},b.prototype.setupPlaceholders=function(){var c,d,b=this;if((b.options.fade===!0||b.options.vertical===!0)&&(b.options.slidesToShow=1,b.options.slidesToScroll=1),0!==b.slideCount%b.options.slidesToScroll&&1!==b.options.slidesToShow){for(d=Math.abs(b.options.slidesToScroll-b.slideCount%b.options.slidesToScroll),c=0;d>c;c+=1)a("<div/>").appendTo(b.slideTrack).addClass("slick-slide slick-placeholder");b.slides=a(".slick-slide:not(.slick-cloned)",b.slider),b.slideCount=b.slides.length}},b.prototype.buildOut=function(){var b=this;b.slides=a(b.options.slide+":not(.slick-cloned)",b.slider).addClass("slick-slide"),b.slideCount=b.slides.length,b.slidesCache=b.slides,b.slider.addClass("slick-slider"),b.slideTrack=b.slides.wrapAll('<div class="slick-track"/>').parent(),b.list=b.slideTrack.wrap('<div class="slick-list"/>').parent(),b.slideTrack.css("opacity",0),b.options.accessibility===!0&&b.list.prop("tabIndex",0),b.setupPlaceholders(),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.setSlideClasses(0),b.options.draggable===!0&&b.list.addClass("draggable")},b.prototype.setDimensions=function(){var a=this;a.list.find(".slick-slide").width(a.slideWidth),a.options.vertical===!1?a.slideTrack.width(Math.ceil(a.slideWidth*a.slider.find(".slick-slide").length)):(a.list.height(a.slides.first().outerHeight()),a.slideTrack.height(Math.ceil(a.listHeight*a.slider.find(".slick-slide").length)))},b.prototype.setPosition=function(){var b,a=this;a.setValues(),a.setDimensions(),a.options.infinite===!0&&(a.slideOffset=-1*a.slideWidth*a.options.slidesToShow),a.options.fade===!1?(b=a.options.vertical===!1?-1*a.currentSlide*a.slideWidth+a.slideOffset:-1*a.currentSlide*a.listHeight-a.listHeight,a.setCSS(b)):a.setFade()},b.prototype.setProps=function(){var a=this;a.positionProp=1==a.options.vertical?"top":"left","top"===a.positionProp?a.slider.addClass("slick-vertical"):a.slider.removeClass("slick-vertical"),(void 0!==document.body.style.WebkitTransition||void 0!==document.body.style.MozTransition||void 0!==document.body.style.msTransition)&&(a.cssTransitions=!0),a.animType=void 0!==document.body.style.MozTransform?"MozTransform":null,a.animType=void 0!==document.body.style.webkitTransform?"webkitTransform":null,a.animType=void 0!==document.body.style.msTransform?"msTransform":null,a.transformsEnabled=null!==a.animType},b.prototype.setFade=function(){var c,b=this;b.slides.each(function(d,e){c=-1*b.slideWidth*d,a(e).css({position:"relative",left:c,top:0,zIndex:800,opacity:0})}),a(b.slides.get(b.currentSlide)).css({zIndex:900,opacity:1})},b.prototype.initArrowEvents=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.prevArrow.on("click.slick",{message:"previous"},a.changeSlide),a.nextArrow.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 a",b.dots).on("click.slick",{message:"index"},b.changeSlide)},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.options.swipe===!0&&(b.list.on("touchstart.slick",{action:"start",kind:"touch"},b.swipeHandler),b.list.on("touchmove.slick",{action:"move",kind:"touch"},b.swipeHandler),b.list.on("touchend.slick",{action:"end",kind:"touch"},b.swipeHandler),b.list.on("touchcancel.slick",{action:"end",kind:"touch"},b.swipeHandler)),b.options.draggable===!0&&(b.list.on("mousedown.slick",{action:"start",kind:"drag"},b.swipeHandler),b.list.on("mousemove.slick",{action:"move",kind:"drag"},b.swipeHandler),b.list.on("mouseup.slick",{action:"end",kind:"drag"},b.swipeHandler),b.list.on("mouseleave.slick",{action:"cancel",kind:"drag"},b.swipeHandler)),b.options.pauseOnHover===!0&&b.options.autoplay===!0&&(b.list.on("mouseenter.slick",b.autoPlayClear),b.list.on("mouseleave.slick",b.autoPlay)),b.list.on("keydown.slick",b.keyHandler),a(window).on("orientationchange.slick",function(){b.checkResponsive(),b.setPosition()}),a(window).resize(function(){a(window).width!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.setPosition()},50))}),a(window).on("load.slick",b.setPosition)},b.prototype.changeSlide=function(b){var c=this;switch(b.data.message){case"previous":c.slideHandler(c.currentSlide-c.options.slidesToScroll);break;case"next":c.slideHandler(c.currentSlide+c.options.slidesToScroll);break;case"index":c.slideHandler(a(b.target).parent().index());break;default:return!1}},b.prototype.updateDots=function(){var b=this;null!==b.dots&&(b.dots.find("li").removeClass("slick-active"),a(b.dots.find("li").get(b.currentSlide)).addClass("slick-active"))},b.prototype.updateArrows=function(){var a=this;a.options.arrows===!0&&a.options.infinite!==!0&&a.slideCount>a.options.slidesToShow&&(0===a.currentSlide?(a.prevArrow.addClass("slick-disabled"),a.nextArrow.removeClass("slick-disabled")):a.currentSlide>=a.slideCount/a.options.slidesToScroll*a.options.slidesToShow-a.options.slidesToScroll?(a.nextArrow.addClass("slick-disabled"),a.prevArrow.removeClass("slick-disabled")):(a.prevArrow.removeClass("slick-disabled"),a.nextArrow.removeClass("slick-disabled")))},b.prototype.fadeSlide=function(b,c){var d=this;d.cssTransitions===!1?(a(d.slides.get(b)).css({zIndex:1e3}),a(d.slides.get(b)).animate({opacity:1},d.options.speed,d.options.easing,c)):(d.applyTransition(b),a(d.slides.get(b)).css({opacity:1,zIndex:1e3}),c&&setTimeout(function(){d.disableTransition(b),c.call()},d.options.speed))},b.prototype.animateSlide=function(b,c){var d={},e=this;null!==e.options.onBeforeChange&&e.options.onBeforeChange.call(),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?a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px,0px)",e.slideTrack.css(d))},complete:function(){c&&c.call()}}):(e.applyTransition(),d[e.animType]=e.options.vertical===!1?"translate3d("+b+"px, 0px, 0px)":"translate3d(0px,"+b+"px, 0px)",e.slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.setSlideClasses=function(b){var c=this;c.slides.removeClass("slick-active"),a(c.slides.get(b)).addClass("slick-active")},b.prototype.postSlide=function(a){var b=this;b.animating=!1,b.currentSlide=a,b.setPosition(),b.swipeLeft=null,b.updateDots(),b.updateArrows(),b.options.autoplay===!0&&b.options.paused===!1&&b.autoPlay(),null!==b.options.onAfterChange&&b.options.onAfterChange.call(this,a),b.setSlideClasses(b.currentSlide)},b.prototype.slideHandler=function(a){var b,c,d,e=null,f=this;return f.animating===!0?!1:(b=a,f.options.vertical===!1?(e=-1*b*f.slideWidth+f.slideOffset,d=-1*f.currentSlide*f.slideWidth+f.slideOffset):(e=-1*b*f.listHeight-f.listHeight,d=-1*f.currentSlide*f.listHeight-f.listHeight),f.options.autoplay===!0&&clearInterval(f.autoPlayTimer),f.currentLeft=null===f.swipeLeft?d:f.swipeLeft,c=0>b?f.slideCount-f.options.slidesToScroll:b>f.slideCount-1?0:b,f.animating=!0,f.options.fade===!0?(f.fadeSlide(c,function(){f.postSlide(c)}),!1):(f.animateSlide(e,function(){f.postSlide(c)}),void 0))},b.prototype.setCSS=function(a){var d,e,b=this,c={};d="left"==b.positionProp?a:"0px",e="top"==b.positionProp?a:"0px",c[b.positionProp]=a,b.transformsEnabled===!1?b.slideTrack.css(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.swipeStart=function(a){var c,b=this;return c=a.originalEvent.touches,1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(b.touchObject.startX=b.touchObject.curX=void 0!==c?c[0].pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c[0].pageY:a.clientY,b.list.addClass("dragging"),void 0)},b.prototype.swipeMove=function(a){var c,d,e,f,b=this;return f=a.originalEvent.touches,c=b.options.vertical===!1?-1*b.currentSlide*b.slideWidth+b.slideOffset:-1*b.currentSlide*b.listHeight-b.listHeight,!b.list.hasClass("dragging")&&"drag"===a.data.kind||f&&1!==f.length?!1:(b.touchObject.curX=void 0!==f?f[0].pageX:a.clientX,b.touchObject.curY=void 0!==f?f[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),d=b.swipeDirection(),"vertical"===d?!1:(a.originalEvent.preventDefault(),e=b.touchObject.curX>b.touchObject.startX?1:-1,b.swipeLeft=b.options.vertical===!1?c+b.touchObject.swipeLength*e:c+b.touchObject.swipeLength*(b.listHeight/b.listWidth)*e,b.options.fade===!0||b.options.touchMove===!1?!1:(b.setCSS(b.swipeLeft),void 0)))},b.prototype.swipeEnd=function(a){var b=this;if(b.list.removeClass("dragging"),0!==b.touchObject.fingerCount&&"drag"!==a.data.kind)return b.touchObject={},!1;if(b.touchObject.swipeLength>=b.touchObject.minSwipe)switch(b.swipeDirection()){case"left":b.slideHandler(b.currentSlide+b.options.slidesToScroll),b.touchObject={};break;case"right":b.slideHandler(b.currentSlide-b.options.slidesToScroll),b.touchObject={}}else b.slideHandler(b.currentSlide),b.touchObject={}},b.prototype.swipeCancel=function(){var a=this;a.list.removeClass("dragging"),a.touchObject.startX&&a.options.fade===!1&&(a.slideHandler(a.currentSlide),a.touchObject={})},b.prototype.keyHandler=function(a){var b=this;37===a.keyCode?b.changeSlide({data:{message:"previous"}}):39===a.keyCode&&b.changeSlide({data:{message:"next"}})},b.prototype.swipeHandler=function(a){var b=this;switch(b.touchObject.fingerCount=void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a);break;case"cancel":b.swipeCancel()}},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?"left":360>=d&&d>=315?"left":d>=135&&225>=d?"right":"vertical"},b.prototype.refresh=function(){var b=this;b.destroy(),a.extend(b,b.initials),b.init()},b.prototype.unload=function(){var b=this;a(".slick-cloned",b.slider).remove(),a(".slick-placeholder",b.slider).remove(),b.dots&&b.dots.remove(),b.prevArrow&&(b.prevArrow.remove(),b.nextArrow.remove()),b.slides.removeClass("slick-slide slick-active slick-visible").removeAttr("style")},b.prototype.reinit=function(){var b=this;b.slides=a(b.options.slide+":not(.slick-cloned)",b.slideTrack).addClass("slick-slide"),b.slideCount=b.slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.setProps(),b.setupPlaceholders(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.setSlideClasses(0),b.setPosition()},b.prototype.destroy=function(){var b=this;b.autoPlayClear(),b.touchObject={},a(".slick-cloned",b.slider).remove(),a(".slick-placeholder",b.slider).remove(),b.dots&&b.dots.remove(),b.prevArrow&&(b.prevArrow.remove(),b.nextArrow.remove()),b.slides.unwrap().unwrap(),b.slides.removeClass("slick-slide slick-active slick-visible").removeAttr("style"),b.slider.removeClass("slick-slider"),b.slider.removeClass("slick-initialized")},a.fn.slick=function(a){var c=this;return c.each(function(c,d){d.slick=new b(d,a)})},a.fn.slickAdd=function(a){var b=this;return b.each(function(b,c){c.slick.addSlide(a)})},a.fn.slickRemove=function(a){var b=this;return b.each(function(b,c){c.slick.removeSlide(a)})},a.fn.slickFilter=function(a){var b=this;return b.each(function(b,c){c.slick.filterSlides(a)})},a.fn.slickUnfilter=function(){var a=this;return a.each(function(a,b){b.slick.unfilterSlides()})},a.fn.slickGoTo=function(a){var b=this;return b.each(function(b,c){c.slick.slideHandler(a)})},a.fn.slickNext=function(){var a=this;return a.each(function(a,b){b.slick.changeSlide({data:{message:"next"}})})},a.fn.slickPrev=function(){var a=this;return a.each(function(a,b){b.slick.changeSlide({data:{message:"previous"}})})},a.fn.slickPause=function(){var a=this;return a.each(function(a,b){b.slick.autoPlayClear(),b.slick.paused=!0})},a.fn.slickPlay=function(){var a=this;return a.each(function(a,b){b.slick.autoPlay(),b.slick.paused=!1})},a.fn.unslick=function(){var a=this;return a.each(function(a,b){b.slick.destroy()})}});