/* ____ _____ _____ ____ ____ __ ___ _ _ _______ __ _ _ _ | _ \ | _ || _ || _ \ | _ \ / \ / __|| |_| ||__ __| | \ | || | | | | | | || | | || | | || |_| || | | | / /\ \ / / | _ | | | | \ \| || | | | | |_| || |_| || |_| || _ / | |_| | / /__\ \ \ \__ | | | | | | _ | |\ || |_| | |____/ |_____||_____||_| \_\|____/ /_/ \_\ \___||_| |_| |_| (_)|_| \__| \___/ */ function onScroll(event){ var scrollPos = $(document).scrollTop(); $('.one-page').each(function(index, element) { var $currLink = $(this); var refElement = $currLink.attr("href"); var sdasd = $currLink.attr("href"); var offset = 0; offset = 70; refElement = refElement.substring(refElement.indexOf("#") - 1); refElement = refElement.substring(1); if(refElement.indexOf("#") !== 0){ refElement = '#'+refElement; } refElement = $(refElement); if(refElement.length > 0){ if(scrollPos >= 0){ if (refElement.position().top - offset <= scrollPos && (refElement.position().top - offset) + refElement.height() > scrollPos) { $(this).parent().find('.one-page').parent().removeClass("current-page"); $(this).parent().addClass("current-page"); }else{ $(this).parent().removeClass("current-page"); } } } }); } function GetImageExt(filename){ return (/[.]/.exec(filename)) ? /[^.]+$/.exec(filename) : undefined; } function ImageResize($this, $shortname, $parent){ var parentw; if($parent === 'parent()'){ parentw = $this.parent().innerWidth();} else{ parentw = $this.parent().parent().parent().parent().innerWidth();} var w = $this.innerWidth(); if(!w){w = 1600;} var src = $this.attr('src'); if(src){ var imgext = GetImageExt(src); imgext = imgext[0]; var numext = imgext.length; numext = numext + 5; var newsrc = src.slice(0, - numext); var numbers = [1600, 1366, 1280, 1024, 800, 640, 480, 320, 200, 100]; var closest = null; $.each(numbers, function(){ if(closest === null || this > w){closest = this;} if(this < w){return false;} }); var final = $shortname+'_'+closest+'.'+imgext; $this.attr('src', final); } } function ImageBgResize($this, $shortname, $parent){ var parentw; if($parent === 'parent()'){parentw = $this.parent().innerWidth();} else{parentw = $this.parent().parent().parent().parent().innerWidth();} var w = $this.innerWidth(); if(!w){w = 1600;} var src = $this.css('background-image'); if(src){ src = src.replace('url(',''); src = src.replace(')',''); src = src.replace('"',''); src = src.replace('"',''); var imgext = GetImageExt(src); imgext = imgext[0]; var numext = imgext.length; numext = numext + 5; var newsrc = src.slice(0, - numext); var numbers = [1600, 1366, 1280, 1024, 800, 640, 480, 320, 200, 100]; var closest = null; $.each(numbers, function(){ if(closest === null || this > w){closest = this;} if(this < w){return false;} }); var final; if(!$shortname){final = newsrc+'_'+closest+'.'+imgext;} else{final = $shortname+'_'+closest+'.'+imgext;} $this.css('background', ''); $this.css('background', "url("+final+")"); } } function SetFooter(){ $("#footer").attr('style',''); var footerh = $('#footer').innerHeight(); var bodyHeight = $('#layout').height(); bodyHeight = bodyHeight + footerh; var windowHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); if(windowHeight > bodyHeight){ $("#footer").css({"position":"absolute", "bottom": 0});} } function ForceImgAlt(){ var $image = ''; $image = $('img'); var $imagesrc = ''; var siteurl = ''; if(siteurl){ siteurl = document.location.origin; siteurl = siteurl.replace(/[&\/\\#_,+()$~%.'":*?<>{}]/g, ''); } $image.each(function() { if(!$(this).attr("alt")) { $imagesrc = $(this).attr('src').replace(/\.[^/.]+$/, '').replace(/\d/g, '').replace(/[&\/\\#_,+()$~%.'":*?<>{}]/g, '').replace(siteurl+'uploads', ''); $(this).attr('alt', $imagesrc); } }); } function FullheightContainer(){ $('.fullheightcontainer').each(function(){ var browserheight = $(window).outerHeight(); var strokepaddingtop = parseInt($(this).parents('.stroke').css('padding-top')); var strokepaddingbot = parseInt($(this).parents('.stroke').css('padding-top')); var strokepaddingtot = strokepaddingtop + strokepaddingbot; var strokinnerheight = browserheight - strokepaddingtot; $(this).parents('.stroke').css('height',browserheight); $(this).css('height','100%'); $(this).find('.row').first().css('height','100%'); $(this).find('.row-inner').first().css('height','100%'); $(this).find('.row-inner [class*="col-"]').first().css('height','100%'); if($(this).find('.mind-slider').length > 0){ //$(this).find('.mind-slider, .mind-slider .slides').css('height', strokinnerheight); } if($(this).find('.googlemaps-element').length > 0){ //$(this).find('.googlemaps-element').css('height', strokinnerheight); } }); } function EqualheightContainer(){ var windowwcheck = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); if(windowwcheck >= 480){ $('.equalheightcontainer').each(function(index, element) { var contheight = ''; var countel = $(this).find('[id*="element-"]').length; if(countel > 1){ $(this).find('[id*="element-"]').each(function(index, element) { $(this).css('height',''); if($(this).find('.googlemaps-element').length > 0){$(this).find('.googlemaps-element').css('height','');} var testone = $(this).outerHeight(); var testtwo = $(this).innerHeight(); var containerheight = $(this).innerHeight(); if(containerheight > contheight || contheight === undefined){contheight = containerheight;} }); $(this).find('[id*="element-"]').each(function(index, element) { $(this).css('height',contheight); if($(this).find('.googlemaps-element').length > 0){$(this).find('.googlemaps-element').css('height',contheight);} }); } }); }else{ $('.equalheightcontainer').each(function(index, element) { $(this).find('[id*="element-"]').each(function(index, element) { $(this).css('height',''); if($(this).find('.googlemaps-element').length > 0){$(this).find('.googlemaps-element').css('height','');} }); }); } } $(window).load(function(e){ SetFooter(); FullheightContainer(); EqualheightContainer(); ForceImgAlt(); $('img.check-resize').each(function(index, element) { if($(this).parent().hasClass('thumbnail')){ ImageResize($(this), $(this).data('shortname'), 'parent()'); }else{ ImageResize($(this), $(this).data('shortname')); } }); $('.check-bg-resize').each(function(index, element) { if($(this).parent().hasClass('thumbnail')){ ImageBgResize($(this), $(this).data('shortname'), 'parent()'); }else{ ImageBgResize($(this), $(this).data('shortname')); } }); $('img').each(function(index, element) { var attrh = $(this).attr('height'); var attrw = $(this).attr('width'); var thish = $(this).height(); var thisw = $(this).width(); if(attrh){ if(attrh === '' || attrh === 0){ if(thish !== ''){ $(this).attr('height', thish); } } }else{ if(thish !== ''){ $(this).attr('height', thish); } } if(attrw){ if(attrw === '' || attrw === 0){if(thisw !== ''){$(this).attr('width', thisw);}} }else{if(thisw !== ''){$(this).attr('width', thisw);}} }); if($('.yendifplayer').length > 0){ $('.yendifplayer').each(function(index, element){ if($(this).parents('.slide').find('.slide-elements .link-element').length > 0){ $(this).parents('.slide').find('.slide-elements .link-element').remove(); } $(this).yendifplayer({ engine: 'html5', responsive: 1, embed: 0 }); $(this).find("a").last().remove(); }); } $('.mind-slider .hasvideo').parents('.mind-slider').find('.bullets').remove(); $('.mind-slider .next, .mind-slider .prev').on('click',function(e){$(this).parent().find('.slide.active').find('video').trigger("pause");}); $(window).trigger('resize'); }); $(window).resize(function(e) { SetFooter(); FullheightContainer(); EqualheightContainer(); $('.slide, .thumbnail').each(function(index, element){ $(this).MindSetImages({ alignmenttop: 'center', alignmentleft: 'center'});}); $('img.check-resize').each(function(index, element) { if($(this).parent().hasClass('thumbnail')){ ImageResize($(this), $(this).data('shortname'), 'parent()'); }else{ ImageResize($(this), $(this).data('shortname')); } }); $('.check-bg-resize').each(function(index, element) { if($(this).parent().hasClass('thumbnail')){ ImageBgResize($(this), $(this).data('shortname'), 'parent()'); }else{ImageBgResize($(this), $(this).data('shortname')); } }); $('video').each(function(index, element) { var thisheight = $(this).parents('.slide').innerHeight(); if(!thisheight){ thisheight = $(this).parents('.stroke').innerHeight(); } var thiswidth = $(this).parents('.slide').innerWidth(); if(!thiswidth){ thiswidth = $(this).parents('.stroke').innerWidth(); } }); }); $(document).ready(function () { ForceImgAlt(); if ($('.ie-box').length > 0) { $('.ie-box').show().animate({ top: "0px"}, 1000); $('.icon-close').on('click', function(event){ $('.ie-box').show().animate({top: "-60px"}, 1000, function(event){ $(this).remove(); }); }); } $('.container').each(function(index, element) { var nopadding = $(this).data('nopadding'); var nomargin = $(this).data('nomargin'); var keepinnermargin = $(this).data('keepinnermargin'); var forcemargin = $(this).data('forcemargin'); var abovebreadcr = $(this).data('abovebreadcr'); var divcenter = ''; divcenter = $(this).data('center'); var $target; if(abovebreadcr === true){ if($('.breadcrumb').length !== 0){$(this).parent('[class*="col-"]').insertBefore($('.breadcrumb')); }else{$(this).insertBefore( $('.content_inner').find('.stroke').first() ); } } if(divcenter !== '' && divcenter !== undefined){ var towrap = ''; if(divcenter === 'dev-10'){ towrap='
'; }else if(divcenter === 'dev-8'){ towrap='
'; }else if(divcenter === 'dev-6'){ towrap='
'; }else if(divcenter === 'dev-4'){ towrap='
'; }else if(divcenter === 'dev-2'){ towrap ='
'; } if(towrap){$(this).find('.row-inner').wrapInner(towrap);} } if(nopadding === true){ $(this).addClass('p-0'); $(this).parent().addClass('p-0'); if(forcemargin !== true){$(this).find('[class*="col-"]').each(function(){$(this).addClass('p-0');});} }else{ var paddingt = $(this).data('paddingtop'); var paddingb = $(this).data('paddingbottom'); var paddingl = $(this).data('paddingleft'); var paddingr = $(this).data('paddingright'); var paddingtarget = $(this).data('paddingtarget'); if(paddingtarget === 'container'){$target = $(this);}else{$target = $(this).parent();} if(paddingt || paddingt === 0){$target.css('padding-top', paddingt);} if(paddingb || paddingb === 0){$target.css('padding-bottom', paddingb);} if(paddingl || paddingl === 0){$target.css('padding-left', paddingl);} if(paddingr || paddingr === 0){$target.css('padding-right', paddingr);} } if(nomargin === true){ $(this).addClass('m-0'); $(this).parent().addClass('m-0'); if(keepinnermargin !== true){ $(this).find('[class*="col-"]').each(function() { $(this).addClass('m-0'); }); } }else{ var margint = $(this).data('margintop'); var marginb = $(this).data('marginbottom'); var marginl = $(this).data('marginleft'); var marginr = $(this).data('marginright'); var margintarget = $(this).data('margintarget'); if(margintarget === 'container'){$target = $(this);}else{$target = $(this).parent();} if(margint || margint === 0){$target.css('margin-top', margint);} if(marginb || marginb === 0){$target.css('margin-bottom', marginb);} if(marginl || marginl === 0){$target.css('margin-left', marginl);} if(marginr || marginr === 0){$target.css('margin-right', marginr);} } }); $(document).on('click', '.mobile-icon', function(){ $(this).parents('.header-wrapper').toggleClass('is-active'); $('.content').toggleClass('pushed'); }); $(document).on('click', '.dropdown-trigger', function(){ $('.header-wrapper').toggleClass('open'); }); $('.print-page').on('click', function(){window.print(); return( false );}); var footerheight = $('#footer').outerHeight(true); var browserheight = $(window).height(); var wrapperheight = browserheight - footerheight; $('#wrapper').css('min-height', wrapperheight+'px'); $('input.temp_el_type[value="productwidget"], input.temp_el_type[value="projectwidget"], input.temp_el_type[value="image"], input.temp_el_type[value="htmlslider"]').each(function() { $(this).parent().addClass('p-0'); }); }); $(document).ready(function () { $(document).on("scroll ready", onScroll); $('a.one-page').on('click', function (e) { e.preventDefault(); $(document).off("scroll"); $('a.one-page').each(function(){$(this).removeClass('current-page');}); $(this).addClass('current-page'); var target; var menu; target = this.hash; menu = target; var $target = $(target); $('html, body').stop().animate({ 'scrollTop': $target.offset().top }, 500, 'swing', function () { window.location.hash = target; $(document).on("scroll", onScroll); }); }); }); var scrollTop = 50; var element = 'firststroke'; if(element === ''){scrollTop = 50;} else if(element === 'firststroke'){ //scrollTop = $('.stroke:first-child').innerHeight(); scrollTop = 75; } $(document).ready(function(){ if($(window).scrollTop() >= scrollTop){ $('.header-wrapper').addClass('nav-scrolled'); }else if($(window).scrollTop() < scrollTop){ $('.header-wrapper').removeClass('nav-scrolled'); } $(window).scroll(function(){ if($(window).scrollTop() >= scrollTop){ $('.header-wrapper').addClass('nav-scrolled'); }else if($(window).scrollTop() < scrollTop){ $('.header-wrapper').removeClass('nav-scrolled'); } }); }); !function(){function t(t){this.message=t}var r="undefined"!=typeof exports?exports:this,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.prototype=new Error,t.prototype.name="InvalidCharacterError",r.btoa||(r.btoa=function(r){for(var o,n,a=String(r),i=0,c=e,d="";a.charAt(0|i)||(c="=",i%1);d+=c.charAt(63&o>>8-i%1*8)){if(n=a.charCodeAt(i+=.75),n>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");o=o<<8|n}return d}),r.atob||(r.atob=function(r){var o=String(r).replace(/=+$/,"");if(o.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,a,i=0,c=0,d="";a=o.charAt(c++);~a&&(n=i%4?64*n+a:a,i++%4)?d+=String.fromCharCode(255&n>>(-2*i&6)):0)a=e.indexOf(a);return d})}();;(function(e,t,n,r){"use strict";var i=function(){var e=n.body||n.documentElement,e=e.style;if(e.WebkitTransition=="")return"-webkit-";if(e.MozTransition=="")return"-moz-";if(e.OTransition=="")return"-o-";if(e.transition=="")return"";return false},s=i()===false?false:true,o=function(e,t,n){var r={},s=i();r[s+"transform"]="translateX("+t+")";r[s+"transition"]=s+"transform "+n+"s linear";e.css(r)},u="ontouchstart"in t,a=t.navigator.pointerEnabled||t.navigator.msPointerEnabled,f=function(e){if(u)return true;if(!a||typeof e==="undefined"||typeof e.pointerType==="undefined")return false;if(typeof e.MSPOINTER_TYPE_MOUSE!=="undefined"){if(e.MSPOINTER_TYPE_MOUSE!=e.pointerType)return true}else if(e.pointerType!="mouse")return true;return false};e.fn.imageLightbox=function(r){var r=e.extend({selector:'id="imagelightbox"',allowedTypes:"png|jpg|jpeg|gif",animationSpeed:250,preloadNext:true,enableKeyboard:true,quitOnEnd:false,quitOnImgClick:false,quitOnDocClick:true,onStart:false,onEnd:false,onLoadStart:false,onLoadEnd:false},r),i=e([]),l=e(),c=e(),h=0,p=0,d=0,v=false,m=function(t){return e(t).prop("tagName").toLowerCase()=="a"&&(new RegExp(".("+r.allowedTypes+")$","i")).test(e(t).attr("href"))},g=function(){if(!c.length)return true;var n=e(t).width()*.8,r=e(t).height()*.9,i=new Image;i.src=c.attr("src");i.onload=function(){h=i.width;p=i.height;if(h>n||p>r){var s=h/p>n/r?h/n:p/r;h/=s;p/=s}c.css({width:h+"px",height:p+"px",top:(e(t).height()-p)/2+"px",left:(e(t).width()-h)/2+"px"})}},y=function(t){if(v)return false;t=typeof t==="undefined"?false:t=="left"?1:-1;if(c.length){if(t!==false&&(i.length<2||r.quitOnEnd===true&&(t===-1&&i.index(l)==0||t===1&&i.index(l)==i.length-1))){w();return false}var n={opacity:0};if(s)o(c,100*t-d+"px",r.animationSpeed/1e3);else n.left=parseInt(c.css("left"))+100*t+"px";c.animate(n,r.animationSpeed,function(){b()});d=0}v=true;if(r.onLoadStart!==false)r.onLoadStart();setTimeout(function(){c=e("").attr("src",l.attr("href")).load(function(){c.appendTo("body");g();var n={opacity:1};c.css("opacity",0);if(s){o(c,-100*t+"px",0);setTimeout(function(){o(c,0+"px",r.animationSpeed/1e3)},50)}else{var u=parseInt(c.css("left"));n.left=u+"px";c.css("left",u-100*t+"px")}c.animate(n,r.animationSpeed,function(){v=false;if(r.onLoadEnd!==false)r.onLoadEnd()});if(r.preloadNext){var a=i.eq(i.index(l)+1);if(!a.length)a=i.eq(0);e("").attr("src",a.attr("href")).load()}}).error(function(){if(r.onLoadEnd!==false)r.onLoadEnd()});var n=0,u=0,p=0;c.on(a?"pointerup MSPointerUp":"click",function(e){e.preventDefault();if(r.quitOnImgClick){w();return false}if(f(e.originalEvent))return true;var t=(e.pageX||e.originalEvent.pageX)-e.target.offsetLeft;l=i.eq(i.index(l)-(h/2>t?1:-1));if(!l.length)l=i.eq(h/2>t?i.length:0);y(h/2>t?"left":"right")}).on("touchstart pointerdown MSPointerDown",function(e){if(!f(e.originalEvent)||r.quitOnImgClick)return true;if(s)p=parseInt(c.css("left"));n=e.originalEvent.pageX||e.originalEvent.touches[0].pageX}).on("touchmove pointermove MSPointerMove",function(e){if(!f(e.originalEvent)||r.quitOnImgClick)return true;e.preventDefault();u=e.originalEvent.pageX||e.originalEvent.touches[0].pageX;d=n-u;if(s)o(c,-d+"px",0);else c.css("left",p-d+"px")}).on("touchend touchcancel pointerup pointercancel MSPointerUp MSPointerCancel",function(e){if(!f(e.originalEvent)||r.quitOnImgClick)return true;if(Math.abs(d)>50){l=i.eq(i.index(l)-(d<0?1:-1));if(!l.length)l=i.eq(d<0?i.length:0);y(d>0?"right":"left")}else{if(s)o(c,0+"px",r.animationSpeed/1e3);else c.animate({left:p+"px"},r.animationSpeed/2)}})},r.animationSpeed+100)},b=function(){if(!c.length)return false;c.remove();c=e()},w=function(){if(!c.length)return false;c.animate({opacity:0},r.animationSpeed,function(){b();v=false;if(r.onEnd!==false)r.onEnd()})};e(t).on("resize",g);if(r.quitOnDocClick){e(n).on(u?"touchend":"click",function(t){if(c.length&&!e(t.target).is(c))w()})}if(r.enableKeyboard){e(n).on("keyup",function(e){if(!c.length)return true;e.preventDefault();if(e.keyCode==27)w();if(e.keyCode==37||e.keyCode==39){l=i.eq(i.index(l)-(e.keyCode==37?1:-1));if(!l.length)l=i.eq(e.keyCode==37?i.length:0);y(e.keyCode==37?"left":"right")}})}e(n).on("click",this.selector,function(t){if(!m(this))return true;t.preventDefault();if(v)return false;v=false;if(r.onStart!==false)r.onStart();l=e(this);y()});this.each(function(){if(!m(this))return true;i=i.add(e(this))});this.switchImageLightbox=function(e){var t=i.eq(e);if(t.length){var n=i.index(l);l=t;y(e1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);(function(a){if(typeof define==="function"&&define.amd&&define.amd.jQuery){define(["jquery"],a)}else{a(jQuery)}}(function(f){var p="left",o="right",e="up",x="down",c="in",z="out",m="none",s="auto",l="swipe",t="pinch",A="tap",j="doubletap",b="longtap",y="hold",D="horizontal",u="vertical",i="all",r=10,g="start",k="move",h="end",q="cancel",a="ontouchstart" in window,v=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,d=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,B="TouchSwipe";var n={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:true,triggerOnTouchLeave:false,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"label, button, input, select, textarea, a, .noSwipe"};f.fn.swipe=function(G){var F=f(this),E=F.data(B);if(E&&typeof G==="string"){if(E[G]){return E[G].apply(this,Array.prototype.slice.call(arguments,1))}else{f.error("Method "+G+" does not exist on jQuery.swipe")}}else{if(!E&&(typeof G==="object"||!G)){return w.apply(this,arguments)}}return F};f.fn.swipe.defaults=n;f.fn.swipe.phases={PHASE_START:g,PHASE_MOVE:k,PHASE_END:h,PHASE_CANCEL:q};f.fn.swipe.directions={LEFT:p,RIGHT:o,UP:e,DOWN:x,IN:c,OUT:z};f.fn.swipe.pageScroll={NONE:m,HORIZONTAL:D,VERTICAL:u,AUTO:s};f.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:i};function w(E){if(E&&(E.allowPageScroll===undefined&&(E.swipe!==undefined||E.swipeStatus!==undefined))){E.allowPageScroll=m}if(E.click!==undefined&&E.tap===undefined){E.tap=E.click}if(!E){E={}}E=f.extend({},f.fn.swipe.defaults,E);return this.each(function(){var G=f(this);var F=G.data(B);if(!F){F=new C(this,E);G.data(B,F)}})}function C(a4,av){var az=(a||d||!av.fallbackToMouseEvents),J=az?(d?(v?"MSPointerDown":"pointerdown"):"touchstart"):"mousedown",ay=az?(d?(v?"MSPointerMove":"pointermove"):"touchmove"):"mousemove",U=az?(d?(v?"MSPointerUp":"pointerup"):"touchend"):"mouseup",S=az?null:"mouseleave",aD=(d?(v?"MSPointerCancel":"pointercancel"):"touchcancel");var ag=0,aP=null,ab=0,a1=0,aZ=0,G=1,aq=0,aJ=0,M=null;var aR=f(a4);var Z="start";var W=0;var aQ=null;var T=0,a2=0,a5=0,ad=0,N=0;var aW=null,af=null;try{aR.bind(J,aN);aR.bind(aD,a9)}catch(ak){f.error("events not supported "+J+","+aD+" on jQuery.swipe")}this.enable=function(){aR.bind(J,aN);aR.bind(aD,a9);return aR};this.disable=function(){aK();return aR};this.destroy=function(){aK();aR.data(B,null);return aR};this.option=function(bc,bb){if(av[bc]!==undefined){if(bb===undefined){return av[bc]}else{av[bc]=bb}}else{f.error("Option "+bc+" does not exist on jQuery.swipe.options")}return null};function aN(bd){if(aB()){return}if(f(bd.target).closest(av.excludedElements,aR).length>0){return}var be=bd.originalEvent?bd.originalEvent:bd;var bc,bb=a?be.touches[0]:be;Z=g;if(a){W=be.touches.length}else{bd.preventDefault()}ag=0;aP=null;aJ=null;ab=0;a1=0;aZ=0;G=1;aq=0;aQ=aj();M=aa();R();if(!a||(W===av.fingers||av.fingers===i)||aX()){ai(0,bb);T=at();if(W==2){ai(1,be.touches[1]);a1=aZ=au(aQ[0].start,aQ[1].start)}if(av.swipeStatus||av.pinchStatus){bc=O(be,Z)}}else{bc=false}if(bc===false){Z=q;O(be,Z);return bc}else{if(av.hold){af=setTimeout(f.proxy(function(){aR.trigger("hold",[be.target]);if(av.hold){bc=av.hold.call(aR,be,be.target)}},this),av.longTapThreshold)}ao(true)}return null}function a3(be){var bh=be.originalEvent?be.originalEvent:be;if(Z===h||Z===q||am()){return}var bd,bc=a?bh.touches[0]:bh;var bf=aH(bc);a2=at();if(a){W=bh.touches.length}if(av.hold){clearTimeout(af)}Z=k;if(W==2){if(a1==0){ai(1,bh.touches[1]);a1=aZ=au(aQ[0].start,aQ[1].start)}else{aH(bh.touches[1]);aZ=au(aQ[0].end,aQ[1].end);aJ=ar(aQ[0].end,aQ[1].end)}G=a7(a1,aZ);aq=Math.abs(a1-aZ)}if((W===av.fingers||av.fingers===i)||!a||aX()){aP=aL(bf.start,bf.end);al(be,aP);ag=aS(bf.start,bf.end);ab=aM();aI(aP,ag);if(av.swipeStatus||av.pinchStatus){bd=O(bh,Z)}if(!av.triggerOnTouchEnd||av.triggerOnTouchLeave){var bb=true;if(av.triggerOnTouchLeave){var bg=aY(this);bb=E(bf.end,bg)}if(!av.triggerOnTouchEnd&&bb){Z=aC(k)}else{if(av.triggerOnTouchLeave&&!bb){Z=aC(h)}}if(Z==q||Z==h){O(bh,Z)}}}else{Z=q;O(bh,Z)}if(bd===false){Z=q;O(bh,Z)}}function L(bb){var bc=bb.originalEvent;if(a){if(bc.touches.length>0){F();return true}}if(am()){W=ad}a2=at();ab=aM();if(ba()||!an()){Z=q;O(bc,Z)}else{if(av.triggerOnTouchEnd||(av.triggerOnTouchEnd==false&&Z===k)){bb.preventDefault();Z=h;O(bc,Z)}else{if(!av.triggerOnTouchEnd&&a6()){Z=h;aF(bc,Z,A)}else{if(Z===k){Z=q;O(bc,Z)}}}}ao(false);return null}function a9(){W=0;a2=0;T=0;a1=0;aZ=0;G=1;R();ao(false)}function K(bb){var bc=bb.originalEvent;if(av.triggerOnTouchLeave){Z=aC(h);O(bc,Z)}}function aK(){aR.unbind(J,aN);aR.unbind(aD,a9);aR.unbind(ay,a3);aR.unbind(U,L);if(S){aR.unbind(S,K)}ao(false)}function aC(bf){var be=bf;var bd=aA();var bc=an();var bb=ba();if(!bd||bb){be=q}else{if(bc&&bf==k&&(!av.triggerOnTouchEnd||av.triggerOnTouchLeave)){be=h}else{if(!bc&&bf==h&&av.triggerOnTouchLeave){be=q}}}return be}function O(bd,bb){var bc=undefined;if(I()||V()){bc=aF(bd,bb,l)}else{if((P()||aX())&&bc!==false){bc=aF(bd,bb,t)}}if(aG()&&bc!==false){bc=aF(bd,bb,j)}else{if(ap()&&bc!==false){bc=aF(bd,bb,b)}else{if(ah()&&bc!==false){bc=aF(bd,bb,A)}}}if(bb===q){a9(bd)}if(bb===h){if(a){if(bd.touches.length==0){a9(bd)}}else{a9(bd)}}return bc}function aF(be,bb,bd){var bc=undefined;if(bd==l){aR.trigger("swipeStatus",[bb,aP||null,ag||0,ab||0,W,aQ]);if(av.swipeStatus){bc=av.swipeStatus.call(aR,be,bb,aP||null,ag||0,ab||0,W,aQ);if(bc===false){return false}}if(bb==h&&aV()){aR.trigger("swipe",[aP,ag,ab,W,aQ]);if(av.swipe){bc=av.swipe.call(aR,be,aP,ag,ab,W,aQ);if(bc===false){return false}}switch(aP){case p:aR.trigger("swipeLeft",[aP,ag,ab,W,aQ]);if(av.swipeLeft){bc=av.swipeLeft.call(aR,be,aP,ag,ab,W,aQ)}break;case o:aR.trigger("swipeRight",[aP,ag,ab,W,aQ]);if(av.swipeRight){bc=av.swipeRight.call(aR,be,aP,ag,ab,W,aQ)}break;case e:aR.trigger("swipeUp",[aP,ag,ab,W,aQ]);if(av.swipeUp){bc=av.swipeUp.call(aR,be,aP,ag,ab,W,aQ)}break;case x:aR.trigger("swipeDown",[aP,ag,ab,W,aQ]);if(av.swipeDown){bc=av.swipeDown.call(aR,be,aP,ag,ab,W,aQ)}break}}}if(bd==t){aR.trigger("pinchStatus",[bb,aJ||null,aq||0,ab||0,W,G,aQ]);if(av.pinchStatus){bc=av.pinchStatus.call(aR,be,bb,aJ||null,aq||0,ab||0,W,G,aQ);if(bc===false){return false}}if(bb==h&&a8()){switch(aJ){case c:aR.trigger("pinchIn",[aJ||null,aq||0,ab||0,W,G,aQ]);if(av.pinchIn){bc=av.pinchIn.call(aR,be,aJ||null,aq||0,ab||0,W,G,aQ)}break;case z:aR.trigger("pinchOut",[aJ||null,aq||0,ab||0,W,G,aQ]);if(av.pinchOut){bc=av.pinchOut.call(aR,be,aJ||null,aq||0,ab||0,W,G,aQ)}break}}}if(bd==A){if(bb===q||bb===h){clearTimeout(aW);clearTimeout(af);if(Y()&&!H()){N=at();aW=setTimeout(f.proxy(function(){N=null;aR.trigger("tap",[be.target]);if(av.tap){bc=av.tap.call(aR,be,be.target)}},this),av.doubleTapThreshold)}else{N=null;aR.trigger("tap",[be.target]);if(av.tap){bc=av.tap.call(aR,be,be.target)}}}}else{if(bd==j){if(bb===q||bb===h){clearTimeout(aW);N=null;aR.trigger("doubletap",[be.target]);if(av.doubleTap){bc=av.doubleTap.call(aR,be,be.target)}}}else{if(bd==b){if(bb===q||bb===h){clearTimeout(aW);N=null;aR.trigger("longtap",[be.target]);if(av.longTap){bc=av.longTap.call(aR,be,be.target)}}}}}return bc}function an(){var bb=true;if(av.threshold!==null){bb=ag>=av.threshold}return bb}function ba(){var bb=false;if(av.cancelThreshold!==null&&aP!==null){bb=(aT(aP)-ag)>=av.cancelThreshold}return bb}function ae(){if(av.pinchThreshold!==null){return aq>=av.pinchThreshold}return true}function aA(){var bb;if(av.maxTimeThreshold){if(ab>=av.maxTimeThreshold){bb=false}else{bb=true}}else{bb=true}return bb}function al(bb,bc){if(av.allowPageScroll===m||aX()){bb.preventDefault()}else{var bd=av.allowPageScroll===s;switch(bc){case p:if((av.swipeLeft&&bd)||(!bd&&av.allowPageScroll!=D)){bb.preventDefault()}break;case o:if((av.swipeRight&&bd)||(!bd&&av.allowPageScroll!=D)){bb.preventDefault()}break;case e:if((av.swipeUp&&bd)||(!bd&&av.allowPageScroll!=u)){bb.preventDefault()}break;case x:if((av.swipeDown&&bd)||(!bd&&av.allowPageScroll!=u)){bb.preventDefault()}break}}}function a8(){var bc=aO();var bb=X();var bd=ae();return bc&&bb&&bd}function aX(){return !!(av.pinchStatus||av.pinchIn||av.pinchOut)}function P(){return !!(a8()&&aX())}function aV(){var be=aA();var bg=an();var bd=aO();var bb=X();var bc=ba();var bf=!bc&&bb&&bd&&bg&&be;return bf}function V(){return !!(av.swipe||av.swipeStatus||av.swipeLeft||av.swipeRight||av.swipeUp||av.swipeDown)}function I(){return !!(aV()&&V())}function aO(){return((W===av.fingers||av.fingers===i)||!a)}function X(){return aQ[0].end.x!==0}function a6(){return !!(av.tap)}function Y(){return !!(av.doubleTap)}function aU(){return !!(av.longTap)}function Q(){if(N==null){return false}var bb=at();return(Y()&&((bb-N)<=av.doubleTapThreshold))}function H(){return Q()}function ax(){return((W===1||!a)&&(isNaN(ag)||agav.longTapThreshold)&&(ag=0)){return p}else{if((bd<=360)&&(bd>=315)){return p}else{if((bd>=135)&&(bd<=225)){return o}else{if((bd>45)&&(bd<135)){return x}else{return e}}}}}function at(){var bb=new Date();return bb.getTime()}function aY(bb){bb=f(bb);var bd=bb.offset();var bc={left:bd.left,right:bd.left+bb.outerWidth(),top:bd.top,bottom:bd.top+bb.outerHeight()};return bc}function E(bb,bc){return(bb.x>bc.left&&bb.xbc.top&&bb.ya;a++){var c=this[a],h=t.data(c,e);if(h)if(t.isFunction(h[o])&&"_"!==o.charAt(0)){var p=h[o].apply(h,s);if(void 0!==p)return p}else r("no such method '"+o+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; attempted to call '"+o+"'")}return this}return this.each(function(){var n=t.data(this,e);n?(n.option(o),n._init()):(n=new i(this,o),t.data(this,e,n))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){i(e),o(t,e)},t.bridget}}var n=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],i):i("object"==typeof exports?require("jquery"):t.jQuery)}(window),function(t){function e(t){return new RegExp("(^|\\s+)"+t+"(\\s+|$)")}function i(t,e){var i=n(t,e)?r:o;i(t,e)}var n,o,r;"classList"in document.documentElement?(n=function(t,e){return t.classList.contains(e)},o=function(t,e){t.classList.add(e)},r=function(t,e){t.classList.remove(e)}):(n=function(t,i){return e(i).test(t.className)},o=function(t,e){n(t,e)||(t.className=t.className+" "+e)},r=function(t,i){t.className=t.className.replace(e(i)," ")});var s={hasClass:n,addClass:o,removeClass:r,toggleClass:i,has:n,add:o,remove:r,toggle:i};"function"==typeof define&&define.amd?define("classie/classie",s):"object"==typeof exports?module.exports=s:t.classie=s}(window),function(){function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var n=t.prototype,o=this,r=o.EventEmitter;n.getListeners=function(t){var e,i,n=this._getEvents();if(t instanceof RegExp){e={};for(i in n)n.hasOwnProperty(i)&&t.test(i)&&(e[i]=n[i])}else e=n[t]||(n[t]=[]);return e},n.flattenListeners=function(t){var e,i=[];for(e=0;eo;o++)if(e=i[o]+t,"string"==typeof n[e])return e}}var i="Webkit Moz ms Ms O".split(" "),n=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t){function e(t){var e=parseFloat(t),i=-1===t.indexOf("%")&&!isNaN(e);return i&&e}function i(){}function n(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=s.length;i>e;e++){var n=s[e];t[n]=0}return t}function o(i){function o(){if(!d){d=!0;var n=t.getComputedStyle;if(c=function(){var t=n?function(t){return n(t,null)}:function(t){return t.currentStyle};return function(e){var i=t(e);return i||r("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),i}}(),h=i("boxSizing")){var o=document.createElement("div");o.style.width="200px",o.style.padding="1px 2px 3px 4px",o.style.borderStyle="solid",o.style.borderWidth="1px 2px 3px 4px",o.style[h]="border-box";var s=document.body||document.documentElement;s.appendChild(o);var a=c(o);p=200===e(a.width),s.removeChild(o)}}}function a(t){if(o(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var i=c(t);if("none"===i.display)return n();var r={};r.width=t.offsetWidth,r.height=t.offsetHeight;for(var a=r.isBorderBox=!(!h||!i[h]||"border-box"!==i[h]),d=0,u=s.length;u>d;d++){var f=s[d],v=i[f];v=l(t,v);var y=parseFloat(v);r[f]=isNaN(y)?0:y}var g=r.paddingLeft+r.paddingRight,m=r.paddingTop+r.paddingBottom,b=r.marginLeft+r.marginRight,S=r.marginTop+r.marginBottom,x=r.borderLeftWidth+r.borderRightWidth,w=r.borderTopWidth+r.borderBottomWidth,C=a&&p,E=e(i.width);E!==!1&&(r.width=E+(C?0:g+x));var P=e(i.height);return P!==!1&&(r.height=P+(C?0:m+w)),r.innerWidth=r.width-(g+x),r.innerHeight=r.height-(m+w),r.outerWidth=r.width+b,r.outerHeight=r.height+S,r}}function l(e,i){if(t.getComputedStyle||-1===i.indexOf("%"))return i;var n=e.style,o=n.left,r=e.runtimeStyle,s=r&&r.left;return s&&(r.left=e.currentStyle.left),n.left=i,i=n.pixelLeft,n.left=o,s&&(r.left=s),i}var c,h,p,d=!1;return a}var r="undefined"==typeof console?i:function(t){console.error(t)},s=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],o):"object"==typeof exports?module.exports=o(require("desandro-get-style-property")):t.getSize=o(t.getStyleProperty)}(window),function(t){function e(t){"function"==typeof t&&(e.isReady?t():s.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==r.readyState;e.isReady||i||n()}function n(){e.isReady=!0;for(var t=0,i=s.length;i>t;t++){var n=s[t];n()}}function o(o){return"complete"===r.readyState?n():(o.bind(r,"DOMContentLoaded",i),o.bind(r,"readystatechange",i),o.bind(t,"load",i)),e}var r=t.document,s=[];e.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],o):"object"==typeof exports?module.exports=o(require("eventie")):t.docReady=o(t.eventie)}(window),function(t){function e(t,e){return t[s](e)}function i(t){if(!t.parentNode){var e=document.createDocumentFragment();e.appendChild(t)}}function n(t,e){i(t);for(var n=t.parentNode.querySelectorAll(e),o=0,r=n.length;r>o;o++)if(n[o]===t)return!0;return!1}function o(t,n){return i(t),e(t,n)}var r,s=function(){if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0,n=e.length;n>i;i++){var o=e[i],r=o+"MatchesSelector";if(t[r])return r}}();if(s){var a=document.createElement("div"),l=e(a,"div");r=l?e:o}else r=n;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return r}):"object"==typeof exports?module.exports=r:window.matchesSelector=r}(Element.prototype),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(i,n){return e(t,i,n)}):"object"==typeof exports?module.exports=e(t,require("doc-ready"),require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.docReady,t.matchesSelector)}(window,function(t,e,i){var n={};n.extend=function(t,e){for(var i in e)t[i]=e[i];return t},n.modulo=function(t,e){return(t%e+e)%e};var o=Object.prototype.toString;n.isArray=function(t){return"[object Array]"==o.call(t)},n.makeArray=function(t){var e=[];if(n.isArray(t))e=t;else if(t&&"number"==typeof t.length)for(var i=0,o=t.length;o>i;i++)e.push(t[i]);else e.push(t);return e},n.indexOf=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i;return-1},n.removeFrom=function(t,e){var i=n.indexOf(t,e);-1!=i&&t.splice(i,1)},n.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1==t.nodeType&&"string"==typeof t.nodeName},n.setText=function(){function t(t,i){e=e||(void 0!==document.documentElement.textContent?"textContent":"innerText"),t[e]=i}var e;return t}(),n.getParent=function(t,e){for(;t!=document.body;)if(t=t.parentNode,i(t,e))return t},n.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.filterFindElements=function(t,e){t=n.makeArray(t);for(var o=[],r=0,s=t.length;s>r;r++){var a=t[r];if(n.isElement(a))if(e){i(a,e)&&o.push(a);for(var l=a.querySelectorAll(e),c=0,h=l.length;h>c;c++)o.push(l[c])}else o.push(a)}return o},n.debounceMethod=function(t,e,i){var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];t&&clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i||100)}},n.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var r=t.console;return n.htmlInit=function(i,o){e(function(){for(var e=n.toDashed(o),s=document.querySelectorAll(".js-"+e),a="data-"+e+"-options",l=0,c=s.length;c>l;l++){var h,p=s[l],d=p.getAttribute(a);try{h=d&&JSON.parse(d)}catch(u){r&&r.error("Error parsing "+a+" on "+p.nodeName.toLowerCase()+(p.id?"#"+p.id:"")+": "+u);continue}var f=new i(p,h),v=t.jQuery;v&&v.data(p,o,f)}})},n}),function(t,e){"function"==typeof define&&define.amd?define("flickity/js/cell",["get-size/get-size"],function(i){return e(t,i)}):"object"==typeof exports?module.exports=e(t,require("get-size")):(t.Flickity=t.Flickity||{},t.Flickity.Cell=e(t,t.getSize))}(window,function(t,e){function i(t,e){this.element=t,this.parent=e,this.create()}var n="attachEvent"in t;return i.prototype.create=function(){this.element.style.position="absolute",n&&this.element.setAttribute("unselectable","on"),this.x=0,this.shift=0},i.prototype.destroy=function(){this.element.style.position="";var t=this.parent.originSide;this.element.style[t]=""},i.prototype.getSize=function(){this.size=e(this.element)},i.prototype.setPosition=function(t){this.x=t,this.setDefaultTarget(),this.renderPosition(t)},i.prototype.setDefaultTarget=function(){var t="left"==this.parent.originSide?"marginLeft":"marginRight";this.target=this.x+this.size[t]+this.size.width*this.parent.cellAlign},i.prototype.renderPosition=function(t){var e=this.parent.originSide;this.element.style[e]=this.parent.getPositionValue(t)},i.prototype.wrapShift=function(t){this.shift=t,this.renderPosition(this.x+this.parent.slideableWidth*t)},i.prototype.remove=function(){this.element.parentNode.removeChild(this.element)},i}),function(t,e){"function"==typeof define&&define.amd?define("flickity/js/animate",["get-style-property/get-style-property","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof exports?module.exports=e(t,require("desandro-get-style-property"),require("fizzy-ui-utils")):(t.Flickity=t.Flickity||{},t.Flickity.animatePrototype=e(t,t.getStyleProperty,t.fizzyUIUtils))}(window,function(t,e,i){for(var n,o=0,r="webkit moz ms o".split(" "),s=t.requestAnimationFrame,a=t.cancelAnimationFrame,l=0;l1&&(t=i.modulo(t,this.slideableWidth),t-=this.slideableWidth,this.shiftWrapCells(t)),t+=this.cursorPosition,t=this.options.rightToLeft&&h?-t:t;var e=this.getPositionValue(t);h?this.slider.style[h]=p&&this.isAnimating?"translate3d("+e+",0,0)":"translateX("+e+")":this.slider.style[this.originSide]=e},c.positionSliderAtSelected=function(){if(this.cells.length){var t=this.cells[this.selectedIndex];this.x=-t.target,this.positionSlider()}},c.getPositionValue=function(t){return this.options.percentPosition?.01*Math.round(t/this.size.innerWidth*1e4)+"%":Math.round(t)+"px"},c.settle=function(t){this.isPointerDown||Math.round(100*this.x)!=Math.round(100*t)||this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,p&&this.positionSlider(),this.dispatchEvent("settle"))},c.shiftWrapCells=function(t){var e=this.cursorPosition+t;this._shiftCells(this.beforeShiftCells,e,-1);var i=this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,i,1)},c._shiftCells=function(t,e,i){for(var n=0,o=t.length;o>n;n++){var r=t[n],s=e>0?i:0;r.wrapShift(s),e-=r.size.outerWidth}},c._unshiftCells=function(t){if(t&&t.length)for(var e=0,i=t.length;i>e;e++)t[e].wrapShift(0)},c.integratePhysics=function(){this.velocity+=this.accel,this.x+=this.velocity,this.velocity*=this.getFrictionFactor(),this.accel=0},c.applyForce=function(t){this.accel+=t},c.getFrictionFactor=function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]},c.getRestingPosition=function(){return this.x+this.velocity/(1-this.getFrictionFactor())},c.applyDragForce=function(){if(this.isPointerDown){var t=this.dragX-this.x,e=t-this.velocity;this.applyForce(e)}},c.applySelectedAttraction=function(){var t=this.cells.length;if(!this.isPointerDown&&!this.isFreeScrolling&&t){var e=this.cells[this.selectedIndex],i=this.options.wrapAround&&t>1?this.slideableWidth*Math.floor(this.selectedIndex/t):0,n=-1*(e.target+i)-this.x,o=n*this.options.selectedAttraction;this.applyForce(o)}},c}),function(t,e){if("function"==typeof define&&define.amd)define("flickity/js/flickity",["classie/classie","eventEmitter/EventEmitter","eventie/eventie","get-size/get-size","fizzy-ui-utils/utils","./cell","./animate"],function(i,n,o,r,s,a,l){return e(t,i,n,o,r,s,a,l)});else if("object"==typeof exports)module.exports=e(t,require("desandro-classie"),require("wolfy87-eventemitter"),require("eventie"),require("get-size"),require("fizzy-ui-utils"),require("./cell"),require("./animate"));else{var i=t.Flickity;t.Flickity=e(t,t.classie,t.EventEmitter,t.eventie,t.getSize,t.fizzyUIUtils,i.Cell,i.animatePrototype)}}(window,function(t,e,i,n,o,r,s,a){function l(t,e){for(t=r.makeArray(t);t.length;)e.appendChild(t.shift())}function c(t,e){var i=r.getQueryElement(t);return i?(this.element=i,h&&(this.$element=h(this.element)),this.options=r.extend({},this.constructor.defaults),this.option(e),void this._create()):void(d&&d.error("Bad element for Flickity: "+(i||t)))}var h=t.jQuery,p=t.getComputedStyle,d=t.console,u=0,f={};c.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},c.createMethods=[],r.extend(c.prototype,i.prototype),c.prototype._create=function(){var e=this.guid=++u;this.element.flickityGUID=e,f[e]=this,this.selectedIndex=this.options.initialIndex||0,this.restingFrames=0,this.x=0,this.velocity=0,this.accel=0,this.originSide=this.options.rightToLeft?"right":"left",this.viewport=document.createElement("div"),this.viewport.className="flickity-viewport",c.setUnselectable(this.viewport),this._createSlider(),(this.options.resize||this.options.watchCSS)&&(n.bind(t,"resize",this),this.isResizeBound=!0);for(var i=0,o=c.createMethods.length;o>i;i++){var r=c.createMethods[i];this[r]()}this.options.watchCSS?this.watchCSS():this.activate()},c.prototype.option=function(t){r.extend(this.options,t)},c.prototype.activate=function(){if(!this.isActive){this.isActive=!0,e.add(this.element,"flickity-enabled"),this.options.rightToLeft&&e.add(this.element,"flickity-rtl"),this.getSize();var t=this._filterFindCellElements(this.element.children);l(t,this.slider),this.viewport.appendChild(this.slider),this.element.appendChild(this.viewport),this.reloadCells(),this.options.accessibility&&(this.element.tabIndex=0,n.bind(this.element,"keydown",this)),this.emit("activate"),this.positionSliderAtSelected(),this.select(this.selectedIndex)}},c.prototype._createSlider=function(){var t=document.createElement("div");t.className="flickity-slider",t.style[this.originSide]=0,this.slider=t},c.prototype._filterFindCellElements=function(t){return r.filterFindElements(t,this.options.cellSelector)},c.prototype.reloadCells=function(){this.cells=this._makeCells(this.slider.children),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize()},c.prototype._makeCells=function(t){for(var e=this._filterFindCellElements(t),i=[],n=0,o=e.length;o>n;n++){var r=e[n],a=new s(r,this);i.push(a)}return i},c.prototype.getLastCell=function(){return this.cells[this.cells.length-1]},c.prototype.positionCells=function(){this._sizeCells(this.cells),this._positionCells(0)},c.prototype._positionCells=function(t){t=t||0,this.maxCellHeight=t?this.maxCellHeight||0:0;var e=0;if(t>0){var i=this.cells[t-1];e=i.x+i.size.outerWidth}for(var n,o=this.cells.length,r=t;o>r;r++)n=this.cells[r],n.setPosition(e),e+=n.size.outerWidth,this.maxCellHeight=Math.max(n.size.outerHeight,this.maxCellHeight);this.slideableWidth=e,this._containCells()},c.prototype._sizeCells=function(t){for(var e=0,i=t.length;i>e;e++){var n=t[e];n.getSize()}},c.prototype._init=c.prototype.reposition=function(){this.positionCells(),this.positionSliderAtSelected()},c.prototype.getSize=function(){this.size=o(this.element),this.setCellAlign(),this.cursorPosition=this.size.innerWidth*this.cellAlign};var v={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};c.prototype.setCellAlign=function(){var t=v[this.options.cellAlign];this.cellAlign=t?t[this.originSide]:this.options.cellAlign},c.prototype.setGallerySize=function(){this.options.setGallerySize&&(this.viewport.style.height=this.maxCellHeight+"px")},c.prototype._getWrapShiftCells=function(){if(this.options.wrapAround){this._unshiftCells(this.beforeShiftCells),this._unshiftCells(this.afterShiftCells);var t=this.cursorPosition,e=this.cells.length-1;this.beforeShiftCells=this._getGapCells(t,e,-1),t=this.size.innerWidth-this.cursorPosition,this.afterShiftCells=this._getGapCells(t,0,1)}},c.prototype._getGapCells=function(t,e,i){for(var n=[];t>0;){var o=this.cells[e];if(!o)break;n.push(o),e+=i,t-=o.size.outerWidth}return n},c.prototype._containCells=function(){if(this.options.contain&&!this.options.wrapAround&&this.cells.length)for(var t=this.options.rightToLeft?"marginRight":"marginLeft",e=this.options.rightToLeft?"marginLeft":"marginRight",i=this.cells[0].size[t],n=this.getLastCell(),o=this.slideableWidth-n.size[e],r=o-this.size.innerWidth*(1-this.cellAlign),s=oa;a++){var c=this.cells[a];c.setDefaultTarget(),s?c.target=o*this.cellAlign:(c.target=Math.max(c.target,this.cursorPosition+i),c.target=Math.min(c.target,r))}},c.prototype.dispatchEvent=function(t,e,i){var n=[e].concat(i);if(this.emitEvent(t,n),h&&this.$element)if(e){var o=h.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},c.prototype.select=function(t,e){if(this.isActive){var i=this.cells.length;this.options.wrapAround&&i>1&&(0>t?this.x-=this.slideableWidth:t>=i&&(this.x+=this.slideableWidth)),(this.options.wrapAround||e)&&(t=r.modulo(t,i)),this.cells[t]&&(this.selectedIndex=t,this.setSelectedCell(),this.startAnimation(),this.dispatchEvent("cellSelect"))}},c.prototype.previous=function(t){this.select(this.selectedIndex-1,t)},c.prototype.next=function(t){this.select(this.selectedIndex+1,t)},c.prototype.setSelectedCell=function(){this._removeSelectedCellClass(),this.selectedCell=this.cells[this.selectedIndex],this.selectedElement=this.selectedCell.element,e.add(this.selectedElement,"is-selected")},c.prototype._removeSelectedCellClass=function(){this.selectedCell&&e.remove(this.selectedCell.element,"is-selected")},c.prototype.getCell=function(t){for(var e=0,i=this.cells.length;i>e;e++){var n=this.cells[e];if(n.element==t)return n}},c.prototype.getCells=function(t){t=r.makeArray(t);for(var e=[],i=0,n=t.length;n>i;i++){var o=t[i],s=this.getCell(o);s&&e.push(s)}return e},c.prototype.getCellElements=function(){for(var t=[],e=0,i=this.cells.length;i>e;e++)t.push(this.cells[e].element);return t},c.prototype.getParentCell=function(t){var e=this.getCell(t);return e?e:(t=r.getParent(t,".flickity-slider > *"),this.getCell(t))},c.prototype.getAdjacentCellElements=function(t,e){if(!t)return[this.selectedElement];e=void 0===e?this.selectedIndex:e;var i=this.cells.length;if(1+2*t>=i)return this.getCellElements();for(var n=[],o=e-t;e+t>=o;o++){var s=this.options.wrapAround?r.modulo(o,i):o,a=this.cells[s];a&&n.push(a.element)}return n},c.prototype.uiChange=function(){this.emit("uiChange")},c.prototype.childUIPointerDown=function(t){this.emitEvent("childUIPointerDown",[t])},c.prototype.onresize=function(){this.watchCSS(),this.resize()},r.debounceMethod(c,"onresize",150),c.prototype.resize=function(){this.isActive&&(this.getSize(),this.options.wrapAround&&(this.x=r.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.positionSliderAtSelected())};var y=c.supportsConditionalCSS=function(){var t;return function(){if(void 0!==t)return t;if(!p)return void(t=!1);var e=document.createElement("style"),i=document.createTextNode('body:after { content: "foo"; display: none; }');e.appendChild(i),document.head.appendChild(e);var n=p(document.body,":after").content;return t=-1!=n.indexOf("foo"),document.head.removeChild(e),t}}();c.prototype.watchCSS=function(){var t=this.options.watchCSS;if(t){var e=y();if(!e){var i="fallbackOn"==t?"activate":"deactivate";return void this[i]()}var n=p(this.element,":after").content;-1!=n.indexOf("flickity")?this.activate():this.deactivate()}},c.prototype.onkeydown=function(t){if(this.options.accessibility&&(!document.activeElement||document.activeElement==this.element))if(37==t.keyCode){var e=this.options.rightToLeft?"next":"previous";this.uiChange(),this[e]()}else if(39==t.keyCode){var i=this.options.rightToLeft?"previous":"next";this.uiChange(),this[i]()}},c.prototype.deactivate=function(){if(this.isActive){e.remove(this.element,"flickity-enabled"),e.remove(this.element,"flickity-rtl");for(var t=0,i=this.cells.length;i>t;t++){var o=this.cells[t];o.destroy()}this._removeSelectedCellClass(),this.element.removeChild(this.viewport),l(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),n.unbind(this.element,"keydown",this)),this.isActive=!1,this.emit("deactivate")}},c.prototype.destroy=function(){this.deactivate(),this.isResizeBound&&n.unbind(t,"resize",this),this.emit("destroy"),h&&this.$element&&h.removeData(this.element,"flickity"),delete this.element.flickityGUID,delete f[this.guid]},r.extend(c.prototype,a);var g="attachEvent"in t;return c.setUnselectable=function(t){g&&t.setAttribute("unselectable","on")},c.data=function(t){t=r.getQueryElement(t);var e=t&&t.flickityGUID;return e&&f[e]},r.htmlInit(c,"flickity"),h&&h.bridget&&h.bridget("flickity",c),c.Cell=s,c}),function(t,e){"function"==typeof define&&define.amd?define("unipointer/unipointer",["eventEmitter/EventEmitter","eventie/eventie"],function(i,n){return e(t,i,n)}):"object"==typeof exports?module.exports=e(t,require("wolfy87-eventemitter"),require("eventie")):t.Unipointer=e(t,t.EventEmitter,t.eventie)}(window,function(t,e,i){function n(){}function o(){}o.prototype=new e,o.prototype.bindStartEvent=function(t){this._bindStartEvent(t,!0)},o.prototype.unbindStartEvent=function(t){this._bindStartEvent(t,!1)},o.prototype._bindStartEvent=function(e,n){n=void 0===n?!0:!!n;var o=n?"bind":"unbind";t.navigator.pointerEnabled?i[o](e,"pointerdown",this):t.navigator.msPointerEnabled?i[o](e,"MSPointerDown",this):(i[o](e,"mousedown",this),i[o](e,"touchstart",this))},o.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},o.prototype.getTouch=function(t){for(var e=0,i=t.length;i>e;e++){var n=t[e];if(n.identifier==this.pointerIdentifier)return n}},o.prototype.onmousedown=function(t){var e=t.button;e&&0!==e&&1!==e||this._pointerDown(t,t)},o.prototype.ontouchstart=function(t){this._pointerDown(t,t.changedTouches[0])},o.prototype.onMSPointerDown=o.prototype.onpointerdown=function(t){this._pointerDown(t,t)},o.prototype._pointerDown=function(t,e){this.isPointerDown||(this.isPointerDown=!0,this.pointerIdentifier=void 0!==e.pointerId?e.pointerId:e.identifier,this.pointerDown(t,e))},o.prototype.pointerDown=function(t,e){this._bindPostStartEvents(t),this.emitEvent("pointerDown",[t,e])};var r={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"],MSPointerDown:["MSPointerMove","MSPointerUp","MSPointerCancel"]};return o.prototype._bindPostStartEvents=function(e){if(e){for(var n=r[e.type],o=e.preventDefault?t:document,s=0,a=n.length;a>s;s++){var l=n[s];i.bind(o,l,this)}this._boundPointerEvents={events:n,node:o}}},o.prototype._unbindPostStartEvents=function(){var t=this._boundPointerEvents;if(t&&t.events){for(var e=0,n=t.events.length;n>e;e++){var o=t.events[e];i.unbind(t.node,o,this)}delete this._boundPointerEvents}},o.prototype.onmousemove=function(t){this._pointerMove(t,t)},o.prototype.onMSPointerMove=o.prototype.onpointermove=function(t){t.pointerId==this.pointerIdentifier&&this._pointerMove(t,t)},o.prototype.ontouchmove=function(t){var e=this.getTouch(t.changedTouches);e&&this._pointerMove(t,e)},o.prototype._pointerMove=function(t,e){this.pointerMove(t,e)},o.prototype.pointerMove=function(t,e){this.emitEvent("pointerMove",[t,e])},o.prototype.onmouseup=function(t){this._pointerUp(t,t)},o.prototype.onMSPointerUp=o.prototype.onpointerup=function(t){t.pointerId==this.pointerIdentifier&&this._pointerUp(t,t)},o.prototype.ontouchend=function(t){var e=this.getTouch(t.changedTouches);e&&this._pointerUp(t,e)},o.prototype._pointerUp=function(t,e){this._pointerDone(),this.pointerUp(t,e)},o.prototype.pointerUp=function(t,e){this.emitEvent("pointerUp",[t,e])},o.prototype._pointerDone=function(){this.isPointerDown=!1,delete this.pointerIdentifier,this._unbindPostStartEvents(),this.pointerDone()},o.prototype.pointerDone=n,o.prototype.onMSPointerCancel=o.prototype.onpointercancel=function(t){t.pointerId==this.pointerIdentifier&&this._pointerCancel(t,t)},o.prototype.ontouchcancel=function(t){var e=this.getTouch(t.changedTouches);e&&this._pointerCancel(t,e)},o.prototype._pointerCancel=function(t,e){this._pointerDone(),this.pointerCancel(t,e)},o.prototype.pointerCancel=function(t,e){this.emitEvent("pointerCancel",[t,e])},o.getPointerPoint=function(t){return{x:void 0!==t.pageX?t.pageX:t.clientX,y:void 0!==t.pageY?t.pageY:t.clientY}},o}),function(t,e){"function"==typeof define&&define.amd?define("unidragger/unidragger",["eventie/eventie","unipointer/unipointer"],function(i,n){return e(t,i,n)}):"object"==typeof exports?module.exports=e(t,require("eventie"),require("unipointer")):t.Unidragger=e(t,t.eventie,t.Unipointer)}(window,function(t,e,i){function n(){}function o(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function r(){}function s(){return!1}r.prototype=new i,r.prototype.bindHandles=function(){this._bindHandles(!0)},r.prototype.unbindHandles=function(){this._bindHandles(!1)};var a=t.navigator;r.prototype._bindHandles=function(t){t=void 0===t?!0:!!t;var i;i=a.pointerEnabled?function(e){e.style.touchAction=t?"none":""}:a.msPointerEnabled?function(e){e.style.msTouchAction=t?"none":""}:function(){t&&c(s)};for(var n=t?"bind":"unbind",o=0,r=this.handles.length;r>o;o++){var s=this.handles[o];this._bindStartEvent(s,t),i(s),e[n](s,"click",this)}};var l="attachEvent"in document.documentElement,c=l?function(t){"IMG"==t.nodeName&&(t.ondragstart=s);for(var e=t.querySelectorAll("img"),i=0,n=e.length;n>i;i++){var o=e[i];o.ondragstart=s}}:n;r.prototype.pointerDown=function(i,n){if("INPUT"==i.target.nodeName&&"range"==i.target.type)return this.isPointerDown=!1,void delete this.pointerIdentifier;this._dragPointerDown(i,n);var o=document.activeElement;o&&o.blur&&o.blur(),this._bindPostStartEvents(i),this.pointerDownScroll=r.getScrollPosition(),e.bind(t,"scroll",this),this.emitEvent("pointerDown",[i,n])},r.prototype._dragPointerDown=function(t,e){this.pointerDownPoint=i.getPointerPoint(e);var n="touchstart"==t.type,r=t.target.nodeName;n||"SELECT"==r||o(t)},r.prototype.pointerMove=function(t,e){var i=this._dragPointerMove(t,e);this.emitEvent("pointerMove",[t,e,i]),this._dragMove(t,e,i)},r.prototype._dragPointerMove=function(t,e){var n=i.getPointerPoint(e),o={x:n.x-this.pointerDownPoint.x,y:n.y-this.pointerDownPoint.y};return!this.isDragging&&this.hasDragStarted(o)&&this._dragStart(t,e),o},r.prototype.hasDragStarted=function(t){return Math.abs(t.x)>3||Math.abs(t.y)>3},r.prototype.pointerUp=function(t,e){this.emitEvent("pointerUp",[t,e]),this._dragPointerUp(t,e)},r.prototype._dragPointerUp=function(t,e){this.isDragging?this._dragEnd(t,e):this._staticClick(t,e)},i.prototype.pointerDone=function(){e.unbind(t,"scroll",this)},r.prototype._dragStart=function(t,e){this.isDragging=!0,this.dragStartPoint=r.getPointerPoint(e),this.isPreventingClicks=!0,this.dragStart(t,e)},r.prototype.dragStart=function(t,e){this.emitEvent("dragStart",[t,e])},r.prototype._dragMove=function(t,e,i){this.isDragging&&this.dragMove(t,e,i) },r.prototype.dragMove=function(t,e,i){o(t),this.emitEvent("dragMove",[t,e,i])},r.prototype._dragEnd=function(t,e){this.isDragging=!1;var i=this;setTimeout(function(){delete i.isPreventingClicks}),this.dragEnd(t,e)},r.prototype.dragEnd=function(t,e){this.emitEvent("dragEnd",[t,e])},r.prototype.pointerDone=function(){e.unbind(t,"scroll",this),delete this.pointerDownScroll},r.prototype.onclick=function(t){this.isPreventingClicks&&o(t)},r.prototype._staticClick=function(t,e){if(!this.isIgnoringMouseUp||"mouseup"!=t.type){var i=t.target.nodeName;if(("INPUT"==i||"TEXTAREA"==i)&&t.target.focus(),this.staticClick(t,e),"mouseup"!=t.type){this.isIgnoringMouseUp=!0;var n=this;setTimeout(function(){delete n.isIgnoringMouseUp},400)}}},r.prototype.staticClick=function(t,e){this.emitEvent("staticClick",[t,e])},r.prototype.onscroll=function(){var t=r.getScrollPosition(),e=this.pointerDownScroll.x-t.x,i=this.pointerDownScroll.y-t.y;(Math.abs(e)>3||Math.abs(i)>3)&&this._pointerDone()},r.getPointerPoint=function(t){return{x:void 0!==t.pageX?t.pageX:t.clientX,y:void 0!==t.pageY?t.pageY:t.clientY}};var h=void 0!==t.pageYOffset;return r.getScrollPosition=function(){return{x:h?t.pageXOffset:document.body.scrollLeft,y:h?t.pageYOffset:document.body.scrollTop}},r.getPointerPoint=i.getPointerPoint,r}),function(t,e){"function"==typeof define&&define.amd?define("flickity/js/drag",["classie/classie","eventie/eventie","./flickity","unidragger/unidragger","fizzy-ui-utils/utils"],function(i,n,o,r,s){return e(t,i,n,o,r,s)}):"object"==typeof exports?module.exports=e(t,require("desandro-classie"),require("eventie"),require("./flickity"),require("unidragger"),require("fizzy-ui-utils")):t.Flickity=e(t,t.classie,t.eventie,t.Flickity,t.Unidragger,t.fizzyUIUtils)}(window,function(t,e,i,n,o,r){function s(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function a(e){var i=o.getPointerPoint(e);return i.y-t.pageYOffset}r.extend(n.defaults,{draggable:!0,touchVerticalScroll:!0}),n.createMethods.push("_createDrag"),r.extend(n.prototype,o.prototype),n.prototype._createDrag=function(){this.on("activate",this.bindDrag),this.on("uiChange",this._uiChangeDrag),this.on("childUIPointerDown",this._childUIPointerDownDrag),this.on("deactivate",this.unbindDrag)},n.prototype.bindDrag=function(){this.options.draggable&&!this.isDragBound&&(e.add(this.element,"is-draggable"),this.handles=[this.viewport],this.bindHandles(),this.isDragBound=!0)},n.prototype.unbindDrag=function(){this.isDragBound&&(e.remove(this.element,"is-draggable"),this.unbindHandles(),delete this.isDragBound)},n.prototype._uiChangeDrag=function(){delete this.isFreeScrolling},n.prototype._childUIPointerDownDrag=function(t){s(t),this.pointerDownFocus(t)},n.prototype.pointerDown=function(n,r){if("INPUT"==n.target.nodeName&&"range"==n.target.type)return this.isPointerDown=!1,void delete this.pointerIdentifier;this._dragPointerDown(n,r);var s=document.activeElement;s&&s.blur&&s!=this.element&&s!=document.body&&s.blur(),this.pointerDownFocus(n),this.dragX=this.x,e.add(this.viewport,"is-pointer-down"),this._bindPostStartEvents(n),this.pointerDownScroll=o.getScrollPosition(),i.bind(t,"scroll",this),this.dispatchEvent("pointerDown",n,[r])};var l={touchstart:!0,MSPointerDown:!0},c={INPUT:!0,SELECT:!0};n.prototype.pointerDownFocus=function(t){!this.options.accessibility||l[t.type]||c[t.target.nodeName]||this.element.focus()},n.prototype.pointerMove=function(t,e){var i=this._dragPointerMove(t,e);this.touchVerticalScrollMove(t,e,i),this._dragMove(t,e,i),this.dispatchEvent("pointerMove",t,[e,i])},n.prototype.hasDragStarted=function(t){return!this.isTouchScrolling&&Math.abs(t.x)>3},n.prototype.pointerUp=function(t,i){delete this.isTouchScrolling,e.remove(this.viewport,"is-pointer-down"),this.dispatchEvent("pointerUp",t,[i]),this._dragPointerUp(t,i)};var h={touchmove:!0,MSPointerMove:!0};return n.prototype.touchVerticalScrollMove=function(e,i,n){var o=this.options.touchVerticalScroll,r="withDrag"==o?!o:this.isDragging||!o;!r&&h[e.type]&&!this.isTouchScrolling&&Math.abs(n.y)>10&&(this.startScrollY=t.pageYOffset,this.pointerWindowStartY=a(i),this.isTouchScrolling=!0)},n.prototype.dragStart=function(t,e){this.dragStartPosition=this.x,this.startAnimation(),this.dispatchEvent("dragStart",t,[e])},n.prototype.dragMove=function(t,e,i){s(t),this.previousDragX=this.dragX;var n=this.options.rightToLeft?-1:1,o=this.dragStartPosition+i.x*n;if(!this.options.wrapAround&&this.cells.length){var r=Math.max(-this.cells[0].target,this.dragStartPosition);o=o>r?.5*(o+r):o;var a=Math.min(-this.getLastCell().target,this.dragStartPosition);o=a>o?.5*(o+a):o}this.dragX=o,this.dragMoveTime=new Date,this.dispatchEvent("dragMove",t,[e,i])},n.prototype.dragEnd=function(t,e){this.options.freeScroll&&(this.isFreeScrolling=!0);var i=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){var n=this.getRestingPosition();this.isFreeScrolling=-n>this.cells[0].target&&-n=t}:function(t,e){return e>t};r(e,o)&&(n+=i,o=e,e=this.getCellDistance(-t,n),null!==e);)e=Math.abs(e);return{distance:o,index:n-i}},n.prototype.getCellDistance=function(t,e){var i=this.cells.length,n=this.options.wrapAround&&i>1,o=n?r.modulo(e,i):e,s=this.cells[o];if(!s)return null;var a=n?this.slideableWidth*Math.floor(e/i):0;return t-(s.target+a)},n.prototype.dragEndBoostSelect=function(){if(void 0===this.previousDragX||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;var t=this.getCellDistance(-this.dragX,this.selectedIndex),e=this.previousDragX-this.dragX;return t>0&&e>0?1:0>t&&0>e?-1:0},n.prototype.staticClick=function(t,e){var i=this.getParentCell(t.target),n=i&&i.element,o=i&&r.indexOf(this.cells,i);this.dispatchEvent("staticClick",t,[e,n,o])},n}),function(t,e){"function"==typeof define&&define.amd?define("tap-listener/tap-listener",["unipointer/unipointer"],function(i){return e(t,i)}):"object"==typeof exports?module.exports=e(t,require("unipointer")):t.TapListener=e(t,t.Unipointer)}(window,function(t,e){function i(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function n(t){this.bindTap(t)}n.prototype=new e,n.prototype.bindTap=function(t){t&&(this.unbindTap(),this.tapElement=t,this._bindStartEvent(t,!0))},n.prototype.unbindTap=function(){this.tapElement&&(this._bindStartEvent(this.tapElement,!0),delete this.tapElement)};var o=n.prototype.pointerDown;n.prototype.pointerDown=function(t){"touchstart"==t.type&&i(t),o.apply(this,arguments)};var r=void 0!==t.pageYOffset;return n.prototype.pointerUp=function(i,n){var o=e.getPointerPoint(n),s=this.tapElement.getBoundingClientRect(),a=r?t.pageXOffset:document.body.scrollLeft,l=r?t.pageYOffset:document.body.scrollTop,c=o.x>=s.left+a&&o.x<=s.right+a&&o.y>=s.top+l&&o.y<=s.bottom+l;c&&this.emitEvent("tap",[i,n])},n.prototype.destroy=function(){this.pointerDone(),this.unbindTap()},n}),function(t,e){"function"==typeof define&&define.amd?define("flickity/js/prev-next-button",["eventie/eventie","./flickity","tap-listener/tap-listener","fizzy-ui-utils/utils"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof exports?module.exports=e(t,require("eventie"),require("./flickity"),require("tap-listener"),require("fizzy-ui-utils")):e(t,t.eventie,t.Flickity,t.TapListener,t.fizzyUIUtils)}(window,function(t,e,i,n,o){function r(t,e){this.direction=t,this.parent=e,this._create()}function s(t){return"string"==typeof t?t:"M "+t.x0+",50 L "+t.x1+","+(t.y1+50)+" L "+t.x2+","+(t.y2+50)+" L "+t.x3+",50 L "+t.x2+","+(50-t.y2)+" L "+t.x1+","+(50-t.y1)+" Z"}var a="http://www.w3.org/2000/svg",l=function(){function t(){if(void 0!==e)return e;var t=document.createElement("div");return t.innerHTML="",e=(t.firstChild&&t.firstChild.namespaceURI)==a}var e;return t}();return r.prototype=new n,r.prototype._create=function(){this.isEnabled=!0,this.isPrevious=-1==this.direction;var t=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==t;var e=this.element=document.createElement("button");if(e.className="flickity-prev-next-button",e.className+=this.isPrevious?" previous":" next",e.setAttribute("type","button"),i.setUnselectable(e),l()){var n=this.createSVG();e.appendChild(n)}else this.setArrowText(),e.className+=" no-svg";var o=this;this.onCellSelect=function(){o.update()},this.parent.on("cellSelect",this.onCellSelect),this.on("tap",this.onTap),this.on("pointerDown",function(t,e){o.parent.childUIPointerDown(e)})},r.prototype.activate=function(){this.update(),this.bindTap(this.element),e.bind(this.element,"click",this),this.parent.element.appendChild(this.element)},r.prototype.deactivate=function(){this.parent.element.removeChild(this.element),n.prototype.destroy.call(this),e.unbind(this.element,"click",this)},r.prototype.createSVG=function(){var t=document.createElementNS(a,"svg");t.setAttribute("viewBox","0 0 100 100");var e=document.createElementNS(a,"path"),i=s(this.parent.options.arrowShape);return e.setAttribute("d",i),e.setAttribute("class","arrow"),this.isLeft||e.setAttribute("transform","translate(100, 100) rotate(180) "),t.appendChild(e),t},r.prototype.setArrowText=function(){var t=this.parent.options,e=this.isLeft?t.leftArrowText:t.rightArrowText;o.setText(this.element,e)},r.prototype.onTap=function(){if(this.isEnabled){this.parent.uiChange();var t=this.isPrevious?"previous":"next";this.parent[t]()}},r.prototype.handleEvent=o.handleEvent,r.prototype.onclick=function(){var t=document.activeElement;t&&t==this.element&&this.onTap()},r.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},r.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},r.prototype.update=function(){var t=this.parent.cells;if(this.parent.options.wrapAround&&t.length>1)return void this.enable();var e=t.length?t.length-1:0,i=this.isPrevious?0:e,n=this.parent.selectedIndex==i?"disable":"enable";this[n]()},r.prototype.destroy=function(){this.deactivate()},o.extend(i.defaults,{prevNextButtons:!0,leftArrowText:"‹",rightArrowText:"›",arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),i.createMethods.push("_createPrevNextButtons"),i.prototype._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new r(-1,this),this.nextButton=new r(1,this),this.on("activate",this.activatePrevNextButtons))},i.prototype.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},i.prototype.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},i.PrevNextButton=r,i}),function(t,e){"function"==typeof define&&define.amd?define("flickity/js/page-dots",["eventie/eventie","./flickity","tap-listener/tap-listener","fizzy-ui-utils/utils"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof exports?module.exports=e(t,require("eventie"),require("./flickity"),require("tap-listener"),require("fizzy-ui-utils")):e(t,t.eventie,t.Flickity,t.TapListener,t.fizzyUIUtils)}(window,function(t,e,i,n,o){function r(t){this.parent=t,this._create()}return r.prototype=new n,r.prototype._create=function(){this.holder=document.createElement("ol"),this.holder.className="flickity-page-dots",i.setUnselectable(this.holder),this.dots=[];var t=this;this.onCellSelect=function(){t.updateSelected()},this.parent.on("cellSelect",this.onCellSelect),this.on("tap",this.onTap),this.on("pointerDown",function(e,i){t.parent.childUIPointerDown(i)})},r.prototype.activate=function(){this.setDots(),this.updateSelected(),this.bindTap(this.holder),this.parent.element.appendChild(this.holder)},r.prototype.deactivate=function(){this.parent.element.removeChild(this.holder),n.prototype.destroy.call(this)},r.prototype.setDots=function(){var t=this.parent.cells.length-this.dots.length;t>0?this.addDots(t):0>t&&this.removeDots(-t)},r.prototype.addDots=function(t){for(var e=document.createDocumentFragment(),i=[];t;){var n=document.createElement("li");n.className="dot",e.appendChild(n),i.push(n),t--}this.holder.appendChild(e),this.dots=this.dots.concat(i)},r.prototype.removeDots=function(t){for(var e=this.dots.splice(this.dots.length-t,t),i=0,n=e.length;n>i;i++){var o=e[i];this.holder.removeChild(o)}},r.prototype.updateSelected=function(){this.selectedDot&&(this.selectedDot.className="dot"),this.dots.length&&(this.selectedDot=this.dots[this.parent.selectedIndex],this.selectedDot.className="dot is-selected")},r.prototype.onTap=function(t){var e=t.target;if("LI"==e.nodeName){this.parent.uiChange();var i=o.indexOf(this.dots,e);this.parent.select(i)}},r.prototype.destroy=function(){this.deactivate()},i.PageDots=r,o.extend(i.defaults,{pageDots:!0}),i.createMethods.push("_createPageDots"),i.prototype._createPageDots=function(){this.options.pageDots&&(this.pageDots=new r(this),this.on("activate",this.activatePageDots),this.on("cellAddedRemoved",this.onCellAddedRemovedPageDots),this.on("deactivate",this.deactivatePageDots))},i.prototype.activatePageDots=function(){this.pageDots.activate()},i.prototype.onCellAddedRemovedPageDots=function(){this.pageDots.setDots()},i.prototype.deactivatePageDots=function(){this.pageDots.deactivate()},i.PageDots=r,i}),function(t,e){"function"==typeof define&&define.amd?define("flickity/js/player",["eventEmitter/EventEmitter","eventie/eventie","./flickity"],function(t,i,n){return e(t,i,n)}):"object"==typeof exports?module.exports=e(require("wolfy87-eventemitter"),require("eventie"),require("./flickity")):e(t.EventEmitter,t.eventie,t.Flickity)}(window,function(t,e,i){function n(t){if(this.isPlaying=!1,this.parent=t,r){var e=this;this.onVisibilityChange=function(){e.visibilityChange()}}}var o,r;return"hidden"in document?(o="hidden",r="visibilitychange"):"webkitHidden"in document&&(o="webkitHidden",r="webkitvisibilitychange"),n.prototype=new t,n.prototype.play=function(){this.isPlaying=!0,delete this.isPaused,r&&document.addEventListener(r,this.onVisibilityChange,!1),this.tick()},n.prototype.tick=function(){if(this.isPlaying&&!this.isPaused){this.tickTime=new Date;var t=this.parent.options.autoPlay;t="number"==typeof t?t:3e3;var e=this;this.timeout=setTimeout(function(){e.parent.next(!0),e.tick()},t)}},n.prototype.stop=function(){this.isPlaying=!1,delete this.isPaused,this.clear(),r&&document.removeEventListener(r,this.onVisibilityChange,!1)},n.prototype.clear=function(){clearTimeout(this.timeout)},n.prototype.pause=function(){this.isPlaying&&(this.isPaused=!0,this.clear())},n.prototype.unpause=function(){this.isPaused&&this.play()},n.prototype.visibilityChange=function(){var t=document[o];this[t?"pause":"unpause"]()},i.createMethods.push("_createPlayer"),i.prototype._createPlayer=function(){this.player=new n(this),this.on("activate",this.activatePlayer),this.on("uiChange",this.stopPlayer),this.on("pointerDown",this.stopPlayer),this.on("deactivate",this.deactivatePlayer)},i.prototype.activatePlayer=function(){this.options.autoPlay&&(this.player.play(),e.bind(this.element,"mouseenter",this),this.isMouseenterBound=!0)},i.prototype.stopPlayer=function(){this.player.stop()},i.prototype.deactivatePlayer=function(){this.player.stop(),this.isMouseenterBound&&(e.unbind(this.element,"mouseenter",this),delete this.isMouseenterBound)},i.prototype.onmouseenter=function(){this.player.pause(),e.bind(this.element,"mouseleave",this)},i.prototype.onmouseleave=function(){this.player.unpause(),e.unbind(this.element,"mouseleave",this)},i.Player=n,i}),function(t,e){"function"==typeof define&&define.amd?define("flickity/js/add-remove-cell",["./flickity","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof exports?module.exports=e(t,require("./flickity"),require("fizzy-ui-utils")):e(t,t.Flickity,t.fizzyUIUtils)}(window,function(t,e,i){function n(t){for(var e=document.createDocumentFragment(),i=0,n=t.length;n>i;i++){var o=t[i];e.appendChild(o.element)}return e}return e.prototype.insert=function(t,e){var i=this._makeCells(t);if(i&&i.length){var o=this.cells.length;e=void 0===e?o:e;var r=n(i),s=e==o;if(s)this.slider.appendChild(r);else{var a=this.cells[e].element;this.slider.insertBefore(r,a)}if(0===e)this.cells=i.concat(this.cells);else if(s)this.cells=this.cells.concat(i);else{var l=this.cells.splice(e,o-e);this.cells=this.cells.concat(i).concat(l)}this._sizeCells(i);var c=e>this.selectedIndex?0:i.length;this._cellAddedRemoved(e,c)}},e.prototype.append=function(t){this.insert(t,this.cells.length)},e.prototype.prepend=function(t){this.insert(t,0)},e.prototype.remove=function(t){var e,n,o,r=this.getCells(t),s=0;for(e=0,n=r.length;n>e;e++){o=r[e];var a=i.indexOf(this.cells,o)e;e++)o=r[e],o.remove(),i.removeFrom(this.cells,o);r.length&&this._cellAddedRemoved(0,s)},e.prototype._cellAddedRemoved=function(t,e){e=e||0,this.selectedIndex+=e,this.selectedIndex=Math.max(0,Math.min(this.cells.length-1,this.selectedIndex)),this.emitEvent("cellAddedRemoved",[t,e]),this.cellChange(t,!0)},e.prototype.cellSizeChange=function(t){var e=this.getCell(t);if(e){e.getSize();var n=i.indexOf(this.cells,e);this.cellChange(n)}},e.prototype.cellChange=function(t,e){var i=this.slideableWidth;this._positionCells(t),this._getWrapShiftCells(),this.setGallerySize(),this.options.freeScroll?(this.x+=i-this.slideableWidth,this.positionSlider()):(e&&this.positionSliderAtSelected(),this.select(this.selectedIndex))},e}),function(t,e){"function"==typeof define&&define.amd?define("flickity/js/lazyload",["classie/classie","eventie/eventie","./flickity","fizzy-ui-utils/utils"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof exports?module.exports=e(t,require("desandro-classie"),require("eventie"),require("./flickity"),require("fizzy-ui-utils")):e(t,t.classie,t.eventie,t.Flickity,t.fizzyUIUtils)}(window,function(t,e,i,n,o){function r(t){if("IMG"==t.nodeName&&t.getAttribute("data-flickity-lazyload"))return[t];var e=t.querySelectorAll("img[data-flickity-lazyload]");return o.makeArray(e)}function s(t,e){this.img=t,this.flickity=e,this.load()}return n.createMethods.push("_createLazyload"),n.prototype._createLazyload=function(){this.on("cellSelect",this.lazyLoad)},n.prototype.lazyLoad=function(){var t=this.options.lazyLoad;if(t){for(var e="number"==typeof t?t:0,i=this.getAdjacentCellElements(e),n=[],o=0,a=i.length;a>o;o++){var l=i[o],c=r(l);n=n.concat(c)}for(o=0,a=n.length;a>o;o++){var h=n[o];new s(h,this)}}},s.prototype.handleEvent=o.handleEvent,s.prototype.load=function(){i.bind(this.img,"load",this),i.bind(this.img,"error",this),this.img.src=this.img.getAttribute("data-flickity-lazyload"),this.img.removeAttribute("data-flickity-lazyload")},s.prototype.onload=function(t){this.complete(t,"flickity-lazyloaded")},s.prototype.onerror=function(){this.complete(event,"flickity-lazyerror")},s.prototype.complete=function(t,n){i.unbind(this.img,"load",this),i.unbind(this.img,"error",this);var o=this.flickity.getParentCell(this.img),r=o&&o.element;this.flickity.cellSizeChange(r),e.add(this.img,n),this.flickity.dispatchEvent("lazyLoad",t,r)},n.LazyLoader=s,n}),function(t,e){"function"==typeof define&&define.amd?define("flickity/js/index",["./flickity","./drag","./prev-next-button","./page-dots","./player","./add-remove-cell","./lazyload"],e):"object"==typeof exports&&(module.exports=e(require("./flickity"),require("./drag"),require("./prev-next-button"),require("./page-dots"),require("./player"),require("./add-remove-cell"),require("./lazyload")))}(window,function(t){return t}),function(t,e){"function"==typeof define&&define.amd?define("flickity-as-nav-for/as-nav-for",["classie/classie","flickity/js/index","fizzy-ui-utils/utils"],function(i,n,o){return e(t,i,n,o)}):"object"==typeof exports?module.exports=e(t,require("desandro-classie"),require("flickity"),require("fizzy-ui-utils")):t.Flickity=e(t,t.classie,t.Flickity,t.fizzyUIUtils)}(window,function(t,e,i,n){return i.createMethods.push("_createAsNavFor"),i.prototype._createAsNavFor=function(){this.on("activate",this.activateAsNavFor),this.on("deactivate",this.deactivateAsNavFor),this.on("destroy",this.destroyAsNavFor);var t=this.options.asNavFor;if(t){var e=this;setTimeout(function(){e.setNavCompanion(t)})}},i.prototype.setNavCompanion=function(t){t=n.getQueryElement(t);var e=i.data(t);if(e&&e!=this){this.navCompanion=e;var o=this;this.onNavCompanionSelect=function(){o.navCompanionSelect()},e.on("cellSelect",this.onNavCompanionSelect),this.on("staticClick",this.onNavStaticClick),this.navCompanionSelect()}},i.prototype.navCompanionSelect=function(){if(this.navCompanion){var t=this.navCompanion.selectedIndex;this.select(t),this.removeNavSelectedElement(),this.selectedIndex==t&&(this.navSelectedElement=this.cells[t].element,e.add(this.navSelectedElement,"is-nav-selected"))}},i.prototype.activateAsNavFor=function(){this.navCompanionSelect()},i.prototype.removeNavSelectedElement=function(){this.navSelectedElement&&(e.remove(this.navSelectedElement,"is-nav-selected"),delete this.navSelectedElement)},i.prototype.onNavStaticClick=function(t,e,i,n){"number"==typeof n&&this.navCompanion.select(n)},i.prototype.deactivateAsNavFor=function(){this.removeNavSelectedElement()},i.prototype.destroyAsNavFor=function(){this.navCompanion&&(this.navCompanion.off("cellSelect",this.onNavCompanionSelect),this.off("staticClick",this.onNavStaticClick),delete this.navCompanion)},i}),function(t,e){"function"==typeof define&&define.amd?define("imagesloaded/imagesloaded",["eventEmitter/EventEmitter","eventie/eventie"],function(i,n){return e(t,i,n)}):"object"==typeof exports?module.exports=e(t,require("wolfy87-eventemitter"),require("eventie")):t.imagesLoaded=e(t,t.EventEmitter,t.eventie)}(window,function(t,e,i){function n(t,e){for(var i in e)t[i]=e[i];return t}function o(t){return"[object Array]"===d.call(t)}function r(t){var e=[];if(o(t))e=t;else if("number"==typeof t.length)for(var i=0,n=t.length;n>i;i++)e.push(t[i]);else e.push(t);return e}function s(t,e,i){if(!(this instanceof s))return new s(t,e);"string"==typeof t&&(t=document.querySelectorAll(t)),this.elements=r(t),this.options=n({},this.options),"function"==typeof e?i=e:n(this.options,e),i&&this.on("always",i),this.getImages(),c&&(this.jqDeferred=new c.Deferred);var o=this;setTimeout(function(){o.check()})}function a(t){this.img=t}function l(t){this.src=t,u[t]=this}var c=t.jQuery,h=t.console,p="undefined"!=typeof h,d=Object.prototype.toString;s.prototype=new e,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var t=0,e=this.elements.length;e>t;t++){var i=this.elements[t];"IMG"===i.nodeName&&this.addImage(i);var n=i.nodeType;if(n&&(1===n||9===n||11===n))for(var o=i.querySelectorAll("img"),r=0,s=o.length;s>r;r++){var a=o[r];this.addImage(a)}}},s.prototype.addImage=function(t){var e=new a(t);this.images.push(e)},s.prototype.check=function(){function t(t,o){return e.options.debug&&p&&h.log("confirm",t,o),e.progress(t),i++,i===n&&e.complete(),!0}var e=this,i=0,n=this.images.length;if(this.hasAnyBroken=!1,!n)return void this.complete();for(var o=0;n>o;o++){var r=this.images[o];r.on("confirm",t),r.check()}},s.prototype.progress=function(t){this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded;var e=this;setTimeout(function(){e.emit("progress",e,t),e.jqDeferred&&e.jqDeferred.notify&&e.jqDeferred.notify(e,t)})},s.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var e=this;setTimeout(function(){if(e.emit(t,e),e.emit("always",e),e.jqDeferred){var i=e.hasAnyBroken?"reject":"resolve";e.jqDeferred[i](e)}})},c&&(c.fn.imagesLoaded=function(t,e){var i=new s(this,t,e);return i.jqDeferred.promise(c(this))}),a.prototype=new e,a.prototype.check=function(){var t=u[this.img.src]||new l(this.img.src);if(t.isConfirmed)return void this.confirm(t.isLoaded,"cached was confirmed");if(this.img.complete&&void 0!==this.img.naturalWidth)return void this.confirm(0!==this.img.naturalWidth,"naturalWidth");var e=this;t.on("confirm",function(t,i){return e.confirm(t.isLoaded,i),!0}),t.check()},a.prototype.confirm=function(t,e){this.isLoaded=t,this.emit("confirm",this,e)};var u={};return l.prototype=new e,l.prototype.check=function(){if(!this.isChecked){var t=new Image;i.bind(t,"load",this),i.bind(t,"error",this),t.src=this.src,this.isChecked=!0}},l.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},l.prototype.onload=function(t){this.confirm(!0,"onload"),this.unbindProxyEvents(t)},l.prototype.onerror=function(t){this.confirm(!1,"onerror"),this.unbindProxyEvents(t)},l.prototype.confirm=function(t,e){this.isConfirmed=!0,this.isLoaded=t,this.emit("confirm",this,e)},l.prototype.unbindProxyEvents=function(t){i.unbind(t.target,"load",this),i.unbind(t.target,"error",this)},s}),function(t,e){"function"==typeof define&&define.amd?define(["flickity/js/index","imagesloaded/imagesloaded"],function(i,n){return e(t,i,n)}):"object"==typeof exports?module.exports=e(t,require("flickity"),require("imagesloaded")):t.Flickity=e(t,t.Flickity,t.imagesLoaded)}(window,function(t,e,i){return e.createMethods.push("_createImagesLoaded"),e.prototype._createImagesLoaded=function(){this.on("activate",this.imagesLoaded)},e.prototype.imagesLoaded=function(){function t(t,i){var n=e.getParentCell(i.img);e.cellSizeChange(n&&n.element),e.options.freeScroll||e.positionSliderAtSelected()}if(this.options.imagesLoaded){var e=this;i(this.slider).on("progress",t)}},e});!function(e,t,i,s){e.fn.mouseIsOver=function(){return e(this).parent().find(e(this).selector+":hover").length>0},e.fn.MindSlider=function(a){function n(){if(!b.find(".slide").is(":animated")){$objecttoslide=b.find(".slide.active").is(":last-child")?b.find(".slide").first():b.find(".slide.active").next();var t=b.innerWidth();"slide"==h.effect?($objecttoslide.css({left:t+"px",opacity:"1","z-index":"2"}).stop().animate({left:"0px"},h.slidespeed,h.slideeasing,function(){e(this).addClass("active")}),b.find(".slide.active").stop().animate({left:"-"+t+"px"},h.slidespeed,h.slideeasing,function(){e(this).css({left:0,"z-index":"0",opacity:"0"}).removeClass("active"),"bullets"==h.quickoption?b.find(".bullets a.active").is(":last-child")?b.find(".bullets a").removeClass("active").first().addClass("active"):b.find(".bullets a.active").removeClass("active").next().addClass("active"):"thumb"==h.quickoption?b.find(".thumbs a.active").is(":last-child")?b.find(".thumbs a").removeClass("active").first().addClass("active"):b.find(".thumbs a.active").removeClass("active").next().addClass("active"):("buttons"==h.quickoption||"buttonstext"==h.quickoption)&&(b.find(".buttons a.active").is(":last-child")?b.find(".buttons a").removeClass("active").first().addClass("active"):b.find(".buttons a.active").removeClass("active").next().addClass("active"))})):"fade"==h.effect&&($objecttoslide.css({left:"0px",opacity:"1","z-index":"1"}),b.find(".slide.active").css({"z-index":"2"}).stop().animate({opacity:"0"},h.slidespeed,h.slideeasing,function(){e(this).css({"z-index":"0",opacity:"0"}).removeClass("active"),"bullets"==h.quickoption?b.find(".bullets a.active").is(":last-child")?b.find(".bullets a").removeClass("active").first().addClass("active"):b.find(".bullets a.active").removeClass("active").next().addClass("active"):"thumb"==h.quickoption?b.find(".thumbs a.active").is(":last-child")?b.find(".thumbs a").removeClass("active").first().addClass("active"):b.find(".thumbs a.active").removeClass("active").next().addClass("active"):("buttons"==h.quickoption||"buttonstext"==h.quickoption)&&(b.find(".buttons a.active").is(":last-child")?b.find(".buttons a").removeClass("active").first().addClass("active"):b.find(".buttons a.active").removeClass("active").next().addClass("active")),$objecttoslide.addClass("active")}))}}function l(){if(!b.find(".slide").is(":animated")){$objecttoslide=b.find(".slide.active").is(":first-child")?b.find(".slide").last():b.find(".slide.active").prev();var t=b.innerWidth();"slide"==h.effect?($objecttoslide.css({left:"-"+t+"px",opacity:"1","z-index":"2"}).stop().animate({left:"0px"},h.slidespeed,h.slideeasing,function(){e(this).addClass("active")}),b.find(".slide.active").stop().animate({left:t+"px",avoidTransforms:!0},h.slidespeed,h.slideeasing,function(){e(this).css({left:0,"z-index":"0",opacity:"0"}).removeClass("active"),"bullets"==h.quickoption?b.find(".bullets a.active").is(":first-child")?b.find(".bullets a").removeClass("active").last().addClass("active"):b.find(".bullets a.active").removeClass("active").prev().addClass("active"):"thumb"==h.quickoption?b.find(".thumbs a.active").is(":first-child")?b.find(".thumbs a").removeClass("active").last().addClass("active"):b.find(".thumbs a.active").removeClass("active").prev().addClass("active"):("buttons"==h.quickoption||"buttonstext"==h.quickoption)&&(b.find(".buttons a.active").is(":first-child")?b.find(".buttons a").removeClass("active").last().addClass("active"):b.find(".buttons a.active").removeClass("active").prev().addClass("active"))})):"fade"==h.effect&&($objecttoslide.css({left:"0px",opacity:"1","z-index":"1"}),b.find(".slide.active").css({"z-index":"2"}).stop().animate({opacity:"0"},h.slidespeed,h.slideeasing,function(){e(this).css({"z-index":"0",opacity:"0"}).removeClass("active"),"bullets"==h.quickoption?b.find(".bullets a.active").is(":first-child")?b.find(".bullets a").removeClass("active").last().addClass("active"):b.find(".bullets a.active").removeClass("active").prev().addClass("active"):"thumb"==h.quickoption?b.find(".thumbs a.active").is(":first-child")?b.find(".thumbs a").removeClass("active").last().addClass("active"):b.find(".thumbs a.active").removeClass("active").prev().addClass("active"):("buttons"==h.quickoption||"buttonstext"==h.quickoption)&&(b.find(".buttons a.active").is(":first-child")?b.find(".buttons a").removeClass("active").last().addClass("active"):b.find(".buttons a.active").removeClass("active").prev().addClass("active")),$objecttoslide.addClass("active")}))}}function o(t,i){var i=parseInt(i),s=i+1;if("bullets"==h.quickoption)var a=b.find(".bullets a.active").attr("id");else if("thumb"==h.quickoption)var a=b.find(".thumbs a.active").attr("id");else if("buttons"==h.quickoption||"buttonstext"==h.quickoption)var a=b.find(".buttons a.active").attr("id");i>a?1==h.autoplay&&0==h.pausehover?(r(),u(),d()):1==h.autoplay&&1==h.pausehover&&r():1==h.autoplay&&0==h.pausehover?(r(),u(),c()):1==h.autoplay&&1==h.pausehover&&r();var n=b.innerWidth();"slide"==h.effect?i>a?(b.find(".slide.active").stop().animate({left:"-"+n+"px"},h.slidespeed,h.slideeasing,function(){e(this).css({left:0,"z-index":"0",opacity:"0"}).removeClass("active")}),b.find(".slide:nth-child("+s+")").css({left:n+"px",opacity:"1","z-index":"2"}).stop().animate({left:"0px"},h.slidespeed,h.slideeasing,function(){e(this).addClass("active")})):(b.find(".slide.active").stop().animate({left:n+"px"},h.slidespeed,h.slideeasing,function(){e(this).css({left:0,"z-index":"0",opacity:"0"}).removeClass("active")}),b.find(".slide:nth-child("+s+")").css({left:"-"+n+"px",opacity:"1","z-index":"2"}).stop().animate({left:"0px"},h.slidespeed,h.slideeasing,function(){e(this).addClass("active")})):"fade"==h.effect&&(b.find(".slide:nth-child("+s+")").css({left:"0px",opacity:"1","z-index":"1"}),b.find(".slide.active").css({"z-index":"2"}).stop().animate({opacity:"0"},h.slidespeed,h.slideeasing,function(){e(this).css({"z-index":"0",opacity:"0"}).removeClass("active"),b.find(".slide:nth-child("+s+")").addClass("active")})),"bullets"==h.quickoption?b.find(".bullets a").removeClass("active"):"thumb"==h.quickoption?b.find(".thumbs a").removeClass("active"):("buttons"==h.quickoption||"buttonstext"==h.quickoption)&&b.find(".buttons a").removeClass("active"),t.addClass("active")}function d(){p=setTimeout(function(){r(),n(),u(),d()},h.playspeed)}function c(){p=setTimeout(function(){r(),l(),u(),c()},h.playspeed)}function r(){clearTimeout(p)}function u(){1==h.timershow&&1==h.autoplay&&(timerspeed=h.playspeed-h.slidespeed,b.find(".timer").show().css("width","0%").show().stop().delay(h.slidespeed).animate({width:"+=100%"},timerspeed,"easeOutSine",function(){}))}function f(){b.find(".slide").each(function(){if("container-width"==m)var t=!0;else var t=!1;if("container"!=g)var i=!1;else var i=!0;var s=e("#layout").data("container"),a=0,n=e(this).find("img").height(),l=e(this).find("img").width(),o=b.outerWidth(),d=b.outerHeight(),c=d/n;a=Math.floor(l*c),a>o&&(a=o),a>s&&1==i&&(a=s),1==t&&(a=s),e(this).width(a)})}function v(){flkty=b.find(".slides").data("flickity"),flkty.cells[flkty.selectedIndex-1]?flkty.cells[flkty.selectedIndex+1]?(b.find(".prev").removeClass("disabled"),b.find(".next").removeClass("disabled")):b.find(".next").addClass("disabled"):b.find(".prev").addClass("disabled")}var p,h=e.extend({showcontent:!1,slidestylestatus:!1,slidestyle:1,keyboardcontrol:!1,mousecontrol:!1,controlstatus:!0,controlhide:!1,popupimages:!1,timershow:!1,autoplay:!1,loaddelay:0,pausehover:!1,playspeed:4e3,slidespeed:430,slideeasing:"easeInOutSine",effect:"slide",quickoption:"none",swipestatus:!0,fullscreen:!1},a),b=this;effect=b.data("effect"),effect!=s&&0!=effect.length&&(h.effect=effect),controlstatus=b.data("control"),controlstatus!=s&&0!=controlstatus.length&&(h.controlstatus=controlstatus),quickoption=b.data("quickselect"),quickoption!=s&&0!=quickoption.length&&(h.quickoption=quickoption),controlhide=b.data("controlhide"),controlhide!=s&&0!=controlhide.length&&(h.controlhide=controlhide),pausehover=b.data("pausehover"),pausehover!=s&&0!=pausehover.length&&(h.pausehover=pausehover),playspeed=b.data("playspeed"),playspeed!=s&&0!=playspeed.length&&(h.playspeed=playspeed),slidespeed=b.data("slidespeed"),slidespeed!=s&&0!=slidespeed.length&&(h.slidespeed=slidespeed),slideeasing=b.data("slideease"),slideeasing!=s&&0!=slideeasing.length&&(h.slideeasing=slideeasing),keyboardcontrol=b.data("keyboardstatus"),keyboardcontrol!=s&&0!=keyboardcontrol.length&&(h.keyboardcontrol=keyboardcontrol),mousecontrol=b.data("mousestatus"),mousecontrol!=s&&0!=mousecontrol.length&&(h.mousecontrol=mousecontrol),/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&(h.mousecontrol=!1),swipestatus=b.data("swipestatus"),swipestatus!=s&&0!=swipestatus.length&&(h.swipestatus=swipestatus),timershow=b.data("timer"),timershow!=s&&0!=timershow.length&&(h.timershow=timershow),autoplay=b.data("autoplay"),autoplay!=s&&0!=autoplay.length&&(h.autoplay=autoplay),loaddelay=b.data("loaddelay"),loaddelay!=s&&0!=loaddelay.length&&(h.loaddelay=loaddelay),fullscreen=b.data("fullscreen"),fullscreen!=s&&0!=fullscreen.length&&(h.fullscreen=fullscreen),1==h.timershow&&(h.autoplay=!0);var m=b.data("carouselwidth"),g=b.data("carouselmaxwidth"),y=b.data("carouselrepeat"),C=b.data("carouselfreescroll"),x=b.data("carsouselarrows"),k=b.data("carsouselbullets"),w=b.data("carsouselautoplay");b.show();var q=b.height();q||(q=160);var z=b.innerWidth(),I=b.find(".slides").find(".slide").length;if(b.find(".load").show(),b.find(".slides").show(),1==I&&(h.controlstatus=!1,h.keyboardcontrol=!1,h.quickoption=!1,h.mousecontrol=!1,h.autoplay=!1,h.swipestatus=!1),1==h.fullscreen?(b.find(".fullscreen").show(),b.find(".fullscreen").on("click",function(){e(this).hasClass("active")?(e(this).removeClass("active"),b.removeClass("fullscreen")):(e(this).addClass("active"),b.addClass("fullscreen"))})):b.find(".fullscreen").hide(),I>=1){if(b.find(".slides").hasClass("buttons-above")){var O=-1;if(b.find(".slides.buttons-above .slide").each(function(){O=O>e(this).find(".button-content").outerHeight()?O:e(this).find(".button-content").outerHeight()}),O){var P=0;P=parseInt(b.find(".slides.buttons-above .slide").first().css("padding-top"));var j=0;j=parseInt(b.find(".slides.buttons-above .slide").first().css("padding-bottom")),O=O+j+P,b.find(".slides.buttons-above").height(O).css("min-height",O)}if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){var O=-1;b.find(".buttons.hoverable .btns").each(function(){O=O>e(this).outerHeight()?O:e(this).outerHeight()}),O&&(O=O,b.find(".buttons.hoverable").height(O))}e(t).resize(function(){var t=-1;if(b.find(".slides.buttons-above .slide").each(function(){t=t>e(this).find(".button-content").outerHeight()?t:e(this).find(".button-content").outerHeight()}),t){var i=0;i=parseInt(b.find(".slides.buttons-above .slide").first().css("padding-top"));var s=0;s=parseInt(b.find(".slides.buttons-above .slide").first().css("padding-bottom")),t=t+s+i,b.find(".slides.buttons-above").height(t).css("min-height",t)}if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){var t=-1;b.find(".buttons.hoverable .btns").each(function(){t=t>e(this).outerHeight()?t:e(this).outerHeight()}),t&&(console.log(t),t=t,b.find(".buttons.hoverable").height(t))}})}if("carousel"!=h.effect){if("drag"!=h.effect){if(1==h.controlstatus){if(b.find(".next").show(),b.find(".prev").show(),1==h.controlhide){var M=b.mouseIsOver();1!=M&&(b.find(".next").css("right","-100px"),b.find(".prev").css("left","-100px")),b.hover(function(){b.find(".next").show().stop().animate({right:"10px"},300,"easeOutQuart"),b.find(".prev").show().stop().animate({left:"10px"},300,"easeOutQuart")},function(){b.find(".prev").stop().animate({left:"-100px"},300,"easeInQuart",function(){e(this).hide()}),b.find(".next").stop().animate({right:"-100px"},300,"easeInQuart",function(){e(this).hide()})})}}else b.find(".prev").hide(),b.find(".next").hide();if(1==h.autoplay){var M=b.mouseIsOver();0==h.pausehover?(b.mouseleave(function(){b.find(".timer").is(":visible")||d()}),u()):1!=M&&u();var M=b.mouseIsOver();(1!=M||0==h.pausehover)&&(h.loaddelay>0?p=setTimeout(function(){d()},h.loaddelay):d()),1==h.pausehover&&b.hover(function(){r(),1==h.timershow&&b.find(".timer").hide()},function(){r(),u(),d()})}else b.find(".timer").hide()}b.find(".slides .slide").first().addClass("active");var S=0,H=0,$=100/I;if("drag"==h.effect){b.find(".next, .prev, .bullets, .thumbs").hide(),b.addClass("grabbable"),I-=1;var A=z*I;A=-Math.abs(A);var B;b.find(".slides").draggable({axis:"x",drag:function(){b.switchClass("grabbable","grabbing")},start:function(e,t){B=t.position.left},stop:function(t,i){b.switchClass("grabbing","grabbable"),slideto=Math.ceil(Math.abs(i.position.left/z)),B0?e(this).animate({left:"0px"},h.slidespeed,h.slideeasing):i.position.left'+H+"":''+H+"");else if("thumb"==h.quickoption){var t=e(this).find("img").attr("src");b.find(".thumbs").append(e(this).hasClass("hasvideo")?0==H?''+H+"":''+H+"":0==H?''+H+"":''+H+"")}e(this).css(0==H?{"z-index":"1",opacity:"1"}:{"z-index":"0",opacity:"0"})}H++})}else"carousel"==h.effect&&(b.find(".slide").first().addClass("active"),f(),y&&"contain"==y?(containvalue=!0,wraparoundvalue=!1):(containvalue=!1,wraparoundvalue=!0),freescrollvalue=C?C:!1,carbulletsvalue=1==k?!0:!1,carautoplayvalue=w?w:!1,b.find(".slides").flickity({cellSelector:".slide",autoPlay:carautoplayvalue,prevNextButtons:!1,pageDots:carbulletsvalue,wrapAround:wraparoundvalue,freeScroll:freescrollvalue,contain:containvalue}),0!=x?(b.find(".next").on("click",function(){b.find(".slides").flickity("next")}),b.find(".prev").on("click",function(){b.find(".slides").flickity("previous")}),v(),b.find(".slides").on("cellSelect",function(){v()})):(b.find(".next").hide(),b.find(".prev").hide()),e(t).resize(function(){f()}));"drag"!=h.effect&&"carousel"!=h.effect?(b.find(".next").on("click",function(e){e.preventDefault(),1==h.autoplay&&0==h.pausehover?(r(),n(),u(),d()):n()}),b.find(".prev").on("click",function(e){e.preventDefault(),1==h.autoplay&&0==h.pausehover?(r(),l(),u(),c()):l()}),1==h.keyboardcontrol&&e(i).keydown(function(e){var t=b.mouseIsOver();1==t&&(37==e.keyCode&&(1==h.autoplay&&0==h.pausehover?(r(),l(),u(),c()):l()),39==e.keyCode&&(1==h.autoplay&&0==h.pausehover?(r(),n(),u(),d()):n()))}),0==h.popupimages&&"none"==h.quickoption&&0!=h.mousecontrol&&b.on("mousedown",function(t){t.stopPropagation(),t.preventDefault();var i=e(this).innerWidth(),s=e(this).offset(),a=t.pageX-s.left;i/2>a&&(1==h.autoplay&&0==h.pausehover?(r(),l(),u(),c()):1==h.autoplay&&0==h.pausehover?(r(),n(),u(),d()):n())}),b.find(".bullets a, .thumbs a, .buttons a").on("click",function(t){if(t.stopPropagation(),t.preventDefault(),!b.find(".slide").is(":animated")&&!e(this).hasClass("active")){thisbull=e(this);var i=thisbull.attr("id");o(thisbull,i)}}),1==h.swipestatus&&b.swipe({swipe:function(e,t){"left"==t?1==h.autoplay?(r(),n(),u(),d()):n():"right"==t&&(1==h.autoplay?(r(),l(),u(),c()):l())},threshold:75,allowPageScroll:"vertical"})):b.find(".bullets, .thumbs").hide(),b.find(".load").delay(h.loaddelay).fadeOut()}}}(jQuery,window,document);!function(t){t.fn.MindSetImages=function(n){var e=t.extend({alignmenttop:"",alignmentleft:"",type:"img"},n);thisObj=this;var a;a=thisObj.hasClass("contain"),a=a?"contain":"cover";var i,_;if(thisObj.hasClass("top-top")?i="top":thisObj.hasClass("top-center")?i="center":thisObj.hasClass("top-bottom")&&(i="bottom"),thisObj.hasClass("left-left")?_="left":thisObj.hasClass("left-center")?_="center":thisObj.hasClass("left-right")&&(_="right"),i&&e.alignmenttop?e.alignmenttop=i:i&&!e.alignmenttop&&(e.alignmenttop=i),_&&e.alignmentleft?e.alignmentleft=_:_&&!e.alignmentleft&&(e.alignmentleft=_),thisObj.attr("data-imagepos")){var s=thisObj.data("imagepos");"top-left"==s?(e.alignmenttop="top",e.alignmentleft="left"):"top-center"==s?(e.alignmenttop="top",e.alignmentleft="center"):"top-right"==s?(e.alignmenttop="top",e.alignmentleft="right"):"center-left"==s?(e.alignmenttop="center",e.alignmentleft="left"):"center-center"==s?(e.alignmenttop="center",e.alignmentleft="center"):"center-right"==s?(e.alignmenttop="center",e.alignmentleft="right"):"bottom-left"==s?(e.alignmenttop="bottom",e.alignmentleft="left"):"bottom-center"==s?(e.alignmenttop="bottom",e.alignmentleft="center"):"bottom-right"==s&&(e.alignmenttop="bottom",e.alignmentleft="right")}var w="img, video, object";thisObj.find(w).each(function(){var n=t(this),i=n.get(0).tagName,_=n.attr("height");if(!_)var _=n.innerHeight();var s=n.attr("width");if(!s)var s=n.innerWidth();var w=thisObj.innerHeight(),l=thisObj.innerWidth(),r=thisObj.parents('[class*="col-"]').innerHeight(),h=thisObj.parent().innerHeight();w||(w=h>r?h:r),n.hasClass("ignore")||"VIDEO"==i||(_>s?(new_w=l,asp_r=s/new_w,new_h=_/asp_r,new_hw?(new_h=w,asp_r=_/new_h,new_w=s/asp_r):"contain"==a&&new_w>l&&(new_w=l,asp_r=s/new_w,new_h=_/asp_r)):"contain"==a&&new_h>w&&(new_h=w,asp_r=_/new_h,new_w=s/asp_r)):s>_?(new_h=w,asp_r=_/new_h,new_w=s/asp_r,"contain"==a&&new_w>l?(new_w=l,asp_r=s/new_w,new_h=_/asp_r):new_ww?(new_h=w,asp_r=_/new_h,new_w=s/asp_r):"contain"==a&&new_w>l&&(new_w=l,asp_r=s/new_w,new_h=_/asp_r))):s==_&&(new_w=l,asp_r=s/new_w,new_h=_/asp_r,"contain"==a&&new_h>w?(new_h=w,asp_r=_/new_h,new_w=s/asp_r):"contain"==a&&new_w>l?(new_w=l,asp_r=s/new_w,new_h=_/asp_r):new_hl&&(new_w=l,asp_r=s/new_w,new_h=_/asp_r))),e.alignmenttop&&("center"==e.alignmenttop&&(img_t=w-new_h,img_t=Math.abs(img_t),img_t/=2,new_h>w?n.css("top","-"+img_t+"px"):n.css("top",img_t+"px")),"top"==e.alignmenttop&&n.css("top","0px"),"bottom"==e.alignmenttop&&n.css("bottom","0px")),e.alignmentleft&&("center"==e.alignmentleft&&(img_l=l-new_w,img_l=Math.abs(img_l),img_l/=2,new_w>l?n.css("left","-"+img_l+"px"):n.css("left",img_l+"px")),"left"==e.alignmentleft&&n.css("left","0px"),"right"==e.alignmentleft&&n.css("right","0px")),n.css("position","absolute"),n.height(new_h),n.width(new_w))})}}(jQuery);/* Copyright (c) 2013 Yendif! Technologies Ltd. @license GNU/GPL http://www.gnu.org/licenses/gpl-2.0.html @link http://www.yendifplayer.com @version Version 5.1.0 */ (function(d,k,g){function w(a,b){this.$el=d(a);this.config=b;++pid;var c=(new Date).getTime().toString()+""+pid;this.yendif={id:this.$el.attr("id")||c,uid:c,index:0,media:"video",engine:b.engine,volume:b.volume,playlistPosition:b.playlistPosition,l:b.logo,lc:b.license,isL:!1,isER:!1,isW:!1,isP:!1,isFS:!1,isR:!0,markup:"",status:A,interval:[]};this.yendif.id.replace("yf","");this.playlist={};this.init();return this}function B(a,b){var c,e,h;function f(a){d("body").addClass("noselect");var b=parseInt(n.obj.css(t), 10);c=u?a.pageX:a.pageY;e="auto"==b?0:b;touchEvents?(g.ontouchmove=function(a){a.preventDefault();v(a.touches[0])},g.ontouchend=k):(d(g).bind("mousemove",v),d(g).bind("mouseup",k),n.obj.bind("mouseup",k));a.preventDefault()}function v(a){1>m.ratio&&(h=touchEvents?Math.min(p[b.axis]-n[b.axis],Math.max(0,e+(c-(u?a.pageX:a.pageY)))):Math.min(p[b.axis]-n[b.axis],Math.max(0,e+((u?a.pageX:a.pageY)-c))),q=h*s.ratio,m.obj.css(t,-q),n.obj.css(t,h));a.preventDefault()}function k(){d("body").removeClass("noselect"); d(g).unbind("mousemove",v);d(g).unbind("mouseup",k);n.obj.unbind("mouseup",k);g.ontouchmove=g.ontouchend=null}var l={obj:d(".yf-viewport",a)},m={obj:d(".yf-overview",a)},s={obj:d(".yf-scrollbar",a)},p={obj:d(".yf-track",s.obj)},n={obj:d(".yf-thumb",s.obj)},u="x"===b.axis,t=u?"left":"top",r=u?"Width":"Height",q=0;h=e=0;c=void 0;this.update=function(a){l[b.axis]=l.obj[0]["offset"+r];m[b.axis]=m.obj[0]["scroll"+r];m.ratio=l[b.axis]/m[b.axis];s.obj.toggleClass("disable",1<=m.ratio);p[b.axis]=l[b.axis]; n[b.axis]=Math.min(p[b.axis],Math.max(0,p[b.axis]*m.ratio));s.ratio=m[b.axis]/p[b.axis];q="relative"===a&&1>=m.ratio?Math.min(m[b.axis]-l[b.axis],Math.max(0,q)):0;q="bottom"===a&&1>=m.ratio?m[b.axis]-l[b.axis]:isNaN(parseInt(a,10))?q:parseInt(a,10);a=r.toLowerCase();n.obj.css(t,q/s.ratio);m.obj.css(t,-q);c=n.obj.offset()[t];s.obj.css(a,p[b.axis]);p.obj.css(a,p[b.axis]);n.obj.css(a,n[b.axis])};this.update();(function(){touchEvents?l.obj[0].ontouchstart=function(a){1===a.touches.length&&(f(a.touches[0]), a.stopPropagation())}:(n.obj.bind("mousedown",f),p.obj.bind("mouseup",v))})();return this}var x=/\.(\w{3,4})(\?.*)?$/i,r=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,C=/^(([0-9]{2}:)?[0-9]{2}:[0-9]{2}[,.]{1}[0-9]{3}) --\> (([0-9]{2}:)?[0-9]{2}:[0-9]{2}[,.]{1}[0-9]{3})(.*)/,A=-1;script=g.getElementsByTagName("script");script=script[script.length-1].src;file=/embed.js/.test(script)?"embed.js":"yendifplayer.js";base=script.split(file)[0];focused="";pid=0;isNFS=1;device={mobile:!1}; touchEvents="ontouchstart"in g.documentElement;browser=function(){var a=navigator.appName,b=navigator.userAgent,c,e=b.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);e&&null!=(c=b.match(/version\/([\.\d]+)/i))&&(e[2]=c[1]);return e=e?[e[1].toLowerCase(),e[2]]:[a,navigator.appVersion,"-?"]}();switch(browser[0]){case "chrome":case "safari":vendor="webkit";break;case "firefox":vendor="moz";break;case "msie":vendor="ms";break;case "opera":vendor="o";break;default:vendor=""}support= {html5:!1,mp4:!1,webm:!1,ogg:!1,mpegurl:!1,mp3:!1,wav:!1,flash:!1,youtube:!1};/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)&&(device.mobile=!0);try{var y=g.createElement("video"),z=g.createElement("audio");if(y.canPlayType){var l=function(a){return/audio/.test(a)?"function"===typeof z.canPlayType&&""!==z.canPlayType(a)?!0:!1:""!==y.canPlayType(a)?!0:!1};support.html5=!0;support.mp4=l("video/mp4");support.webm=l("video/webm");support.ogg=l("video/ogg")||l("audio/ogg");support.mpegurl= l("application/x-mpegurl");support.mp3=l("audio/mpeg");support.wav=l("audio/wav")}}catch(D){}try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(support.flash=!0)}catch(E){"undefined"!=typeof navigator.plugins&&"object"==typeof navigator.plugins["Shockwave Flash"]&&(support.flash=!0)}k.onYouTubeIframeAPIReady=function(){support.youtube=!0};"msie"!==browser[0]&&(k.onbeforeunload=function(){d(".yendifplayer").hide()});k.attachEvent&&k.attachEvent("onbeforeunload",function(){__flash_savedUnloadHandler= __flash_unloadHandler=function(){}});w.prototype={init:function(){this.config.isEF?this.pM():this.iM();this.$el.attr("id",this.yendif.id).addClass("yendifplayer "+this.config.theme+" is-"+this.media).show();0===this.config.muted&&(this.yendif.volume=0);if(!this.config.origin){var a=base.split("/");this.config.origin=a[0]+"//"+a[2]+"/"}this.engine?this.engine.create(this):this.onError("error")},pM:function(){var a=this,b={};this.$media=this.$el.find("video, audio");this.media=this.$media.is("video")? "video":"audio";b.id="yf-engine-"+this.yendif.uid;"video"===this.media&&(b["x-webkit-airplay"]="allow");!0===device.mobile&&(b.controls=!0);this.$media.attr(b).addClass("yf-engine");this.$clone=this.$el.html();this.playlist.poster=this.config.poster;(src=this.config.src)?(b=src.split(x)[1],b=/flv|f4v|mov/.test(b)?"flash":/mp4|m4v/.test(b)?"mp4":b,this.playlist[b]=src):this.$el.find("source").each(function(){var b=d(this).attr("src"),e=d(this).attr("type")||b.split(x)[1],e=/mpegurl/.test(e)?"mpegurl": /mpeg/.test(e)?"mp3":e.replace(a.media+"/","");"m4v"===e&&(e="mp4");switch(e){case "flash":a.playlist.flash=b;a.playlist.rtmp=d(this).attr("data-rtmp")||"";break;case "youtube":a.pY.apply(a,[b]);break;default:a.playlist[e]=b}});this.$track=this.$el.find("track:first");this.$track.length&&(this.playlist.captions=this.$track.attr("src"),this.pVTT(this.playlist.captions));this.sE(this.yendif.engine)},iM:function(){this.media=this.config.videos?"video":"audio";this.yendif.playlist=this.config[this.media+ "s"]||"";this.gPD(-1)},gPD:function(a){var b=tracks="";if(this.playlist=this.yendif.playlist){0>a?(a="[object Array]"===Object.prototype.toString.call(this.playlist)?!0:!1,a&&(this.yendif.isP=!0,this.playlist=this.playlist[0],this.config.loop=0)):(this.yendif.index=a,this.yendif.status=2,this.playlist=this.playlist[a],this.config.autoplay=1,this.$el.addClass("is-playing").removeClass("is-paused is-embed"));for(var c in this.playlist)switch(a=this.playlist[c],c){case "flash":b+='';break;case "youtube":this.pY(a);b+='';break;case "captions":tracks+='';break;default:/mp4|webm|ogg|mpegurl|mp3|wav/.test(c)&&(type="mpegurl"==c?"application/x-mpegurl":"mp3"==c?"audio/mpeg":this.media+"/"+c,b+='')}}c="";"video"===this.media&&(c+=' x-webkit-airplay="allow"');!0===device.mobile&&(c+=' controls="true"');this.$clone="<"+this.media+ ' id="yf-engine-'+this.yendif.uid+'" class="yf-engine"'+c+">"+b+tracks+"";this.playlist.captions&&this.pVTT(this.playlist.captions);this.sE(this.yendif.engine)},pY:function(a){this.yendif.engine="youtube";this.playlist.yID=a.match(r)[2];this.playlist.poster=this.playlist.poster||"http://img.youtube.com/vi/"+this.playlist.yID+"/0.jpg"},pVTT:function(a){function b(a){a=a.split(":");2==a.length&&a.unshift(0);return 3600*a[0]+60*a[1]+parseFloat(a[2].replace(",","."))}if(a){var c=this; this.playlist.subtitles=[];d.get(a,function(a,h){var f=a.split("\n"),g=f.length;for(i=0;i"+f[++i]+"


";d.trim(f[++i])&&i"+f[i]+"


";c.playlist.subtitles.push({start:b(timecode[1]),end:b(timecode[2]||timecode[3]),content:text})}})}},sE:function(a){var b=isFlash=!1;if(!0===support.html5)for(var c="mp4 mpegurl mp3 webm ogg wav".split(" "),d=0;6>d;d++)if(format=c[d],this.playlist[format]&&support[format]){this.playlist.html5=this.playlist[format]; b=!0;break}!0===support.flash&&(this.playlist.flash||this.playlist.mp4||this.playlist.mp3)&&(isFlash=!0);switch(a){case "flash":this.engine=!0===isFlash?this.flash:!0===b?this.html5:null;break;case "youtube":this.engine=200>this.$el.width()||200>this.yendif.height?null:!0===support.flash?this.flash:this.youtube;break;default:this.engine=!0===b?this.html5:!0===isFlash?this.flash:null}},html5:{create:function(a){a.yendif.engine="html5";!0===device.mobile?(a.iSC(),a.$media[0].loop=!1,"video"===a.media&& (a.$media[0].poster=a.playlist.poster),a.$media[0].src=a.playlist.currentSrc=a.playlist.html5):(a.iCC(),a.$media[0].controls=!1,a.$media[0].poster="",a.$media[0].autoplay=a.config.autoplay,a.$media[0].loop=a.config.loop);a.yendif.isER=!0;a.$media[0].volume=a.config.volume;a.$media[0].load();if(!0===device.mobile)a.config.autoplay&&a.$media[0].play(),a.$media.on("play",function(){obj=["Media Plays",a.playlist.currentSrc];a.tE.apply(a,[obj])}),a.$media.on("ended",function(){obj=["Media Completes",a.playlist.currentSrc]; a.tE.apply(a,[obj]);a.config.loop&&a.$media[0].play()}),a.$media.on("error",function(b){err=a.$media[0].networkState;3<=err&&a.onError.apply(a,[err])});else if(a.$media.on("play",function(){a.onPlay.apply(a)}),a.$media.on("pause",function(){a.onPause.apply(a)}),a.$media.on("ended",function(){a.onEnded.apply(a)}),a.$media.on("volumechange",function(){a.config.volumebtn&&a.onVolumeChange.apply(a)}),d("source:last",a.$el).on("error",function(b){err=a.$media[0].networkState;3<=err&&a.onError.apply(a, [err])}),0this.yendif.status&&(this.yendif.status=2,this.sCtrls());this.$media[0].paused&&this.$media[0].play()},pause:function(){this.$media[0].paused||this.$media[0].pause()},time:function(){var a=this.$media[0].currentTime,b=this.playlist.seekedTime;Math.round(a)==Math.round(b)&&(this.playlist.seekedTime=b=-1);return b&&-1!==b?b:a},buffered:function(){var a=this.$media[0].seekable;return a&&0=this.$media[0].readyState)){var b=this.$media[0].seekable;b&&0b&&(this.playlist.currentTime=a=b));this.$media[0].currentTime=this.playlist.seekedTime=a;this.$media[0].paused&&this.$media[0].play()}},setVolume:function(a){this.$media[0].volume=a},muted:function(a){this.$media[0].muted=a},onEnded:function(){this.$media[0].currentTime=0;this.$media[0].pause()},destroy:function(){!0===this.yendif.isER&&(this.$media.off("pause"),this.$media[0].pause())}, changeVideo:function(a){var b=this;!1===device.mobile&&(this.$media[0].poster="",this.sL(),this.rC(),this.$media.off("error").on("error",function(a){err=b.$media[0].networkState;3<=err&&b.onError.apply(b,[err])}));this.$media[0].src=this.playlist.currentSrc=this.playlist.html5;this.$media[0].load();this.$media[0].play()}},flash:{create:function(a){a.yendif.engine="flash";a.yendif.isFS&&a.sFSE(!1);var b=(new Date).getTime().toString(),c=a.config.swf||base+"player.swf",e={id:a.yendif.id,theme:a.config.theme, analytics:a.config.analytics||"",baseref:base,origin:a.config.origin,license:a.config.license||"",logo:a.config.logo||"",poster:a.playlist.poster||"",flash:a.playlist.flash||"",server:a.playlist.rtmp||"",youtubeID:a.playlist.yID||"",mp4:a.playlist.mp4||"",webm:a.playlist.webm||"",ogg:a.playlist.ogg||"",mp3:a.playlist.mp3||"",captions:a.playlist.captions||"",autoplay:a.config.autoplay,loop:a.config.loop,autoplaylist:a.config.autoplaylist,volume:a.yendif.volume,playbtn:a.config.playbtn,controlbar:a.config.controlbar, playpause:a.config.playpause,currenttime:a.config.currenttime,progressbar:a.config.progress,duration:a.config.duration,volumebtn:a.config.volumebtn,fullscreen:a.config.fullscreen,embed:a.config.embed,keyboard:a.config.keyboard,browser:browser[0]},c=c+("?"+b),h;h='':' data="'+c+'"');h+=' type="application/x-shockwave-flash">'; var c={movie:c,name:"yf-engine-"+b,width:"100%",height:"100%",allowscriptaccess:"always",allowfullscreen:"true",quality:"high",wmode:"transparent",flashvars:""},f;for(f in e)""!==e[f]&&(c.flashvars+=f+"="+e[f]+"&");for(f in c)h+='';h+="";a.yendif.isW?a.$mediaCon.html(h):(a.$el.html('
'+h+"
"),a.$mediaCon=d("#yf-media-"+b),a.lP(),a.yendif.isW=!0);a.$media=d("#yf-engine-"+b)},destroy:function(){!0===this.yendif.isER&& (this.yendif.volume=this.$media[0].getVolume())},changeVideo:function(a){this.yendif.engine="flash";a.youtube&&(a.youtubeID=a.yID||a.youtube.match(r)[2]);this.$media[0].updateVideo(a)}},youtube:{create:function(a){a.yendif.engine=a.config.engine;if(support.html5||support.flash){if(!support.youtube){var b=g.createElement("script");b.src="https://www.youtube.com/iframe_api";var c=g.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c)}a.yendif.interval[1]=k.setInterval(function(){if(support.youtube){clearInterval(a.yendif.interval[1]); var b={autoplay:a.config.autoplay,rel:0,showinfo:0,iv_load_policy:0,wmode:"opaque",modestbranding:1};!1===device.mobile?(a.iCC(),b.controls=0,a.config.loop&&(b.loop=a.config.loop,b.playlist=a.playlist.yID),_events={onReady:function(b){a.yendif.isER=!0;a.playlist.currentSrc=a.playlist.yID;a.$el.trigger("onPlayerReady");a.volumeTo(-1)},onStateChange:function(b){switch(b.data){case YT.PlayerState.ENDED:a.onEnded.apply(a);break;case YT.PlayerState.PLAYING:a.playlist.duration=a.$media.getDuration();a.config.duration&& a.$durationDock.html(a.timeFormat(a.playlist.duration));a.onPlay.apply(a);break;case YT.PlayerState.CUED:a.onPlay.apply(a)}},onError:function(b){150!=b.data&&a.onError.apply(a,[b.data])}}):(a.iSC(),b.controls=1,_events={onReady:function(b){a.playlist.currentSrc=a.playlist.yID},onStateChange:function(b){switch(b.data){case YT.PlayerState.ENDED:obj=["Media Completes",a.playlist.currentSrc];a.tE.apply(a,[obj]);a.config.loop&&a.$media.playVideo();break;case YT.PlayerState.PLAYING:a.yendif.isER=!0,obj= ["Media Plays",a.playlist.currentSrc],a.tE.apply(a,[obj])}},onError:function(b){150!==b.data&&a.onError.apply(a,[b.data])}});a.$media=new YT.Player("yf-engine-"+a.yendif.uid,{height:"100%",width:"100%",playerVars:b,videoId:a.playlist.yID,events:_events})}},500)}else a.engine=null,a.onError()},play:function(){2>this.yendif.status&&(this.yendif.status=2,this.sCtrls());this.$media.playVideo();this.onPlay()},pause:function(){this.$media.pauseVideo();this.onPause()},time:function(){var a=this.$media.getCurrentTime(), b=this.playlist.seekedTime;Math.round(a)==Math.round(b)&&(this.playlist.seekedTime=b=-1);return b&&-1!==b?b:a},buffered:function(){return 100},seekTo:function(a){this.playlist.seekedTime=a;this.$media.seekTo(a);this.youtube.play.apply(this)},setVolume:function(a){this.$media.setVolume(100*a);this.onVolumeChange()},muted:function(a){a?this.$media.mute():this.$media.unMute();this.onVolumeChange()},onEnded:function(){},destroy:function(){!0===this.yendif.isER&&this.$media.destroy()},changeVideo:function(a){if(support.html5|| support.flash)!1===device.mobile&&this.rC(),this.yendif.engine=this.config.engine,a.yID=this.playlist.currentSrc=a.yID||a.youtube.match(r)[2],this.$media.loadVideoById(a.yID);else this.onError("error")}},iSC:function(){uid=this.yendif.uid;!1===this.yendif.isW?(this.$el.html('
'+this.$clone+"
"),this.$mediaCon=d("#yf-media-"+uid),this.lP(),this.yendif.isW=!0):this.$mediaCon.html(this.$clone);this.$media=d("#yf-engine-"+uid)},iCC:function(){var a=this.yendif.uid; if(""===this.yendif.markup){"audio"===this.media&&(this.config.playbtn=this.config.embed=this.config.fullscreen=0);for(var b="playbtn controlbar playpause currenttime progress duration volumebtn fullscreen embed".split(" "),c=browser[0].match(/msie/)?" is-"+browser[0]:"",c=c+(0===this.config.autoplay?" is-paused":" is-playing"),e=0;9>e;e++){var h=b[e];0==this.config[h]&&(c+=" no-"+h)}this.yendif.markup+='
';"video"==this.media&&(this.yendif.markup+='
',this.yendif.markup+='
');this.config.playbtn&&(this.yendif.markup+='
');"video"==this.media&&(this.yendif.markup+='
');this.yendif.markup+='
';this.config.playpause&&(this.yendif.markup+='');"audio"==this.media&& (this.yendif.markup+='');this.config.currenttime&&(this.yendif.markup+='
00:00
');this.config.progress&&(this.yendif.markup+='
',this.yendif.markup+='
',this.yendif.markup+="
");this.config.duration&&(this.yendif.markup+= '
00:00
');this.config.volumebtn&&(this.yendif.markup+='
',this.yendif.markup+='',this.yendif.markup+='
',this.yendif.markup+="
");this.config.fullscreen&&(this.yendif.markup+='');this.yendif.markup+= "
";"video"===this.media&&(this.yendif.markup+='
');this.config.embed&&(this.yendif.markup+='
',this.yendif.markup+='
',this.yendif.markup+='Paste this code in your HTML page',this.yendif.markup+='Select
');if("video"===this.media){b=function(a){for(var b="",c=a.length-1;0<=c;c--)b+=a[c];return b};h=document.createElement("a");h.href=this.config.origin;_d=h.hostname.replace("www.","");_totd=_d.length;_k=(""+this.yendif.lc).substring(1,11);_e=0;for(e=_totd-1;0<=e;e--)_e+=9187263540*_d.charCodeAt(e);_e=(""+_e).substring(0,10);_r=Math.random().toString(36).slice(2);_l=this.yendif.l;_k!==_e?(this.yendif.markup+=""+b("! fidneY yb derewoP")+"",this.yendif.l="."+_r):_l&&(_d="ogo",this.yendif.markup+="",this.yendif.l=".yf-l"+_d)}this.yendif.markup+= "
";this.config.isEF?this.$el.addClass(c).append(this.yendif.markup).wrapInner('
'):this.$el.addClass(c).html('
'+this.$clone+this.yendif.markup+"
");c="poster";this.$mediaCon=d("#yf-media-"+a);this.$skin=d("#yf-skin-"+a);this.lP();this.yendif.isW=!0}else this.$mediaCon.html(this.$clone+this.yendif.markup);this.$media=d("#yf-engine-"+a);this.bPE()},lP:function(){if(this.yendif.isP){var a=this,b=this.yendif.playlist, c=this.yendif.uid,e="";list='
';"webkit"!==vendor?list+='
':e=' style="overflow-x:hidden; overflow-y:auto;"';list+='
    ';for(var h=b.length,f=0;f",e="yf-pcontent",poster=b[f].poster,duration= b[f].duration,b[f].youtube&&!poster&&(yID=b[f].youtube.match(r)[2],poster="http://img.youtube.com/vi/"+yID+"/0.jpg"),poster?(list+='
    ',duration&&(list+=''+duration+""),list+="
    "):(e+=" yf-noimage","audio"===a.media&&(list+='
    ')),duration||(e+=" yf-nodur"),list+='
    ',b[f].title&&(list+='
    '+b[f].title+"
    "),b[f].description&&(list+='
    '+ b[f].description+"
    "),!poster&&duration&&(list+='
    '+duration+"
    "),list+="
    ",list+='
    ',list+="",list+="";list+="
";e="is-playlist";if("audio"===this.media||500>this.$el.width())this.yendif.playlistPosition="bottom";"bottom"===this.yendif.playlistPosition&&(e+=" playlist-bottom");this.$el.addClass(e).append('
'+list+"
");this.$playlist=d("#yf-playlist-"+c);this.$playlistItem= d("a",this.$playlist);this.$playlistScrollbar=d("#yf-scrollbar-"+c);this.$playlistViewport=d("#yf-viewport-"+c);this.$playlist.on("click","a",function(b){b.preventDefault();b.stopPropagation();b=d(this).attr("data-index");b!=a.yendif.index&&a.lPI.apply(a,[b])})}this.sPD()},lPI:function(a){if(this.yendif.isP){a>=this.yendif.playlist.length&&(this.yendif.index=a=0);this.cAI();this.playlist=[];var b=this.engine;this.gPD(a);if(null!==b&&"msie"!==browser[0]&&b===this.engine&&!0===this.yendif.isER)files= this.yendif.playlist,b.changeVideo.apply(this,[files[a]]);else if(b?b.destroy.apply(this):this.sE(this.yendif.engine),this.engine)this.yendif.isER=!1,this.engine.create(this);else this.onError("error");this.$playlistItem.removeClass("active");d("#"+this.yendif.uid+"_item"+a).addClass("active")}},sPD:function(){var a=this,b=this.$el.width(),c=device.mobile&&"flash"!==this.yendif.engine?36:26,e=this.yendif.isP&&"bottom"===this.yendif.playlistPosition?this.config.playlistHeight:0;this.config.responsive? (pWid=this.$el.parent().width(),pct=b/pWid,hei="audio"===this.media?c+e:b*this.config.ratio+e,this.$el.css({width:b+"px",height:hei+"px"}),d(k).resize(function(){if(!1!==a.yendif.isR){var b=a.$el.parent().width()*pct;a.yendif.isP&&"right"===a.config.playlistPosition&&"video"===a.media&&(500>b?"right"===a.yendif.playlistPosition&&(a.yendif.playlistPosition="bottom",a.$el.addClass("playlist-bottom")):"bottom"===a.yendif.playlistPosition&&(a.yendif.playlistPosition="right",a.$el.removeClass("playlist-bottom"))); var d=a.yendif.isP&&"bottom"===a.yendif.playlistPosition?a.config.playlistHeight:0;hei="audio"===a.media?c+d:b*a.config.ratio+d;a.$el.css({width:b+"px",height:hei+"px"});a.sPlD.apply(a,[b,hei,!1])}})):(hei="audio"===this.media?c+e:this.$el.height()||b*this.config.ratio+e,this.$el.css({width:b+"px",height:hei+"px"}));this.sPlD.apply(this,[b,hei,!0])},sPlD:function(a,b,c){this.yendif.isP&&("right"===this.yendif.playlistPosition?(this.$mediaCon.css({width:a-this.config.playlistWidth+"px",height:b+"px"}), this.$playlist.css({width:this.config.playlistWidth+"px",height:""}),this.$playlistViewport.css("height",b+"px")):(this.$mediaCon.css({width:"",height:b-this.config.playlistHeight+"px"}),this.$playlist.css({width:"",height:this.config.playlistHeight+"px"}),this.$playlistViewport.css("height",this.config.playlistHeight+"px")),"webkit"!==vendor&&(!0===c&&this.$playlist.yendifscrollbar(),this.$playlist.yendifscrollbar("update")))},bPE:function(){var a=this,b=this.yendif.uid;this.$poster=d("#yf-poster-"+ b).hide();this.playlist.poster&&(this.$poster.css("background-image",'url("'+this.playlist.poster+'")'),0===this.config.autoplay&&this.$poster.show());this.$loading=d("#yf-loading-"+b);"video"==this.media&&(this.$playbtn=d("#yf-playbtn-"+b),this.$screen=d("#yf-screen-"+b),this.$screen.on("click",function(){a.tPP.apply(a)}));this.$controls=d("#yf-controls-"+b);"video"==this.media&&this.$controls.hide();this.config.playpause&&(this.$playpauseBtn=d("#yf-playpause-"+b),this.$playpauseBtn.on("click",function(b){b.preventDefault(); a.tPP.apply(a)}));this.config.currenttime&&(this.$currentTimeDock=d("#yf-currenttime-"+b));this.config.progress&&(this.$progressWrapper=d("#yf-timeline-"+b),this.$bufferBar=d("#yf-buffer-"+b),this.$progressBar=d("#yf-progress-"+b),this.$progressWrapper.on("mousedown",function(b){focused=a;0a.yendif.status&& (0===a.yendif.status?a.engine.play.apply(a):a.yendif.status=1)});1===this.config.autoplay&&(this.sL(),this.yendif.status=2,this.sCtrls())},gEC:function(){var a='