(function(f,e,b,h){var d="glide",g={autoplay:4000,animationtime:500,arrows:true,arrowswrapperclass:"slider-arrows",arrowmainclass:"slider-arrow",arrowrightclass:"slider-arrow--right",arrowrighttext:"next",arrowleftclass:"slider-arrow--left",arrowlefttext:"prev",nav:true,navcenter:true,navclass:"slider-nav",navitemclass:"slider-nav__item",navcurrentitemclass:"slider-nav__item--current",touchdistance:60};function a(k,j){var i=this;i.options=f.extend({},g,j);i.parent=k;i.wrapper=i.parent.children();i.slides=i.wrapper.children();i.currentslide=0;i.css3support=true;i.init();i.build();i.play();if(i.options.touchdistance){i.swipe()}f(b).on("keyup",function(l){if(l.keycode===39){i.slide(1)}if(l.keycode===37){i.slide(-1)}});i.parent.add(i.arrows).add(i.nav).on("mouseover mouseout",function(l){i.pause();if(l.type==="mouseout"){i.play()}});f(e).on("resize",function(){i.init();i.slide(0)});return{current:function(){return -(i.currentslide)+1},play:function(){i.play()},pause:function(){i.pause()},next:function(l){i.slide(1,false,l)},prev:function(l){i.slide(-1,false,l)},jump:function(m,l){i.slide(m-1,true,l)},nav:function(l){if(i.navwrapper){i.navwrapper.remove()}i.options.nav=(l)?l:i.options.nav;i.navigation()},arrows:function(l){if(i.arrowswrapper){i.arrowswrapper.remove()}i.options.arrows=(l)?l:i.options.arrows;i.arrows()}}}a.prototype.build=function(){var i=this;if(i.options.arrows){i.arrows()}if(i.options.nav){i.navigation()}};a.prototype.navigation=function(){var j=this;if(j.slides.length>1){var q=j.options,n=(j.options.nav===true)?j.parent:j.options.nav;j.navwrapper=f("
",{"class":q.navclass}).appendto(n);var p=j.navwrapper,l;for(var k=0;k",{href:"#","class":q.navitemclass,"data-distance":k}).appendto(p);p[k+1]=l}var m=p.children();m.eq(0).addclass(q.navcurrentitemclass);if(q.navcenter){p.css({left:"50%",width:m.outerwidth(true)*m.length,"margin-left":-p.outerwidth(true)/2})}m.on("click touchstart",function(i){i.preventdefault();j.slide(f(this).data("distance"),true)})}};a.prototype.arrows=function(){var j=this;if(j.slides.length>1){var l=j.options,k=(j.options.arrows===true)?j.parent:j.options.arrows;j.arrowswrapper=f("",{"class":l.arrowswrapperclass}).appendto(k);var i=j.arrowswrapper;i.right=f("",{href:"#","class":l.arrowmainclass+" "+l.arrowrightclass,"data-distance":"1",html:l.arrowrighttext}).appendto(i);i.left=f("",{href:"#","class":l.arrowmainclass+" "+l.arrowleftclass,"data-distance":"-1",html:l.arrowlefttext}).appendto(i);i.children().on("click touchstart",function(m){m.preventdefault();j.slide(f(this).data("distance"),false)})}};a.prototype.slide=function(j,q,p){var o=this,l=(q)?0:o.currentslide,m=-(o.slides.length-1),n=o.options.navcurrentitemclass,i=o.slides.spread;o.pause();if(l===0&&j===-1){l=m}else{if(l===m&&j===1){l=0}else{l=l+(-j)}}var k=i*l+"px";if(o.css3support){o.wrapper.css({"-webkit-transform":"translate3d("+k+", 0px, 0px)","-moz-transform":"translate3d("+k+", 0px, 0px)","-ms-transform":"translate3d("+k+", 0px, 0px)","-o-transform":"translate3d("+k+", 0px, 0px)",transform:"translate3d("+k+", 0px, 0px)"})}else{o.wrapper.stop().animate({"margin-left":k},o.options.animationtime)}if(o.options.nav){o.navwrapper.children().eq(-l).addclass(n).siblings().removeclass(n)}o.currentslide=l;if((p!=="undefined")&&(typeof p==="function")){p()}o.play()};a.prototype.play=function(){var i=this;if(i.options.autoplay){i.auto=setinterval(function(){i.slide(1,false)},i.options.autoplay)}};a.prototype.pause=function(){if(this.options.autoplay){this.auto=clearinterval(this.auto)}};a.prototype.swipe=function(){var u=this,q,o,k,j,r,p,v,w,l,s=180/math.pi,t,i,n,m;u.parent.on("touchstart",function(x){q=x.originalevent.touches[0]||x.originalevent.changedtouches[0];k=q.pagex;j=q.pagey});u.parent.on("touchmove",function(x){q=x.originalevent.touches[0]||x.originalevent.changedtouches[0];r=q.pagex;p=q.pagey;t=r-k;i=p-j;n=math.abs(t<<2);m=math.abs(i<<2);v=math.sqrt(n+m);w=math.sqrt(m);l=math.asin(w/v);if((l*s)<32){x.preventdefault()}});u.parent.on("touchend",function(x){q=x.originalevent.touches[0]||x.originalevent.changedtouches[0];o=q.pagex-k;if(o>u.options.touchdistance){u.slide(-1)}else{if(o<-u.options.touchdistance){u.slide(1)}}})};a.prototype.init=function(){var i=this,j=i.parent.width();i.slides.spread=j;i.wrapper.width(j*i.slides.length);i.slides.width(i.slides.spread);if(!c("transition")||!c("transform")){i.css3support=false}};function c(o){var j=false,l="khtml ms o moz webkit".split(" "),n=b.createelement("div"),m=null;o=o.tolowercase();if(n.style[o]){j=true}if(j===false){m=o.charat(0).touppercase()+o.substr(1);for(var k=0;k