/
var
/
www
/
barefootlaw.org
/
wp-content
/
themes
/
barefoot
/
inc
/
basement
/
Upload File
HOME
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){var e=function(i,s){this.$element=t(i),this.options=t.extend({},e.DEFAULTS,this.dataOptions(),s),this.init()};e.DEFAULTS={from:0,to:0,speed:1e3,refreshInterval:100,decimals:0,formatter:function(t,e){return t.toFixed(e.decimals)},onUpdate:null,onComplete:null},e.prototype.init=function(){this.value=this.options.from,this.loops=Math.ceil(this.options.speed/this.options.refreshInterval),this.loopCount=0,this.increment=(this.options.to-this.options.from)/this.loops},e.prototype.dataOptions=function(){var t={from:this.$element.data("from"),to:this.$element.data("to"),speed:this.$element.data("speed"),refreshInterval:this.$element.data("refresh-interval"),decimals:this.$element.data("decimals")},e=Object.keys(t);for(var i in e){var s=e[i];void 0===t[s]&&delete t[s]}return t},e.prototype.update=function(){this.value+=this.increment,this.loopCount++,this.render(),"function"==typeof this.options.onUpdate&&this.options.onUpdate.call(this.$element,this.value),this.loopCount>=this.loops&&(clearInterval(this.interval),this.value=this.options.to,"function"==typeof this.options.onComplete&&this.options.onComplete.call(this.$element,this.value))},e.prototype.render=function(){var t=this.options.formatter.call(this.$element,this.value,this.options);this.$element.text(t)},e.prototype.restart=function(){this.stop(),this.init(),this.start()},e.prototype.start=function(){this.stop(),this.render(),this.interval=setInterval(this.update.bind(this),this.options.refreshInterval)},e.prototype.stop=function(){this.interval&&clearInterval(this.interval)},e.prototype.toggle=function(){this.interval?this.stop():this.start()},t.fn.countTo=function(i){return this.each(function(){var s=t(this),n=s.data("countTo"),o="object"==typeof i?i:{},r="string"==typeof i?i:"start";(!n||"object"==typeof i)&&(n&&n.stop(),s.data("countTo",n=new e(this,o))),n[r].call(n)})}}),function(t,e){"$:nomunge";var i,s=t.jQuery||t.Cowboy||(t.Cowboy={});s.throttle=i=function(t,i,n,o){function r(){function s(){l=+new Date,n.apply(r,h)}var r=this,c=+new Date-l,h=arguments;o&&!a&&s(),a&&clearTimeout(a),o===e&&c>t?s():!0!==i&&(a=setTimeout(o?function(){a=e}:s,o===e?t-c:t))}var a,l=0;return"boolean"!=typeof i&&(o=n,n=i,i=e),s.guid&&(r.guid=n.guid=n.guid||s.guid++),r},s.debounce=function(t,s,n){return n===e?i(t,s,!1):i(t,n,!1!==s)}}(this),function(t){function e(e){var i=e||window.event,s=[].slice.call(arguments,1),n=0,o=0,r=0;return e=t.event.fix(i),e.type="mousewheel",i.wheelDelta&&(n=i.wheelDelta/120),i.detail&&(n=-i.detail/3),r=n,void 0!==i.axis&&i.axis===i.HORIZONTAL_AXIS&&(r=0,o=-1*n),void 0!==i.wheelDeltaY&&(r=i.wheelDeltaY/120),void 0!==i.wheelDeltaX&&(o=-1*i.wheelDeltaX/120),s.unshift(e,n,o,r),(t.event.dispatch||t.event.handle).apply(this,s)}var i=["DOMMouseScroll","mousewheel"];if(t.event.fixHooks)for(var s=i.length;s;)t.event.fixHooks[i[--s]]=t.event.mouseHooks;t.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var t=i.length;t;)this.addEventListener(i[--t],e,!1);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var t=i.length;t;)this.removeEventListener(i[--t],e,!1);else this.onmousewheel=null}},t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})}(jQuery),function(t){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],t):t("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function(t){"use strict";function e(e){return!e||void 0!==e.allowPageScroll||void 0===e.swipe&&void 0===e.swipeStatus||(e.allowPageScroll=l),void 0!==e.click&&void 0===e.tap&&(e.tap=e.click),e||(e={}),e=t.extend({},t.fn.swipe.defaults,e),this.each(function(){var A=t(this),E=A.data(T);E||(E=new function(e,A){function E(e){if(!0!==xt.data(T+"_intouch")&&!(t(e.target).closest(A.excludedElements,xt).length>0)){var r=e.originalEvent?e.originalEvent:e;if(!r.pointerType||"mouse"!=r.pointerType||0!=A.fallbackToMouseEvents){var a,l=r.touches,c=l?l[0]:r;return Ct=b,l?St=l.length:!1!==A.preventDefaultEvents&&e.preventDefault(),dt=0,ft=null,pt=null,_t=null,mt=0,gt=0,vt=0,yt=1,bt=0,wt=function(){var t={};return t[i]=et(i),t[s]=et(s),t[n]=et(n),t[o]=et(o),t}(),Q(),Z(0,c),!l||St===A.fingers||A.fingers===v||j()?(Tt=ot(),2==St&&(Z(1,l[1]),gt=vt=st(It[0].start,It[1].start)),(A.swipeStatus||A.pinchStatus)&&(a=N(r,Ct))):a=!1,!1===a?(Ct=x,N(r,Ct),a):(A.hold&&(Dt=setTimeout(t.proxy(function(){xt.trigger("hold",[r.target]),A.hold&&(a=A.hold.call(xt,r,r.target))},this),A.longTapThreshold)),K(!0),null)}}}function k(e){var h=e.originalEvent?e.originalEvent:e;if(Ct!==w&&Ct!==x&&!X()){var u,d=h.touches,f=J(d?d[0]:h);if(At=ot(),d&&(St=d.length),A.hold&&clearTimeout(Dt),Ct=_,2==St&&(0==gt?(Z(1,d[1]),gt=vt=st(It[0].start,It[1].start)):(J(d[1]),vt=st(It[0].end,It[1].end),It[0].end,It[1].end,_t=yt<1?a:r),yt=function(t,e){return(e/t*1).toFixed(2)}(gt,vt),bt=Math.abs(gt-vt)),St===A.fingers||A.fingers===v||!d||j()){if(ft=nt(f.start,f.end),pt=nt(f.last,f.end),function(t,e){if(!1!==A.preventDefaultEvents)if(A.allowPageScroll===l)t.preventDefault();else{var r=A.allowPageScroll===c;switch(e){case i:(A.swipeLeft&&r||!r&&A.allowPageScroll!=m)&&t.preventDefault();break;case s:(A.swipeRight&&r||!r&&A.allowPageScroll!=m)&&t.preventDefault();break;case n:(A.swipeUp&&r||!r&&A.allowPageScroll!=g)&&t.preventDefault();break;case o:(A.swipeDown&&r||!r&&A.allowPageScroll!=g)&&t.preventDefault()}}}(e,pt),dt=function(t,e){return Math.round(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)))}(f.start,f.end),mt=it(),function(t,e){t!=l&&(e=Math.max(e,tt(t)),wt[t].distance=e)}(ft,dt),u=N(h,Ct),!A.triggerOnTouchEnd||A.triggerOnTouchLeave){var p=!0;if(A.triggerOnTouchLeave){var y=function(e){var i=(e=t(e)).offset();return{left:i.left,right:i.left+e.outerWidth(),top:i.top,bottom:i.top+e.outerHeight()}}(this);p=function(t,e){return t.x>e.left&&t.x<e.right&&t.y>e.top&&t.y<e.bottom}(f.end,y)}!A.triggerOnTouchEnd&&p?Ct=z(_):A.triggerOnTouchLeave&&!p&&(Ct=z(w)),Ct!=x&&Ct!=w||N(h,Ct)}}else Ct=x,N(h,Ct);!1===u&&(Ct=x,N(h,Ct))}}function O(t){var e=t.originalEvent?t.originalEvent:t,i=e.touches;if(i){if(i.length&&!X())return function(t){Et=ot(),kt=t.touches.length+1}(e),!0;if(i.length&&X())return!0}return X()&&(St=kt),At=ot(),mt=it(),F()||!R()?(Ct=x,N(e,Ct)):A.triggerOnTouchEnd||!1===A.triggerOnTouchEnd&&Ct===_?(!1!==A.preventDefaultEvents&&!1!==t.cancelable&&t.preventDefault(),Ct=w,N(e,Ct)):!A.triggerOnTouchEnd&&V()?(Ct=w,L(e,Ct,d)):Ct===_&&(Ct=x,N(e,Ct)),K(!1),null}function P(){St=0,At=0,Tt=0,gt=0,vt=0,yt=1,Q(),K(!1)}function D(t){var e=t.originalEvent?t.originalEvent:t;A.triggerOnTouchLeave&&(Ct=z(w),N(e,Ct))}function M(){xt.unbind(at,E),xt.unbind(ut,P),xt.unbind(lt,k),xt.unbind(ct,O),ht&&xt.unbind(ht,D),K(!1)}function z(t){var e=t,i=B(),s=R(),n=F();return!i||n?e=x:!s||t!=_||A.triggerOnTouchEnd&&!A.triggerOnTouchLeave?!s&&t==w&&A.triggerOnTouchLeave&&(e=x):e=w,e}function N(t,e){var i,s=t.touches;return(!(!H()||!q())||q())&&(i=L(t,e,h)),(!(!$()||!j())||j())&&!1!==i&&(i=L(t,e,u)),!Y()||!G()||!1===i?!(mt>A.longTapThreshold&&dt<y&&A.longTap)||!1===i?!(1!==St&&C||!(isNaN(dt)||dt<A.threshold)||!V())&&!1!==i&&(i=L(t,e,d)):i=L(t,e,p):i=L(t,e,f),e===x&&P(),e===w&&(s?s.length||P():P()),i}function L(e,l,c){var m;if(c==h){if(xt.trigger("swipeStatus",[l,ft||null,dt||0,mt||0,St,It,pt]),A.swipeStatus&&!1===(m=A.swipeStatus.call(xt,e,l,ft||null,dt||0,mt||0,St,It,pt)))return!1;if(l==w&&H()){if(clearTimeout(Pt),clearTimeout(Dt),xt.trigger("swipe",[ft,dt,mt,St,It,pt]),A.swipe&&!1===(m=A.swipe.call(xt,e,ft,dt,mt,St,It,pt)))return!1;switch(ft){case i:xt.trigger("swipeLeft",[ft,dt,mt,St,It,pt]),A.swipeLeft&&(m=A.swipeLeft.call(xt,e,ft,dt,mt,St,It,pt));break;case s:xt.trigger("swipeRight",[ft,dt,mt,St,It,pt]),A.swipeRight&&(m=A.swipeRight.call(xt,e,ft,dt,mt,St,It,pt));break;case n:xt.trigger("swipeUp",[ft,dt,mt,St,It,pt]),A.swipeUp&&(m=A.swipeUp.call(xt,e,ft,dt,mt,St,It,pt));break;case o:xt.trigger("swipeDown",[ft,dt,mt,St,It,pt]),A.swipeDown&&(m=A.swipeDown.call(xt,e,ft,dt,mt,St,It,pt))}}}if(c==u){if(xt.trigger("pinchStatus",[l,_t||null,bt||0,mt||0,St,yt,It]),A.pinchStatus&&!1===(m=A.pinchStatus.call(xt,e,l,_t||null,bt||0,mt||0,St,yt,It)))return!1;if(l==w&&$())switch(_t){case r:xt.trigger("pinchIn",[_t||null,bt||0,mt||0,St,yt,It]),A.pinchIn&&(m=A.pinchIn.call(xt,e,_t||null,bt||0,mt||0,St,yt,It));break;case a:xt.trigger("pinchOut",[_t||null,bt||0,mt||0,St,yt,It]),A.pinchOut&&(m=A.pinchOut.call(xt,e,_t||null,bt||0,mt||0,St,yt,It))}}return c==d?l!==x&&l!==w||(clearTimeout(Pt),clearTimeout(Dt),G()&&!Y()?(Ot=ot(),Pt=setTimeout(t.proxy(function(){Ot=null,xt.trigger("tap",[e.target]),A.tap&&(m=A.tap.call(xt,e,e.target))},this),A.doubleTapThreshold)):(Ot=null,xt.trigger("tap",[e.target]),A.tap&&(m=A.tap.call(xt,e,e.target)))):c==f?l!==x&&l!==w||(clearTimeout(Pt),clearTimeout(Dt),Ot=null,xt.trigger("doubletap",[e.target]),A.doubleTap&&(m=A.doubleTap.call(xt,e,e.target))):c==p&&(l!==x&&l!==w||(clearTimeout(Pt),Ot=null,xt.trigger("longtap",[e.target]),A.longTap&&(m=A.longTap.call(xt,e,e.target)))),m}function R(){var t=!0;return null!==A.threshold&&(t=dt>=A.threshold),t}function F(){var t=!1;return null!==A.cancelThreshold&&null!==ft&&(t=tt(ft)-dt>=A.cancelThreshold),t}function B(){return!(A.maxTimeThreshold&&mt>=A.maxTimeThreshold)}function $(){var t=W(),e=U(),i=null===A.pinchThreshold||bt>=A.pinchThreshold;return t&&e&&i}function j(){return!!(A.pinchStatus||A.pinchIn||A.pinchOut)}function H(){var t=B(),e=R(),i=W(),s=U();return!F()&&s&&i&&e&&t}function q(){return!!(A.swipe||A.swipeStatus||A.swipeLeft||A.swipeRight||A.swipeUp||A.swipeDown)}function W(){return St===A.fingers||A.fingers===v||!C}function U(){return 0!==It[0].end.x}function V(){return!!A.tap}function G(){return!!A.doubleTap}function Y(){if(null==Ot)return!1;var t=ot();return G()&&t-Ot<=A.doubleTapThreshold}function Q(){Et=0,kt=0}function X(){var t=!1;if(Et){ot()-Et<=A.fingerReleaseThreshold&&(t=!0)}return t}function K(t){xt&&(!0===t?(xt.bind(lt,k),xt.bind(ct,O),ht&&xt.bind(ht,D)):(xt.unbind(lt,k,!1),xt.unbind(ct,O,!1),ht&&xt.unbind(ht,D,!1)),xt.data(T+"_intouch",!0===t))}function Z(t,e){var i={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return i.start.x=i.last.x=i.end.x=e.pageX||e.clientX,i.start.y=i.last.y=i.end.y=e.pageY||e.clientY,It[t]=i,i}function J(t){var e=void 0!==t.identifier?t.identifier:0,i=function(t){return It[t]||null}(e);return null===i&&(i=Z(e,t)),i.last.x=i.end.x,i.last.y=i.end.y,i.end.x=t.pageX||t.clientX,i.end.y=t.pageY||t.clientY,i}function tt(t){if(wt[t])return wt[t].distance}function et(t){return{direction:t,distance:0}}function it(){return At-Tt}function st(t,e){var i=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);return Math.round(Math.sqrt(i*i+s*s))}function nt(t,e){if(function(t,e){return t.x==e.x&&t.y==e.y}(t,e))return l;var r=function(t,e){var i=t.x-e.x,s=e.y-t.y,n=Math.atan2(s,i),o=Math.round(180*n/Math.PI);return o<0&&(o=360-Math.abs(o)),o}(t,e);return r<=45&&r>=0?i:r<=360&&r>=315?i:r>=135&&r<=225?s:r>45&&r<135?o:n}function ot(){return(new Date).getTime()}var A=t.extend({},A),rt=C||I||!A.fallbackToMouseEvents,at=rt?I?S?"MSPointerDown":"pointerdown":"touchstart":"mousedown",lt=rt?I?S?"MSPointerMove":"pointermove":"touchmove":"mousemove",ct=rt?I?S?"MSPointerUp":"pointerup":"touchend":"mouseup",ht=rt?I?"mouseleave":null:"mouseleave",ut=I?S?"MSPointerCancel":"pointercancel":"touchcancel",dt=0,ft=null,pt=null,mt=0,gt=0,vt=0,yt=1,bt=0,_t=0,wt=null,xt=t(e),Ct="start",St=0,It={},Tt=0,At=0,Et=0,kt=0,Ot=0,Pt=null,Dt=null;try{xt.bind(at,E),xt.bind(ut,P)}catch(e){t.error("events not supported "+at+","+ut+" on jQuery.swipe")}this.enable=function(){return this.disable(),xt.bind(at,E),xt.bind(ut,P),xt},this.disable=function(){return M(),xt},this.destroy=function(){M(),xt.data(T,null),xt=null},this.option=function(e,i){if("object"==typeof e)A=t.extend(A,e);else if(void 0!==A[e]){if(void 0===i)return A[e];A[e]=i}else{if(!e)return A;t.error("Option "+e+" does not exist on jQuery.swipe.options")}return null}}(this,e),A.data(T,E))})}var i="left",s="right",n="up",o="down",r="in",a="out",l="none",c="auto",h="swipe",u="pinch",d="tap",f="doubletap",p="longtap",m="horizontal",g="vertical",v="all",y=10,b="start",_="move",w="end",x="cancel",C="ontouchstart"in window,S=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!C,I=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!C,T="TouchSwipe";t.fn.swipe=function(i){var s=t(this),n=s.data(T);if(n&&"string"==typeof i){if(n[i])return n[i].apply(n,Array.prototype.slice.call(arguments,1));t.error("Method "+i+" does not exist on jQuery.swipe")}else if(n&&"object"==typeof i)n.option.apply(n,arguments);else if(!(n||"object"!=typeof i&&i))return e.apply(this,arguments);return s},t.fn.swipe.version="1.6.18",t.fn.swipe.defaults={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:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0},t.fn.swipe.phases={PHASE_START:b,PHASE_MOVE:_,PHASE_END:w,PHASE_CANCEL:x},t.fn.swipe.directions={LEFT:i,RIGHT:s,UP:n,DOWN:o,IN:r,OUT:a},t.fn.swipe.pageScroll={NONE:l,HORIZONTAL:m,VERTICAL:g,AUTO:c},t.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:v}}),function(t,e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(t.jQuery)}(this,function(t){function e(t){if(t in c.style)return t;for(var e=["Moz","Webkit","O","ms"],i=t.charAt(0).toUpperCase()+t.substr(1),s=0;s<e.length;++s){var n=e[s]+i;if(n in c.style)return n}}function i(t){return"string"==typeof t&&this.parse(t),this}function s(t,e,i){!0===e?t.queue(i):e?t.queue(e,i):t.each(function(){i.call(this)})}function n(e,i,s,n){var o=function(e){var i=[];return t.each(e,function(e){e=t.camelCase(e),e=r(e=t.transit.propertyMap[e]||t.cssProps[e]||e),h[e]&&(e=r(h[e])),-1===t.inArray(e,i)&&i.push(e)}),i}(e);t.cssEase[s]&&(s=t.cssEase[s]);var a=l(i)+" "+s;parseInt(n,10)>0&&(a+=" "+l(n));var c=[];return t.each(o,function(t,e){c.push(e+" "+a)}),c.join(", ")}function o(e,i){i||(t.cssNumber[e]=!0),t.transit.propertyMap[e]=h.transform,t.cssHooks[e]={get:function(i){return t(i).css("transit:transform").get(e)},set:function(i,s){var n=t(i).css("transit:transform");n.setFromString(e,s),t(i).css({"transit:transform":n})}}}function r(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function a(t,e){return"string"!=typeof t||t.match(/^[\-0-9\.]+$/)?""+t+e:t}function l(e){var i=e;return"string"!=typeof i||i.match(/^[\-0-9\.]+/)||(i=t.fx.speeds[i]||t.fx.speeds._default),a(i,"ms")}t.transit={version:"0.9.12",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:!0,useTransitionEnd:!1};var c=document.createElement("div"),h={},u=navigator.userAgent.toLowerCase().indexOf("chrome")>-1;h.transition=e("transition"),h.transitionDelay=e("transitionDelay"),h.transform=e("transform"),h.transformOrigin=e("transformOrigin"),h.filter=e("Filter"),h.transform3d=(c.style[h.transform]="",c.style[h.transform]="rotateY(90deg)",""!==c.style[h.transform]);var d=h.transitionEnd={transition:"transitionend",MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"}[h.transition]||null;for(var f in h)h.hasOwnProperty(f)&&void 0===t.support[f]&&(t.support[f]=h[f]);return c=null,t.cssEase={_default:"ease",in:"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeInCubic:"cubic-bezier(.550,.055,.675,.190)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"},t.cssHooks["transit:transform"]={get:function(e){return t(e).data("transform")||new i},set:function(e,s){var n=s;n instanceof i||(n=new i(n)),"WebkitTransform"!==h.transform||u?e.style[h.transform]=n.toString():e.style[h.transform]=n.toString(!0),t(e).data("transform",n)}},t.cssHooks.transform={set:t.cssHooks["transit:transform"].set},t.cssHooks.filter={get:function(t){return t.style[h.filter]},set:function(t,e){t.style[h.filter]=e}},t.fn.jquery<"1.8"&&(t.cssHooks.transformOrigin={get:function(t){return t.style[h.transformOrigin]},set:function(t,e){t.style[h.transformOrigin]=e}},t.cssHooks.transition={get:function(t){return t.style[h.transition]},set:function(t,e){t.style[h.transition]=e}}),o("scale"),o("scaleX"),o("scaleY"),o("translate"),o("rotate"),o("rotateX"),o("rotateY"),o("rotate3d"),o("perspective"),o("skewX"),o("skewY"),o("x",!0),o("y",!0),i.prototype={setFromString:function(t,e){var s="string"==typeof e?e.split(","):e.constructor===Array?e:[e];s.unshift(t),i.prototype.set.apply(this,s)},set:function(t){var e=Array.prototype.slice.apply(arguments,[1]);this.setter[t]?this.setter[t].apply(this,e):this[t]=e.join(",")},get:function(t){return this.getter[t]?this.getter[t].apply(this):this[t]||0},setter:{rotate:function(t){this.rotate=a(t,"deg")},rotateX:function(t){this.rotateX=a(t,"deg")},rotateY:function(t){this.rotateY=a(t,"deg")},scale:function(t,e){void 0===e&&(e=t),this.scale=t+","+e},skewX:function(t){this.skewX=a(t,"deg")},skewY:function(t){this.skewY=a(t,"deg")},perspective:function(t){this.perspective=a(t,"px")},x:function(t){this.set("translate",t,null)},y:function(t){this.set("translate",null,t)},translate:function(t,e){void 0===this._translateX&&(this._translateX=0),void 0===this._translateY&&(this._translateY=0),null!==t&&void 0!==t&&(this._translateX=a(t,"px")),null!==e&&void 0!==e&&(this._translateY=a(e,"px")),this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var t=(this.scale||"1,1").split(",");return t[0]&&(t[0]=parseFloat(t[0])),t[1]&&(t[1]=parseFloat(t[1])),t[0]===t[1]?t[0]:t},rotate3d:function(){for(var t=(this.rotate3d||"0,0,0,0deg").split(","),e=0;e<=3;++e)t[e]&&(t[e]=parseFloat(t[e]));return t[3]&&(t[3]=a(t[3],"deg")),t}},parse:function(t){var e=this;t.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(t,i,s){e.setFromString(i,s)})},toString:function(t){var e=[];for(var i in this)if(this.hasOwnProperty(i)){if(!h.transform3d&&("rotateX"===i||"rotateY"===i||"perspective"===i||"transformOrigin"===i))continue;"_"!==i[0]&&(t&&"scale"===i?e.push(i+"3d("+this[i]+",1)"):t&&"translate"===i?e.push(i+"3d("+this[i]+",0)"):e.push(i+"("+this[i]+")"))}return e.join(" ")}},t.fn.transition=t.fn.transit=function(e,i,o,r){var a=this,c=0,u=!0,f=t.extend(!0,{},e);"function"==typeof i&&(r=i,i=void 0),"object"==typeof i&&(o=i.easing,c=i.delay||0,u=void 0===i.queue||i.queue,r=i.complete,i=i.duration),"function"==typeof o&&(r=o,o=void 0),void 0!==f.easing&&(o=f.easing,delete f.easing),void 0!==f.duration&&(i=f.duration,delete f.duration),void 0!==f.complete&&(r=f.complete,delete f.complete),void 0!==f.queue&&(u=f.queue,delete f.queue),void 0!==f.delay&&(c=f.delay,delete f.delay),void 0===i&&(i=t.fx.speeds._default),void 0===o&&(o=t.cssEase._default),i=l(i);var p=n(f,i,o,c),m=t.transit.enabled&&h.transition?parseInt(i,10)+parseInt(c,10):0;if(0===m){return s(a,u,function(t){a.css(f),r&&r.apply(a),t&&t()}),a}var g={};return s(a,u,function(e){this.offsetWidth,function(e){var i=!1,s=function(){i&&a.unbind(d,s),m>0&&a.each(function(){this.style[h.transition]=g[this]||null}),"function"==typeof r&&r.apply(a),"function"==typeof e&&e()};m>0&&d&&t.transit.useTransitionEnd?(i=!0,a.bind(d,s)):window.setTimeout(s,m),a.each(function(){m>0&&(this.style[h.transition]=p),t(this).css(f)})}(e)}),this},t.transit.getTransitionValue=n,t}),function($){function sc_setScroll(t,e,i){return"transition"==i.transition&&"swing"==e&&(e="ease"),{anims:[],duration:t,orgDuration:t,easing:e,startTime:getTime()}}function sc_startScroll(t,e){for(var i=0,s=t.anims.length;i<s;i++){var n=t.anims[i];n&&n[0][e.transition](n[1],t.duration,t.easing,n[2])}}function sc_stopScroll(t,e){is_boolean(e)||(e=!0),is_object(t.pre)&&sc_stopScroll(t.pre,e);for(var i=0,s=t.anims.length;i<s;i++){var n=t.anims[i];n[0].stop(!0),e&&(n[0].css(n[1]),is_function(n[2])&&n[2]())}is_object(t.post)&&sc_stopScroll(t.post,e)}function sc_afterScroll(t,e,i){switch(e&&e.remove(),i.fx){case"fade":case"crossfade":case"cover-fade":case"uncover-fade":t.css("opacity",1),t.css("filter","")}}function sc_fireCallbacks(t,e,i,s,n){if(e[i]&&e[i].call(t,s),n[i].length)for(var o=0,r=n[i].length;o<r;o++)n[i][o].call(t,s);return[]}function sc_fireQueue(t,e,i){return e.length&&(t.trigger(cf_e(e[0][0],i),e[0][1]),e.shift()),e}function sc_hideHiddenItems(t){t.each(function(){var t=$(this);t.data("_cfs_isHidden",t.is(":hidden")).hide()})}function sc_showHiddenItems(t){t&&t.each(function(){var t=$(this);t.data("_cfs_isHidden")||t.show()})}function sc_clearTimers(t){return t.auto&&clearTimeout(t.auto),t.progress&&clearInterval(t.progress),t}function sc_mapCallbackArguments(t,e,i,s,n,o,r){return{width:r.width,height:r.height,items:{old:t,skipped:e,visible:i},scroll:{items:s,direction:n,duration:o}}}function sc_getDuration(t,e,i,s){var n=t.duration;return"none"==t.fx?0:("auto"==n?n=e.scroll.duration/e.scroll.items*i:n<10&&(n=s/n),n<1?0:("fade"==t.fx&&(n/=2),Math.round(n)))}function nv_showNavi(t,e,i){var s=is_number(t.items.minimum)?t.items.minimum:t.items.visible+1;if("show"==e||"hide"==e)n=e;else if(s>e){debug(i,"Not enough items ("+e+" total, "+s+" needed): Hiding navigation.");n="hide"}else var n="show";var o="show"==n?"removeClass":"addClass",r=cf_c("hidden",i);t.auto.button&&t.auto.button[n]()[o](r),t.prev.button&&t.prev.button[n]()[o](r),t.next.button&&t.next.button[n]()[o](r),t.pagination.container&&t.pagination.container[n]()[o](r)}function nv_enableNavi(t,e,i){if(!t.circular&&!t.infinite){var s=("removeClass"==e||"addClass"==e)&&e,n=cf_c("disabled",i);if(t.auto.button&&s&&t.auto.button[s](n),t.prev.button){o=s||0==e?"addClass":"removeClass";t.prev.button[o](n)}if(t.next.button){var o=s||e==t.items.visible?"addClass":"removeClass";t.next.button[o](n)}}}function go_getObject(t,e){return is_function(e)?e=e.call(t):is_undefined(e)&&(e={}),e}function go_getItemsObject(t,e){return e=go_getObject(t,e),is_number(e)?e={visible:e}:"variable"==e?e={visible:e,width:e,height:e}:is_object(e)||(e={}),e}function go_getScrollObject(t,e){return e=go_getObject(t,e),is_number(e)?e=e<=50?{items:e}:{duration:e}:is_string(e)?e={easing:e}:is_object(e)||(e={}),e}function go_getNaviObject(t,e){if(e=go_getObject(t,e),is_string(e)){var i=cf_getKeyCode(e);e=-1==i?$(e):i}return e}function go_getAutoObject(t,e){return e=go_getNaviObject(t,e),is_jquery(e)?e={button:e}:is_boolean(e)?e={play:e}:is_number(e)&&(e={timeoutDuration:e}),e.progress&&(is_string(e.progress)||is_jquery(e.progress))&&(e.progress={bar:e.progress}),e}function go_complementAutoObject(t,e){return is_function(e.button)&&(e.button=e.button.call(t)),is_string(e.button)&&(e.button=$(e.button)),is_boolean(e.play)||(e.play=!0),is_number(e.delay)||(e.delay=0),is_undefined(e.pauseOnEvent)&&(e.pauseOnEvent=!0),is_boolean(e.pauseOnResize)||(e.pauseOnResize=!0),is_number(e.timeoutDuration)||(e.timeoutDuration=e.duration<10?2500:5*e.duration),e.progress&&(is_function(e.progress.bar)&&(e.progress.bar=e.progress.bar.call(t)),is_string(e.progress.bar)&&(e.progress.bar=$(e.progress.bar)),e.progress.bar?(is_function(e.progress.updater)||(e.progress.updater=$.fn.carouFredSel.progressbarUpdater),is_number(e.progress.interval)||(e.progress.interval=50)):e.progress=!1),e}function go_getPrevNextObject(t,e){return e=go_getNaviObject(t,e),is_jquery(e)?e={button:e}:is_number(e)&&(e={key:e}),e}function go_complementPrevNextObject(t,e){return is_function(e.button)&&(e.button=e.button.call(t)),is_string(e.button)&&(e.button=$(e.button)),is_string(e.key)&&(e.key=cf_getKeyCode(e.key)),e}function go_getPaginationObject(t,e){return e=go_getNaviObject(t,e),is_jquery(e)?e={container:e}:is_boolean(e)&&(e={keys:e}),e}function go_complementPaginationObject(t,e){return is_function(e.container)&&(e.container=e.container.call(t)),is_string(e.container)&&(e.container=$(e.container)),is_number(e.items)||(e.items=!1),is_boolean(e.keys)||(e.keys=!1),is_function(e.anchorBuilder)||is_false(e.anchorBuilder)||(e.anchorBuilder=$.fn.carouFredSel.pageAnchorBuilder),is_number(e.deviation)||(e.deviation=0),e}function go_getSwipeObject(t,e){return is_function(e)&&(e=e.call(t)),is_undefined(e)&&(e={onTouch:!1}),is_true(e)?e={onTouch:e}:is_number(e)&&(e={items:e}),e}function go_complementSwipeObject(t,e){return is_boolean(e.onTouch)||(e.onTouch=!0),is_boolean(e.onMouse)||(e.onMouse=!1),is_object(e.options)||(e.options={}),is_boolean(e.options.triggerOnTouchEnd)||(e.options.triggerOnTouchEnd=!1),e}function go_getMousewheelObject(t,e){return is_function(e)&&(e=e.call(t)),is_true(e)?e={}:is_number(e)?e={items:e}:is_undefined(e)&&(e=!1),e}function go_complementMousewheelObject(t,e){return e}function gn_getItemIndex(t,e,i,s,n){if(is_string(t)&&(t=$(t,n)),is_object(t)&&(t=$(t,n)),is_jquery(t)?(t=n.children().index(t),is_boolean(i)||(i=!1)):is_boolean(i)||(i=!0),is_number(t)||(t=0),is_number(e)||(e=0),i&&(t+=s.first),t+=e,s.total>0){for(;t>=s.total;)t-=s.total;for(;t<0;)t+=s.total}return t}function gn_getVisibleItemsPrev(t,e,i){for(var s=0,n=0,o=i;o>=0;o--){var r=t.eq(o);if((s+=r.is(":visible")?r[e.d.outerWidth](!0):0)>e.maxDimension)return n;0==o&&(o=t.length),n++}}function gn_getVisibleItemsPrevFilter(t,e,i){return gn_getItemsPrevFilter(t,e.items.filter,e.items.visibleConf.org,i)}function gn_getScrollItemsPrevFilter(t,e,i,s){return gn_getItemsPrevFilter(t,e.items.filter,s,i)}function gn_getItemsPrevFilter(t,e,i,s){for(var n=0,o=0,r=s,a=t.length;r>=0;r--){if(++o==a)return o;if(t.eq(r).is(e)&&++n==i)return o;0==r&&(r=a)}}function gn_getVisibleOrg(t,e){return e.items.visibleConf.org||t.children().slice(0,e.items.visible).filter(e.items.filter).length}function gn_getVisibleItemsNext(t,e,i){for(var s=0,n=0,o=i,r=t.length-1;o<=r;o++){var a=t.eq(o);if((s+=a.is(":visible")?a[e.d.outerWidth](!0):0)>e.maxDimension)return n;if(++n==r+1)return n;o==r&&(o=-1)}}function gn_getVisibleItemsNextTestCircular(t,e,i,s){var n=gn_getVisibleItemsNext(t,e,i);return e.circular||i+n>s&&(n=s-i),n}function gn_getVisibleItemsNextFilter(t,e,i){return gn_getItemsNextFilter(t,e.items.filter,e.items.visibleConf.org,i,e.circular)}function gn_getScrollItemsNextFilter(t,e,i,s){return gn_getItemsNextFilter(t,e.items.filter,s+1,i,e.circular)-1}function gn_getItemsNextFilter(t,e,i,s,n){for(var o=0,r=0,a=s,l=t.length-1;a<=l;a++){if(++r>=l)return r;if(t.eq(a).is(e)&&++o==i)return r;a==l&&(a=-1)}}function gi_getCurrentItems(t,e){return t.slice(0,e.items.visible)}function gi_getOldItemsPrev(t,e,i){return t.slice(i,e.items.visibleConf.old+i)}function gi_getNewItemsPrev(t,e){return t.slice(0,e.items.visible)}function gi_getOldItemsNext(t,e){return t.slice(0,e.items.visibleConf.old)}function gi_getNewItemsNext(t,e,i){return t.slice(i,e.items.visible+i)}function sz_storeMargin(t,e,i){e.usePadding&&(is_string(i)||(i="_cfs_origCssMargin"),t.each(function(){var t=$(this),s=parseInt(t.css(e.d.marginRight),10);is_number(s)||(s=0),t.data(i,s)}))}function sz_resetMargin(t,e,i){if(e.usePadding){var s=!!is_boolean(i)&&i;is_number(i)||(i=0),sz_storeMargin(t,e,"_cfs_tempCssMargin"),t.each(function(){var t=$(this);t.css(e.d.marginRight,s?t.data("_cfs_tempCssMargin"):i+t.data("_cfs_origCssMargin"))})}}function sz_storeOrigCss(t){t.each(function(){var t=$(this);t.data("_cfs_origCss",t.attr("style")||"")})}function sz_restoreOrigCss(t){t.each(function(){var t=$(this);t.attr("style",t.data("_cfs_origCss")||"")})}function sz_setResponsiveSizes(t,e){t.items.visible;var i=t.items[t.d.width],s=t[t.d.height],n=is_percentage(s);e.each(function(){var e=$(this),o=i-ms_getPaddingBorderMargin(e,t,"Width");e[t.d.width](o),n&&e[t.d.height](ms_getPercentage(o,s))})}function sz_setSizes(t,e){var i=t.parent(),s=t.children(),n=gi_getCurrentItems(s,e),o=cf_mapWrapperSizes(ms_getSizes(n,e,!0),e,!1);if(i.css(o),e.usePadding){var r=e.padding,a=r[e.d[1]];e.align&&a<0&&(a=0);var l=n.last();l.css(e.d.marginRight,l.data("_cfs_origCssMargin")+a),t.css(e.d.top,r[e.d[0]]),t.css(e.d.left,r[e.d[3]])}return t.css(e.d.width,o[e.d.width]+2*ms_getTotalSize(s,e,"width")),t.css(e.d.height,ms_getLargestSize(s,e,"height")),o}function ms_getSizes(t,e,i){return[ms_getTotalSize(t,e,"width",i),ms_getLargestSize(t,e,"height",i)]}function ms_getLargestSize(t,e,i,s){return is_boolean(s)||(s=!1),is_number(e[e.d[i]])&&s?e[e.d[i]]:is_number(e.items[e.d[i]])?e.items[e.d[i]]:(i=i.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight",ms_getTrueLargestSize(t,e,i))}function ms_getTrueLargestSize(t,e,i){for(var s=0,n=0,o=t.length;n<o;n++){var r=t.eq(n),a=r.is(":visible")?r[e.d[i]](!0):0;s<a&&(s=a)}return s}function ms_getTotalSize(t,e,i,s){if(is_boolean(s)||(s=!1),is_number(e[e.d[i]])&&s)return e[e.d[i]];if(is_number(e.items[e.d[i]]))return e.items[e.d[i]]*t.length;for(var n=i.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight",o=0,r=0,a=t.length;r<a;r++){var l=t.eq(r);o+=l.is(":visible")?l[e.d[n]](!0):0}return o}function ms_getParentSize(t,e,i){var s=t.is(":visible");s&&t.hide();var n=t.parent()[e.d[i]]();return s&&t.show(),n}function ms_getMaxDimension(t,e){return is_number(t[t.d.width])?t[t.d.width]:e}function ms_hasVariableSizes(t,e,i){for(var s=!1,n=!1,o=0,r=t.length;o<r;o++){var a=t.eq(o),l=a.is(":visible")?a[e.d[i]](!0):0;!1===s?s=l:s!=l&&(n=!0),0==s&&(n=!0)}return n}function ms_getPaddingBorderMargin(t,e,i){return t[e.d["outer"+i]](!0)-t[e.d[i.toLowerCase()]]()}function ms_getPercentage(t,e){if(is_percentage(e)){if(e=parseInt(e.slice(0,-1),10),!is_number(e))return t;t*=e/100}return t}function cf_e(t,e,i,s,n){return is_boolean(i)||(i=!0),is_boolean(s)||(s=!0),is_boolean(n)||(n=!1),i&&(t=e.events.prefix+t),s&&(t=t+"."+e.events.namespace),s&&n&&(t+=e.serialNumber),t}function cf_c(t,e){return is_string(e.classnames[t])?e.classnames[t]:t}function cf_mapWrapperSizes(t,e,i){is_boolean(i)||(i=!0);var s=e.usePadding&&i?e.padding:[0,0,0,0],n={};return n[e.d.width]=t[0]+s[1]+s[3],n[e.d.height]=t[1]+s[0]+s[2],n}function cf_sortParams(t,e){for(var i=[],s=0,n=t.length;s<n;s++)for(var o=0,r=e.length;o<r;o++)if(e[o].indexOf(typeof t[s])>-1&&is_undefined(i[o])){i[o]=t[s];break}return i}function cf_getPadding(t){if(is_undefined(t))return[0,0,0,0];if(is_number(t))return[t,t,t,t];if(is_string(t)&&(t=t.split("px").join("").split("em").join("").split(" ")),!is_array(t))return[0,0,0,0];for(var e=0;e<4;e++)t[e]=parseInt(t[e],10);switch(t.length){case 0:return[0,0,0,0];case 1:return[t[0],t[0],t[0],t[0]];case 2:return[t[0],t[1],t[0],t[1]];case 3:return[t[0],t[1],t[2],t[1]];default:return[t[0],t[1],t[2],t[3]]}}function cf_getAlignPadding(t,e){var i=is_number(e[e.d.width])?Math.ceil(e[e.d.width]-ms_getTotalSize(t,e,"width")):0;switch(e.align){case"left":return[0,i];case"right":return[i,0];case"center":default:return[Math.ceil(i/2),Math.floor(i/2)]}}function cf_getDimensions(t){for(var e=[["width","innerWidth","outerWidth","height","innerHeight","outerHeight","left","top","marginRight",0,1,2,3],["height","innerHeight","outerHeight","width","innerWidth","outerWidth","top","left","marginBottom",3,2,1,0]],i=e[0].length,s="right"==t.direction||"left"==t.direction?0:1,n={},o=0;o<i;o++)n[e[0][o]]=e[s][o];return n}function cf_getAdjust(t,e,i,s){var n=t;if(is_function(i))n=i.call(s,n);else if(is_string(i)){var o=i.split("+"),r=i.split("-");if(r.length>o.length)var a=!0,l=r[0],c=r[1];else var a=!1,l=o[0],c=o[1];switch(l){case"even":n=t%2==1?t-1:t;break;case"odd":n=t%2==0?t-1:t;break;default:n=t}is_number(c=parseInt(c,10))&&(a&&(c=-c),n+=c)}return(!is_number(n)||n<1)&&(n=1),n}function cf_getItemsAdjust(t,e,i,s){return cf_getItemAdjustMinMax(cf_getAdjust(t,0,i,s),e.items.visibleConf)}function cf_getItemAdjustMinMax(t,e){return is_number(e.min)&&t<e.min&&(t=e.min),is_number(e.max)&&t>e.max&&(t=e.max),t<1&&(t=1),t}function cf_getSynchArr(t){is_array(t)||(t=[[t]]),is_array(t[0])||(t=[t]);for(var e=0,i=t.length;e<i;e++)is_string(t[e][0])&&(t[e][0]=$(t[e][0])),is_boolean(t[e][1])||(t[e][1]=!0),is_boolean(t[e][2])||(t[e][2]=!0),is_number(t[e][3])||(t[e][3]=0);return t}function cf_getKeyCode(t){return"right"==t?39:"left"==t?37:"up"==t?38:"down"==t?40:-1}function cf_setCookie(t,e,i){if(t){var s=e.triggerHandler(cf_e("currentPosition",i));$.fn.carouFredSel.cookie.set(t,s)}}function cf_getCookie(t){var e=$.fn.carouFredSel.cookie.get(t);return""==e?0:e}function in_mapCss(t,e){for(var i={},s=0,n=e.length;s<n;s++)i[e[s]]=t.css(e[s]);return i}function in_complementItems(t,e,i,s){return is_object(t.visibleConf)||(t.visibleConf={}),is_object(t.sizesConf)||(t.sizesConf={}),0==t.start&&is_number(s)&&(t.start=s),is_object(t.visible)?(t.visibleConf.min=t.visible.min,t.visibleConf.max=t.visible.max,t.visible=!1):is_string(t.visible)?("variable"==t.visible?t.visibleConf.variable=!0:t.visibleConf.adjust=t.visible,t.visible=!1):is_function(t.visible)&&(t.visibleConf.adjust=t.visible,t.visible=!1),is_string(t.filter)||(t.filter=i.filter(":hidden").length>0?":visible":"*"),t[e.d.width]||(e.responsive?(debug(!0,"Set a "+e.d.width+" for the items!"),t[e.d.width]=ms_getTrueLargestSize(i,e,"outerWidth")):t[e.d.width]=ms_hasVariableSizes(i,e,"outerWidth")?"variable":i[e.d.outerWidth](!0)),t[e.d.height]||(t[e.d.height]=ms_hasVariableSizes(i,e,"outerHeight")?"variable":i[e.d.outerHeight](!0)),t.sizesConf.width=t.width,t.sizesConf.height=t.height,t}function in_complementVisibleItems(t,e){return"variable"==t.items[t.d.width]&&(t.items.visibleConf.variable=!0),t.items.visibleConf.variable||(is_number(t[t.d.width])?t.items.visible=Math.floor(t[t.d.width]/t.items[t.d.width]):(t.items.visible=Math.floor(e/t.items[t.d.width]),t[t.d.width]=t.items.visible*t.items[t.d.width],t.items.visibleConf.adjust||(t.align=!1)),("Infinity"==t.items.visible||t.items.visible<1)&&(debug(!0,'Not a valid number of visible items: Set to "variable".'),t.items.visibleConf.variable=!0)),t}function in_complementPrimarySize(t,e,i){return"auto"==t&&(t=ms_getTrueLargestSize(i,e,"outerWidth")),t}function in_complementSecondarySize(t,e,i){return"auto"==t&&(t=ms_getTrueLargestSize(i,e,"outerHeight")),t||(t=e.items[e.d.height]),t}function in_getAlignPadding(t,e){var i=cf_getAlignPadding(gi_getCurrentItems(e,t),t);return t.padding[t.d[1]]=i[1],t.padding[t.d[3]]=i[0],t}function in_getResponsiveValues(t,e,i){var s=cf_getItemAdjustMinMax(Math.ceil(t[t.d.width]/t.items[t.d.width]),t.items.visibleConf);s>e.length&&(s=e.length);var n=Math.floor(t[t.d.width]/s);return t.items.visible=s,t.items[t.d.width]=n,t[t.d.width]=s*n,t}function bt_pauseOnHoverConfig(t){if(is_string(t))var e=t.indexOf("immediate")>-1,i=t.indexOf("resume")>-1;else e=i=!1;return[e,i]}function bt_mousesheelNumber(t){return is_number(t)?t:null}function is_null(t){return null===t}function is_undefined(t){return is_null(t)||void 0===t||""===t||"undefined"===t}function is_array(t){return t instanceof Array}function is_jquery(t){return t instanceof jQuery}function is_object(t){return(t instanceof Object||"object"==typeof t)&&!is_null(t)&&!is_jquery(t)&&!is_array(t)&&!is_function(t)}function is_number(t){return(t instanceof Number||"number"==typeof t)&&!isNaN(t)}function is_string(t){return(t instanceof String||"string"==typeof t)&&!is_undefined(t)&&!is_true(t)&&!is_false(t)}function is_function(t){return t instanceof Function||"function"==typeof t}function is_boolean(t){return t instanceof Boolean||"boolean"==typeof t||is_true(t)||is_false(t)}function is_true(t){return!0===t||"true"===t}function is_false(t){return!1===t||"false"===t}function is_percentage(t){return is_string(t)&&"%"==t.slice(-1)}function getTime(){return(new Date).getTime()}function deprecated(t,e){debug(!0,t+" is DEPRECATED, support for it will be removed. Use "+e+" instead.")}function debug(t,e){if(!is_undefined(window.console)&&!is_undefined(window.console.log)){if(is_object(t)){i=" ("+t.selector+")";t=t.debug}else var i="";if(!t)return!1;e=is_string(e)?"carouFredSel"+i+": "+e:["carouFredSel"+i+":",e],window.console.log(e)}return!1}$.fn.carouFredSel||($.fn.caroufredsel=$.fn.carouFredSel=function(options,configs){if(0==this.length)return debug(!0,'No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){$(this).carouFredSel(options,configs)});var $cfs=this,$tt0=this[0],starting_position=!1;$cfs.data("_cfs_isCarousel")&&(starting_position=$cfs.triggerHandler("_cfs_triggerEvent","currentPosition"),$cfs.trigger("_cfs_triggerEvent",["destroy",!0]));var FN={};FN._init=function(t,e,i){(t=go_getObject($tt0,t)).items=go_getItemsObject($tt0,t.items),t.scroll=go_getScrollObject($tt0,t.scroll),t.auto=go_getAutoObject($tt0,t.auto),t.prev=go_getPrevNextObject($tt0,t.prev),t.next=go_getPrevNextObject($tt0,t.next),t.pagination=go_getPaginationObject($tt0,t.pagination),t.swipe=go_getSwipeObject($tt0,t.swipe),t.mousewheel=go_getMousewheelObject($tt0,t.mousewheel),e&&(opts_orig=$.extend(!0,{},$.fn.carouFredSel.defaults,t)),(opts=$.extend(!0,{},$.fn.carouFredSel.defaults,t)).d=cf_getDimensions(opts),crsl.direction="up"==opts.direction||"left"==opts.direction?"next":"prev";var s=$cfs.children(),n=ms_getParentSize($wrp,opts,"width");if(is_true(opts.cookie)&&(opts.cookie="caroufredsel_cookie_"+conf.serialNumber),opts.maxDimension=ms_getMaxDimension(opts,n),opts.items=in_complementItems(opts.items,opts,s,i),opts[opts.d.width]=in_complementPrimarySize(opts[opts.d.width],opts,s),opts[opts.d.height]=in_complementSecondarySize(opts[opts.d.height],opts,s),opts.responsive&&(is_percentage(opts[opts.d.width])||(opts[opts.d.width]="100%")),is_percentage(opts[opts.d.width])&&(crsl.upDateOnWindowResize=!0,crsl.primarySizePercentage=opts[opts.d.width],opts[opts.d.width]=ms_getPercentage(n,crsl.primarySizePercentage),opts.items.visible||(opts.items.visibleConf.variable=!0)),opts.responsive?(opts.usePadding=!1,opts.padding=[0,0,0,0],opts.align=!1,opts.items.visibleConf.variable=!1):(opts.items.visible||(opts=in_complementVisibleItems(opts,n)),opts[opts.d.width]||(!opts.items.visibleConf.variable&&is_number(opts.items[opts.d.width])&&"*"==opts.items.filter?(opts[opts.d.width]=opts.items.visible*opts.items[opts.d.width],opts.align=!1):opts[opts.d.width]="variable"),is_undefined(opts.align)&&(opts.align=!!is_number(opts[opts.d.width])&&"center"),opts.items.visibleConf.variable&&(opts.items.visible=gn_getVisibleItemsNext(s,opts,0))),"*"==opts.items.filter||opts.items.visibleConf.variable||(opts.items.visibleConf.org=opts.items.visible,opts.items.visible=gn_getVisibleItemsNextFilter(s,opts,0)),opts.items.visible=cf_getItemsAdjust(opts.items.visible,opts,opts.items.visibleConf.adjust,$tt0),opts.items.visibleConf.old=opts.items.visible,opts.responsive)opts.items.visibleConf.min||(opts.items.visibleConf.min=opts.items.visible),opts.items.visibleConf.max||(opts.items.visibleConf.max=opts.items.visible),opts=in_getResponsiveValues(opts,s);else switch(opts.padding=cf_getPadding(opts.padding),"top"==opts.align?opts.align="left":"bottom"==opts.align&&(opts.align="right"),opts.align){case"center":case"left":case"right":"variable"!=opts[opts.d.width]&&((opts=in_getAlignPadding(opts,s)).usePadding=!0);break;default:opts.align=!1,opts.usePadding=0!=opts.padding[0]||0!=opts.padding[1]||0!=opts.padding[2]||0!=opts.padding[3]}is_number(opts.scroll.duration)||(opts.scroll.duration=500),is_undefined(opts.scroll.items)&&(opts.scroll.items=opts.responsive||opts.items.visibleConf.variable||"*"!=opts.items.filter?"visible":opts.items.visible),opts.auto=$.extend(!0,{},opts.scroll,opts.auto),opts.prev=$.extend(!0,{},opts.scroll,opts.prev),opts.next=$.extend(!0,{},opts.scroll,opts.next),opts.pagination=$.extend(!0,{},opts.scroll,opts.pagination),opts.auto=go_complementAutoObject($tt0,opts.auto),opts.prev=go_complementPrevNextObject($tt0,opts.prev),opts.next=go_complementPrevNextObject($tt0,opts.next),opts.pagination=go_complementPaginationObject($tt0,opts.pagination),opts.swipe=go_complementSwipeObject(0,opts.swipe),opts.mousewheel=go_complementMousewheelObject(0,opts.mousewheel),opts.synchronise&&(opts.synchronise=cf_getSynchArr(opts.synchronise)),opts.auto.onPauseStart&&(opts.auto.onTimeoutStart=opts.auto.onPauseStart,deprecated("auto.onPauseStart","auto.onTimeoutStart")),opts.auto.onPausePause&&(opts.auto.onTimeoutPause=opts.auto.onPausePause,deprecated("auto.onPausePause","auto.onTimeoutPause")),opts.auto.onPauseEnd&&(opts.auto.onTimeoutEnd=opts.auto.onPauseEnd,deprecated("auto.onPauseEnd","auto.onTimeoutEnd")),opts.auto.pauseDuration&&(opts.auto.timeoutDuration=opts.auto.pauseDuration,deprecated("auto.pauseDuration","auto.timeoutDuration"))},FN._build=function(){$cfs.data("_cfs_isCarousel",!0);var t=$cfs.children(),e=in_mapCss($cfs,["textAlign","float","position","top","right","bottom","left","zIndex","width","height","marginTop","marginRight","marginBottom","marginLeft"]),i="relative";switch(e.position){case"absolute":case"fixed":i=e.position}"parent"==conf.wrapper?sz_storeOrigCss($wrp):$wrp.css(e),$wrp.css({overflow:"hidden",position:i}),sz_storeOrigCss($cfs),$cfs.data("_cfs_origCssZindex",e.zIndex),$cfs.css({textAlign:"left",float:"none",position:"absolute",top:0,right:"auto",bottom:"auto",left:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0}),sz_storeMargin(t,opts),sz_storeOrigCss(t),opts.responsive&&sz_setResponsiveSizes(opts,t)},FN._bind_events=function(){FN._unbind_events(),$cfs.bind(cf_e("stop",conf),function(t,e){return t.stopPropagation(),crsl.isStopped||opts.auto.button&&opts.auto.button.addClass(cf_c("stopped",conf)),crsl.isStopped=!0,opts.auto.play&&(opts.auto.play=!1,$cfs.trigger(cf_e("pause",conf),e)),!0}),$cfs.bind(cf_e("finish",conf),function(t){return t.stopPropagation(),crsl.isScrolling&&sc_stopScroll(scrl),!0}),$cfs.bind(cf_e("pause",conf),function(t,e,i){if(t.stopPropagation(),tmrs=sc_clearTimers(tmrs),e&&crsl.isScrolling){scrl.isStopped=!0;var s=getTime()-scrl.startTime;scrl.duration-=s,scrl.pre&&(scrl.pre.duration-=s),scrl.post&&(scrl.post.duration-=s),sc_stopScroll(scrl,!1)}if(crsl.isPaused||crsl.isScrolling||i&&(tmrs.timePassed+=getTime()-tmrs.startTime),crsl.isPaused||opts.auto.button&&opts.auto.button.addClass(cf_c("paused",conf)),crsl.isPaused=!0,opts.auto.onTimeoutPause){var n=opts.auto.timeoutDuration-tmrs.timePassed,o=100-Math.ceil(100*n/opts.auto.timeoutDuration);opts.auto.onTimeoutPause.call($tt0,o,n)}return!0}),$cfs.bind(cf_e("play",conf),function(t,e,i,s){t.stopPropagation(),tmrs=sc_clearTimers(tmrs);var n=cf_sortParams([e,i,s],["string","number","boolean"]);if(e=n[0],i=n[1],s=n[2],"prev"!=e&&"next"!=e&&(e=crsl.direction),is_number(i)||(i=0),is_boolean(s)||(s=!1),s&&(crsl.isStopped=!1,opts.auto.play=!0),!opts.auto.play)return t.stopImmediatePropagation(),debug(conf,"Carousel stopped: Not scrolling.");crsl.isPaused&&opts.auto.button&&(opts.auto.button.removeClass(cf_c("stopped",conf)),opts.auto.button.removeClass(cf_c("paused",conf))),crsl.isPaused=!1,tmrs.startTime=getTime();var o=opts.auto.timeoutDuration+i;return dur2=o-tmrs.timePassed,perc=100-Math.ceil(100*dur2/o),opts.auto.progress&&(tmrs.progress=setInterval(function(){var t=getTime()-tmrs.startTime+tmrs.timePassed,e=Math.ceil(100*t/o);opts.auto.progress.updater.call(opts.auto.progress.bar[0],e)},opts.auto.progress.interval)),tmrs.auto=setTimeout(function(){opts.auto.progress&&opts.auto.progress.updater.call(opts.auto.progress.bar[0],100),opts.auto.onTimeoutEnd&&opts.auto.onTimeoutEnd.call($tt0,perc,dur2),crsl.isScrolling?$cfs.trigger(cf_e("play",conf),e):$cfs.trigger(cf_e(e,conf),opts.auto)},dur2),opts.auto.onTimeoutStart&&opts.auto.onTimeoutStart.call($tt0,perc,dur2),!0}),$cfs.bind(cf_e("resume",conf),function(t){return t.stopPropagation(),scrl.isStopped?(scrl.isStopped=!1,crsl.isPaused=!1,crsl.isScrolling=!0,scrl.startTime=getTime(),sc_startScroll(scrl,conf)):$cfs.trigger(cf_e("play",conf)),!0}),$cfs.bind(cf_e("prev",conf)+" "+cf_e("next",conf),function(t,e,i,s,n){if(t.stopPropagation(),crsl.isStopped||$cfs.is(":hidden"))return t.stopImmediatePropagation(),debug(conf,"Carousel stopped or hidden: Not scrolling.");var o=is_number(opts.items.minimum)?opts.items.minimum:opts.items.visible+1;if(o>itms.total)return t.stopImmediatePropagation(),debug(conf,"Not enough items ("+itms.total+" total, "+o+" needed): Not scrolling.");e=(l=cf_sortParams([e,i,s,n],["object","number/string","function","boolean"]))[0],i=l[1],s=l[2],n=l[3];var r=t.type.slice(conf.events.prefix.length);if(is_object(e)||(e={}),is_function(s)&&(e.onAfter=s),is_boolean(n)&&(e.queue=n),(e=$.extend(!0,{},opts[r],e)).conditions&&!e.conditions.call($tt0,r))return t.stopImmediatePropagation(),debug(conf,'Callback "conditions" returned false.');if(!is_number(i)){if("*"!=opts.items.filter)i="visible";else for(var a=[i,e.items,opts[r].items],l=0,c=a.length;l<c;l++)if(is_number(a[l])||"page"==a[l]||"visible"==a[l]){i=a[l];break}switch(i){case"page":return t.stopImmediatePropagation(),$cfs.triggerHandler(cf_e(r+"Page",conf),[e,s]);case"visible":opts.items.visibleConf.variable||"*"!=opts.items.filter||(i=opts.items.visible)}}if(scrl.isStopped)return $cfs.trigger(cf_e("resume",conf)),$cfs.trigger(cf_e("queue",conf),[r,[e,i,s]]),t.stopImmediatePropagation(),debug(conf,"Carousel resumed scrolling.");if(e.duration>0&&crsl.isScrolling)return e.queue&&("last"==e.queue&&(queu=[]),"first"==e.queue&&0!=queu.length||$cfs.trigger(cf_e("queue",conf),[r,[e,i,s]])),t.stopImmediatePropagation(),debug(conf,"Carousel currently scrolling.");if(tmrs.timePassed=0,$cfs.trigger(cf_e("slide_"+r,conf),[e,i]),opts.synchronise)for(var h=opts.synchronise,u=[e,i],d=0,c=h.length;d<c;d++){var f=r;h[d][2]||(f="prev"==f?"next":"prev"),h[d][1]||(u[0]=h[d][0].triggerHandler("_cfs_triggerEvent",["configuration",f])),u[1]=i+h[d][3],h[d][0].trigger("_cfs_triggerEvent",["slide_"+f,u])}return!0}),$cfs.bind(cf_e("slide_prev",conf),function(t,e,i){t.stopPropagation();o=$cfs.children();if(!opts.circular&&0==itms.first)return opts.infinite&&$cfs.trigger(cf_e("next",conf),itms.total-1),t.stopImmediatePropagation();if(sz_resetMargin(o,opts),!is_number(i)){if(opts.items.visibleConf.variable)i=gn_getVisibleItemsPrev(o,opts,itms.total-1);else if("*"!=opts.items.filter){var s=is_number(e.items)?e.items:gn_getVisibleOrg($cfs,opts);i=gn_getScrollItemsPrevFilter(o,opts,itms.total-1,s)}else i=opts.items.visible;i=cf_getAdjust(i,0,e.items,$tt0)}if(opts.circular||itms.total-i<itms.first&&(i=itms.total-itms.first),opts.items.visibleConf.old=opts.items.visible,opts.items.visibleConf.variable){n=cf_getItemsAdjust(gn_getVisibleItemsNext(o,opts,itms.total-i),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible+i<=n&&i<itms.total&&(i++,n=cf_getItemsAdjust(gn_getVisibleItemsNext(o,opts,itms.total-i),opts,opts.items.visibleConf.adjust,$tt0)),opts.items.visible=n}else if("*"!=opts.items.filter){var n=gn_getVisibleItemsNextFilter(o,opts,itms.total-i);opts.items.visible=cf_getItemsAdjust(n,opts,opts.items.visibleConf.adjust,$tt0)}if(sz_resetMargin(o,opts,!0),0==i)return t.stopImmediatePropagation(),debug(conf,"0 items to scroll: Not scrolling.");for(debug(conf,"Scrolling "+i+" items backward."),itms.first+=i;itms.first>=itms.total;)itms.first-=itms.total;opts.circular||(0==itms.first&&e.onEnd&&e.onEnd.call($tt0,"prev"),opts.infinite||nv_enableNavi(opts,itms.first,conf)),$cfs.children().slice(itms.total-i,itms.total).prependTo($cfs),itms.total<opts.items.visible+i&&$cfs.children().slice(0,opts.items.visible+i-itms.total).clone(!0).appendTo($cfs);var o,r=gi_getOldItemsPrev(o=$cfs.children(),opts,i),a=gi_getNewItemsPrev(o,opts),l=o.eq(i-1),c=r.last(),h=a.last();sz_resetMargin(o,opts);var u=0,d=0;if(opts.align){var f=cf_getAlignPadding(a,opts);u=f[0],d=f[1]}var p=u<0?opts.padding[opts.d[3]]:0,m=!1,g=$();if(opts.items.visible<i&&(g=o.slice(opts.items.visibleConf.old,i),"directscroll"==e.fx)){var v=opts.items[opts.d.width];l=h,sc_hideHiddenItems(m=g),opts.items[opts.d.width]="variable"}var y=!1,b=ms_getTotalSize(o.slice(0,i),opts,"width"),_=cf_mapWrapperSizes(ms_getSizes(a,opts,!0),opts,!opts.usePadding),w=0,x={},C={},S={},I={},T={},A={},E={},k=sc_getDuration(e,opts,i,b);switch(e.fx){case"cover":case"cover-fade":w=ms_getTotalSize(o.slice(0,opts.items.visible),opts,"width")}m&&(opts.items[opts.d.width]=v),sz_resetMargin(o,opts,!0),d>=0&&sz_resetMargin(c,opts,opts.padding[opts.d[1]]),u>=0&&sz_resetMargin(l,opts,opts.padding[opts.d[3]]),opts.align&&(opts.padding[opts.d[1]]=d,opts.padding[opts.d[3]]=u),A[opts.d.left]=-(b-p),E[opts.d.left]=-(w-p),C[opts.d.left]=_[opts.d.width];var O=function(){},P=function(){},D=function(){},M=function(){},z=function(){},N=function(){},L=function(){},R=function(){},F=function(){},B=function(){},j=function(){};switch(e.fx){case"crossfade":case"cover":case"cover-fade":case"uncover":case"uncover-fade":y=$cfs.clone(!0).appendTo($wrp)}switch(e.fx){case"crossfade":case"uncover":case"uncover-fade":y.children().slice(0,i).remove(),y.children().slice(opts.items.visibleConf.old).remove();break;case"cover":case"cover-fade":y.children().slice(opts.items.visible).remove(),y.css(E)}if($cfs.css(A),scrl=sc_setScroll(k,e.easing,conf),x[opts.d.left]=opts.usePadding?opts.padding[opts.d[3]]:0,"variable"!=opts[opts.d.width]&&"variable"!=opts[opts.d.height]||(O=function(){$wrp.css(_)},P=function(){scrl.anims.push([$wrp,_])}),opts.usePadding){switch(h.not(l).length&&(S[opts.d.marginRight]=l.data("_cfs_origCssMargin"),u<0?l.css(S):(L=function(){l.css(S)},R=function(){scrl.anims.push([l,S])})),e.fx){case"cover":case"cover-fade":y.children().eq(i-1).css(S)}h.not(c).length&&(I[opts.d.marginRight]=c.data("_cfs_origCssMargin"),D=function(){c.css(I)},M=function(){scrl.anims.push([c,I])}),d>=0&&(T[opts.d.marginRight]=h.data("_cfs_origCssMargin")+opts.padding[opts.d[1]],z=function(){h.css(T)},N=function(){scrl.anims.push([h,T])})}j=function(){$cfs.css(x)};var H=opts.items.visible+i-itms.total;B=function(){if(H>0&&($cfs.children().slice(itms.total).remove(),r=$($cfs.children().slice(itms.total-(opts.items.visible-H)).get().concat($cfs.children().slice(0,H).get()))),sc_showHiddenItems(m),opts.usePadding){var t=$cfs.children().eq(opts.items.visible+i-1);t.css(opts.d.marginRight,t.data("_cfs_origCssMargin"))}};var q=sc_mapCallbackArguments(r,g,a,i,"prev",k,_);switch(F=function(){sc_afterScroll($cfs,y,e),crsl.isScrolling=!1,clbk.onAfter=sc_fireCallbacks($tt0,e,"onAfter",q,clbk),queu=sc_fireQueue($cfs,queu,conf),crsl.isPaused||$cfs.trigger(cf_e("play",conf))},crsl.isScrolling=!0,tmrs=sc_clearTimers(tmrs),clbk.onBefore=sc_fireCallbacks($tt0,e,"onBefore",q,clbk),e.fx){case"none":$cfs.css(x),O(),D(),z(),L(),j(),B(),F();break;case"fade":scrl.anims.push([$cfs,{opacity:0},function(){O(),D(),z(),L(),j(),B(),(scrl=sc_setScroll(k,e.easing,conf)).anims.push([$cfs,{opacity:1},F]),sc_startScroll(scrl,conf)}]);break;case"crossfade":$cfs.css({opacity:0}),scrl.anims.push([y,{opacity:0}]),scrl.anims.push([$cfs,{opacity:1},F]),P(),D(),z(),L(),j(),B();break;case"cover":scrl.anims.push([y,x,function(){D(),z(),L(),j(),B(),F()}]),P();break;case"cover-fade":scrl.anims.push([$cfs,{opacity:0}]),scrl.anims.push([y,x,function(){D(),z(),L(),j(),B(),F()}]),P();break;case"uncover":scrl.anims.push([y,C,F]),P(),D(),z(),L(),j(),B();break;case"uncover-fade":$cfs.css({opacity:0}),scrl.anims.push([$cfs,{opacity:1}]),scrl.anims.push([y,C,F]),P(),D(),z(),L(),j(),B();break;default:scrl.anims.push([$cfs,x,function(){B(),F()}]),P(),M(),N(),R()}return sc_startScroll(scrl,conf),cf_setCookie(opts.cookie,$cfs,conf),$cfs.trigger(cf_e("updatePageStatus",conf),[!1,_]),!0}),$cfs.bind(cf_e("slide_next",conf),function(t,e,i){t.stopPropagation();r=$cfs.children();if(!opts.circular&&itms.first==opts.items.visible)return opts.infinite&&$cfs.trigger(cf_e("prev",conf),itms.total-1),t.stopImmediatePropagation();if(sz_resetMargin(r,opts),!is_number(i)){if("*"!=opts.items.filter){o=is_number(e.items)?e.items:gn_getVisibleOrg($cfs,opts);i=gn_getScrollItemsNextFilter(r,opts,0,o)}else i=opts.items.visible;i=cf_getAdjust(i,0,e.items,$tt0)}var s=0==itms.first?itms.total:itms.first;if(!opts.circular){if(opts.items.visibleConf.variable)var n=gn_getVisibleItemsNext(r,opts,i),o=gn_getVisibleItemsPrev(r,opts,s-1);else var n=opts.items.visible,o=opts.items.visible;i+n>s&&(i=s-o)}if(opts.items.visibleConf.old=opts.items.visible,opts.items.visibleConf.variable){for(n=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(r,opts,i,s),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible-i>=n&&i<itms.total;)n=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(r,opts,++i,s),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible=n}else if("*"!=opts.items.filter){n=gn_getVisibleItemsNextFilter(r,opts,i);opts.items.visible=cf_getItemsAdjust(n,opts,opts.items.visibleConf.adjust,$tt0)}if(sz_resetMargin(r,opts,!0),0==i)return t.stopImmediatePropagation(),debug(conf,"0 items to scroll: Not scrolling.");for(debug(conf,"Scrolling "+i+" items forward."),itms.first-=i;itms.first<0;)itms.first+=itms.total;opts.circular||(itms.first==opts.items.visible&&e.onEnd&&e.onEnd.call($tt0,"next"),opts.infinite||nv_enableNavi(opts,itms.first,conf)),itms.total<opts.items.visible+i&&$cfs.children().slice(0,opts.items.visible+i-itms.total).clone(!0).appendTo($cfs);var r,a=gi_getOldItemsNext(r=$cfs.children(),opts),l=gi_getNewItemsNext(r,opts,i),c=r.eq(i-1),h=a.last(),u=l.last();sz_resetMargin(r,opts);var d=0,f=0;if(opts.align){var p=cf_getAlignPadding(l,opts);d=p[0],f=p[1]}var m=!1,g=$();if(opts.items.visibleConf.old<i&&(g=r.slice(opts.items.visibleConf.old,i),"directscroll"==e.fx)){var v=opts.items[opts.d.width];c=h,sc_hideHiddenItems(m=g),opts.items[opts.d.width]="variable"}var y=!1,b=ms_getTotalSize(r.slice(0,i),opts,"width"),_=cf_mapWrapperSizes(ms_getSizes(l,opts,!0),opts,!opts.usePadding),w=0,x={},C={},S={},I={},T={},A=sc_getDuration(e,opts,i,b);switch(e.fx){case"uncover":case"uncover-fade":w=ms_getTotalSize(r.slice(0,opts.items.visibleConf.old),opts,"width")}m&&(opts.items[opts.d.width]=v),opts.align&&opts.padding[opts.d[1]]<0&&(opts.padding[opts.d[1]]=0),sz_resetMargin(r,opts,!0),sz_resetMargin(h,opts,opts.padding[opts.d[1]]),opts.align&&(opts.padding[opts.d[1]]=f,opts.padding[opts.d[3]]=d),T[opts.d.left]=opts.usePadding?opts.padding[opts.d[3]]:0;var E=function(){},k=function(){},O=function(){},P=function(){},D=function(){},M=function(){},z=function(){},N=function(){},L=function(){};switch(e.fx){case"crossfade":case"cover":case"cover-fade":case"uncover":case"uncover-fade":(y=$cfs.clone(!0).appendTo($wrp)).children().slice(opts.items.visibleConf.old).remove()}switch(e.fx){case"crossfade":case"cover":case"cover-fade":$cfs.css("zIndex",1),y.css("zIndex",0)}if(scrl=sc_setScroll(A,e.easing,conf),x[opts.d.left]=-b,C[opts.d.left]=-w,d<0&&(x[opts.d.left]+=d),"variable"!=opts[opts.d.width]&&"variable"!=opts[opts.d.height]||(E=function(){$wrp.css(_)},k=function(){scrl.anims.push([$wrp,_])}),opts.usePadding){var R=u.data("_cfs_origCssMargin");f>=0&&(R+=opts.padding[opts.d[1]]),u.css(opts.d.marginRight,R),c.not(h).length&&(I[opts.d.marginRight]=h.data("_cfs_origCssMargin")),O=function(){h.css(I)},P=function(){scrl.anims.push([h,I])};var F=c.data("_cfs_origCssMargin");d>0&&(F+=opts.padding[opts.d[3]]),S[opts.d.marginRight]=F,D=function(){c.css(S)},M=function(){scrl.anims.push([c,S])}}L=function(){$cfs.css(T)};var B=opts.items.visible+i-itms.total;N=function(){B>0&&$cfs.children().slice(itms.total).remove();var t=$cfs.children().slice(0,i).appendTo($cfs).last();if(B>0&&(l=gi_getCurrentItems(r,opts)),sc_showHiddenItems(m),opts.usePadding){if(itms.total<opts.items.visible+i){var e=$cfs.children().eq(opts.items.visible-1);e.css(opts.d.marginRight,e.data("_cfs_origCssMargin")+opts.padding[opts.d[1]])}t.css(opts.d.marginRight,t.data("_cfs_origCssMargin"))}};var j=sc_mapCallbackArguments(a,g,l,i,"next",A,_);switch(z=function(){$cfs.css("zIndex",$cfs.data("_cfs_origCssZindex")),sc_afterScroll($cfs,y,e),crsl.isScrolling=!1,clbk.onAfter=sc_fireCallbacks($tt0,e,"onAfter",j,clbk),queu=sc_fireQueue($cfs,queu,conf),crsl.isPaused||$cfs.trigger(cf_e("play",conf))},crsl.isScrolling=!0,tmrs=sc_clearTimers(tmrs),clbk.onBefore=sc_fireCallbacks($tt0,e,"onBefore",j,clbk),e.fx){case"none":$cfs.css(x),E(),O(),D(),L(),N(),z();break;case"fade":scrl.anims.push([$cfs,{opacity:0},function(){E(),O(),D(),L(),N(),(scrl=sc_setScroll(A,e.easing,conf)).anims.push([$cfs,{opacity:1},z]),sc_startScroll(scrl,conf)}]);break;case"crossfade":$cfs.css({opacity:0}),scrl.anims.push([y,{opacity:0}]),scrl.anims.push([$cfs,{opacity:1},z]),k(),O(),D(),L(),N();break;case"cover":$cfs.css(opts.d.left,$wrp[opts.d.width]()),scrl.anims.push([$cfs,T,z]),k(),O(),D(),N();break;case"cover-fade":$cfs.css(opts.d.left,$wrp[opts.d.width]()),scrl.anims.push([y,{opacity:0}]),scrl.anims.push([$cfs,T,z]),k(),O(),D(),N();break;case"uncover":scrl.anims.push([y,C,z]),k(),O(),D(),L(),N();break;case"uncover-fade":$cfs.css({opacity:0}),scrl.anims.push([$cfs,{opacity:1}]),scrl.anims.push([y,C,z]),k(),O(),D(),L(),N();break;default:scrl.anims.push([$cfs,x,function(){L(),N(),z()}]),k(),P(),M()}return sc_startScroll(scrl,conf),cf_setCookie(opts.cookie,$cfs,conf),$cfs.trigger(cf_e("updatePageStatus",conf),[!1,_]),!0}),$cfs.bind(cf_e("slideTo",conf),function(t,e,i,s,n,o,r){t.stopPropagation();var a=cf_sortParams([e,i,s,n,o,r],["string/number/object","number","boolean","object","string","function"]);return n=a[3],o=a[4],r=a[5],0!=(e=gn_getItemIndex(a[0],a[1],a[2],itms,$cfs))&&(is_object(n)||(n=!1),"prev"!=o&&"next"!=o&&(o=opts.circular?e<=itms.total/2?"next":"prev":0==itms.first||itms.first>e?"next":"prev"),"prev"==o&&(e=itms.total-e),$cfs.trigger(cf_e(o,conf),[n,e,r]),!0)}),$cfs.bind(cf_e("prevPage",conf),function(t,e,i){t.stopPropagation();var s=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[s-1,e,"prev",i])}),$cfs.bind(cf_e("nextPage",conf),function(t,e,i){t.stopPropagation();var s=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[s+1,e,"next",i])}),$cfs.bind(cf_e("slideToPage",conf),function(t,e,i,s,n){t.stopPropagation(),is_number(e)||(e=$cfs.triggerHandler(cf_e("currentPage",conf)));var o=opts.pagination.items||opts.items.visible,r=Math.ceil(itms.total/o)-1;return e<0&&(e=r),e>r&&(e=0),$cfs.triggerHandler(cf_e("slideTo",conf),[e*o,0,!0,i,s,n])}),$cfs.bind(cf_e("jumpToStart",conf),function(t,e){if(t.stopPropagation(),e=e?gn_getItemIndex(e,0,!0,itms,$cfs):0,0!=(e+=itms.first)){if(itms.total>0)for(;e>itms.total;)e-=itms.total;$cfs.prepend($cfs.children().slice(e,itms.total))}return!0}),$cfs.bind(cf_e("synchronise",conf),function(t,e){if(t.stopPropagation(),e)e=cf_getSynchArr(e);else{if(!opts.synchronise)return debug(conf,"No carousel to synchronise.");e=opts.synchronise}for(var i=$cfs.triggerHandler(cf_e("currentPosition",conf)),s=!0,n=0,o=e.length;n<o;n++)e[n][0].triggerHandler(cf_e("slideTo",conf),[i,e[n][3],!0])||(s=!1);return s}),$cfs.bind(cf_e("queue",conf),function(t,e,i){return t.stopPropagation(),is_function(e)?e.call($tt0,queu):is_array(e)?queu=e:is_undefined(e)||queu.push([e,i]),queu}),$cfs.bind(cf_e("insertItem",conf),function(t,e,i,s,n){t.stopPropagation();var o=cf_sortParams([e,i,s,n],["string/object","string/number/object","boolean","number"]);if(e=o[0],i=o[1],s=o[2],n=o[3],is_object(e)&&!is_jquery(e)?e=$(e):is_string(e)&&(e=$(e)),!is_jquery(e)||0==e.length)return debug(conf,"Not a valid object.");is_undefined(i)&&(i="end"),sz_storeMargin(e,opts),sz_storeOrigCss(e);var r=i,a="before";"end"==i?s?(0==itms.first?(i=itms.total-1,a="after"):(i=itms.first,itms.first+=e.length),i<0&&(i=0)):(i=itms.total-1,a="after"):i=gn_getItemIndex(i,n,s,itms,$cfs);var l=$cfs.children().eq(i);return l.length?l[a](e):(debug(conf,"Correct insert-position not found! Appending item to the end."),$cfs.append(e)),"end"==r||s||i<itms.first&&(itms.first+=e.length),itms.total=$cfs.children().length,itms.first>=itms.total&&(itms.first-=itms.total),$cfs.trigger(cf_e("updateSizes",conf)),$cfs.trigger(cf_e("linkAnchors",conf)),!0}),$cfs.bind(cf_e("removeItem",conf),function(t,e,i,s){t.stopPropagation();var n=cf_sortParams([e,i,s],["string/number/object","boolean","number"]);e=n[0],i=n[1],s=n[2];if(e instanceof $&&e.length>1)return o=$(),e.each(function(t,e){var n=$cfs.trigger(cf_e("removeItem",conf),[$(this),i,s]);n&&(o=o.add(n))}),o;if(is_undefined(e)||"end"==e)o=$cfs.children().last();else{e=gn_getItemIndex(e,s,i,itms,$cfs);var o=$cfs.children().eq(e);o.length&&e<itms.first&&(itms.first-=o.length)}return o&&o.length&&(o.detach(),itms.total=$cfs.children().length,$cfs.trigger(cf_e("updateSizes",conf))),o}),$cfs.bind(cf_e("onBefore",conf)+" "+cf_e("onAfter",conf),function(t,e){t.stopPropagation();var i=t.type.slice(conf.events.prefix.length);return is_array(e)&&(clbk[i]=e),is_function(e)&&clbk[i].push(e),clbk[i]}),$cfs.bind(cf_e("currentPosition",conf),function(t,e){if(t.stopPropagation(),0==itms.first)i=0;else var i=itms.total-itms.first;return is_function(e)&&e.call($tt0,i),i}),$cfs.bind(cf_e("currentPage",conf),function(t,e){t.stopPropagation();var i,s=opts.pagination.items||opts.items.visible,n=Math.ceil(itms.total/s-1);return(i=0==itms.first?0:itms.first<itms.total%s?0:itms.first!=s||opts.circular?Math.round((itms.total-itms.first)/s):n)<0&&(i=0),i>n&&(i=n),is_function(e)&&e.call($tt0,i),i}),$cfs.bind(cf_e("currentVisible",conf),function(t,e){t.stopPropagation();var i=gi_getCurrentItems($cfs.children(),opts);return is_function(e)&&e.call($tt0,i),i}),$cfs.bind(cf_e("slice",conf),function(t,e,i,s){if(t.stopPropagation(),0==itms.total)return!1;var n=cf_sortParams([e,i,s],["number","number","function"]);if(e=is_number(n[0])?n[0]:0,i=is_number(n[1])?n[1]:itms.total,s=n[2],e+=itms.first,i+=itms.first,items.total>0){for(;e>itms.total;)e-=itms.total;for(;i>itms.total;)i-=itms.total;for(;e<0;)e+=itms.total;for(;i<0;)i+=itms.total}var o,r=$cfs.children();return o=i>e?r.slice(e,i):$(r.slice(e,itms.total).get().concat(r.slice(0,i).get())),is_function(s)&&s.call($tt0,o),o}),$cfs.bind(cf_e("isPaused",conf)+" "+cf_e("isStopped",conf)+" "+cf_e("isScrolling",conf),function(t,e){t.stopPropagation();var i=t.type.slice(conf.events.prefix.length),s=crsl[i];return is_function(e)&&e.call($tt0,s),s}),$cfs.bind(cf_e("configuration",conf),function(e,a,b,c){e.stopPropagation();var reInit=!1;if(is_function(a))a.call($tt0,opts);else if(is_object(a))opts_orig=$.extend(!0,{},opts_orig,a),!1!==b?reInit=!0:opts=$.extend(!0,{},opts,a);else if(!is_undefined(a))if(is_function(b)){var val=eval("opts."+a);is_undefined(val)&&(val=""),b.call($tt0,val)}else{if(is_undefined(b))return eval("opts."+a);"boolean"!=typeof c&&(c=!0),eval("opts_orig."+a+" = b"),!1!==c?reInit=!0:eval("opts."+a+" = b")}if(reInit){sz_resetMargin($cfs.children(),opts),FN._init(opts_orig),FN._bind_buttons();var sz=sz_setSizes($cfs,opts);$cfs.trigger(cf_e("updatePageStatus",conf),[!0,sz])}return opts}),$cfs.bind(cf_e("linkAnchors",conf),function(t,e,i){return t.stopPropagation(),is_undefined(e)?e=$("body"):is_string(e)&&(e=$(e)),is_jquery(e)&&0!=e.length?(is_string(i)||(i="a.caroufredsel"),e.find(i).each(function(){var t=this.hash||"";t.length>0&&-1!=$cfs.children().index($(t))&&$(this).unbind("click").click(function(e){e.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),t)})}),!0):debug(conf,"Not a valid object.")}),$cfs.bind(cf_e("updatePageStatus",conf),function(t,e,i){if(t.stopPropagation(),opts.pagination.container){var s=opts.pagination.items||opts.items.visible,n=Math.ceil(itms.total/s);e&&(opts.pagination.anchorBuilder&&(opts.pagination.container.children().remove(),opts.pagination.container.each(function(){for(var t=0;t<n;t++){var e=$cfs.children().eq(gn_getItemIndex(t*s,0,!0,itms,$cfs));$(this).append(opts.pagination.anchorBuilder.call(e[0],t+1))}})),opts.pagination.container.each(function(){$(this).children().unbind(opts.pagination.event).each(function(t){$(this).bind(opts.pagination.event,function(e){e.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),[t*s,-opts.pagination.deviation,!0,opts.pagination])})})}));var o=$cfs.triggerHandler(cf_e("currentPage",conf))+opts.pagination.deviation;return o>=n&&(o=0),o<0&&(o=n-1),opts.pagination.container.each(function(){$(this).children().removeClass(cf_c("selected",conf)).eq(o).addClass(cf_c("selected",conf))}),!0}}),$cfs.bind(cf_e("updateSizes",conf),function(t){var e=opts.items.visible,i=$cfs.children(),s=ms_getParentSize($wrp,opts,"width");if(itms.total=i.length,crsl.primarySizePercentage?(opts.maxDimension=s,opts[opts.d.width]=ms_getPercentage(s,crsl.primarySizePercentage)):opts.maxDimension=ms_getMaxDimension(opts,s),opts.responsive?(opts.items.width=opts.items.sizesConf.width,opts.items.height=opts.items.sizesConf.height,e=(opts=in_getResponsiveValues(opts,i)).items.visible,sz_setResponsiveSizes(opts,i)):opts.items.visibleConf.variable?e=gn_getVisibleItemsNext(i,opts,0):"*"!=opts.items.filter&&(e=gn_getVisibleItemsNextFilter(i,opts,0)),!opts.circular&&0!=itms.first&&e>itms.first){if(opts.items.visibleConf.variable)n=gn_getVisibleItemsPrev(i,opts,itms.first)-itms.first;else if("*"!=opts.items.filter)n=gn_getVisibleItemsPrevFilter(i,opts,itms.first)-itms.first;else var n=opts.items.visible-itms.first;debug(conf,"Preventing non-circular: sliding "+n+" items backward."),$cfs.trigger(cf_e("prev",conf),n)}opts.items.visible=cf_getItemsAdjust(e,opts,opts.items.visibleConf.adjust,$tt0),opts.items.visibleConf.old=opts.items.visible,opts=in_getAlignPadding(opts,i);var o=sz_setSizes($cfs,opts);return $cfs.trigger(cf_e("updatePageStatus",conf),[!0,o]),nv_showNavi(opts,itms.total,conf),nv_enableNavi(opts,itms.first,conf),o}),$cfs.bind(cf_e("destroy",conf),function(t,e){return t.stopPropagation(),tmrs=sc_clearTimers(tmrs),$cfs.data("_cfs_isCarousel",!1),$cfs.trigger(cf_e("finish",conf)),e&&$cfs.trigger(cf_e("jumpToStart",conf)),sz_restoreOrigCss($cfs.children()),sz_restoreOrigCss($cfs),FN._unbind_events(),FN._unbind_buttons(),"parent"==conf.wrapper?sz_restoreOrigCss($wrp):$wrp.replaceWith($cfs),!0}),$cfs.bind(cf_e("debug",conf),function(t){return debug(conf,"Carousel width: "+opts.width),debug(conf,"Carousel height: "+opts.height),debug(conf,"Item widths: "+opts.items.width),debug(conf,"Item heights: "+opts.items.height),debug(conf,"Number of items visible: "+opts.items.visible),opts.auto.play&&debug(conf,"Number of items scrolled automatically: "+opts.auto.items),opts.prev.button&&debug(conf,"Number of items scrolled backward: "+opts.prev.items),opts.next.button&&debug(conf,"Number of items scrolled forward: "+opts.next.items),conf.debug}),$cfs.bind("_cfs_triggerEvent",function(t,e,i){return t.stopPropagation(),$cfs.triggerHandler(cf_e(e,conf),i)})},FN._unbind_events=function(){$cfs.unbind(cf_e("",conf)),$cfs.unbind(cf_e("",conf,!1)),$cfs.unbind("_cfs_triggerEvent")},FN._bind_buttons=function(){if(FN._unbind_buttons(),nv_showNavi(opts,itms.total,conf),nv_enableNavi(opts,itms.first,conf),opts.auto.pauseOnHover){t=bt_pauseOnHoverConfig(opts.auto.pauseOnHover);$wrp.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.auto.button&&opts.auto.button.bind(cf_e(opts.auto.event,conf,!1),function(t){t.preventDefault();var e=!1,i=null;crsl.isPaused?e="play":opts.auto.pauseOnEvent&&(e="pause",i=bt_pauseOnHoverConfig(opts.auto.pauseOnEvent)),e&&$cfs.trigger(cf_e(e,conf),i)}),opts.prev.button&&(opts.prev.button.bind(cf_e(opts.prev.event,conf,!1),function(t){t.preventDefault(),$cfs.trigger(cf_e("prev",conf))}),opts.prev.pauseOnHover)){t=bt_pauseOnHoverConfig(opts.prev.pauseOnHover);opts.prev.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.next.button&&(opts.next.button.bind(cf_e(opts.next.event,conf,!1),function(t){t.preventDefault(),$cfs.trigger(cf_e("next",conf))}),opts.next.pauseOnHover)){t=bt_pauseOnHoverConfig(opts.next.pauseOnHover);opts.next.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.pagination.container&&opts.pagination.pauseOnHover){var t=bt_pauseOnHoverConfig(opts.pagination.pauseOnHover);opts.pagination.container.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),t)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if((opts.prev.key||opts.next.key)&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(t){var e=t.keyCode;e==opts.next.key&&(t.preventDefault(),$cfs.trigger(cf_e("next",conf))),e==opts.prev.key&&(t.preventDefault(),$cfs.trigger(cf_e("prev",conf)))}),opts.pagination.keys&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(t){var e=t.keyCode;e>=49&&e<58&&(e=(e-49)*opts.items.visible)<=itms.total&&(t.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),[e,0,!0,opts.pagination]))}),$.fn.swipe){var e="ontouchstart"in window;if(e&&opts.swipe.onTouch||!e&&opts.swipe.onMouse){var i=$.extend(!0,{},opts.prev,opts.swipe),s=$.extend(!0,{},opts.next,opts.swipe),n=function(){$cfs.trigger(cf_e("prev",conf),[i])},o=function(){$cfs.trigger(cf_e("next",conf),[s])};switch(opts.direction){case"up":case"down":opts.swipe.options.swipeUp=o,opts.swipe.options.swipeDown=n;break;default:opts.swipe.options.swipeLeft=o,opts.swipe.options.swipeRight=n}crsl.swipe&&$cfs.swipe("destroy"),$wrp.swipe(opts.swipe.options),$wrp.css("cursor","move"),crsl.swipe=!0}}if($.fn.mousewheel&&opts.mousewheel){var r=$.extend(!0,{},opts.prev,opts.mousewheel),a=$.extend(!0,{},opts.next,opts.mousewheel);crsl.mousewheel&&$wrp.unbind(cf_e("mousewheel",conf,!1)),$wrp.bind(cf_e("mousewheel",conf,!1),function(t,e){t.preventDefault(),e>0?$cfs.trigger(cf_e("prev",conf),[r]):$cfs.trigger(cf_e("next",conf),[a])}),crsl.mousewheel=!0}if(opts.auto.play&&$cfs.trigger(cf_e("play",conf),opts.auto.delay),crsl.upDateOnWindowResize){var l=function(t){$cfs.trigger(cf_e("finish",conf)),opts.auto.pauseOnResize&&!crsl.isPaused&&$cfs.trigger(cf_e("play",conf)),sz_resetMargin($cfs.children(),opts),$cfs.trigger(cf_e("updateSizes",conf))},c=$(window),h=null;if($.debounce&&"debounce"==conf.onWindowResize)h=$.debounce(200,l);else if($.throttle&&"throttle"==conf.onWindowResize)h=$.throttle(300,l);else{var u=0,d=0;h=function(){var t=c.width(),e=c.height();t==u&&e==d||(l(),u=t,d=e)}}c.bind(cf_e("resize",conf,!1,!0,!0),h)}},FN._unbind_buttons=function(){cf_e("",conf);var t=cf_e("",conf,!1);ns3=cf_e("",conf,!1,!0,!0),$(document).unbind(ns3),$(window).unbind(ns3),$wrp.unbind(t),opts.auto.button&&opts.auto.button.unbind(t),opts.prev.button&&opts.prev.button.unbind(t),opts.next.button&&opts.next.button.unbind(t),opts.pagination.container&&(opts.pagination.container.unbind(t),opts.pagination.anchorBuilder&&opts.pagination.container.children().remove()),crsl.swipe&&($cfs.swipe("destroy"),$wrp.css("cursor","default"),crsl.swipe=!1),crsl.mousewheel&&(crsl.mousewheel=!1),nv_showNavi(opts,"hide",conf),nv_enableNavi(opts,"removeClass",conf)},is_boolean(configs)&&(configs={debug:configs});var crsl={direction:"next",isPaused:!0,isScrolling:!1,isStopped:!1,mousewheel:!1,swipe:!1},itms={total:$cfs.children().length,first:0},tmrs={auto:null,progress:null,startTime:getTime(),timePassed:0},scrl={isStopped:!1,duration:0,startTime:0,easing:"",anims:[]},clbk={onBefore:[],onAfter:[]},queu=[],conf=$.extend(!0,{},$.fn.carouFredSel.configs,configs),opts={},opts_orig=$.extend(!0,{},options),$wrp="parent"==conf.wrapper?$cfs.parent():$cfs.wrap("<"+conf.wrapper.element+' class="'+conf.wrapper.classname+'" />').parent();if(conf.selector=$cfs.selector,conf.serialNumber=$.fn.carouFredSel.serialNumber++,conf.transition=conf.transition&&$.fn.transition?"transition":"animate",FN._init(opts_orig,!0,starting_position),FN._build(),FN._bind_events(),FN._bind_buttons(),is_array(opts.items.start))var start_arr=opts.items.start;else{var start_arr=[];0!=opts.items.start&&start_arr.push(opts.items.start)}if(opts.cookie&&start_arr.unshift(parseInt(cf_getCookie(opts.cookie),10)),start_arr.length>0)for(var a=0,l=start_arr.length;a<l;a++){var s=start_arr[a];if(0!=s){if(!0===s){if((s=window.location.hash).length<1)continue}else"random"===s&&(s=Math.floor(Math.random()*itms.total));if($cfs.triggerHandler(cf_e("slideTo",conf),[s,0,!0,{fx:"none"}]))break}}var siz=sz_setSizes($cfs,opts),itm=gi_getCurrentItems($cfs.children(),opts);return opts.onCreate&&opts.onCreate.call($tt0,{width:siz.width,height:siz.height,items:itm}),$cfs.trigger(cf_e("updatePageStatus",conf),[!0,siz]),$cfs.trigger(cf_e("linkAnchors",conf)),conf.debug&&$cfs.trigger(cf_e("debug",conf)),$cfs},$.fn.carouFredSel.serialNumber=1,$.fn.carouFredSel.defaults={synchronise:!1,infinite:!0,circular:!0,responsive:!1,direction:"left",items:{start:0},scroll:{easing:"swing",duration:500,pauseOnHover:!1,event:"click",queue:!1}},$.fn.carouFredSel.configs={debug:!1,transition:!1,onWindowResize:"throttle",events:{prefix:"",namespace:"cfs"},wrapper:{element:"div",classname:"caroufredsel_wrapper"},classnames:{}},$.fn.carouFredSel.pageAnchorBuilder=function(t){return'<a href="#"><span>'+t+"</span></a>"},$.fn.carouFredSel.progressbarUpdater=function(t){$(this).css("width",t+"%")},$.fn.carouFredSel.cookie={get:function(t){t+="=";for(var e=document.cookie.split(";"),i=0,s=e.length;i<s;i++){for(var n=e[i];" "==n.charAt(0);)n=n.slice(1);if(0==n.indexOf(t))return n.slice(t.length)}return 0},set:function(t,e,i){var s="";if(i){var n=new Date;n.setTime(n.getTime()+24*i*60*60*1e3),s="; expires="+n.toGMTString()}document.cookie=t+"="+e+s+"; path=/"},remove:function(t){$.fn.carouFredSel.cookie.set(t,"",-1)}},$.extend($.easing,{quadratic:function(t){var e=t*t;return t*(-e*t+4*e-6*t+4)},cubic:function(t){return t*(4*t*t-9*t+6)},elastic:function(t){var e=t*t;return t*(33*e*e-106*e*t+126*e-67*t+15)}}))}(jQuery),function(){"use strict";function t(t){if(void 0===t)throw new Error('Pathformer [constructor]: "element" parameter is required');if(t.constructor===String&&!(t=document.getElementById(t)))throw new Error('Pathformer [constructor]: "element" parameter is not related to an existing ID');if(!(t instanceof window.SVGElement||t instanceof window.SVGGElement||/^svg$/i.test(t.nodeName)))throw new Error('Pathformer [constructor]: "element" parameter must be a string or a SVGelement');this.el=t,this.scan(t)}function e(t,e,s){i(),this.isReady=!1,this.setElement(t,e),this.setOptions(e),this.setCallback(s),this.isReady&&this.init()}t.prototype.TYPES=["line","ellipse","circle","polygon","polyline","rect"],t.prototype.ATTR_WATCH=["cx","cy","points","r","rx","ry","x","x1","x2","y","y1","y2"],t.prototype.scan=function(t){for(var e,i,s,n=t.querySelectorAll(this.TYPES.join(",")),o=0;o<n.length;o++)i=(0,this[(e=n[o]).tagName.toLowerCase()+"ToPath"])(this.parseAttr(e.attributes)),s=this.pathMaker(e,i),e.parentNode.replaceChild(s,e)},t.prototype.lineToPath=function(t){var e={},i=t.x1||0,s=t.y1||0,n=t.x2||0,o=t.y2||0;return e.d="M"+i+","+s+"L"+n+","+o,e},t.prototype.rectToPath=function(t){var e={},i=parseFloat(t.x)||0,s=parseFloat(t.y)||0,n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;if(t.rx||t.ry){var r=parseInt(t.rx,10)||-1,a=parseInt(t.ry,10)||-1;r=Math.min(Math.max(r<0?a:r,0),n/2),a=Math.min(Math.max(a<0?r:a,0),o/2),e.d="M "+(i+r)+","+s+" L "+(i+n-r)+","+s+" A "+r+","+a+",0,0,1,"+(i+n)+","+(s+a)+" L "+(i+n)+","+(s+o-a)+" A "+r+","+a+",0,0,1,"+(i+n-r)+","+(s+o)+" L "+(i+r)+","+(s+o)+" A "+r+","+a+",0,0,1,"+i+","+(s+o-a)+" L "+i+","+(s+a)+" A "+r+","+a+",0,0,1,"+(i+r)+","+s}else e.d="M"+i+" "+s+" L"+(i+n)+" "+s+" L"+(i+n)+" "+(s+o)+" L"+i+" "+(s+o)+" Z";return e},t.prototype.polylineToPath=function(t){var e,i,s={},n=t.points.trim().split(" ");if(-1===t.points.indexOf(",")){var o=[];for(e=0;e<n.length;e+=2)o.push(n[e]+","+n[e+1]);n=o}for(i="M"+n[0],e=1;e<n.length;e++)-1!==n[e].indexOf(",")&&(i+="L"+n[e]);return s.d=i,s},t.prototype.polygonToPath=function(e){var i=t.prototype.polylineToPath(e);return i.d+="Z",i},t.prototype.ellipseToPath=function(t){var e={},i=parseFloat(t.rx)||0,s=parseFloat(t.ry)||0,n=parseFloat(t.cx)||0,o=parseFloat(t.cy)||0,r=n-i,a=o,l=parseFloat(n)+parseFloat(i),c=o;return e.d="M"+r+","+a+"A"+i+","+s+" 0,1,1 "+l+","+c+"A"+i+","+s+" 0,1,1 "+r+","+c,e},t.prototype.circleToPath=function(t){var e={},i=parseFloat(t.r)||0,s=parseFloat(t.cx)||0,n=parseFloat(t.cy)||0,o=s-i,r=n,a=parseFloat(s)+parseFloat(i),l=n;return e.d="M"+o+","+r+"A"+i+","+i+" 0,1,1 "+a+","+l+"A"+i+","+i+" 0,1,1 "+o+","+l,e},t.prototype.pathMaker=function(t,e){var i,s,n=document.createElementNS("http://www.w3.org/2000/svg","path");for(i=0;i<t.attributes.length;i++)s=t.attributes[i],-1===this.ATTR_WATCH.indexOf(s.name)&&n.setAttribute(s.name,s.value);for(i in e)n.setAttribute(i,e[i]);return n},t.prototype.parseAttr=function(t){for(var e,i={},s=0;s<t.length;s++){if(e=t[s],-1!==this.ATTR_WATCH.indexOf(e.name)&&-1!==e.value.indexOf("%"))throw new Error("Pathformer [parseAttr]: a SVG shape got values in percentage. This cannot be transformed into 'path' tags. Please use 'viewBox'.");i[e.name]=e.value}return i};var i,s,n,o;e.LINEAR=function(t){return t},e.EASE=function(t){return-Math.cos(t*Math.PI)/2+.5},e.EASE_OUT=function(t){return 1-Math.pow(1-t,3)},e.EASE_IN=function(t){return Math.pow(t,3)},e.EASE_OUT_BOUNCE=function(t){var e=1-Math.cos(t*(.5*Math.PI)),i=Math.pow(e,1.5),s=Math.pow(1-t,2);return 1-s+(1-Math.abs(Math.cos(i*(2.5*Math.PI))))*s},e.prototype.setElement=function(t,e){var i;if(void 0===t)throw new Error('Vivus [constructor]: "element" parameter is required');if(t.constructor===String&&!(t=document.getElementById(t)))throw new Error('Vivus [constructor]: "element" parameter is not related to an existing ID');if(this.parentEl=t,e&&e.file){var s=this;i=function(t){var i=document.createElement("div");i.innerHTML=this.responseText;var n=i.querySelector("svg");if(!n)throw new Error("Vivus [load]: Cannot find the SVG in the loaded file : "+e.file);s.el=n,s.el.setAttribute("width","100%"),s.el.setAttribute("height","100%"),s.parentEl.appendChild(s.el),s.isReady=!0,s.init(),s=null};var n=new window.XMLHttpRequest;return n.addEventListener("load",i),n.open("GET",e.file),void n.send()}switch(t.constructor){case window.SVGSVGElement:case window.SVGElement:case window.SVGGElement:this.el=t,this.isReady=!0;break;case window.HTMLObjectElement:s=this,(i=function(e){if(!s.isReady){if(s.el=t.contentDocument&&t.contentDocument.querySelector("svg"),!s.el&&e)throw new Error("Vivus [constructor]: object loaded does not contain any SVG");s.el&&(t.getAttribute("built-by-vivus")&&(s.parentEl.insertBefore(s.el,t),s.parentEl.removeChild(t),s.el.setAttribute("width","100%"),s.el.setAttribute("height","100%")),s.isReady=!0,s.init(),s=null)}})()||t.addEventListener("load",i);break;default:throw new Error('Vivus [constructor]: "element" parameter is not valid (or miss the "file" attribute)')}},e.prototype.setOptions=function(t){var i=["delayed","sync","async","nsync","oneByOne","scenario","scenario-sync"],s=["inViewport","manual","autostart"];if(void 0!==t&&t.constructor!==Object)throw new Error('Vivus [constructor]: "options" parameter must be an object');if((t=t||{}).type&&-1===i.indexOf(t.type))throw new Error("Vivus [constructor]: "+t.type+" is not an existing animation `type`");if(this.type=t.type||i[0],t.start&&-1===s.indexOf(t.start))throw new Error("Vivus [constructor]: "+t.start+" is not an existing `start` option");if(this.start=t.start||s[0],this.isIE=-1!==window.navigator.userAgent.indexOf("MSIE")||-1!==window.navigator.userAgent.indexOf("Trident/")||-1!==window.navigator.userAgent.indexOf("Edge/"),this.duration=o(t.duration,120),this.delay=o(t.delay,null),this.dashGap=o(t.dashGap,1),this.forceRender=t.hasOwnProperty("forceRender")?!!t.forceRender:this.isIE,this.reverseStack=!!t.reverseStack,this.selfDestroy=!!t.selfDestroy,this.onReady=t.onReady,this.map=[],this.frameLength=this.currentFrame=this.delayUnit=this.speed=this.handle=null,this.ignoreInvisible=!!t.hasOwnProperty("ignoreInvisible")&&!!t.ignoreInvisible,this.animTimingFunction=t.animTimingFunction||e.LINEAR,this.pathTimingFunction=t.pathTimingFunction||e.LINEAR,this.delay>=this.duration)throw new Error("Vivus [constructor]: delay must be shorter than duration")},e.prototype.setCallback=function(t){if(t&&t.constructor!==Function)throw new Error('Vivus [constructor]: "callback" parameter must be a function');this.callback=t||function(){}},e.prototype.mapping=function(){var t,e,i,s,n,r,a,l;for(l=r=a=0,e=this.el.querySelectorAll("path"),t=0;t<e.length;t++)i=e[t],this.isInvisible(i)||(n={el:i,length:Math.ceil(i.getTotalLength())},isNaN(n.length)?window.console&&console.warn&&console.warn("Vivus [mapping]: cannot retrieve a path element length",i):(this.map.push(n),i.style.strokeDasharray=n.length+" "+(n.length+2*this.dashGap),i.style.strokeDashoffset=n.length+this.dashGap,n.length+=this.dashGap,r+=n.length,this.renderPath(t)));for(r=0===r?1:r,this.delay=null===this.delay?this.duration/3:this.delay,this.delayUnit=this.delay/(e.length>1?e.length-1:1),this.reverseStack&&this.map.reverse(),t=0;t<this.map.length;t++){switch(n=this.map[t],this.type){case"delayed":n.startAt=this.delayUnit*t,n.duration=this.duration-this.delay;break;case"oneByOne":n.startAt=a/r*this.duration,n.duration=n.length/r*this.duration;break;case"sync":case"async":case"nsync":n.startAt=0,n.duration=this.duration;break;case"scenario-sync":i=n.el,s=this.parseAttr(i),n.startAt=l+(o(s["data-delay"],this.delayUnit)||0),n.duration=o(s["data-duration"],this.duration),l=void 0!==s["data-async"]?n.startAt:n.startAt+n.duration,this.frameLength=Math.max(this.frameLength,n.startAt+n.duration);break;case"scenario":i=n.el,s=this.parseAttr(i),n.startAt=o(s["data-start"],this.delayUnit)||0,n.duration=o(s["data-duration"],this.duration),this.frameLength=Math.max(this.frameLength,n.startAt+n.duration)}a+=n.length,this.frameLength=this.frameLength||this.duration}},e.prototype.drawer=function(){var t=this;if(this.currentFrame+=this.speed,this.currentFrame<=0)this.stop(),this.reset();else{if(!(this.currentFrame>=this.frameLength))return this.trace(),void(this.handle=s(function(){t.drawer()}));this.stop(),this.currentFrame=this.frameLength,this.trace(),this.selfDestroy&&this.destroy()}this.callback(this),this.instanceCallback&&(this.instanceCallback(this),this.instanceCallback=null)},e.prototype.trace=function(){var t,e,i,s;for(s=this.animTimingFunction(this.currentFrame/this.frameLength)*this.frameLength,t=0;t<this.map.length;t++)e=(s-(i=this.map[t]).startAt)/i.duration,e=this.pathTimingFunction(Math.max(0,Math.min(1,e))),i.progress!==e&&(i.progress=e,i.el.style.strokeDashoffset=Math.floor(i.length*(1-e)),this.renderPath(t))},e.prototype.renderPath=function(t){if(this.forceRender&&this.map&&this.map[t]){var e=this.map[t],i=e.el.cloneNode(!0);e.el.parentNode.replaceChild(i,e.el),e.el=i}},e.prototype.init=function(){this.frameLength=0,this.currentFrame=0,this.map=[],new t(this.el),this.mapping(),this.starter(),this.onReady&&this.onReady(this)},e.prototype.starter=function(){switch(this.start){case"manual":return;case"autostart":this.play();break;case"inViewport":var t=this,e=function(){t.isInViewport(t.parentEl,1)&&(t.play(),window.removeEventListener("scroll",e))};window.addEventListener("scroll",e),e()}},e.prototype.getStatus=function(){return 0===this.currentFrame?"start":this.currentFrame===this.frameLength?"end":"progress"},e.prototype.reset=function(){return this.setFrameProgress(0)},e.prototype.finish=function(){return this.setFrameProgress(1)},e.prototype.setFrameProgress=function(t){return t=Math.min(1,Math.max(0,t)),this.currentFrame=Math.round(this.frameLength*t),this.trace(),this},e.prototype.play=function(t,e){if(this.instanceCallback=null,t&&"function"==typeof t)this.instanceCallback=t,t=null;else if(t&&"number"!=typeof t)throw new Error("Vivus [play]: invalid speed");return e&&"function"==typeof e&&!this.instanceCallback&&(this.instanceCallback=e),this.speed=t||1,this.handle||this.drawer(),this},e.prototype.stop=function(){return this.handle&&(n(this.handle),this.handle=null),this},e.prototype.destroy=function(){this.stop();var t,e;for(t=0;t<this.map.length;t++)(e=this.map[t]).el.style.strokeDashoffset=null,e.el.style.strokeDasharray=null,this.renderPath(t)},e.prototype.isInvisible=function(t){var e,i=t.getAttribute("data-ignore");return null!==i?"false"!==i:!!this.ignoreInvisible&&(!(e=t.getBoundingClientRect()).width&&!e.height)},e.prototype.parseAttr=function(t){var e,i={};if(t&&t.attributes)for(var s=0;s<t.attributes.length;s++)i[(e=t.attributes[s]).name]=e.value;return i},e.prototype.isInViewport=function(t,e){var i=this.scrollY(),s=i+this.getViewportH(),n=t.getBoundingClientRect(),o=n.height,r=i+n.top;return e=e||0,r+o*e<=s&&r+o>=i},e.prototype.getViewportH=function(){var t=this.docElem.clientHeight,e=window.innerHeight;return t<e?e:t},e.prototype.scrollY=function(){return window.pageYOffset||this.docElem.scrollTop},i=function(){e.prototype.docElem||(e.prototype.docElem=window.document.documentElement,s=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},n=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t)})},o=function(t,e){var i=parseInt(t,10);return i>=0?i:e},"function"==typeof define&&define.amd?define([],function(){return e}):"object"==typeof exports?module.exports=e:window.Vivus=e}(),function(t){t.fn.viewportChecker=function(e){var i={classToAdd:"visible",classToRemove:"invisible",classToAddForFullView:"full-visible",removeClassAfterAnimation:!1,offset:100,repeat:!1,invertBottomOffset:!0,callbackFunction:function(t,e){},scrollHorizontal:!1,scrollBox:window};t.extend(i,e);var s=this,n={height:t(i.scrollBox).height(),width:t(i.scrollBox).width()};return this.checkElements=function(){var e,o;i.scrollHorizontal?(e=Math.max(t("html").scrollLeft(),t("body").scrollLeft(),t(window).scrollLeft()),o=e+n.width):(e=Math.max(t("html").scrollTop(),t("body").scrollTop(),t(window).scrollTop()),o=e+n.height),s.each(function(){var s=t(this),r={},a={};if(s.data("vp-add-class")&&(a.classToAdd=s.data("vp-add-class")),s.data("vp-remove-class")&&(a.classToRemove=s.data("vp-remove-class")),s.data("vp-add-class-full-view")&&(a.classToAddForFullView=s.data("vp-add-class-full-view")),s.data("vp-keep-add-class")&&(a.removeClassAfterAnimation=s.data("vp-remove-after-animation")),s.data("vp-offset")&&(a.offset=s.data("vp-offset")),s.data("vp-repeat")&&(a.repeat=s.data("vp-repeat")),s.data("vp-scrollHorizontal")&&(a.scrollHorizontal=s.data("vp-scrollHorizontal")),s.data("vp-invertBottomOffset")&&(a.scrollHorizontal=s.data("vp-invertBottomOffset")),t.extend(r,i),t.extend(r,a),!s.data("vp-animated")||r.repeat){String(r.offset).indexOf("%")>0&&(r.offset=parseInt(r.offset)/100*n.height);var l=r.scrollHorizontal?s.offset().left:s.offset().top,c=r.scrollHorizontal?l+s.width():l+s.height(),h=Math.round(l)+r.offset,u=r.scrollHorizontal?h+s.width():h+s.height();r.invertBottomOffset&&(u-=2*r.offset),h<o&&u>e?(s.removeClass(r.classToRemove),s.addClass(r.classToAdd),r.callbackFunction(s,"add"),c<=o&&l>=e?s.addClass(r.classToAddForFullView):s.removeClass(r.classToAddForFullView),s.data("vp-animated",!0),r.removeClassAfterAnimation&&s.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){s.removeClass(r.classToAdd)})):s.hasClass(r.classToAdd)&&r.repeat&&(s.removeClass(r.classToAdd+" "+r.classToAddForFullView),r.callbackFunction(s,"remove"),s.data("vp-animated",!1))}})},("ontouchstart"in window||"onmsgesturechange"in window)&&t(document).bind("touchmove MSPointerMove pointermove",this.checkElements),t(i.scrollBox).bind("load scroll",this.checkElements),t(window).resize(function(e){n={height:t(i.scrollBox).height(),width:t(i.scrollBox).width()},s.checkElements()}),this.checkElements(),this}}(jQuery),function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,o,a){(a=a||e||t.jQuery)&&(o.prototype.option||(o.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){return function(t,e,s){var n,o="$()."+i+'("'+e+'")';return t.each(function(t,l){var c=a.data(l,i);if(c){var h=c[e];if(h&&"_"!=e.charAt(0)){var u=h.apply(c,s);n=void 0===n?u:n}else r(o+" is not a valid method")}else r(i+" not initialized. Cannot call methods, i.e. "+o)}),void 0!==n?n:t}(this,t,n.call(arguments,1))}return function(t,e){t.each(function(t,s){var n=a.data(s,i);n?(n.option(e),n._init()):(n=new o(s,e),a.data(s,i,n))})}(this,t),this},s(a))}function s(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,o=t.console,r=void 0===o?function(){}:function(t){o.error(t)};return s(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},s=i[t]=i[t]||[];return-1==s.indexOf(e)&&s.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var s=i.indexOf(e);return-1!=s&&i.splice(s,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var s=this._onceEvents&&this._onceEvents[t],n=0;n<i.length;n++){var o=i[n];s&&s[o]&&(this.off(t,o),delete s[o]),o.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}function e(t){var e=getComputedStyle(t);return e||n("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function i(n){if(function(){if(!a){a=!0;var n=document.createElement("div");n.style.width="200px",n.style.padding="1px 2px 3px 4px",n.style.borderStyle="solid",n.style.borderWidth="1px 2px 3px 4px",n.style.boxSizing="border-box";var o=document.body||document.documentElement;o.appendChild(n);var r=e(n);s=200==Math.round(t(r.width)),i.isBoxSizeOuter=s,o.removeChild(n)}}(),"string"==typeof n&&(n=document.querySelector(n)),n&&"object"==typeof n&&n.nodeType){var l=e(n);if("none"==l.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<r;e++)t[o[e]]=0;return t}();var c={};c.width=n.offsetWidth,c.height=n.offsetHeight;for(var h=c.isBorderBox="border-box"==l.boxSizing,u=0;u<r;u++){var d=o[u],f=l[d],p=parseFloat(f);c[d]=isNaN(p)?0:p}var m=c.paddingLeft+c.paddingRight,g=c.paddingTop+c.paddingBottom,v=c.marginLeft+c.marginRight,y=c.marginTop+c.marginBottom,b=c.borderLeftWidth+c.borderRightWidth,_=c.borderTopWidth+c.borderBottomWidth,w=h&&s,x=t(l.width);!1!==x&&(c.width=x+(w?0:m+b));var C=t(l.height);return!1!==C&&(c.height=C+(w?0:g+_)),c.innerWidth=c.width-(m+b),c.innerHeight=c.height-(g+_),c.outerWidth=c.width+v,c.outerHeight=c.height+y,c}}var s,n="undefined"==typeof console?function(){}:function(t){console.error(t)},o=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],r=o.length,a=!1;return i}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var s=e[i]+"MatchesSelector";if(t[s])return s}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var s=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];return"object"==typeof t&&"number"==typeof t.length?s.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,s){var n=[];return(t=i.makeArray(t)).forEach(function(t){if(t instanceof HTMLElement)if(s){e(t,s)&&n.push(t);for(var i=t.querySelectorAll(s),o=0;o<i.length;o++)n.push(i[o])}else n.push(t)}),n},i.debounceMethod=function(t,e,i){i=i||100;var s=t.prototype[e],n=e+"Timeout";t.prototype[e]=function(){var t=this[n];clearTimeout(t);var e=arguments,o=this;this[n]=setTimeout(function(){s.apply(o,e),delete o[n]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var n=t.console;return i.htmlInit=function(e,s){i.docReady(function(){var o=i.toDashed(s),r="data-"+o,a=document.querySelectorAll("["+r+"]"),l=document.querySelectorAll(".js-"+o),c=i.makeArray(a).concat(i.makeArray(l)),h=r+"-options",u=t.jQuery;c.forEach(function(t){var i,o=t.getAttribute(r)||t.getAttribute(h);try{i=o&&JSON.parse(o)}catch(e){return void(n&&n.error("Error parsing "+r+" on "+t.className+": "+e))}var a=new e(t,i);u&&u.data(t,s,a)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var s=document.documentElement.style,n="string"==typeof s.transition?"transition":"WebkitTransition",o="string"==typeof s.transform?"transform":"WebkitTransform",r={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[n],a={transform:o,transition:n,transitionDuration:n+"Duration",transitionProperty:n+"Property",transitionDelay:n+"Delay"},l=i.prototype=Object.create(t.prototype);l.constructor=i,l._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},l.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},l.getSize=function(){this.size=e(this.element)},l.css=function(t){var e=this.element.style;for(var i in t){e[a[i]||i]=t[i]}},l.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),s=t[e?"left":"right"],n=t[i?"top":"bottom"],o=parseFloat(s),r=parseFloat(n),a=this.layout.size;-1!=s.indexOf("%")&&(o=o/100*a.width),-1!=n.indexOf("%")&&(r=r/100*a.height),o=isNaN(o)?0:o,r=isNaN(r)?0:r,o-=e?a.paddingLeft:a.paddingRight,r-=i?a.paddingTop:a.paddingBottom,this.position.x=o,this.position.y=r},l.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),s=this.layout._getOption("originTop"),n=i?"paddingLeft":"paddingRight",o=i?"left":"right",r=i?"right":"left",a=this.position.x+t[n];e[o]=this.getXValue(a),e[r]="";var l=s?"paddingTop":"paddingBottom",c=s?"top":"bottom",h=s?"bottom":"top",u=this.position.y+t[l];e[c]=this.getYValue(u),e[h]="",this.css(e),this.emitEvent("layout",[this])},l.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},l.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},l._transitionTo=function(t,e){this.getPosition();var i=this.position.x,s=this.position.y,n=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),!n||this.isTransitioning){var o=t-i,r=e-s,a={};a.transform=this.getTranslate(o,r),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},l.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),s=this.layout._getOption("originTop");return t=i?t:-t,e=s?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},l.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},l.moveTo=l._transitionTo,l.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},l._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},l.transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);this.element.offsetHeight;null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var c="opacity,"+function(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}(o);l.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:c,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(r,this,!1)}},l.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},l.onotransitionend=function(t){this.ontransitionend(t)};var h={"-webkit-transform":"transform"};l.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,i=h[t.propertyName]||t.propertyName;if(delete e.ingProperties[i],function(t){for(var e in t)return!1;return!0}(e.ingProperties)&&this.disableTransition(),i in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[i]),i in e.onEnd){e.onEnd[i].call(this),delete e.onEnd[i]}this.emitEvent("transitionEnd",[this])}},l.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(r,this,!1),this.isTransitioning=!1},l._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var u={transitionProperty:"",transitionDuration:"",transitionDelay:""};return l.removeTransitionStyles=function(){this.css(u)},l.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},l.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},l.remove=function(){n&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),this.hide()):this.removeElem()},l.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},l.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},l.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},l.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},l.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},l.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},i}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,s,n,o){return e(t,i,s,n,o)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,s,n){"use strict";function o(t,e){var i=s.getQueryElement(t);if(i){this.element=i,l&&(this.$element=l(this.element)),this.options=s.extend({},this.constructor.defaults),this.option(e);var n=++h;this.element.outlayerGUID=n,u[n]=this,this._create();this._getOption("initLayout")&&this.layout()}else a&&a.error("Bad element for "+this.constructor.namespace+": "+(i||t))}function r(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}var a=t.console,l=t.jQuery,c=function(){},h=0,u={};o.namespace="outlayer",o.Item=n,o.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var d=o.prototype;s.extend(d,e.prototype),d.option=function(t){s.extend(this.options,t)},d._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},o.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},d._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),s.extend(this.element.style,this.options.containerStyle);this._getOption("resize")&&this.bindResize()},d.reloadItems=function(){this.items=this._itemize(this.element.children)},d._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,s=[],n=0;n<e.length;n++){var o=new i(e[n],this);s.push(o)}return s},d._filterFindItemElements=function(t){return s.filterFindElements(t,this.options.itemSelector)},d.getItemElements=function(){return this.items.map(function(t){return t.element})},d.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},d._init=d.layout,d._resetLayout=function(){this.getSize()},d.getSize=function(){this.size=i(this.element)},d._getMeasurement=function(t,e){var s,n=this.options[t];n?("string"==typeof n?s=this.element.querySelector(n):n instanceof HTMLElement&&(s=n),this[t]=s?i(s)[e]:n):this[t]=0},d.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},d._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},d._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var s=this._getItemLayoutPosition(t);s.item=t,s.isInstant=e||t.isLayoutInstant,i.push(s)},this),this._processLayoutQueue(i)}},d._getItemLayoutPosition=function(){return{x:0,y:0}},d._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},d.updateStagger=function(){var t=this.options.stagger;{if(null!==t&&void 0!==t)return this.stagger=function(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],s=e&&e[2];return i.length?(i=parseFloat(i))*(f[s]||1):0}(t),this.stagger;this.stagger=0}},d._positionItem=function(t,e,i,s,n){s?t.goTo(e,i):(t.stagger(n*this.stagger),t.moveTo(e,i))},d._postLayout=function(){this.resizeContainer()},d.resizeContainer=function(){if(this._getOption("resizeContainer")){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},d._getContainerSize=c,d._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},d._emitCompleteOnItems=function(t,e){function i(){n.dispatchEvent(t+"Complete",null,[e])}function s(){++r==o&&i()}var n=this,o=e.length;if(e&&o){var r=0;e.forEach(function(e){e.once(t,s)})}else i()},d.dispatchEvent=function(t,e,i){var s=e?[e].concat(i):i;if(this.emitEvent(t,s),l)if(this.$element=this.$element||l(this.element),e){var n=l.Event(e);n.type=t,this.$element.trigger(n,i)}else this.$element.trigger(t,i)},d.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},d.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},d.stamp=function(t){(t=this._find(t))&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},d.unstamp=function(t){(t=this._find(t))&&t.forEach(function(t){s.removeFrom(this.stamps,t),this.unignore(t)},this)},d._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=s.makeArray(t)},d._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},d._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},d._manageStamp=c,d._getElementOffset=function(t){var e=t.getBoundingClientRect(),s=this._boundingRect,n=i(t);return{left:e.left-s.left-n.marginLeft,top:e.top-s.top-n.marginTop,right:s.right-e.right-n.marginRight,bottom:s.bottom-e.bottom-n.marginBottom}},d.handleEvent=s.handleEvent,d.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},d.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},d.onresize=function(){this.resize()},s.debounceMethod(o,"onresize",100),d.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},d.needsResizeLayout=function(){var t=i(this.element);return this.size&&t&&t.innerWidth!==this.size.innerWidth},d.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},d.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},d.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},d.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},d.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},d.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},d.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},d.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},d.getItems=function(t){var e=[];return(t=s.makeArray(t)).forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},d.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),s.removeFrom(this.items,t)},this)},d.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete u[e],delete this.element.outlayerGUID,l&&l.removeData(this.element,this.constructor.namespace)},o.data=function(t){var e=(t=s.getQueryElement(t))&&t.outlayerGUID;return e&&u[e]},o.create=function(t,e){var i=r(o);return i.defaults=s.extend({},o.defaults),s.extend(i.defaults,e),i.compatOptions=s.extend({},o.compatOptions),i.namespace=t,i.data=o.data,i.Item=r(n),s.htmlInit(i,t),l&&l.bridget&&l.bridget(t,i),i};var f={ms:1,s:1e3};return o.Item=n,o}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/item",["outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window,function(t){"use strict";function e(){t.Item.apply(this,arguments)}var i=e.prototype=Object.create(t.Item.prototype),s=i._create;i._create=function(){this.id=this.layout.itemGUID++,s.call(this),this.sortData={}},i.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var s=e[i];this.sortData[i]=s(this.element,this)}}};var n=i.destroy;return i.destroy=function(){n.apply(this,arguments),this.css({display:""})},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("get-size"),require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window,function(t,e){"use strict";function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}var s=i.prototype;return["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"].forEach(function(t){s[t]=function(){return e.prototype[t].apply(this.isotope,arguments)}}),s.needsVerticalResizeLayout=function(){var e=t(this.isotope.element);return this.isotope.size&&e&&e.innerHeight!=this.isotope.size.innerHeight},s._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},s.getColumnWidth=function(){this.getSegmentSize("column","Width")},s.getRowHeight=function(){this.getSegmentSize("row","Height")},s.getSegmentSize=function(t,e){var i=t+e,s="outer"+e;if(this._getMeasurement(i,s),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[s]||this.isotope.size["inner"+e]}},s.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},s.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},s.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function n(){i.apply(this,arguments)}return n.prototype=Object.create(s),n.prototype.constructor=n,e&&(n.options=e),n.prototype.namespace=t,i.modes[t]=n,n},i}),function(t,e){"function"==typeof define&&define.amd?define("masonry-layout/masonry",["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var s=i.prototype;return s._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},s.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var s=this.columnWidth+=this.gutter,n=this.containerWidth+this.gutter,o=n/s,r=s-n%s,a=r&&r<1?"round":"floor";o=Math[a](o),this.cols=Math.max(o,1)},s.getContainerWidth=function(){var t=this._getOption("fitWidth")?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},s._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&e<1?"round":"ceil",s=Math[i](t.size.outerWidth/this.columnWidth);s=Math.min(s,this.cols);for(var n=this[this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition"](s,t),o={x:this.columnWidth*n.col,y:n.y},r=n.y+t.size.outerHeight,a=s+n.col,l=n.col;l<a;l++)this.colYs[l]=r;return o},s._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},s._getTopColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,s=0;s<i;s++)e[s]=this._getColGroupY(s,t);return e},s._getColGroupY=function(t,e){if(e<2)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},s._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols;i=t>1&&i+t>this.cols?0:i;var s=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=s?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},s._manageStamp=function(t){var i=e(t),s=this._getElementOffset(t),n=this._getOption("originLeft")?s.left:s.right,o=n+i.outerWidth,r=Math.floor(n/this.columnWidth);r=Math.max(0,r);var a=Math.floor(o/this.columnWidth);a-=o%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var l=(this._getOption("originTop")?s.top:s.bottom)+i.outerHeight,c=r;c<=a;c++)this.colYs[c]=Math.max(l,this.colYs[c])},s._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},s._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},s.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/masonry",["../layout-mode","masonry-layout/masonry"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode"),require("masonry-layout")):e(t.Isotope.LayoutMode,t.Masonry)}(window,function(t,e){"use strict";var i=t.create("masonry"),s=i.prototype,n={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(var o in e.prototype)n[o]||(s[o]=e.prototype[o]);var r=s.measureColumns;s.measureColumns=function(){this.items=this.isotope.filteredItems,r.call(this)};var a=s._getOption;return s._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:a.apply(this.isotope,arguments)},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/fit-rows",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("fitRows"),i=e.prototype;return i._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},i._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var s={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,s},i._getContainerSize=function(){return{height:this.maxY}},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/vertical",["../layout-mode"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("vertical",{horizontalAlignment:0}),i=e.prototype;return i._resetLayout=function(){this.y=0},i._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},i._getContainerSize=function(){return{height:this.y}},e}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","desandro-matches-selector/matches-selector","fizzy-ui-utils/utils","isotope-layout/js/item","isotope-layout/js/layout-mode","isotope-layout/js/layout-modes/masonry","isotope-layout/js/layout-modes/fit-rows","isotope-layout/js/layout-modes/vertical"],function(i,s,n,o,r,a){return e(t,i,s,n,o,r,a)}):"object"==typeof module&&module.exports?module.exports=e(t,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("isotope-layout/js/item"),require("isotope-layout/js/layout-mode"),require("isotope-layout/js/layout-modes/masonry"),require("isotope-layout/js/layout-modes/fit-rows"),require("isotope-layout/js/layout-modes/vertical")):t.Isotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.Isotope.Item,t.Isotope.LayoutMode)}(window,function(t,e,i,s,n,o,r){var a=t.jQuery,l=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},c=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});c.Item=o,c.LayoutMode=r;var h=c.prototype;h._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var t in r.modes)this._initLayoutMode(t)},h.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},h._itemize=function(){for(var t=e.prototype._itemize.apply(this,arguments),i=0;i<t.length;i++){t[i].id=this.itemGUID++}return this._updateItemsSortData(t),t},h._initLayoutMode=function(t){var e=r.modes[t],i=this.options[t]||{};this.options[t]=e.options?n.extend(e.options,i):i,this.modes[t]=new e(this)},h.layout=function(){this._isLayoutInited||!this._getOption("initLayout")?this._layout():this.arrange()},h._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},h.arrange=function(t){this.option(t),this._getIsInstant();var e=this._filter(this.items);this.filteredItems=e.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[e]):this._hideReveal(e),this._sort(),this._layout()},h._init=h.arrange,h._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},h._getIsInstant=function(){var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;return this._isInstant=e,e},h._bindArrangeComplete=function(){function t(){e&&i&&s&&n.dispatchEvent("arrangeComplete",null,[n.filteredItems])}var e,i,s,n=this;this.once("layoutComplete",function(){e=!0,t()}),this.once("hideComplete",function(){i=!0,t()}),this.once("revealComplete",function(){s=!0,t()})},h._filter=function(t){var e=this.options.filter;e=e||"*";for(var i=[],s=[],n=[],o=this._getFilterTest(e),r=0;r<t.length;r++){var a=t[r];if(!a.isIgnored){var l=o(a);l&&i.push(a),l&&a.isHidden?s.push(a):l||a.isHidden||n.push(a)}}return{matches:i,needReveal:s,needHide:n}},h._getFilterTest=function(t){return a&&this.options.isJQueryFiltering?function(e){return a(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return s(e.element,t)}},h.updateSortData=function(t){var e;t?(t=n.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},h._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=u(i)}},h._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++){t[i].updateSortData()}};var u=function(){return function(t){if("string"!=typeof t)return t;var e=l(t).split(" "),i=e[0],s=i.match(/^\[(.+)\]$/),n=function(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}(s&&s[1],i),o=c.sortDataParsers[e[1]];return t=o?function(t){return t&&o(n(t))}:function(t){return t&&n(t)}}}();c.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},h._sort=function(){if(this.options.sortBy){var t=n.makeArray(this.options.sortBy);this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory));var e=function(t,e){return function(i,s){for(var n=0;n<t.length;n++){var o=t[n],r=i.sortData[o],a=s.sortData[o];if(r>a||r<a){var l=void 0!==e[o]?e[o]:e;return(r>a?1:-1)*(l?1:-1)}}return 0}}(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},h._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},h._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},h._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},h._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},h._manageStamp=function(t){this._mode()._manageStamp(t)},h._getContainerSize=function(){return this._mode()._getContainerSize()},h.needsResizeLayout=function(){return this._mode().needsResizeLayout()},h.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},h.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},h._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},h.insert=function(t){var e=this.addItems(t);if(e.length){var i,s,n=e.length;for(i=0;i<n;i++)s=e[i],this.element.appendChild(s.element);var o=this._filter(e).matches;for(i=0;i<n;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;i<n;i++)delete e[i].isLayoutInstant;this.reveal(o)}};var d=h.remove;return h.remove=function(t){t=n.makeArray(t);var e=this.getItems(t);d.call(this,t);for(var i=e&&e.length,s=0;i&&s<i;s++){var o=e[s];n.removeFrom(this.filteredItems,o)}},h.shuffle=function(){for(var t=0;t<this.items.length;t++){this.items[t].sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},h._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var s=t.apply(this,e);return this.options.transitionDuration=i,s},h.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},c}),function(t,e){"function"==typeof define&&define.amd?define("packery/js/rect",e):"object"==typeof module&&module.exports?module.exports=e():(t.Packery=t.Packery||{},t.Packery.Rect=e())}(window,function(){function t(e){for(var i in t.defaults)this[i]=t.defaults[i];for(i in e)this[i]=e[i]}t.defaults={x:0,y:0,width:0,height:0};var e=t.prototype;return e.contains=function(t){var e=t.width||0,i=t.height||0;return this.x<=t.x&&this.y<=t.y&&this.x+this.width>=t.x+e&&this.y+this.height>=t.y+i},e.overlaps=function(t){var e=this.x+this.width,i=this.y+this.height,s=t.x+t.width,n=t.y+t.height;return this.x<s&&e>t.x&&this.y<n&&i>t.y},e.getMaximalFreeRects=function(e){if(!this.overlaps(e))return!1;var i,s=[],n=this.x+this.width,o=this.y+this.height,r=e.x+e.width,a=e.y+e.height;return this.y<e.y&&(i=new t({x:this.x,y:this.y,width:this.width,height:e.y-this.y}),s.push(i)),n>r&&(i=new t({x:r,y:this.y,width:n-r,height:this.height}),s.push(i)),o>a&&(i=new t({x:this.x,y:a,width:this.width,height:o-a}),s.push(i)),this.x<e.x&&(i=new t({x:this.x,y:this.y,width:e.x-this.x,height:this.height}),s.push(i)),s},e.canFit=function(t){return this.width>=t.width&&this.height>=t.height},t}),function(t,e){if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],e);else if("object"==typeof module&&module.exports)module.exports=e(require("./rect"));else{var i=t.Packery=t.Packery||{};i.Packer=e(i.Rect)}}(window,function(t){function e(t,e,i){this.width=t||0,this.height=e||0,this.sortDirection=i||"downwardLeftToRight",this.reset()}var i=e.prototype;i.reset=function(){this.spaces=[];var e=new t({x:0,y:0,width:this.width,height:this.height});this.spaces.push(e),this.sorter=s[this.sortDirection]||s.downwardLeftToRight},i.pack=function(t){for(var e=0;e<this.spaces.length;e++){var i=this.spaces[e];if(i.canFit(t)){this.placeInSpace(t,i);break}}},i.columnPack=function(t){for(var e=0;e<this.spaces.length;e++){var i=this.spaces[e];if(i.x<=t.x&&i.x+i.width>=t.x+t.width&&i.height>=t.height-.01){t.y=i.y,this.placed(t);break}}},i.rowPack=function(t){for(var e=0;e<this.spaces.length;e++){var i=this.spaces[e];if(i.y<=t.y&&i.y+i.height>=t.y+t.height&&i.width>=t.width-.01){t.x=i.x,this.placed(t);break}}},i.placeInSpace=function(t,e){t.x=e.x,t.y=e.y,this.placed(t)},i.placed=function(t){for(var e=[],i=0;i<this.spaces.length;i++){var s=this.spaces[i],n=s.getMaximalFreeRects(t);n?e.push.apply(e,n):e.push(s)}this.spaces=e,this.mergeSortSpaces()},i.mergeSortSpaces=function(){e.mergeRects(this.spaces),this.spaces.sort(this.sorter)},i.addSpace=function(t){this.spaces.push(t),this.mergeSortSpaces()},e.mergeRects=function(t){var e=0,i=t[e];t:for(;i;){for(var s=0,n=t[e+s];n;){if(n==i)s++;else{if(n.contains(i)){t.splice(e,1),i=t[e];continue t}i.contains(n)?t.splice(e+s,1):s++}n=t[e+s]}i=t[++e]}return t};var s={downwardLeftToRight:function(t,e){return t.y-e.y||t.x-e.x},rightwardTopToBottom:function(t,e){return t.x-e.x||t.y-e.y}};return e}),function(t,e){"function"==typeof define&&define.amd?define("packery/js/item",["outlayer/outlayer","./rect"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("./rect")):t.Packery.Item=e(t.Outlayer,t.Packery.Rect)}(window,function(t,e){var i="string"==typeof document.documentElement.style.transform?"transform":"WebkitTransform",s=function(){t.Item.apply(this,arguments)},n=s.prototype=Object.create(t.Item.prototype),o=n._create;n._create=function(){o.call(this),this.rect=new e};var r=n.moveTo;return n.moveTo=function(t,e){var i=Math.abs(this.position.x-t),s=Math.abs(this.position.y-e);this.layout.dragItemCount&&!this.isPlacing&&!this.isTransitioning&&i<1&&s<1?this.goTo(t,e):r.apply(this,arguments)},n.enablePlacing=function(){this.removeTransitionStyles(),this.isTransitioning&&i&&(this.element.style[i]="none"),this.isTransitioning=!1,this.getSize(),this.layout._setRectSize(this.element,this.rect),this.isPlacing=!0},n.disablePlacing=function(){this.isPlacing=!1},n.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},n.showDropPlaceholder=function(){var t=this.dropPlaceholder;t||((t=this.dropPlaceholder=document.createElement("div")).className="packery-drop-placeholder",t.style.position="absolute"),t.style.width=this.size.width+"px",t.style.height=this.size.height+"px",this.positionDropPlaceholder(),this.layout.element.appendChild(t)},n.positionDropPlaceholder=function(){this.dropPlaceholder.style[i]="translate("+this.rect.x+"px, "+this.rect.y+"px)"},n.hideDropPlaceholder=function(){this.layout.element.removeChild(this.dropPlaceholder)},s}),function(t,e){"function"==typeof define&&define.amd?define("packery/js/packery",["get-size/get-size","outlayer/outlayer","./rect","./packer","./item"],e):"object"==typeof module&&module.exports?module.exports=e(require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):t.Packery=e(t.getSize,t.Outlayer,t.Packery.Rect,t.Packery.Packer,t.Packery.Item)}(window,function(t,e,i,s,n){i.prototype.canFit=function(t){return this.width>=t.width-1&&this.height>=t.height-1};var o=e.create("packery");o.Item=n;var r=o.prototype;r._create=function(){e.prototype._create.call(this),this.packer=new s,this.shiftPacker=new s,this.isEnabled=!0,this.dragItemCount=0;var t=this;this.handleDraggabilly={dragStart:function(){t.itemDragStart(this.element)},dragMove:function(){t.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){t.itemDragEnd(this.element)}},this.handleUIDraggable={start:function(e,i){i&&t.itemDragStart(e.currentTarget)},drag:function(e,i){i&&t.itemDragMove(e.currentTarget,i.position.left,i.position.top)},stop:function(e,i){i&&t.itemDragEnd(e.currentTarget)}}},r._resetLayout=function(){this.getSize(),this._getMeasurements();var t,e,i;this._getOption("horizontal")?(t=1/0,e=this.size.innerHeight+this.gutter,i="rightwardTopToBottom"):(t=this.size.innerWidth+this.gutter,e=1/0,i="downwardLeftToRight"),this.packer.width=this.shiftPacker.width=t,this.packer.height=this.shiftPacker.height=e,this.packer.sortDirection=this.shiftPacker.sortDirection=i,this.packer.reset(),this.maxY=0,this.maxX=0},r._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},r._getItemLayoutPosition=function(t){if(this._setRectSize(t.element,t.rect),this.isShifting||this.dragItemCount>0){var e=this._getPackMethod();this.packer[e](t.rect)}else this.packer.pack(t.rect);return this._setMaxXY(t.rect),t.rect},r.shiftLayout=function(){this.isShifting=!0,this.layout(),delete this.isShifting},r._getPackMethod=function(){return this._getOption("horizontal")?"rowPack":"columnPack"},r._setMaxXY=function(t){this.maxX=Math.max(t.x+t.width,this.maxX),this.maxY=Math.max(t.y+t.height,this.maxY)},r._setRectSize=function(e,i){var s=t(e),n=s.outerWidth,o=s.outerHeight;(n||o)&&(n=this._applyGridGutter(n,this.columnWidth),o=this._applyGridGutter(o,this.rowHeight)),i.width=Math.min(n,this.packer.width),i.height=Math.min(o,this.packer.height)},r._applyGridGutter=function(t,e){if(!e)return t+this.gutter;var i=t%(e+=this.gutter),s=i&&i<1?"round":"ceil";return t=Math[s](t/e)*e},r._getContainerSize=function(){return this._getOption("horizontal")?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},r._manageStamp=function(t){var e,s=this.getItem(t);if(s&&s.isPlacing)e=s.rect;else{var n=this._getElementOffset(t);e=new i({x:this._getOption("originLeft")?n.left:n.right,y:this._getOption("originTop")?n.top:n.bottom})}this._setRectSize(t,e),this.packer.placed(e),this._setMaxXY(e)},r.sortItemsByPosition=function(){var t=this._getOption("horizontal")?function(t,e){return t.position.x-e.position.x||t.position.y-e.position.y}:function(t,e){return t.position.y-e.position.y||t.position.x-e.position.x};this.items.sort(t)},r.fit=function(t,e,i){var s=this.getItem(t);s&&(this.stamp(s.element),s.enablePlacing(),this.updateShiftTargets(s),e=void 0===e?s.rect.x:e,i=void 0===i?s.rect.y:i,this.shift(s,e,i),this._bindFitEvents(s),s.moveTo(s.rect.x,s.rect.y),this.shiftLayout(),this.unstamp(s.element),this.sortItemsByPosition(),s.disablePlacing())},r._bindFitEvents=function(t){function e(){2==++s&&i.dispatchEvent("fitComplete",null,[t])}var i=this,s=0;t.once("layout",e),this.once("layoutComplete",e)},r.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&(this.options.shiftPercentResize?this.resizeShiftPercentLayout():this.layout())},r.needsResizeLayout=function(){var e=t(this.element),i=this._getOption("horizontal")?"innerHeight":"innerWidth";return e[i]!=this.size[i]},r.resizeShiftPercentLayout=function(){var e=this._getItemsForLayout(this.items),i=this._getOption("horizontal"),s=i?"y":"x",n=i?"height":"width",o=i?"rowHeight":"columnWidth",r=i?"innerHeight":"innerWidth",a=this[o];if(a=a&&a+this.gutter){this._getMeasurements();var l=this[o]+this.gutter;e.forEach(function(t){var e=Math.round(t.rect[s]/a);t.rect[s]=e*l})}else{var c=t(this.element)[r]+this.gutter,h=this.packer[n];e.forEach(function(t){t.rect[s]=t.rect[s]/h*c})}this.shiftLayout()},r.itemDragStart=function(t){if(this.isEnabled){this.stamp(t);var e=this.getItem(t);e&&(e.enablePlacing(),e.showDropPlaceholder(),this.dragItemCount++,this.updateShiftTargets(e))}},r.updateShiftTargets=function(t){this.shiftPacker.reset(),this._getBoundingRect();var e=this._getOption("originLeft"),s=this._getOption("originTop");this.stamps.forEach(function(t){var n=this.getItem(t);if(!n||!n.isPlacing){var o=this._getElementOffset(t),r=new i({x:e?o.left:o.right,y:s?o.top:o.bottom});this._setRectSize(t,r),this.shiftPacker.placed(r)}},this);var n=this._getOption("horizontal"),o=n?"rowHeight":"columnWidth",r=n?"height":"width";this.shiftTargetKeys=[],this.shiftTargets=[];var a,l=this[o];if(l=l&&l+this.gutter){var c=Math.ceil(t.rect[r]/l),h=Math.floor((this.shiftPacker[r]+this.gutter)/l);a=(h-c)*l;for(var u=0;u<h;u++)this._addShiftTarget(u*l,0,a)}else a=this.shiftPacker[r]+this.gutter-t.rect[r],this._addShiftTarget(0,0,a);var d=this._getItemsForLayout(this.items),f=this._getPackMethod();d.forEach(function(t){var e=t.rect;this._setRectSize(t.element,e),this.shiftPacker[f](e),this._addShiftTarget(e.x,e.y,a);var i=n?e.x+e.width:e.x,s=n?e.y:e.y+e.height;if(this._addShiftTarget(i,s,a),l)for(var o=Math.round(e[r]/l),c=1;c<o;c++){var h=n?i:e.x+l*c,u=n?e.y+l*c:s;this._addShiftTarget(h,u,a)}},this)},r._addShiftTarget=function(t,e,i){var s=this._getOption("horizontal")?e:t;if(!(0!==s&&s>i)){var n=t+","+e;-1!=this.shiftTargetKeys.indexOf(n)||(this.shiftTargetKeys.push(n),this.shiftTargets.push({x:t,y:e}))}},r.shift=function(t,e,i){var s,n=1/0,o={x:e,y:i};this.shiftTargets.forEach(function(t){var e=function(t,e){var i=e.x-t.x,s=e.y-t.y;return Math.sqrt(i*i+s*s)}(t,o);e<n&&(s=t,n=e)}),t.rect.x=s.x,t.rect.y=s.y};r.itemDragMove=function(t,e,i){function s(){o.shift(n,e,i),n.positionDropPlaceholder(),o.layout()}var n=this.isEnabled&&this.getItem(t);if(n){e-=this.size.paddingLeft,i-=this.size.paddingTop;var o=this,r=new Date;this._itemDragTime&&r-this._itemDragTime<120?(clearTimeout(this.dragTimeout),this.dragTimeout=setTimeout(s,120)):(s(),this._itemDragTime=r)}},r.itemDragEnd=function(t){function e(){2==++s&&(i.element.classList.remove("is-positioning-post-drag"),i.hideDropPlaceholder(),n.dispatchEvent("dragItemPositioned",null,[i]))}var i=this.isEnabled&&this.getItem(t);if(i){clearTimeout(this.dragTimeout),i.element.classList.add("is-positioning-post-drag");var s=0,n=this;i.once("layout",e),this.once("layoutComplete",e),i.moveTo(i.rect.x,i.rect.y),this.layout(),this.dragItemCount=Math.max(0,this.dragItemCount-1),this.sortItemsByPosition(),i.disablePlacing(),this.unstamp(i.element)}},r.bindDraggabillyEvents=function(t){this._bindDraggabillyEvents(t,"on")},r.unbindDraggabillyEvents=function(t){this._bindDraggabillyEvents(t,"off")},r._bindDraggabillyEvents=function(t,e){var i=this.handleDraggabilly;t[e]("dragStart",i.dragStart),t[e]("dragMove",i.dragMove),t[e]("dragEnd",i.dragEnd)},r.bindUIDraggableEvents=function(t){this._bindUIDraggableEvents(t,"on")},r.unbindUIDraggableEvents=function(t){this._bindUIDraggableEvents(t,"off")},r._bindUIDraggableEvents=function(t,e){var i=this.handleUIDraggable;t[e]("dragstart",i.start)[e]("drag",i.drag)[e]("dragstop",i.stop)};var a=r.destroy;return r.destroy=function(){a.apply(this,arguments),this.isEnabled=!1},o.Rect=i,o.Packer=s,o}),function(t,e){"function"==typeof define&&define.amd?define(["isotope-layout/js/layout-mode","packery/js/packery"],e):"object"==typeof module&&module.exports?module.exports=e(require("isotope-layout/js/layout-mode"),require("packery")):e(t.Isotope.LayoutMode,t.Packery)}(window,function(t,e){var i=t.create("packery"),s=i.prototype,n={_getElementOffset:!0,_getMeasurement:!0};for(var o in e.prototype)n[o]||(s[o]=e.prototype[o]);var r=s._resetLayout;s._resetLayout=function(){this.packer=this.packer||new e.Packer,this.shiftPacker=this.shiftPacker||new e.Packer,r.apply(this,arguments)};var a=s._getItemLayoutPosition;s._getItemLayoutPosition=function(t){return t.rect=t.rect||new e.Rect,a.call(this,t)};var l=s.needsResizeLayout;s.needsResizeLayout=function(){return this._getOption("horizontal")?this.needsVerticalResizeLayout():l.call(this)};var c=s._getOption;return s._getOption=function(t){return"horizontal"==t?void 0!==this.options.isHorizontal?this.options.isHorizontal:this.options.horizontal:c.apply(this.isotope,arguments)},i}),function(t){"use strict";var e=null,i=null;!function(){var e=["webkit","moz","o","ms"],i=t.document.createElement("div"),s=-1;for(s=0;s<e.length&&!t.requestAnimationFrame;s++)t.requestAnimationFrame=t[e[s]+"RequestAnimationFrame"];void 0===i.nextElementSibling&&Object.defineProperty(t.Element.prototype,"nextElementSibling",{get:function(){for(var t=this.nextSibling;t;){if(1===t.nodeType)return t;t=t.nextSibling}return null}}),function(t){t.matches=t.matches||t.machesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector||function(t){return Array.prototype.indexOf.call(this.parentElement.querySelectorAll(t),this)>-1}}(t.Element.prototype),Object.keys||(Object.keys=function(){var t=Object.prototype.hasOwnProperty,e=!1,i=[],s=-1;return e=!{toString:null}.propertyIsEnumerable("toString"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],s=i.length,function(n){var o=[],r="",a=-1;if("object"!=typeof n&&("function"!=typeof n||null===n))throw new TypeError("Object.keys called on non-object");for(r in n)t.call(n,r)&&o.push(r);if(e)for(a=0;a<s;a++)t.call(n,i[a])&&o.push(i[a]);return o}}()),Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),"function"!=typeof Object.create&&(Object.create=function(t){var e=function(){};return function(t,i){if(t!==Object(t)&&null!==t)throw TypeError("Argument must be an object, or null");e.prototype=t||{};var s=new e;return e.prototype=null,void 0!==i&&Object.defineProperties(s,i),null===t&&(s.__proto__=null),s}}()),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var e,i,s,n;if(null===this)throw new TypeError;if(s=Object(this),0===(n=s.length>>>0))return-1;if(e=0,arguments.length>1&&((e=Number(arguments[1]))!=e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e)))),e>=n)return-1;for(i=e>=0?e:Math.max(n-Math.abs(e),0);i<n;i++)if(i in s&&s[i]===t)return i;return-1}),Function.prototype.bind||(Function.prototype.bind=function(t){var e,i,s,n;if("function"!=typeof this)throw new TypeError;return e=Array.prototype.slice.call(arguments,1),i=this,s=function(){},n=function(){return i.apply(this instanceof s?this:t,e.concat(Array.prototype.slice.call(arguments)))},this.prototype&&(s.prototype=this.prototype),n.prototype=new s,n}),t.Element.prototype.dispatchEvent||(t.Element.prototype.dispatchEvent=function(t){try{return this.fireEvent("on"+t.type,t)}catch(t){}})}(),(e=function(s,n,o){var r=null,a=!1,l=null,c=null,h=null,u=[],d="",f=[],p=-1;if(h=o||t.document,(a=arguments[3])&&(a="boolean"==typeof a),"string"==typeof s)f=h.querySelectorAll(s);else if(s&&"object"==typeof s&&i.isElement(s,h))f=[s];else{if(!s||"object"!=typeof s||!s.length)throw new Error(e.messages.errorFactoryInvalidContainer());f=s}if(f.length<1)throw new Error(e.messages.errorFactoryContainerNotFound());for(p=0;(r=f[p])&&(!(p>0)||a);p++)r.id?d=r.id:(d="MixItUp"+i.randomHex(),r.id=d),e.instances[d]instanceof e.Mixer?(l=e.instances[d],(!n||n&&n.debug&&!1!==n.debug.showWarnings)&&console.warn(e.messages.warningFactoryPreexistingInstance())):((l=new e.Mixer).attach(r,h,d,n),e.instances[d]=l),c=new e.Facade(l),n&&n.debug&&n.debug.enable?u.push(l):u.push(c);return a?new e.Collection(u):u[0]}).use=function(t){e.Base.prototype.callActions.call(e,"beforeUse",arguments),"function"==typeof t&&"mixitup-extension"===t.TYPE?void 0===e.extensions[t.NAME]&&(t(e),e.extensions[t.NAME]=t):t.fn&&t.fn.jquery&&(e.libraries.$=t),e.Base.prototype.callActions.call(e,"afterUse",arguments)},e.instances={},e.extensions={},e.libraries={},i={hasClass:function(t,e){return!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))},addClass:function(t,e){this.hasClass(t,e)||(t.className+=t.className?" "+e:e)},removeClass:function(t,e){if(this.hasClass(t,e)){var i=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(i," ").trim()}},extend:function(t,e,i,s){var n=[],o="",r=-1;i=i||!1,s=s||!1;try{if(Array.isArray(e))for(r=0;r<e.length;r++)n.push(r);else e&&(n=Object.keys(e));for(r=0;r<n.length;r++)o=n[r],!i||"object"!=typeof e[o]||this.isElement(e[o])?t[o]=e[o]:Array.isArray(e[o])?(t[o]||(t[o]=[]),this.extend(t[o],e[o],i,s)):(t[o]||(t[o]={}),this.extend(t[o],e[o],i,s))}catch(e){if(!s)throw e;this.handleExtendError(e,t)}return t},handleExtendError:function(t,i){var s=null,n="",o="",r="",a="",l="",c=-1,h=-1;if(t instanceof TypeError&&(s=/property "?(\w*)"?[,:] object/i.exec(t.message))){n=s[1];for(l in i){for(h=0;h<n.length&&n.charAt(h)===l.charAt(h);)h++;h>c&&(c=h,a=l)}throw c>1&&(r=e.messages.errorConfigInvalidPropertySuggestion({probableMatch:a})),o=e.messages.errorConfigInvalidProperty({erroneous:n,suggestion:r}),new TypeError(o)}throw t},template:function(t){for(var e=/\${([\w]*)}/g,i={},s=null;s=e.exec(t);)i[s[1]]=new RegExp("\\${"+s[1]+"}","g");return function(e){var s="",n=t;e=e||{};for(s in i)n=n.replace(i[s],void 0!==e[s]?e[s]:"");return n}},on:function(e,i,s,n){e&&(e.addEventListener?e.addEventListener(i,s,n):e.attachEvent&&(e["e"+i+s]=s,e[i+s]=function(){e["e"+i+s](t.event)},e.attachEvent("on"+i,e[i+s])))},off:function(t,e,i){t&&(t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent&&(t.detachEvent("on"+e,t[e+i]),t[e+i]=null))},getCustomEvent:function(e,i,s){var n=null;return s=s||t.document,"function"==typeof t.CustomEvent?n=new t.CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):"function"==typeof s.createEvent?(n=s.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,i):((n=s.createEventObject()).type=e,n.returnValue=!1,n.cancelBubble=!1,n.detail=i),n},getOriginalEvent:function(t){return t.touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t},index:function(t,e){for(var i=0;null!==(t=t.previousElementSibling);)e&&!t.matches(e)||++i;return i},camelCase:function(t){return t.toLowerCase().replace(/([_-][a-z])/g,function(t){return t.toUpperCase().replace(/[_-]/,"")})},pascalCase:function(t){return(t=this.camelCase(t)).charAt(0).toUpperCase()+t.slice(1)},dashCase:function(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()},isElement:function(e,i){return i=i||t.document,!!(t.HTMLElement&&e instanceof t.HTMLElement)||(!!(i.defaultView&&i.defaultView.HTMLElement&&e instanceof i.defaultView.HTMLElement)||null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)},createElement:function(e,i){var s=null,n=null;for(s=(i=i||t.document).createDocumentFragment(),(n=i.createElement("div")).innerHTML=e.trim();n.firstChild;)s.appendChild(n.firstChild);return s},removeWhitespace:function(t){for(var e;t&&"#text"===t.nodeName;)e=t,t=t.previousSibling,e.parentElement&&e.parentElement.removeChild(e)},isEqualArray:function(t,e){var i=t.length;if(i!==e.length)return!1;for(;i--;)if(t[i]!==e[i])return!1;return!0},deepEquals:function(t,e){var i;if("object"==typeof t&&t&&"object"==typeof e&&e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(i in t)if(!e.hasOwnProperty(i)||!this.deepEquals(t[i],e[i]))return!1}else if(t!==e)return!1;return!0},arrayShuffle:function(t){for(var e=t.slice(),i=e.length,s=i,n=-1,o=[];s--;)n=~~(Math.random()*i),o=e[s],e[s]=e[n],e[n]=o;return e},arrayFromList:function(t){var e,i;try{return Array.prototype.slice.call(t)}catch(s){for(e=[],i=0;i<t.length;i++)e.push(t[i]);return e}},debounce:function(t,e,i){var s;return function(){var n=this,o=arguments,r=i&&!s,a=null;a=function(){s=null,i||t.apply(n,o)},clearTimeout(s),s=setTimeout(a,e),r&&t.apply(n,o)}},position:function(t){for(var e=0,i=0,s=t;t;)e-=t.scrollLeft,i-=t.scrollTop,t===s&&(e+=t.offsetLeft,i+=t.offsetTop,s=t.offsetParent),t=t.parentElement;return{x:e,y:i}},getHypotenuse:function(t,e){var i=t.x-e.x,s=t.y-e.y;return i=i<0?-1*i:i,s=s<0?-1*s:s,Math.sqrt(Math.pow(i,2)+Math.pow(s,2))},getIntersectionRatio:function(t,e){var i=t.width*t.height,s=-1,n=-1,o=-1;return s=Math.max(0,Math.min(t.left+t.width,e.left+e.width)-Math.max(t.left,e.left)),n=Math.max(0,Math.min(t.top+t.height,e.top+e.height)-Math.max(t.top,e.top)),o=n*s,o/i},closestParent:function(e,i,s,n){var o=e.parentNode;if(n=n||t.document,s&&e.matches(i))return e;for(;o&&o!=n.body;){if(o.matches&&o.matches(i))return o;if(!o.parentNode)return null;o=o.parentNode}return null},children:function(e,i,s){var n=[],o="";return s=s||t.doc,e&&(e.id||(o="Temp"+this.randomHexKey(),e.id=o),n=s.querySelectorAll("#"+e.id+" > "+i),o&&e.removeAttribute("id")),n},clean:function(t){var e=[],i=-1;for(i=0;i<t.length;i++)""!==t[i]&&e.push(t[i]);return e},defer:function(i){var s=null,n=null,o=null;return n=new this.Deferred,e.features.has.promises?n.promise=new Promise(function(t,e){n.resolve=t,n.reject=e}):(o=t.jQuery||i.$)&&"function"==typeof o.Deferred?(s=o.Deferred(),n.promise=s.promise(),n.resolve=s.resolve,n.reject=s.reject):t.console&&console.warn(e.messages.warningNoPromiseImplementation()),n},all:function(i,s){var n=null;return e.features.has.promises?Promise.all(i):(n=t.jQuery||s.$)&&"function"==typeof n.when?n.when.apply(n,i).done(function(){return arguments}):(t.console&&console.warn(e.messages.warningNoPromiseImplementation()),[])},getPrefix:function(t,e,s){var n=-1,o="";if(i.dashCase(e)in t.style)return"";for(n=0;o=s[n];n++)if(o+e in t.style)return o.toLowerCase();return"unsupported"},randomHex:function(){return("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6).toUpperCase()},getDocumentState:function(e){return e="object"==typeof e.body?e:t.document,{scrollTop:t.pageYOffset,scrollLeft:t.pageXOffset,docHeight:e.documentElement.scrollHeight,docWidth:e.documentElement.scrollWidth,viewportHeight:e.documentElement.clientHeight,viewportWidth:e.documentElement.clientWidth}},bind:function(t,e){return function(){return e.apply(t,arguments)}},isVisible:function(e){var i=null;return!!e.offsetParent||"fixed"===(i=t.getComputedStyle(e)).position&&"hidden"!==i.visibility&&"0"!==i.opacity},seal:function(t){"function"==typeof Object.seal&&Object.seal(t)},freeze:function(t){"function"==typeof Object.freeze&&Object.freeze(t)},compareVersions:function(t,e){var i=t.split("."),s=e.split("."),n=-1,o=-1,r=-1;for(r=0;r<i.length;r++){if(n=parseInt(i[r].replace(/[^\d.]/g,"")),(o=parseInt(s[r].replace(/[^\d.]/g,"")||0))<n)return!1;if(o>n)return!0}return!0},Deferred:function(){this.promise=null,this.resolve=null,this.reject=null,this.id=i.randomHex()},isEmptyObject:function(t){var e="";if("function"==typeof Object.keys)return 0===Object.keys(t).length;for(e in t)if(t.hasOwnProperty(e))return!1;return!0},getClassname:function(t,e,i){var s="";return(s+=t.block).length&&(s+=t.delineatorElement),s+=t["element"+this.pascalCase(e)],i?(s.length&&(s+=t.delineatorModifier),s+=i):s},getProperty:function(t,e){var i=e.split("."),s=null,n="",o=0;if(!e)return t;for(s=function(t){return t?t[n]:null};o<i.length;)n=i[o],t=s(t),o++;return void 0!==t?t:null}},e.h=i,e.Base=function(){},e.Base.prototype={constructor:e.Base,callActions:function(t,e){var s=this.constructor.actions[t],n="";if(s&&!i.isEmptyObject(s))for(n in s)s[n].apply(this,e)},callFilters:function(t,e,s){var n=this.constructor.filters[t],o=e,r="";if(!n||i.isEmptyObject(n))return o;s=s||[];for(r in n)(s=i.arrayFromList(s)).unshift(o),o=n[r].apply(this,s);return o}},e.BaseStatic=function(){this.actions={},this.filters={},this.extend=function(t){i.extend(this.prototype,t)},this.registerAction=function(t,e,i){(this.actions[t]=this.actions[t]||{})[e]=i},this.registerFilter=function(t,e,i){(this.filters[t]=this.filters[t]||{})[e]=i}},e.Features=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.boxSizingPrefix="",this.transformPrefix="",this.transitionPrefix="",this.boxSizingPrefix="",this.transformProp="",this.transformRule="",this.transitionProp="",this.perspectiveProp="",this.perspectiveOriginProp="",this.has=new e.Has,this.canary=null,this.BOX_SIZING_PROP="boxSizing",this.TRANSITION_PROP="transition",this.TRANSFORM_PROP="transform",this.PERSPECTIVE_PROP="perspective",this.PERSPECTIVE_ORIGIN_PROP="perspectiveOrigin",this.VENDORS=["Webkit","moz","O","ms"],this.TWEENABLE=["opacity","width","height","marginRight","marginBottom","x","y","scale","translateX","translateY","translateZ","rotateX","rotateY","rotateZ"],this.callActions("afterConstruct")},e.BaseStatic.call(e.Features),e.Features.prototype=Object.create(e.Base.prototype),i.extend(e.Features.prototype,{constructor:e.Features,init:function(){this.callActions("beforeInit",arguments),this.canary=document.createElement("div"),this.setPrefixes(),this.runTests(),this.callActions("beforeInit",arguments)},runTests:function(){this.callActions("beforeRunTests",arguments),this.has.promises="function"==typeof t.Promise,this.has.transitions="unsupported"!==this.transitionPrefix,this.callActions("afterRunTests",arguments),i.freeze(this.has)},setPrefixes:function(){this.callActions("beforeSetPrefixes",arguments),this.transitionPrefix=i.getPrefix(this.canary,"Transition",this.VENDORS),this.transformPrefix=i.getPrefix(this.canary,"Transform",this.VENDORS),this.boxSizingPrefix=i.getPrefix(this.canary,"BoxSizing",this.VENDORS),this.boxSizingProp=this.boxSizingPrefix?this.boxSizingPrefix+i.pascalCase(this.BOX_SIZING_PROP):this.BOX_SIZING_PROP,this.transitionProp=this.transitionPrefix?this.transitionPrefix+i.pascalCase(this.TRANSITION_PROP):this.TRANSITION_PROP,this.transformProp=this.transformPrefix?this.transformPrefix+i.pascalCase(this.TRANSFORM_PROP):this.TRANSFORM_PROP,this.transformRule=this.transformPrefix?"-"+this.transformPrefix+"-"+this.TRANSFORM_PROP:this.TRANSFORM_PROP,this.perspectiveProp=this.transformPrefix?this.transformPrefix+i.pascalCase(this.PERSPECTIVE_PROP):this.PERSPECTIVE_PROP,this.perspectiveOriginProp=this.transformPrefix?this.transformPrefix+i.pascalCase(this.PERSPECTIVE_ORIGIN_PROP):this.PERSPECTIVE_ORIGIN_PROP,this.callActions("afterSetPrefixes",arguments)}}),e.Has=function(){this.transitions=!1,this.promises=!1,i.seal(this)},e.features=new e.Features,e.features.init(),e.ConfigAnimation=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.enable=!0,this.effects="fade scale",this.effectsIn="",this.effectsOut="",this.duration=600,this.easing="ease",this.applyPerspective=!0,this.perspectiveDistance="3000px",this.perspectiveOrigin="50% 50%",this.queue=!0,this.queueLimit=3,this.animateResizeContainer=!0,this.animateResizeTargets=!1,this.staggerSequence=null,this.reverseOut=!1,this.nudge=!0,this.clampHeight=!0,this.clampWidth=!0,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.ConfigAnimation),e.ConfigAnimation.prototype=Object.create(e.Base.prototype),e.ConfigAnimation.prototype.constructor=e.ConfigAnimation,e.ConfigBehavior=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.liveSort=!1,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.ConfigBehavior),e.ConfigBehavior.prototype=Object.create(e.Base.prototype),e.ConfigBehavior.prototype.constructor=e.ConfigBehavior,e.ConfigCallbacks=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.onMixStart=null,this.onMixBusy=null,this.onMixEnd=null,this.onMixFail=null,this.onMixClick=null,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.ConfigCallbacks),e.ConfigCallbacks.prototype=Object.create(e.Base.prototype),e.ConfigCallbacks.prototype.constructor=e.ConfigCallbacks,e.ConfigControls=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.enable=!0,this.live=!1,this.scope="global",this.toggleLogic="or",this.toggleDefault="all",this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.ConfigControls),e.ConfigControls.prototype=Object.create(e.Base.prototype),e.ConfigControls.prototype.constructor=e.ConfigControls,e.ConfigClassNames=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.block="mixitup",this.elementContainer="container",this.elementFilter="control",this.elementSort="control",this.elementMultimix="control",this.elementToggle="control",this.modifierActive="active",this.modifierDisabled="disabled",this.modifierFailed="failed",this.delineatorElement="-",this.delineatorModifier="-",this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.ConfigClassNames),e.ConfigClassNames.prototype=Object.create(e.Base.prototype),e.ConfigClassNames.prototype.constructor=e.ConfigClassNames,e.ConfigData=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.uidKey="",this.dirtyCheck=!1,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.ConfigData),e.ConfigData.prototype=Object.create(e.Base.prototype),e.ConfigData.prototype.constructor=e.ConfigData,e.ConfigDebug=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.enable=!1,this.showWarnings=!0,this.fauxAsync=!1,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.ConfigDebug),e.ConfigDebug.prototype=Object.create(e.Base.prototype),e.ConfigDebug.prototype.constructor=e.ConfigDebug,e.ConfigLayout=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.allowNestedTargets=!0,this.containerClassName="",this.siblingBefore=null,this.siblingAfter=null,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.ConfigLayout),e.ConfigLayout.prototype=Object.create(e.Base.prototype),e.ConfigLayout.prototype.constructor=e.ConfigLayout,e.ConfigLoad=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.filter="all",this.sort="default:asc",this.dataset=null,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.ConfigLoad),e.ConfigLoad.prototype=Object.create(e.Base.prototype),e.ConfigLoad.prototype.constructor=e.ConfigLoad,e.ConfigSelectors=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.target=".mix",this.control="",this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.ConfigSelectors),e.ConfigSelectors.prototype=Object.create(e.Base.prototype),e.ConfigSelectors.prototype.constructor=e.ConfigSelectors,e.ConfigRender=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.target=null,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.ConfigRender),e.ConfigRender.prototype=Object.create(e.Base.prototype),e.ConfigRender.prototype.constructor=e.ConfigRender,e.ConfigTemplates=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.ConfigTemplates),e.ConfigTemplates.prototype=Object.create(e.Base.prototype),e.ConfigTemplates.prototype.constructor=e.ConfigTemplates,e.Config=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.animation=new e.ConfigAnimation,this.behavior=new e.ConfigBehavior,this.callbacks=new e.ConfigCallbacks,this.controls=new e.ConfigControls,this.classNames=new e.ConfigClassNames,this.data=new e.ConfigData,this.debug=new e.ConfigDebug,this.layout=new e.ConfigLayout,this.load=new e.ConfigLoad,this.selectors=new e.ConfigSelectors,this.render=new e.ConfigRender,this.templates=new e.ConfigTemplates,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.Config),e.Config.prototype=Object.create(e.Base.prototype),e.Config.prototype.constructor=e.Config,e.MixerDom=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.document=null,this.body=null,this.container=null,this.parent=null,this.targets=[],this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.MixerDom),e.MixerDom.prototype=Object.create(e.Base.prototype),e.MixerDom.prototype.constructor=e.MixerDom,e.UiClassNames=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.base="",this.active="",this.disabled="",this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.UiClassNames),e.UiClassNames.prototype=Object.create(e.Base.prototype),e.UiClassNames.prototype.constructor=e.UiClassNames,e.CommandDataset=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.dataset=null,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.CommandDataset),e.CommandDataset.prototype=Object.create(e.Base.prototype),e.CommandDataset.prototype.constructor=e.CommandDataset,e.CommandMultimix=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.filter=null,this.sort=null,this.insert=null,this.remove=null,this.changeLayout=null,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.CommandMultimix),e.CommandMultimix.prototype=Object.create(e.Base.prototype),e.CommandMultimix.prototype.constructor=e.CommandMultimix,e.CommandFilter=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.selector="",this.collection=null,this.action="show",this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.CommandFilter),e.CommandFilter.prototype=Object.create(e.Base.prototype),e.CommandFilter.prototype.constructor=e.CommandFilter,e.CommandSort=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.sortString="",this.attribute="",this.order="asc",this.collection=null,this.next=null,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.CommandSort),e.CommandSort.prototype=Object.create(e.Base.prototype),e.CommandSort.prototype.constructor=e.CommandSort,e.CommandInsert=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.index=0,this.collection=[],this.position="before",this.sibling=null,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.CommandInsert),e.CommandInsert.prototype=Object.create(e.Base.prototype),e.CommandInsert.prototype.constructor=e.CommandInsert,e.CommandRemove=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.targets=[],this.collection=[],this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.CommandRemove),e.CommandRemove.prototype=Object.create(e.Base.prototype),e.CommandRemove.prototype.constructor=e.CommandRemove,e.CommandChangeLayout=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.containerClassName="",this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.CommandChangeLayout),e.CommandChangeLayout.prototype=Object.create(e.Base.prototype),e.CommandChangeLayout.prototype.constructor=e.CommandChangeLayout,e.ControlDefinition=function(t,s,n,o){e.Base.call(this),this.callActions("beforeConstruct"),this.type=t,this.selector=s,this.live=n||!1,this.parent=o||"",this.callActions("afterConstruct"),i.freeze(this),i.seal(this)},e.BaseStatic.call(e.ControlDefinition),e.ControlDefinition.prototype=Object.create(e.Base.prototype),e.ControlDefinition.prototype.constructor=e.ControlDefinition,e.controlDefinitions=[],e.controlDefinitions.push(new e.ControlDefinition("multimix","[data-filter][data-sort]")),e.controlDefinitions.push(new e.ControlDefinition("filter","[data-filter]")),e.controlDefinitions.push(new e.ControlDefinition("sort","[data-sort]")),e.controlDefinitions.push(new e.ControlDefinition("toggle","[data-toggle]")),e.Control=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.el=null,this.selector="",this.bound=[],this.pending=-1,this.type="",this.status="inactive",this.filter="",this.sort="",this.canDisable=!1,this.handler=null,this.classNames=new e.UiClassNames,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.Control),e.Control.prototype=Object.create(e.Base.prototype),i.extend(e.Control.prototype,{constructor:e.Control,init:function(t,i,s){if(this.callActions("beforeInit",arguments),this.el=t,this.type=i,this.selector=s,this.selector)this.status="live";else switch(this.canDisable="boolean"==typeof this.el.disable,this.type){case"filter":this.filter=this.el.getAttribute("data-filter");break;case"toggle":this.filter=this.el.getAttribute("data-toggle");break;case"sort":this.sort=this.el.getAttribute("data-sort");break;case"multimix":this.filter=this.el.getAttribute("data-filter"),this.sort=this.el.getAttribute("data-sort")}this.bindClick(),e.controls.push(this),this.callActions("afterInit",arguments)},isBound:function(t){var e=!1;return this.callActions("beforeIsBound",arguments),e=this.bound.indexOf(t)>-1,this.callFilters("afterIsBound",e,arguments)},addBinding:function(t){this.callActions("beforeAddBinding",arguments),this.isBound()||this.bound.push(t),this.callActions("afterAddBinding",arguments)},removeBinding:function(t){var i=-1;this.callActions("beforeRemoveBinding",arguments),(i=this.bound.indexOf(t))>-1&&this.bound.splice(i,1),this.bound.length<1&&(this.unbindClick(),i=e.controls.indexOf(this),e.controls.splice(i,1),"active"===this.status&&this.renderStatus(this.el,"inactive")),this.callActions("afterRemoveBinding",arguments)},bindClick:function(){var t=this;this.callActions("beforeBindClick",arguments),t.handler=function(e){t.handleClick(e)},i.on(t.el,"click",t.handler),this.callActions("afterBindClick",arguments)},unbindClick:function(){this.callActions("beforeUnbindClick",arguments),i.off(this.el,"click",this.handler),this.handler=null,this.callActions("afterUnbindClick",arguments)},handleClick:function(t){var s=null,n=null,o=!1,r={},a=null,l=[],c=-1;if(this.callActions("beforeHandleClick",arguments),this.pending=0,n=this.bound[0],s=this.selector?i.closestParent(t.target,n.config.selectors.control+this.selector,!0,n.dom.document):this.el){switch(this.type){case"filter":r.filter=this.filter||s.getAttribute("data-filter");break;case"sort":r.sort=this.sort||s.getAttribute("data-sort");break;case"multimix":r.filter=this.filter||s.getAttribute("data-filter"),r.sort=this.sort||s.getAttribute("data-sort");break;case"toggle":r.filter=this.filter||s.getAttribute("data-toggle"),o="live"===this.status?i.hasClass(s,this.classNames.active):"active"===this.status}for(c=0;c<this.bound.length;c++)a=new e.CommandMultimix,i.extend(a,r),l.push(a);for(l=this.callFilters("commandsHandleClick",l,arguments),this.pending=this.bound.length,c=0;n=this.bound[c];c++)(r=l[c])&&(n.lastClicked||(n.lastClicked=s),e.events.fire("mixClick",n.dom.container,{state:n.state,instance:n,originalEvent:t,control:n.lastClicked},n.dom.document),"function"==typeof n.config.callbacks.onMixClick&&!1===n.config.callbacks.onMixClick.call(n.lastClicked,n.state,t,n)||("toggle"===this.type?o?n.toggleOff(r.filter):n.toggleOn(r.filter):n.multimix(r)));this.callActions("afterHandleClick",arguments)}else this.callActions("afterHandleClick",arguments)},update:function(t,i){var s=new e.CommandMultimix;this.callActions("beforeUpdate",arguments),this.pending--,this.pending=Math.max(0,this.pending),this.pending>0||("live"===this.status?this.updateLive(t,i):(s.sort=this.sort,s.filter=this.filter,this.callFilters("actionsUpdate",s,arguments),this.parseStatusChange(this.el,t,s,i)),this.callActions("afterUpdate",arguments))},updateLive:function(t,i){var s=null,n=null,o=null,r=-1;if(this.callActions("beforeUpdateLive",arguments),this.el){for(s=this.el.querySelectorAll(this.selector),r=0;o=s[r];r++){switch(n=new e.CommandMultimix,this.type){case"filter":n.filter=o.getAttribute("data-filter");break;case"sort":n.sort=o.getAttribute("data-sort");break;case"multimix":n.filter=o.getAttribute("data-filter"),n.sort=o.getAttribute("data-sort");break;case"toggle":n.filter=o.getAttribute("data-toggle")}n=this.callFilters("actionsUpdateLive",n,arguments),this.parseStatusChange(o,t,n,i)}this.callActions("afterUpdateLive",arguments)}},parseStatusChange:function(t,e,i,s){var n="",o=-1;switch(this.callActions("beforeParseStatusChange",arguments),this.type){case"filter":e.filter===i.filter?this.renderStatus(t,"active"):this.renderStatus(t,"inactive");break;case"multimix":e.sort===i.sort&&e.filter===i.filter?this.renderStatus(t,"active"):this.renderStatus(t,"inactive");break;case"sort":e.sort.match(/:asc/g)&&(n=e.sort.replace(/:asc/g,"")),e.sort===i.sort||n===i.sort?this.renderStatus(t,"active"):this.renderStatus(t,"inactive");break;case"toggle":for(s.length<1&&this.renderStatus(t,"inactive"),e.filter===i.filter&&this.renderStatus(t,"active"),o=0;o<s.length;o++){if(s[o]===i.filter){this.renderStatus(t,"active");break}this.renderStatus(t,"inactive")}}this.callActions("afterParseStatusChange",arguments)},renderStatus:function(t,e){switch(this.callActions("beforeRenderStatus",arguments),e){case"active":i.addClass(t,this.classNames.active),i.removeClass(t,this.classNames.disabled),this.canDisable&&(this.el.disabled=!1);break;case"inactive":i.removeClass(t,this.classNames.active),i.removeClass(t,this.classNames.disabled),this.canDisable&&(this.el.disabled=!1);break;case"disabled":this.canDisable&&(this.el.disabled=!0),i.addClass(t,this.classNames.disabled),i.removeClass(t,this.classNames.active)}"live"!==this.status&&(this.status=e),this.callActions("afterRenderStatus",arguments)}}),e.controls=[],e.StyleData=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.x=0,this.y=0,this.top=0,this.right=0,this.bottom=0,this.left=0,this.width=0,this.height=0,this.marginRight=0,this.marginBottom=0,this.opacity=0,this.scale=new e.TransformData,this.translateX=new e.TransformData,this.translateY=new e.TransformData,this.translateZ=new e.TransformData,this.rotateX=new e.TransformData,this.rotateY=new e.TransformData,this.rotateZ=new e.TransformData,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.StyleData),e.StyleData.prototype=Object.create(e.Base.prototype),e.StyleData.prototype.constructor=e.StyleData,e.TransformData=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.value=0,this.unit="",this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.TransformData),e.TransformData.prototype=Object.create(e.Base.prototype),e.TransformData.prototype.constructor=e.TransformData,e.TransformDefaults=function(){e.StyleData.apply(this),this.callActions("beforeConstruct"),this.scale.value=.01,this.scale.unit="",this.translateX.value=20,this.translateX.unit="px",this.translateY.value=20,this.translateY.unit="px",this.translateZ.value=20,this.translateZ.unit="px",this.rotateX.value=90,this.rotateX.unit="deg",this.rotateY.value=90,this.rotateY.unit="deg",this.rotateX.value=90,this.rotateX.unit="deg",this.rotateZ.value=180,this.rotateZ.unit="deg",this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.TransformDefaults),e.TransformDefaults.prototype=Object.create(e.StyleData.prototype),e.TransformDefaults.prototype.constructor=e.TransformDefaults,e.transformDefaults=new e.TransformDefaults,e.EventDetail=function(){this.state=null,this.futureState=null,this.instance=null,this.originalEvent=null},e.Events=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.mixStart=null,this.mixBusy=null,this.mixEnd=null,this.mixFail=null,this.mixClick=null,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.Events),e.Events.prototype=Object.create(e.Base.prototype),e.Events.prototype.constructor=e.Events,e.Events.prototype.fire=function(t,s,n,o){var r=null,a=new e.EventDetail;if(this.callActions("beforeFire",arguments),void 0===this[t])throw new Error('Event type "'+t+'" not found.');a.state=new e.State,i.extend(a.state,n.state),n.futureState&&(a.futureState=new e.State,i.extend(a.futureState,n.futureState)),a.instance=n.instance,n.originalEvent&&(a.originalEvent=n.originalEvent),r=i.getCustomEvent(t,a,o),this.callFilters("eventFire",r,arguments),s.dispatchEvent(r)},e.events=new e.Events,e.QueueItem=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.args=[],this.instruction=null,this.triggerElement=null,this.deferred=null,this.isToggling=!1,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.QueueItem),e.QueueItem.prototype=Object.create(e.Base.prototype),e.QueueItem.prototype.constructor=e.QueueItem,e.Mixer=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.config=new e.Config,this.id="",this.isBusy=!1,this.isToggling=!1,this.incPadding=!0,this.controls=[],this.targets=[],this.origOrder=[],this.cache={},this.toggleArray=[],this.targetsMoved=0,this.targetsImmovable=0,this.targetsBound=0,this.targetsDone=0,this.staggerDuration=0,this.effectsIn=null,this.effectsOut=null,this.transformIn=[],this.transformOut=[],this.queue=[],this.state=null,this.lastOperation=null,this.lastClicked=null,this.userCallback=null,this.userDeferred=null,this.dom=new e.MixerDom,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.Mixer),e.Mixer.prototype=Object.create(e.Base.prototype),i.extend(e.Mixer.prototype,{constructor:e.Mixer,attach:function(s,n,o,r){var a=null,l=-1;for(this.callActions("beforeAttach",arguments),this.id=o,r&&i.extend(this.config,r,!0,!0),this.sanitizeConfig(),this.cacheDom(s,n),this.config.layout.containerClassName&&i.addClass(this.dom.container,this.config.layout.containerClassName),e.features.has.transitions||(this.config.animation.enable=!1),void 0===t.console&&(this.config.debug.showWarnings=!1),this.config.data.uidKey&&(this.config.controls.enable=!1),this.indexTargets(),this.state=this.getInitialState(),l=0;a=this.lastOperation.toHide[l];l++)a.hide();this.config.controls.enable&&(this.initControls(),this.buildToggleArray(null,this.state),this.updateControls({filter:this.state.activeFilter,sort:this.state.activeSort})),this.parseEffects(),this.callActions("afterAttach",arguments)},sanitizeConfig:function(){this.callActions("beforeSanitizeConfig",arguments),this.config.controls.scope=this.config.controls.scope.toLowerCase().trim(),this.config.controls.toggleLogic=this.config.controls.toggleLogic.toLowerCase().trim(),this.config.controls.toggleDefault=this.config.controls.toggleDefault.toLowerCase().trim(),this.config.animation.effects=this.config.animation.effects.trim(),this.callActions("afterSanitizeConfig",arguments)},getInitialState:function(){var t=new e.State,i=new e.Operation;if(this.callActions("beforeGetInitialState",arguments),t.activeContainerClassName=this.config.layout.containerClassName,this.config.load.dataset){if(!this.config.data.uidKey||"string"!=typeof this.config.data.uidKey)throw new TypeError(e.messages.errorConfigDataUidKeyNotSet());i.startDataset=i.newDataset=t.activeDataset=this.config.load.dataset.slice(),i.startContainerClassName=i.newContainerClassName=t.activeContainerClassName,i.show=this.targets.slice(),t=this.callFilters("stateGetInitialState",t,arguments)}else t.activeFilter=this.parseFilterArgs([this.config.load.filter]).command,t.activeSort=this.parseSortArgs([this.config.load.sort]).command,t.totalTargets=this.targets.length,(t=this.callFilters("stateGetInitialState",t,arguments)).activeSort.collection||t.activeSort.attribute||"random"===t.activeSort.order||"desc"===t.activeSort.order?(i.newSort=t.activeSort,this.sortOperation(i),this.printSort(!1,i),this.targets=i.newOrder):i.startOrder=i.newOrder=this.targets,i.startFilter=i.newFilter=t.activeFilter,i.startSort=i.newSort=t.activeSort,i.startContainerClassName=i.newContainerClassName=t.activeContainerClassName,"all"===i.newFilter.selector?i.newFilter.selector=this.config.selectors.target:"none"===i.newFilter.selector&&(i.newFilter.selector="");return i=this.callFilters("operationGetInitialState",i,[t]),this.lastOperation=i,i.newFilter&&this.filterOperation(i),t=this.buildState(i)},cacheDom:function(t,e){this.callActions("beforeCacheDom",arguments),this.dom.document=e,this.dom.body=this.dom.document.querySelector("body"),this.dom.container=t,this.dom.parent=t,this.callActions("afterCacheDom",arguments)},indexTargets:function(){var t=null,s=null,n=null,o=-1;if(this.callActions("beforeIndexTargets",arguments),this.dom.targets=this.config.layout.allowNestedTargets?this.dom.container.querySelectorAll(this.config.selectors.target):i.children(this.dom.container,this.config.selectors.target,this.dom.document),this.dom.targets=i.arrayFromList(this.dom.targets),this.targets=[],(n=this.config.load.dataset)&&n.length!==this.dom.targets.length)throw new Error(e.messages.errorDatasetPrerenderedMismatch());if(this.dom.targets.length){for(o=0;s=this.dom.targets[o];o++)(t=new e.Target).init(s,this,n?n[o]:void 0),t.isInDom=!0,this.targets.push(t);this.dom.parent=this.dom.targets[0].parentElement===this.dom.container?this.dom.container:this.dom.targets[0].parentElement}this.origOrder=this.targets,this.callActions("afterIndexTargets",arguments)},initControls:function(){var t="",i=null,s=null,n=null,o=null,r=null,a=-1,l=-1;switch(this.callActions("beforeInitControls",arguments),this.config.controls.scope){case"local":n=this.dom.container;break;case"global":n=this.dom.document;break;default:throw new Error(e.messages.errorConfigInvalidControlsScope())}for(a=0;t=e.controlDefinitions[a];a++)if(this.config.controls.live||t.live){if(t.parent){if(!(o=this.dom[t.parent])||o.length<0)continue;"number"!=typeof o.length&&(o=[o])}else o=[n];for(l=0;s=o[l];l++)r=this.getControl(s,t.type,t.selector),this.controls.push(r)}else for(i=n.querySelectorAll(this.config.selectors.control+t.selector),l=0;s=i[l];l++)(r=this.getControl(s,t.type,""))&&this.controls.push(r);this.callActions("afterInitControls",arguments)},getControl:function(t,s,n){var o=null,r=-1;if(this.callActions("beforeGetControl",arguments),!n)for(r=0;o=e.controls[r];r++){if(o.el===t&&o.isBound(this))return this.callFilters("controlGetControl",null,arguments);if(o.el===t&&o.type===s&&o.selector===n)return o.addBinding(this),this.callFilters("controlGetControl",o,arguments)}return(o=new e.Control).init(t,s,n),o.classNames.base=i.getClassname(this.config.classNames,s),o.classNames.active=i.getClassname(this.config.classNames,s,this.config.classNames.modifierActive),o.classNames.disabled=i.getClassname(this.config.classNames,s,this.config.classNames.modifierDisabled),o.addBinding(this),this.callFilters("controlGetControl",o,arguments)},getToggleSelector:function(){var t="or"===this.config.controls.toggleLogic?", ":"",e="";return this.callActions("beforeGetToggleSelector",arguments),this.toggleArray=i.clean(this.toggleArray),""===(e=this.toggleArray.join(t))&&(e=this.config.controls.toggleDefault),this.callFilters("selectorGetToggleSelector",e,arguments)},buildToggleArray:function(t,e){var s="";if(this.callActions("beforeBuildToggleArray",arguments),t&&t.filter)s=t.filter.selector.replace(/\s/g,"");else{if(!e)return;s=e.activeFilter.selector.replace(/\s/g,"")}s!==this.config.selectors.target&&"all"!==s||(s=""),"or"===this.config.controls.toggleLogic?this.toggleArray=s.split(","):this.toggleArray=this.splitCompoundSelector(s),this.toggleArray=i.clean(this.toggleArray),this.callActions("afterBuildToggleArray",arguments)},splitCompoundSelector:function(t){var e=t.split(/([\.\[])/g),i=[],s="",n=-1;for(""===e[0]&&e.shift(),n=0;n<e.length;n++)n%2==0&&(s=""),s+=e[n],n%2!=0&&i.push(s);return i},updateControls:function(t){var s=null,n=new e.CommandMultimix,o=-1;for(this.callActions("beforeUpdateControls",arguments),t.filter?n.filter=t.filter.selector:n.filter=this.state.activeFilter.selector,t.sort?n.sort=this.buildSortString(t.sort):n.sort=this.buildSortString(this.state.activeSort),n.filter===this.config.selectors.target&&(n.filter="all"),""===n.filter&&(n.filter="none"),i.freeze(n),o=0;s=this.controls[o];o++)s.update(n,this.toggleArray);this.callActions("afterUpdateControls",arguments)},buildSortString:function(t){var e="";return e+=t.sortString,t.next&&(e+=" "+this.buildSortString(t.next)),e},insertTargets:function(t,s){var n=null,o=-1,r=null,a=null,l=null,c=-1;if(this.callActions("beforeInsertTargets",arguments),void 0===t.index&&(t.index=0),n=this.getNextSibling(t.index,t.sibling,t.position),r=this.dom.document.createDocumentFragment(),o=n?i.index(n,this.config.selectors.target):this.targets.length,t.collection){for(c=0;l=t.collection[c];c++){if(this.dom.targets.indexOf(l)>-1)throw new Error(e.messages.errorInsertPreexistingElement());l.style.display="none",r.appendChild(l),r.appendChild(this.dom.document.createTextNode(" ")),i.isElement(l,this.dom.document)&&l.matches(this.config.selectors.target)&&((a=new e.Target).init(l,this),a.isInDom=!0,this.targets.splice(o,0,a),o++)}this.dom.parent.insertBefore(r,n)}s.startOrder=this.origOrder=this.targets,this.callActions("afterInsertTargets",arguments)},getNextSibling:function(t,e,i){var s=null;return t=Math.max(t,0),e&&"before"===i?s=e:e&&"after"===i?s=e.nextElementSibling||null:this.targets.length>0&&void 0!==t?s=t<this.targets.length||!this.targets.length?this.targets[t].dom.el:this.targets[this.targets.length-1].dom.el.nextElementSibling:0===this.targets.length&&this.dom.parent.children.length>0&&(this.config.layout.siblingAfter?s=this.config.layout.siblingAfter:this.config.layout.siblingBefore?s=this.config.layout.siblingBefore.nextElementSibling:this.dom.parent.children[0]),this.callFilters("elementGetNextSibling",s,arguments)},filterOperation:function(t){var e=!1,i=-1,s="",n=null,o=-1;for(this.callActions("beforeFilterOperation",arguments),s=t.newFilter.action,o=0;n=t.newOrder[o];o++)e=t.newFilter.collection?t.newFilter.collection.indexOf(n.dom.el)>-1:""!==t.newFilter.selector&&n.dom.el.matches(t.newFilter.selector),this.evaluateHideShow(e,n,s,t);if(t.toRemove.length)for(o=0;n=t.show[o];o++)t.toRemove.indexOf(n)>-1&&(t.show.splice(o,1),(i=t.toShow.indexOf(n))>-1&&t.toShow.splice(i,1),t.toHide.push(n),t.hide.push(n),o--);t.matching=t.show.slice(),0===t.show.length&&""!==t.newFilter.selector&&0!==this.targets.length&&(t.hasFailed=!0),this.callActions("afterFilterOperation",arguments)},evaluateHideShow:function(t,e,i,s){var n=!1,o=Array.prototype.slice.call(arguments,1);n=this.callFilters("testResultEvaluateHideShow",t,o),this.callActions("beforeEvaluateHideShow",arguments),!0===n&&"show"===i||!1===n&&"hide"===i?(s.show.push(e),!e.isShown&&s.toShow.push(e)):(s.hide.push(e),e.isShown&&s.toHide.push(e)),this.callActions("afterEvaluateHideShow",arguments)},sortOperation:function(t){var e=this;e.callActions("beforeSortOperation",arguments),t.startOrder=e.targets,t.newSort.collection?t.newOrder=t.newSort.collection:"random"===t.newSort.order?t.newOrder=i.arrayShuffle(t.startOrder):""===t.newSort.attribute?(t.newOrder=e.origOrder.slice(),"desc"===t.newSort.order&&t.newOrder.reverse()):(t.newOrder=t.startOrder.slice(),t.newOrder.sort(function(i,s){return e.compare(i,s,t.newSort)})),i.isEqualArray(t.newOrder,t.startOrder)&&(t.willSort=!1),e.callActions("afterSortOperation",arguments)},compare:function(t,e,i){var s=i.order,n=this.getAttributeValue(t,i.attribute),o=this.getAttributeValue(e,i.attribute);return isNaN(1*n)||isNaN(1*o)?(n=n.toLowerCase(),o=o.toLowerCase()):(n*=1,o*=1),n<o?"asc"===s?-1:1:n>o?"asc"===s?1:-1:n===o&&i.next?this.compare(t,e,i.next):0},getAttributeValue:function(t,i){var s="";return null===(s=t.dom.el.getAttribute("data-"+i))&&this.config.debug.showWarnings&&console.warn(e.messages.warningInconsistentSortingAttributes({attribute:"data-"+i})),this.callFilters("valueGetAttributeValue",s||0,arguments)},printSort:function(e,s){var n=e?s.newOrder:s.startOrder,o=e?s.startOrder:s.newOrder,r=n.length?n[n.length-1].dom.el.nextElementSibling:null,a=t.document.createDocumentFragment(),l=null,c=null,h=null,u=-1;for(this.callActions("beforePrintSort",arguments),u=0;c=n[u];u++)"absolute"!==(h=c.dom.el).style.position&&(i.removeWhitespace(h.previousSibling),h.parentElement.removeChild(h));for((l=r?r.previousSibling:this.dom.parent.lastChild)&&"#text"===l.nodeName&&i.removeWhitespace(l),u=0;c=o[u];u++)h=c.dom.el,i.isElement(a.lastChild)&&a.appendChild(t.document.createTextNode(" ")),a.appendChild(h);this.dom.parent.firstChild&&this.dom.parent.firstChild!==r&&a.insertBefore(t.document.createTextNode(" "),a.childNodes[0]),r?(a.appendChild(t.document.createTextNode(" ")),this.dom.parent.insertBefore(a,r)):this.dom.parent.appendChild(a),this.callActions("afterPrintSort",arguments)},parseSortString:function(t,s){var n=t.split(" "),o=s,r=[],a=-1;for(a=0;a<n.length;a++){switch(r=n[a].split(":"),o.sortString=n[a],o.attribute=i.dashCase(r[0]),o.order=r[1]||"asc",o.attribute){case"default":o.attribute="";break;case"random":o.attribute="",o.order="random"}if(!o.attribute||"random"===o.order)break;a<n.length-1&&(o.next=new e.CommandSort,i.freeze(o),o=o.next)}return this.callFilters("commandsParseSort",s,arguments)},parseEffects:function(){var t="",i=this.config.animation.effectsIn||this.config.animation.effects,s=this.config.animation.effectsOut||this.config.animation.effects;this.callActions("beforeParseEffects",arguments),this.effectsIn=new e.StyleData,this.effectsOut=new e.StyleData,this.transformIn=[],this.transformOut=[],this.effectsIn.opacity=this.effectsOut.opacity=1,this.parseEffect("fade",i,this.effectsIn,this.transformIn),this.parseEffect("fade",s,this.effectsOut,this.transformOut,!0);for(t in e.transformDefaults)e.transformDefaults[t]instanceof e.TransformData&&(this.parseEffect(t,i,this.effectsIn,this.transformIn),this.parseEffect(t,s,this.effectsOut,this.transformOut,!0));this.parseEffect("stagger",i,this.effectsIn,this.transformIn),this.parseEffect("stagger",s,this.effectsOut,this.transformOut,!0),this.callActions("afterParseEffects",arguments)},parseEffect:function(t,i,s,n,o){var r=-1,a="",l="",c=["%","px","em","rem","vh","vw","deg"],h="",u=-1;if(this.callActions("beforeParseEffect",arguments),"string"!=typeof i)throw new TypeError(e.messages.errorConfigInvalidAnimationEffects());if(i.indexOf(t)<0)"stagger"===t&&(this.staggerDuration=0);else{switch((r=i.indexOf(t+"("))>-1&&(a=i.substring(r),l=/\(([^)]+)\)/.exec(a)[1]),t){case"fade":s.opacity=l?parseFloat(l):0;break;case"stagger":this.staggerDuration=l?parseFloat(l):100;break;default:if(o&&this.config.animation.reverseOut&&"scale"!==t?s[t].value=-1*(l?parseFloat(l):e.transformDefaults[t].value):s[t].value=l?parseFloat(l):e.transformDefaults[t].value,l){for(u=0;h=c[u];u++)if(l.indexOf(h)>-1){s[t].unit=h;break}}else s[t].unit=e.transformDefaults[t].unit;n.push(t+"("+s[t].value+s[t].unit+")")}this.callActions("afterParseEffect",arguments)}},buildState:function(t){var i=new e.State,s=null,n=-1;for(this.callActions("beforeBuildState",arguments),n=0;s=this.targets[n];n++)(!t.toRemove.length||t.toRemove.indexOf(s)<0)&&i.targets.push(s.dom.el);for(n=0;s=t.matching[n];n++)i.matching.push(s.dom.el);for(n=0;s=t.show[n];n++)i.show.push(s.dom.el);for(n=0;s=t.hide[n];n++)(!t.toRemove.length||t.toRemove.indexOf(s)<0)&&i.hide.push(s.dom.el);return i.id=this.id,i.container=this.dom.container,i.activeFilter=t.newFilter,i.activeSort=t.newSort,i.activeDataset=t.newDataset,i.activeContainerClassName=t.newContainerClassName,i.hasFailed=t.hasFailed,i.totalTargets=this.targets.length,i.totalShow=t.show.length,i.totalHide=t.hide.length,i.totalMatching=t.matching.length,i.triggerElement=t.triggerElement,this.callFilters("stateBuildState",i,arguments)},goMix:function(s,n){var o=this,r=null;return o.callActions("beforeGoMix",arguments),o.config.animation.duration&&o.config.animation.effects&&i.isVisible(o.dom.container)||(s=!1),n.toShow.length||n.toHide.length||n.willSort||n.willChangeLayout||(s=!1),n.startState.show.length||n.show.length||(s=!1),e.events.fire("mixStart",o.dom.container,{state:n.startState,futureState:n.newState,instance:o},o.dom.document),"function"==typeof o.config.callbacks.onMixStart&&o.config.callbacks.onMixStart.call(o.dom.container,n.startState,n.newState,o),i.removeClass(o.dom.container,i.getClassname(o.config.classNames,"container",o.config.classNames.modifierFailed)),r=o.userDeferred?o.userDeferred:o.userDeferred=i.defer(e.libraries),o.isBusy=!0,s&&e.features.has.transitions?(t.pageYOffset!==n.docState.scrollTop&&t.scrollTo(n.docState.scrollLeft,n.docState.scrollTop),o.config.animation.applyPerspective&&(o.dom.parent.style[e.features.perspectiveProp]=o.config.animation.perspectiveDistance,o.dom.parent.style[e.features.perspectiveOriginProp]=o.config.animation.perspectiveOrigin),o.config.animation.animateResizeContainer&&n.startHeight!==n.newHeight&&n.viewportDeltaY!==n.startHeight-n.newHeight&&(o.dom.parent.style.height=n.startHeight+"px"),o.config.animation.animateResizeContainer&&n.startWidth!==n.newWidth&&n.viewportDeltaX!==n.startWidth-n.newWidth&&(o.dom.parent.style.width=n.startWidth+"px"),n.startHeight===n.newHeight&&(o.dom.parent.style.height=n.startHeight+"px"),n.startWidth===n.newWidth&&(o.dom.parent.style.width=n.startWidth+"px"),n.startHeight===n.newHeight&&n.startWidth===n.newWidth&&(o.dom.parent.style.overflow="hidden"),requestAnimationFrame(function(){o.moveTargets(n)}),o.callFilters("promiseGoMix",r.promise,arguments)):(o.config.debug.fauxAsync?setTimeout(function(){o.cleanUp(n)},o.config.animation.duration):o.cleanUp(n),o.callFilters("promiseGoMix",r.promise,arguments))},getStartMixData:function(i){var s=t.getComputedStyle(this.dom.parent),n=this.dom.parent.getBoundingClientRect(),o=null,r={},a=-1,l=s[e.features.boxSizingProp];for(this.incPadding="border-box"===l,this.callActions("beforeGetStartMixData",arguments),a=0;o=i.show[a];a++)r=o.getPosData(),i.showPosData[a]={startPosData:r};for(a=0;o=i.toHide[a];a++)r=o.getPosData(),i.toHidePosData[a]={startPosData:r};i.startX=n.left,i.startY=n.top,i.startHeight=this.incPadding?n.height:n.height-parseFloat(s.paddingTop)-parseFloat(s.paddingBottom)-parseFloat(s.borderTop)-parseFloat(s.borderBottom),i.startWidth=this.incPadding?n.width:n.width-parseFloat(s.paddingLeft)-parseFloat(s.paddingRight)-parseFloat(s.borderLeft)-parseFloat(s.borderRight),this.callActions("afterGetStartMixData",arguments)},setInter:function(t){var e=null,s=-1;for(this.callActions("beforeSetInter",arguments),this.config.animation.clampHeight&&(this.dom.parent.style.height=t.startHeight+"px",this.dom.parent.style.overflow="hidden"),this.config.animation.clampWidth&&(this.dom.parent.style.width=t.startWidth+"px",this.dom.parent.style.overflow="hidden"),s=0;e=t.toShow[s];s++)e.show();t.willChangeLayout&&(i.removeClass(this.dom.container,t.startContainerClassName),i.addClass(this.dom.container,t.newContainerClassName)),this.callActions("afterSetInter",arguments)},getInterMixData:function(t){var e=null,i=-1;for(this.callActions("beforeGetInterMixData",arguments),i=0;e=t.show[i];i++)t.showPosData[i].interPosData=e.getPosData();for(i=0;e=t.toHide[i];i++)t.toHidePosData[i].interPosData=e.getPosData();this.callActions("afterGetInterMixData",arguments)},setFinal:function(t){var e=null,i=-1;for(this.callActions("beforeSetFinal",arguments),t.willSort&&this.printSort(!1,t),i=0;e=t.toHide[i];i++)e.hide();this.callActions("afterSetFinal",arguments)},getFinalMixData:function(e){var s=null,n=null,o=null,r=-1;for(this.callActions("beforeGetFinalMixData",arguments),r=0;o=e.show[r];r++)e.showPosData[r].finalPosData=o.getPosData();for(r=0;o=e.toHide[r];r++)e.toHidePosData[r].finalPosData=o.getPosData();for((this.config.animation.clampHeight||this.config.animation.clampWidth)&&(this.dom.parent.style.height=this.dom.parent.style.width=this.dom.parent.style.overflow=""),this.incPadding||(s=t.getComputedStyle(this.dom.parent)),n=this.dom.parent.getBoundingClientRect(),e.newX=n.left,e.newY=n.top,e.newHeight=this.incPadding?n.height:n.height-parseFloat(s.paddingTop)-parseFloat(s.paddingBottom)-parseFloat(s.borderTop)-parseFloat(s.borderBottom),e.newWidth=this.incPadding?n.width:n.width-parseFloat(s.paddingLeft)-parseFloat(s.paddingRight)-parseFloat(s.borderLeft)-parseFloat(s.borderRight),e.viewportDeltaX=e.docState.viewportWidth-this.dom.document.documentElement.clientWidth,e.viewportDeltaY=e.docState.viewportHeight-this.dom.document.documentElement.clientHeight,e.willSort&&this.printSort(!0,e),r=0;o=e.toShow[r];r++)o.hide();for(r=0;o=e.toHide[r];r++)o.show();e.willChangeLayout&&(i.removeClass(this.dom.container,e.newContainerClassName),i.addClass(this.dom.container,this.config.layout.containerClassName)),this.callActions("afterGetFinalMixData",arguments)},getTweenData:function(t){var i=null,s=null,n=Object.getOwnPropertyNames(this.effectsIn),o="",r=null,a=-1,l=-1,c=-1,h=-1;for(this.callActions("beforeGetTweenData",arguments),c=0;i=t.show[c];c++)for((s=t.showPosData[c]).posIn=new e.StyleData,s.posOut=new e.StyleData,s.tweenData=new e.StyleData,i.isShown?(s.posIn.x=s.startPosData.x-s.interPosData.x,s.posIn.y=s.startPosData.y-s.interPosData.y):s.posIn.x=s.posIn.y=0,s.posOut.x=s.finalPosData.x-s.interPosData.x,s.posOut.y=s.finalPosData.y-s.interPosData.y,s.posIn.opacity=i.isShown?1:this.effectsIn.opacity,s.posOut.opacity=1,s.tweenData.opacity=s.posOut.opacity-s.posIn.opacity,i.isShown||this.config.animation.nudge||(s.posIn.x=s.posOut.x,s.posIn.y=s.posOut.y),s.tweenData.x=s.posOut.x-s.posIn.x,s.tweenData.y=s.posOut.y-s.posIn.y,this.config.animation.animateResizeTargets&&(s.posIn.width=s.startPosData.width,s.posIn.height=s.startPosData.height,a=(s.startPosData.width||s.finalPosData.width)-s.interPosData.width,s.posIn.marginRight=s.startPosData.marginRight-a,l=(s.startPosData.height||s.finalPosData.height)-s.interPosData.height,s.posIn.marginBottom=s.startPosData.marginBottom-l,s.posOut.width=s.finalPosData.width,s.posOut.height=s.finalPosData.height,a=(s.finalPosData.width||s.startPosData.width)-s.interPosData.width,s.posOut.marginRight=s.finalPosData.marginRight-a,l=(s.finalPosData.height||s.startPosData.height)-s.interPosData.height,s.posOut.marginBottom=s.finalPosData.marginBottom-l,s.tweenData.width=s.posOut.width-s.posIn.width,s.tweenData.height=s.posOut.height-s.posIn.height,s.tweenData.marginRight=s.posOut.marginRight-s.posIn.marginRight,s.tweenData.marginBottom=s.posOut.marginBottom-s.posIn.marginBottom),h=0;o=n[h];h++)(r=this.effectsIn[o])instanceof e.TransformData&&r.value&&(s.posIn[o].value=r.value,s.posOut[o].value=0,s.tweenData[o].value=s.posOut[o].value-s.posIn[o].value,s.posIn[o].unit=s.posOut[o].unit=s.tweenData[o].unit=r.unit);for(c=0;i=t.toHide[c];c++)for((s=t.toHidePosData[c]).posIn=new e.StyleData,s.posOut=new e.StyleData,s.tweenData=new e.StyleData,s.posIn.x=i.isShown?s.startPosData.x-s.interPosData.x:0,s.posIn.y=i.isShown?s.startPosData.y-s.interPosData.y:0,s.posOut.x=this.config.animation.nudge?0:s.posIn.x,s.posOut.y=this.config.animation.nudge?0:s.posIn.y,s.tweenData.x=s.posOut.x-s.posIn.x,s.tweenData.y=s.posOut.y-s.posIn.y,this.config.animation.animateResizeTargets&&(s.posIn.width=s.startPosData.width,s.posIn.height=s.startPosData.height,a=s.startPosData.width-s.interPosData.width,s.posIn.marginRight=s.startPosData.marginRight-a,l=s.startPosData.height-s.interPosData.height,s.posIn.marginBottom=s.startPosData.marginBottom-l),s.posIn.opacity=1,s.posOut.opacity=this.effectsOut.opacity,s.tweenData.opacity=s.posOut.opacity-s.posIn.opacity,h=0;o=n[h];h++)(r=this.effectsOut[o])instanceof e.TransformData&&r.value&&(s.posIn[o].value=0,s.posOut[o].value=r.value,s.tweenData[o].value=s.posOut[o].value-s.posIn[o].value,s.posIn[o].unit=s.posOut[o].unit=s.tweenData[o].unit=r.unit);this.callActions("afterGetTweenData",arguments)},moveTargets:function(t){var s=this,n=null,o=null,r=null,a="",l=!1,c=-1,h=-1,u=s.checkProgress.bind(s);for(s.callActions("beforeMoveTargets",arguments),h=0;n=t.show[h];h++)o=new e.IMoveData,r=t.showPosData[h],a=n.isShown?"none":"show",(l=s.willTransition(a,t.hasEffect,r.posIn,r.posOut))&&c++,n.show(),o.posIn=r.posIn,o.posOut=r.posOut,o.statusChange=a,o.staggerIndex=c,o.operation=t,o.callback=l?u:null,n.move(o);for(h=0;n=t.toHide[h];h++)r=t.toHidePosData[h],o=new e.IMoveData,a="hide",l=s.willTransition(a,r.posIn,r.posOut),o.posIn=r.posIn,o.posOut=r.posOut,o.statusChange=a,o.staggerIndex=h,o.operation=t,o.callback=l?u:null,n.move(o);s.config.animation.animateResizeContainer&&(s.dom.parent.style[e.features.transitionProp]="height "+s.config.animation.duration+"ms ease, width "+s.config.animation.duration+"ms ease ",requestAnimationFrame(function(){t.startHeight!==t.newHeight&&t.viewportDeltaY!==t.startHeight-t.newHeight&&(s.dom.parent.style.height=t.newHeight+"px"),t.startWidth!==t.newWidth&&t.viewportDeltaX!==t.startWidth-t.newWidth&&(s.dom.parent.style.width=t.newWidth+"px")})),t.willChangeLayout&&(i.removeClass(s.dom.container,s.config.layout.ContainerClassName),i.addClass(s.dom.container,t.newContainerClassName)),s.callActions("afterMoveTargets",arguments)},hasEffect:function(){var t=["scale","translateX","translateY","translateZ","rotateX","rotateY","rotateZ"],e="",i=null,s=!1,n=-1;if(1!==this.effectsIn.opacity)return this.callFilters("resultHasEffect",!0,arguments);for(n=0;e=t[n];n++)if(i=this.effectsIn[e],0!==("undefined"!==i.value?i.value:i)){s=!0;break}return this.callFilters("resultHasEffect",s,arguments)},willTransition:function(t,e,s,n){var o=!1;return o=!!i.isVisible(this.dom.container)&&(!!("none"!==t&&e||s.x!==n.x||s.y!==n.y)||!!this.config.animation.animateResizeTargets&&(s.width!==n.width||s.height!==n.height||s.marginRight!==n.marginRight||s.marginTop!==n.marginTop)),this.callFilters("resultWillTransition",o,arguments)},checkProgress:function(t){this.targetsDone++,this.targetsBound===this.targetsDone&&this.cleanUp(t)},cleanUp:function(t){var s=null,n=null,o=null,r=null,a=-1;for(this.callActions("beforeCleanUp",arguments),this.targetsMoved=this.targetsImmovable=this.targetsBound=this.targetsDone=0,a=0;s=t.show[a];a++)s.cleanUp(),s.show();for(a=0;s=t.toHide[a];a++)s.cleanUp(),s.hide();if(t.willSort&&this.printSort(!1,t),this.dom.parent.style[e.features.transitionProp]=this.dom.parent.style.height=this.dom.parent.style.width=this.dom.parent.style.overflow=this.dom.parent.style[e.features.perspectiveProp]=this.dom.parent.style[e.features.perspectiveOriginProp]="",t.willChangeLayout&&(i.removeClass(this.dom.container,t.startContainerClassName),i.addClass(this.dom.container,t.newContainerClassName)),t.toRemove.length){for(a=0;s=this.targets[a];a++)t.toRemove.indexOf(s)>-1&&((n=s.dom.el.previousSibling)&&"#text"===n.nodeName&&(o=s.dom.el.nextSibling)&&"#text"===o.nodeName&&i.removeWhitespace(n),t.willSort||this.dom.parent.removeChild(s.dom.el),this.targets.splice(a,1),s.isInDom=!1,a--);this.origOrder=this.targets}t.willSort&&(this.targets=t.newOrder),this.state=t.newState,this.lastOperation=t,this.dom.targets=this.state.targets,e.events.fire("mixEnd",this.dom.container,{state:this.state,instance:this},this.dom.document),"function"==typeof this.config.callbacks.onMixEnd&&this.config.callbacks.onMixEnd.call(this.dom.container,this.state,this),t.hasFailed&&(e.events.fire("mixFail",this.dom.container,{state:this.state,instance:this},this.dom.document),"function"==typeof this.config.callbacks.onMixFail&&this.config.callbacks.onMixFail.call(this.dom.container,this.state,this),i.addClass(this.dom.container,i.getClassname(this.config.classNames,"container",this.config.classNames.modifierFailed))),"function"==typeof this.userCallback&&this.userCallback.call(this.dom.container,this.state,this),"function"==typeof this.userDeferred.resolve&&this.userDeferred.resolve(this.state),this.userCallback=null,this.userDeferred=null,this.lastClicked=null,this.isToggling=!1,this.isBusy=!1,this.queue.length&&(this.callActions("beforeReadQueueCleanUp",arguments),r=this.queue.shift(),this.userDeferred=r.deferred,this.isToggling=r.isToggling,this.lastClicked=r.triggerElement,r.instruction.command instanceof e.CommandMultimix?this.multimix.apply(this,r.args):this.dataset.apply(this,r.args)),this.callActions("afterCleanUp",arguments)},parseMultimixArgs:function(t){var s=new e.UserInstruction,n=null,o=-1;for(s.animate=this.config.animation.enable,s.command=new e.CommandMultimix,o=0;o<t.length;o++)null!==(n=t[o])&&("object"==typeof n?i.extend(s.command,n):"boolean"==typeof n?s.animate=n:"function"==typeof n&&(s.callback=n));return!s.command.insert||s.command.insert instanceof e.CommandInsert||(s.command.insert=this.parseInsertArgs([s.command.insert]).command),!s.command.remove||s.command.remove instanceof e.CommandRemove||(s.command.remove=this.parseRemoveArgs([s.command.remove]).command),!s.command.filter||s.command.filter instanceof e.CommandFilter||(s.command.filter=this.parseFilterArgs([s.command.filter]).command),!s.command.sort||s.command.sort instanceof e.CommandSort||(s.command.sort=this.parseSortArgs([s.command.sort]).command),!s.command.changeLayout||s.command.changeLayout instanceof e.CommandChangeLayout||(s.command.changeLayout=this.parseChangeLayoutArgs([s.command.changeLayout]).command),s=this.callFilters("instructionParseMultimixArgs",s,arguments),i.freeze(s),s},parseFilterArgs:function(t){var s=new e.UserInstruction,n=null,o=-1;for(s.animate=this.config.animation.enable,s.command=new e.CommandFilter,o=0;o<t.length;o++)"string"==typeof(n=t[o])?s.command.selector=n:null===n?s.command.collection=[]:"object"==typeof n&&i.isElement(n,this.dom.document)?s.command.collection=[n]:"object"==typeof n&&void 0!==n.length?s.command.collection=i.arrayFromList(n):"object"==typeof n?i.extend(s.command,n):"boolean"==typeof n?s.animate=n:"function"==typeof n&&(s.callback=n);if(s.command.selector&&s.command.collection)throw new Error(e.messages.errorFilterInvalidArguments());return s=this.callFilters("instructionParseFilterArgs",s,arguments),i.freeze(s),s},parseSortArgs:function(t){var s=new e.UserInstruction,n=null,o="",r=-1;for(s.animate=this.config.animation.enable,s.command=new e.CommandSort,r=0;r<t.length;r++)if(null!==(n=t[r]))switch(typeof n){case"string":o=n;break;case"object":n.length&&(s.command.collection=i.arrayFromList(n));break;case"boolean":s.animate=n;break;case"function":s.callback=n}return o&&(s.command=this.parseSortString(o,s.command)),s=this.callFilters("instructionParseSortArgs",s,arguments),i.freeze(s),s},parseInsertArgs:function(t){var s=new e.UserInstruction,n=null,o=-1;for(s.animate=this.config.animation.enable,s.command=new e.CommandInsert,o=0;o<t.length;o++)null!==(n=t[o])&&("number"==typeof n?s.command.index=n:"string"==typeof n&&["before","after"].indexOf(n)>-1?s.command.position=n:"string"==typeof n?s.command.collection=i.arrayFromList(i.createElement(n).childNodes):"object"==typeof n&&i.isElement(n,this.dom.document)?s.command.collection.length?s.command.sibling=n:s.command.collection=[n]:"object"==typeof n&&n.length?s.command.collection.length?s.command.sibling=n[0]:s.command.collection=n:"object"==typeof n&&n.childNodes&&n.childNodes.length?s.command.collection.length?s.command.sibling=n.childNodes[0]:s.command.collection=i.arrayFromList(n.childNodes):"object"==typeof n?i.extend(s.command,n):"boolean"==typeof n?s.animate=n:"function"==typeof n&&(s.callback=n));if(s.command.index&&s.command.sibling)throw new Error(e.messages.errorInsertInvalidArguments());return!s.command.collection.length&&this.config.debug.showWarnings&&console.warn(e.messages.warningInsertNoElements()),s=this.callFilters("instructionParseInsertArgs",s,arguments),i.freeze(s),s},parseRemoveArgs:function(t){var s=new e.UserInstruction,n=null,o=null,r=-1;for(s.animate=this.config.animation.enable,s.command=new e.CommandRemove,r=0;r<t.length;r++)if(null!==(o=t[r]))switch(typeof o){case"number":this.targets[o]&&(s.command.targets[0]=this.targets[o]);break;case"string":s.command.collection=i.arrayFromList(this.dom.parent.querySelectorAll(o));break;case"object":o&&o.length?s.command.collection=o:i.isElement(o,this.dom.document)?s.command.collection=[o]:i.extend(s.command,o);break;case"boolean":s.animate=o;break;case"function":s.callback=o}if(s.command.collection.length)for(r=0;n=this.targets[r];r++)s.command.collection.indexOf(n.dom.el)>-1&&s.command.targets.push(n);return!s.command.targets.length&&this.config.debug.showWarnings&&console.warn(e.messages.warningRemoveNoElements()),i.freeze(s),s},parseDatasetArgs:function(t){var s=new e.UserInstruction,n=null,o=-1;for(s.animate=this.config.animation.enable,s.command=new e.CommandDataset,o=0;o<t.length;o++)if(null!==(n=t[o]))switch(typeof n){case"object":Array.isArray(n)||"number"==typeof n.length?s.command.dataset=n:i.extend(s.command,n);break;case"boolean":s.animate=n;break;case"function":s.callback=n}return i.freeze(s),s},parseChangeLayoutArgs:function(t){var s=new e.UserInstruction,n=null,o=-1;for(s.animate=this.config.animation.enable,s.command=new e.CommandChangeLayout,o=0;o<t.length;o++)if(null!==(n=t[o]))switch(typeof n){case"string":s.command.containerClassName=n;break;case"object":i.extend(s.command,n);break;case"boolean":s.animate=n;break;case"function":s.callback=n}return i.freeze(s),s},queueMix:function(t){var s=null,n="";return this.callActions("beforeQueueMix",arguments),s=i.defer(e.libraries),this.config.animation.queue&&this.queue.length<this.config.animation.queueLimit?(t.deferred=s,this.queue.push(t),this.config.controls.enable&&(this.isToggling?(this.buildToggleArray(t.instruction.command),n=this.getToggleSelector(),this.updateControls({filter:{selector:n}})):this.updateControls(t.instruction.command))):(this.config.debug.showWarnings&&console.warn(e.messages.warningMultimixInstanceQueueFull()),s.resolve(this.state),e.events.fire("mixBusy",this.dom.container,{state:this.state,instance:this},this.dom.document),"function"==typeof this.config.callbacks.onMixBusy&&this.config.callbacks.onMixBusy.call(this.dom.container,this.state,this)),this.callFilters("promiseQueueMix",s.promise,arguments)},getDataOperation:function(t){var s=new e.Operation,n=[];if(s=this.callFilters("operationUnmappedGetDataOperation",s,arguments),this.dom.targets.length&&!(n=this.state.activeDataset||[]).length)throw new Error(e.messages.errorDatasetNotSet());return s.id=i.randomHex(),s.startState=this.state,s.startDataset=n,s.newDataset=t.slice(),this.diffDatasets(s),s.startOrder=this.targets,s.newOrder=s.show,this.config.animation.enable&&(this.getStartMixData(s),this.setInter(s),s.docState=i.getDocumentState(this.dom.document),this.getInterMixData(s),this.setFinal(s),this.getFinalMixData(s),this.parseEffects(),s.hasEffect=this.hasEffect(),this.getTweenData(s)),this.targets=s.show.slice(),s.newState=this.buildState(s),Array.prototype.push.apply(this.targets,s.toRemove),s=this.callFilters("operationMappedGetDataOperation",s,arguments)},diffDatasets:function(t){var s=[],n=[],o=[],r=null,a=null,l=null,c=null,h=null,u={},d="",f=-1;for(this.callActions("beforeDiffDatasets",arguments),f=0;r=t.newDataset[f];f++){if(void 0===(d=r[this.config.data.uidKey])||d.toString().length<1)throw new TypeError(e.messages.errorDatasetInvalidUidKey({uidKey:this.config.data.uidKey}));if(u[d])throw new Error(e.messages.errorDatasetDuplicateUid({uid:d}));u[d]=!0,(a=this.cache[d])instanceof e.Target?(this.config.data.dirtyCheck&&!i.deepEquals(r,a.data)&&(l=a.render(r),a.data=r,l!==a.dom.el&&(a.isInDom&&(a.unbindEvents(),this.dom.parent.replaceChild(l,a.dom.el)),a.isShown||(l.style.display="none"),a.dom.el=l,a.isInDom&&a.bindEvents())),l=a.dom.el):((a=new e.Target).init(null,this,r),a.hide()),a.isInDom?(h=a.dom.el.nextElementSibling,n.push(d),c&&(c.lastElementChild&&c.appendChild(this.dom.document.createTextNode(" ")),this.insertDatasetFrag(c,a.dom.el,o),c=null)):(c||(c=this.dom.document.createDocumentFragment()),c.lastElementChild&&c.appendChild(this.dom.document.createTextNode(" ")),c.appendChild(a.dom.el),a.isInDom=!0,a.unbindEvents(),a.bindEvents(),a.hide(),t.toShow.push(a),o.push(a)),t.show.push(a)}for(c&&((h=h||this.config.layout.siblingAfter)&&c.appendChild(this.dom.document.createTextNode(" ")),this.insertDatasetFrag(c,h,o)),f=0;r=t.startDataset[f];f++)d=r[this.config.data.uidKey],a=this.cache[d],t.show.indexOf(a)<0?(t.hide.push(a),t.toHide.push(a),t.toRemove.push(a)):s.push(d);i.isEqualArray(s,n)||(t.willSort=!0),this.callActions("afterDiffDatasets",arguments)},insertDatasetFrag:function(t,e,i){var s=e?Array.from(this.dom.parent.children).indexOf(e):this.targets.length;for(this.dom.parent.insertBefore(t,e);i.length;)this.targets.splice(s,0,i.shift()),s++},willSort:function(t,e){var i=!1;return i=!!(this.config.behavior.liveSort||"random"===t.order||t.attribute!==e.attribute||t.order!==e.order||t.collection!==e.collection||null===t.next&&e.next||t.next&&null===e.next)||!(!t.next||!e.next)&&this.willSort(t.next,e.next),this.callFilters("resultWillSort",i,arguments)},show:function(){return this.filter("all")},hide:function(){return this.filter("none")},isMixing:function(){return this.isBusy},filter:function(){var t=this.parseFilterArgs(arguments);return this.multimix({filter:t.command},t.animate,t.callback)},toggleOn:function(){var t=this.parseFilterArgs(arguments),e=t.command.selector,i="";return this.isToggling=!0,this.toggleArray.indexOf(e)<0&&this.toggleArray.push(e),i=this.getToggleSelector(),this.multimix({filter:i},t.animate,t.callback)},toggleOff:function(){var t=this.parseFilterArgs(arguments),e=t.command.selector,i=this.toggleArray.indexOf(e),s="";return this.isToggling=!0,i>-1&&this.toggleArray.splice(i,1),s=this.getToggleSelector(),this.multimix({filter:s},t.animate,t.callback)},sort:function(){var t=this.parseSortArgs(arguments);return this.multimix({sort:t.command},t.animate,t.callback)},changeLayout:function(){var t=this.parseChangeLayoutArgs(arguments);return this.multimix({changeLayout:t.command},t.animate,t.callback)},dataset:function(){var t=this.parseDatasetArgs(arguments),i=null,s=null,n=!1;return this.callActions("beforeDataset",arguments),this.isBusy?(s=new e.QueueItem,s.args=arguments,s.instruction=t,this.queueMix(s)):(t.callback&&(this.userCallback=t.callback),n=t.animate^this.config.animation.enable?t.animate:this.config.animation.enable,i=this.getDataOperation(t.command.dataset),this.goMix(n,i))},multimix:function(){var t=null,i=!1,s=null,n=this.parseMultimixArgs(arguments);return this.callActions("beforeMultimix",arguments),this.isBusy?(s=new e.QueueItem,s.args=arguments,s.instruction=n,s.triggerElement=this.lastClicked,s.isToggling=this.isToggling,this.queueMix(s)):(t=this.getOperation(n.command),this.config.controls.enable&&(n.command.filter&&!this.isToggling&&(this.toggleArray.length=0,this.buildToggleArray(t.command)),this.queue.length<1&&this.updateControls(t.command)),n.callback&&(this.userCallback=n.callback),i=n.animate^this.config.animation.enable?n.animate:this.config.animation.enable,this.callFilters("operationMultimix",t,arguments),this.goMix(i,t))},getOperation:function(t){var s=t.sort,n=t.filter,o=t.changeLayout,r=t.remove,a=t.insert,l=new e.Operation;return l=this.callFilters("operationUnmappedGetOperation",l,arguments),l.id=i.randomHex(),l.command=t,l.startState=this.state,l.triggerElement=this.lastClicked,this.isBusy?(this.config.debug.showWarnings&&console.warn(e.messages.warningGetOperationInstanceBusy()),null):(a&&this.insertTargets(a,l),r&&(l.toRemove=r.targets),l.startSort=l.newSort=l.startState.activeSort,l.startOrder=l.newOrder=this.targets,s&&(l.startSort=l.startState.activeSort,l.newSort=s,l.willSort=this.willSort(s,l.startState.activeSort),l.willSort&&this.sortOperation(l)),l.startFilter=l.startState.activeFilter,l.newFilter=n||i.extend(new e.CommandFilter,l.startFilter),"all"===l.newFilter.selector?l.newFilter.selector=this.config.selectors.target:"none"===l.newFilter.selector&&(l.newFilter.selector=""),this.filterOperation(l),l.startContainerClassName=l.startState.activeContainerClassName,o?(l.newContainerClassName=o.containerClassName,l.newContainerClassName!==l.startContainerClassName&&(l.willChangeLayout=!0)):l.newContainerClassName=l.startContainerClassName,this.config.animation.enable&&(this.getStartMixData(l),this.setInter(l),l.docState=i.getDocumentState(this.dom.document),this.getInterMixData(l),this.setFinal(l),this.getFinalMixData(l),this.parseEffects(),l.hasEffect=this.hasEffect(),this.getTweenData(l)),l.willSort&&(this.targets=l.newOrder),l.newState=this.buildState(l),this.callFilters("operationMappedGetOperation",l,arguments))},tween:function(t,e){var i=null,s=null,n=-1,o=-1;for(e=Math.min(e,1),e=Math.max(e,0),o=0;i=t.show[o];o++)s=t.showPosData[o],i.applyTween(s,e);for(o=0;i=t.hide[o];o++)i.isShown&&i.hide(),(n=t.toHide.indexOf(i))>-1&&(s=t.toHidePosData[n],i.isShown||i.show(),i.applyTween(s,e))},insert:function(){var t=this.parseInsertArgs(arguments);return this.multimix({insert:t.command},t.animate,t.callback)},insertBefore:function(){var t=this.parseInsertArgs(arguments);return this.insert(t.command.collection,"before",t.command.sibling,t.animate,t.callback)},insertAfter:function(){var t=this.parseInsertArgs(arguments);return this.insert(t.command.collection,"after",t.command.sibling,t.animate,t.callback)},prepend:function(){var t=this.parseInsertArgs(arguments);return this.insert(0,t.command.collection,t.animate,t.callback)},append:function(){var t=this.parseInsertArgs(arguments);return this.insert(this.state.totalTargets,t.command.collection,t.animate,t.callback)},remove:function(){var t=this.parseRemoveArgs(arguments);return this.multimix({remove:t.command},t.animate,t.callback)},getConfig:function(t){var e=null;return e=t?i.getProperty(this.config,t):this.config,this.callFilters("valueGetConfig",e,arguments)},configure:function(t){this.callActions("beforeConfigure",arguments),i.extend(this.config,t,!0,!0),this.callActions("afterConfigure",arguments)},getState:function(){var t=null;return t=new e.State,i.extend(t,this.state),i.freeze(t),this.callFilters("stateGetState",t,arguments)},forceRefresh:function(){this.indexTargets()},forceRender:function(){var t=null,e=null,i="";for(i in this.cache)(e=(t=this.cache[i]).render(t.data))!==t.dom.el&&(t.isInDom&&(t.unbindEvents(),this.dom.parent.replaceChild(e,t.dom.el)),t.isShown||(e.style.display="none"),t.dom.el=e,t.isInDom&&t.bindEvents());this.state=this.buildState(this.lastOperation)},destroy:function(t){var i=null,s=null,n=0;for(this.callActions("beforeDestroy",arguments),n=0;i=this.controls[n];n++)i.removeBinding(this);for(n=0;s=this.targets[n];n++)t&&s.show(),s.unbindEvents();this.dom.container.id.match(/^MixItUp/)&&this.dom.container.removeAttribute("id"),delete e.instances[this.id],this.callActions("afterDestroy",arguments)}}),e.IMoveData=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.posIn=null,this.posOut=null,this.operation=null,this.callback=null,this.statusChange="",this.duration=-1,this.staggerIndex=-1,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.IMoveData),e.IMoveData.prototype=Object.create(e.Base.prototype),e.IMoveData.prototype.constructor=e.IMoveData,e.TargetDom=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.el=null,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.TargetDom),e.TargetDom.prototype=Object.create(e.Base.prototype),e.TargetDom.prototype.constructor=e.TargetDom,e.Target=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.id="",this.sortString="",this.mixer=null,this.callback=null,this.isShown=!1,this.isBound=!1,this.isExcluded=!1,this.isInDom=!1,this.handler=null,this.operation=null,this.data=null,this.dom=new e.TargetDom,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.Target),e.Target.prototype=Object.create(e.Base.prototype),i.extend(e.Target.prototype,{constructor:e.Target,init:function(t,i,s){var n="";if(this.callActions("beforeInit",arguments),this.mixer=i,t||(t=this.render(s)),this.cacheDom(t),this.bindEvents(),"none"!==this.dom.el.style.display&&(this.isShown=!0),s&&i.config.data.uidKey){if(void 0===(n=s[i.config.data.uidKey])||n.toString().length<1)throw new TypeError(e.messages.errorDatasetInvalidUidKey({uidKey:i.config.data.uidKey}));this.id=n,this.data=s,i.cache[n]=this}this.callActions("afterInit",arguments)},render:function(t){var s=null,n=null,o=null,r="";if(this.callActions("beforeRender",arguments),"function"!=typeof(s=this.callFilters("renderRender",this.mixer.config.render.target,arguments)))throw new TypeError(e.messages.errorDatasetRendererNotSet());return(r=s(t))&&"object"==typeof r&&i.isElement(r)?n=r:"string"==typeof r&&((o=document.createElement("div")).innerHTML=r,n=o.firstElementChild),this.callFilters("elRender",n,arguments)},cacheDom:function(t){this.callActions("beforeCacheDom",arguments),this.dom.el=t,this.callActions("afterCacheDom",arguments)},getSortString:function(t){var e=this.dom.el.getAttribute("data-"+t)||"";this.callActions("beforeGetSortString",arguments),e=isNaN(1*e)?e.toLowerCase():1*e,this.sortString=e,this.callActions("afterGetSortString",arguments)},show:function(){this.callActions("beforeShow",arguments),this.isShown||(this.dom.el.style.display="",this.isShown=!0),this.callActions("afterShow",arguments)},hide:function(){this.callActions("beforeHide",arguments),this.isShown&&(this.dom.el.style.display="none",this.isShown=!1),this.callActions("afterHide",arguments)},move:function(t){var e=this;e.callActions("beforeMove",arguments),e.isExcluded||e.mixer.targetsMoved++,e.applyStylesIn(t),requestAnimationFrame(function(){e.applyStylesOut(t)}),e.callActions("afterMove",arguments)},applyTween:function(t,i){var s="",n=null,o=t.posIn,r=[],a=new e.StyleData,l=-1;for(this.callActions("beforeApplyTween",arguments),a.x=o.x,a.y=o.y,0===i?this.hide():this.isShown||this.show(),l=0;s=e.features.TWEENABLE[l];l++)if(n=t.tweenData[s],"x"===s){if(!n)continue;a.x=o.x+n*i}else if("y"===s){if(!n)continue;a.y=o.y+n*i}else if(n instanceof e.TransformData){if(!n.value)continue;a[s].value=o[s].value+n.value*i,a[s].unit=n.unit,r.push(s+"("+a[s].value+n.unit+")")}else{if(!n)continue;a[s]=o[s]+n*i,this.dom.el.style[s]=a[s]}(a.x||a.y)&&r.unshift("translate("+a.x+"px, "+a.y+"px)"),r.length&&(this.dom.el.style[e.features.transformProp]=r.join(" ")),this.callActions("afterApplyTween",arguments)},applyStylesIn:function(t){var i=t.posIn,s=1!==this.mixer.effectsIn.opacity,n=[];this.callActions("beforeApplyStylesIn",arguments),n.push("translate("+i.x+"px, "+i.y+"px)"),this.mixer.config.animation.animateResizeTargets&&("show"!==t.statusChange&&(this.dom.el.style.width=i.width+"px",this.dom.el.style.height=i.height+"px"),this.dom.el.style.marginRight=i.marginRight+"px",this.dom.el.style.marginBottom=i.marginBottom+"px"),s&&(this.dom.el.style.opacity=i.opacity),"show"===t.statusChange&&(n=n.concat(this.mixer.transformIn)),this.dom.el.style[e.features.transformProp]=n.join(" "),this.callActions("afterApplyStylesIn",arguments)},applyStylesOut:function(t){var i=[],s=[],n=this.mixer.config.animation.animateResizeTargets,o=void 0!==this.mixer.effectsIn.opacity;if(this.callActions("beforeApplyStylesOut",arguments),i.push(this.writeTransitionRule(e.features.transformRule,t.staggerIndex)),"none"!==t.statusChange&&i.push(this.writeTransitionRule("opacity",t.staggerIndex,t.duration)),n&&(i.push(this.writeTransitionRule("width",t.staggerIndex,t.duration)),i.push(this.writeTransitionRule("height",t.staggerIndex,t.duration)),i.push(this.writeTransitionRule("margin",t.staggerIndex,t.duration))),!t.callback)return this.mixer.targetsImmovable++,void(this.mixer.targetsMoved===this.mixer.targetsImmovable&&this.mixer.cleanUp(t.operation));switch(this.operation=t.operation,this.callback=t.callback,!this.isExcluded&&this.mixer.targetsBound++,this.isBound=!0,this.applyTransition(i),n&&t.posOut.width>0&&t.posOut.height>0&&(this.dom.el.style.width=t.posOut.width+"px",this.dom.el.style.height=t.posOut.height+"px",this.dom.el.style.marginRight=t.posOut.marginRight+"px",this.dom.el.style.marginBottom=t.posOut.marginBottom+"px"),this.mixer.config.animation.nudge||"hide"!==t.statusChange||s.push("translate("+t.posOut.x+"px, "+t.posOut.y+"px)"),t.statusChange){case"hide":o&&(this.dom.el.style.opacity=this.mixer.effectsOut.opacity),s=s.concat(this.mixer.transformOut);break;case"show":o&&(this.dom.el.style.opacity=1)}(this.mixer.config.animation.nudge||!this.mixer.config.animation.nudge&&"hide"!==t.statusChange)&&s.push("translate("+t.posOut.x+"px, "+t.posOut.y+"px)"),this.dom.el.style[e.features.transformProp]=s.join(" "),this.callActions("afterApplyStylesOut",arguments)},writeTransitionRule:function(t,e,i){var s=this.getDelay(e),n="";return n=t+" "+(i>0?i:this.mixer.config.animation.duration)+"ms "+s+"ms "+("opacity"===t?"linear":this.mixer.config.animation.easing),this.callFilters("ruleWriteTransitionRule",n,arguments)},getDelay:function(t){var e=-1;return"function"==typeof this.mixer.config.animation.staggerSequence&&(t=this.mixer.config.animation.staggerSequence.call(this,t,this.state)),e=this.mixer.staggerDuration?t*this.mixer.staggerDuration:0,this.callFilters("delayGetDelay",e,arguments)},applyTransition:function(t){var i=t.join(", ");this.callActions("beforeApplyTransition",arguments),this.dom.el.style[e.features.transitionProp]=i,this.callActions("afterApplyTransition",arguments)},handleTransitionEnd:function(t){var e=t.propertyName,i=this.mixer.config.animation.animateResizeTargets;this.callActions("beforeHandleTransitionEnd",arguments),this.isBound&&t.target.matches(this.mixer.config.selectors.target)&&(e.indexOf("transform")>-1||e.indexOf("opacity")>-1||i&&e.indexOf("height")>-1||i&&e.indexOf("width")>-1||i&&e.indexOf("margin")>-1)&&(this.callback.call(this,this.operation),this.isBound=!1,this.callback=null,this.operation=null),this.callActions("afterHandleTransitionEnd",arguments)},eventBus:function(t){switch(this.callActions("beforeEventBus",arguments),t.type){case"webkitTransitionEnd":case"transitionend":this.handleTransitionEnd(t)}this.callActions("afterEventBus",arguments)},unbindEvents:function(){this.callActions("beforeUnbindEvents",arguments),i.off(this.dom.el,"webkitTransitionEnd",this.handler),i.off(this.dom.el,"transitionend",this.handler),this.callActions("afterUnbindEvents",arguments)},bindEvents:function(){var t=this,s="";t.callActions("beforeBindEvents",arguments),s="webkit"===e.features.transitionPrefix?"webkitTransitionEnd":"transitionend",t.handler=function(e){return t.eventBus(e)},i.on(t.dom.el,s,t.handler),t.callActions("afterBindEvents",arguments)},getPosData:function(i){var s={},n=null,o=new e.StyleData;return this.callActions("beforeGetPosData",arguments),o.x=this.dom.el.offsetLeft,o.y=this.dom.el.offsetTop,(this.mixer.config.animation.animateResizeTargets||i)&&(n=this.dom.el.getBoundingClientRect(),o.top=n.top,o.right=n.right,o.bottom=n.bottom,o.left=n.left,o.width=n.width,o.height=n.height),this.mixer.config.animation.animateResizeTargets&&(s=t.getComputedStyle(this.dom.el),o.marginBottom=parseFloat(s.marginBottom),o.marginRight=parseFloat(s.marginRight)),this.callFilters("posDataGetPosData",o,arguments)},cleanUp:function(){this.callActions("beforeCleanUp",arguments),this.dom.el.style[e.features.transformProp]="",this.dom.el.style[e.features.transitionProp]="",this.dom.el.style.opacity="",this.mixer.config.animation.animateResizeTargets&&(this.dom.el.style.width="",this.dom.el.style.height="",this.dom.el.style.marginRight="",this.dom.el.style.marginBottom=""),this.callActions("afterCleanUp",arguments)}}),e.Collection=function(t){var e=null,s=-1;for(this.callActions("beforeConstruct"),s=0;e=t[s];s++)this[s]=e;this.length=t.length,this.callActions("afterConstruct"),i.freeze(this)},e.BaseStatic.call(e.Collection),e.Collection.prototype=Object.create(e.Base.prototype),i.extend(e.Collection.prototype,{constructor:e.Collection,mixitup:function(t){var s=null,n=Array.prototype.slice.call(arguments),o=[],r=-1;for(this.callActions("beforeMixitup"),n.shift(),r=0;s=this[r];r++)o.push(s[t].apply(s,n));return this.callFilters("promiseMixitup",i.all(o,e.libraries),arguments)}}),e.Operation=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.id="",this.args=[],this.command=null,this.showPosData=[],this.toHidePosData=[],this.startState=null,this.newState=null,this.docState=null,this.willSort=!1,this.willChangeLayout=!1,this.hasEffect=!1,this.hasFailed=!1,this.triggerElement=null,this.show=[],this.hide=[],this.matching=[],this.toShow=[],this.toHide=[],this.toMove=[],this.toRemove=[],this.startOrder=[],this.newOrder=[],this.startSort=null,this.newSort=null,this.startFilter=null,this.newFilter=null,this.startDataset=null,this.newDataset=null,this.viewportDeltaX=0,this.viewportDeltaY=0,this.startX=0,this.startY=0,this.startHeight=0,this.startWidth=0,this.newX=0,this.newY=0,this.newHeight=0,this.newWidth=0,this.startContainerClassName="",this.startDisplay="",this.newContainerClassName="",this.newDisplay="",this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.Operation),e.Operation.prototype=Object.create(e.Base.prototype),e.Operation.prototype.constructor=e.Operation,e.State=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.id="",this.activeFilter=null,this.activeSort=null,this.activeContainerClassName="",this.container=null,this.targets=[],this.hide=[],this.show=[],this.matching=[],this.totalTargets=-1,this.totalShow=-1,this.totalHide=-1,this.totalMatching=-1,this.hasFailed=!1,this.triggerElement=null,this.activeDataset=null,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.State),e.State.prototype=Object.create(e.Base.prototype),e.State.prototype.constructor=e.State,e.UserInstruction=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.command={},this.animate=!1,this.callback=null,this.callActions("afterConstruct"),i.seal(this)},e.BaseStatic.call(e.UserInstruction),e.UserInstruction.prototype=Object.create(e.Base.prototype),e.UserInstruction.prototype.constructor=e.UserInstruction,e.Messages=function(){e.Base.call(this),this.callActions("beforeConstruct"),this.ERROR_FACTORY_INVALID_CONTAINER="[MixItUp] An invalid selector or element reference was passed to the mixitup factory function",this.ERROR_FACTORY_CONTAINER_NOT_FOUND="[MixItUp] The provided selector yielded no container element",this.ERROR_CONFIG_INVALID_ANIMATION_EFFECTS="[MixItUp] Invalid value for `animation.effects`",this.ERROR_CONFIG_INVALID_CONTROLS_SCOPE="[MixItUp] Invalid value for `controls.scope`",this.ERROR_CONFIG_INVALID_PROPERTY='[MixitUp] Invalid configuration object property "${erroneous}"${suggestion}',this.ERROR_CONFIG_INVALID_PROPERTY_SUGGESTION='. Did you mean "${probableMatch}"?',this.ERROR_CONFIG_DATA_UID_KEY_NOT_SET="[MixItUp] To use the dataset API, a UID key must be specified using `data.uidKey`",this.ERROR_DATASET_INVALID_UID_KEY='[MixItUp] The specified UID key "${uidKey}" is not present on one or more dataset items',this.ERROR_DATASET_DUPLICATE_UID='[MixItUp] The UID "${uid}" was found on two or more dataset items. UIDs must be unique.',this.ERROR_INSERT_INVALID_ARGUMENTS="[MixItUp] Please provider either an index or a sibling and position to insert, not both",this.ERROR_INSERT_PREEXISTING_ELEMENT="[MixItUp] An element to be inserted already exists in the container",this.ERROR_FILTER_INVALID_ARGUMENTS="[MixItUp] Please provide either a selector or collection `.filter()`, not both",this.ERROR_DATASET_NOT_SET="[MixItUp] To use the dataset API with pre-rendered targets, a starting dataset must be set using `load.dataset`",this.ERROR_DATASET_PRERENDERED_MISMATCH="[MixItUp] `load.dataset` does not match pre-rendered targets",this.ERROR_DATASET_RENDERER_NOT_SET="[MixItUp] To insert an element via the dataset API, a target renderer function must be provided to `render.target`",this.WARNING_FACTORY_PREEXISTING_INSTANCE="[MixItUp] WARNING: This element already has an active MixItUp instance. The provided configuration object will be ignored. If you wish to perform additional methods on this instance, please create a reference.",this.WARNING_INSERT_NO_ELEMENTS="[MixItUp] WARNING: No valid elements were passed to `.insert()`",this.WARNING_REMOVE_NO_ELEMENTS="[MixItUp] WARNING: No valid elements were passed to `.remove()`",this.WARNING_MULTIMIX_INSTANCE_QUEUE_FULL="[MixItUp] WARNING: An operation was requested but the MixItUp instance was busy. The operation was rejected because the queue is full or queuing is disabled.",this.WARNING_GET_OPERATION_INSTANCE_BUSY="[MixItUp] WARNING: Operations can be be created while the MixItUp instance is busy.",this.WARNING_NO_PROMISE_IMPLEMENTATION="[MixItUp] WARNING: No Promise implementations could be found. If you wish to use promises with MixItUp please install an ES6 Promise polyfill.",this.WARNING_INCONSISTENT_SORTING_ATTRIBUTES='[MixItUp] WARNING: The requested sorting data attribute "${attribute}" was not present on one or more target elements which may product unexpected sort output',this.callActions("afterConstruct"),this.compileTemplates(),i.seal(this)},e.BaseStatic.call(e.Messages),e.Messages.prototype=Object.create(e.Base.prototype),e.Messages.prototype.constructor=e.Messages,e.Messages.prototype.compileTemplates=function(){var t="",e="";for(t in this)"string"==typeof(e=this[t])&&(this[i.camelCase(t)]=i.template(e))},e.messages=new e.Messages,e.Facade=function(t){e.Base.call(this),this.callActions("beforeConstruct",arguments),this.configure=t.configure.bind(t),this.show=t.show.bind(t),this.hide=t.hide.bind(t),this.filter=t.filter.bind(t),this.toggleOn=t.toggleOn.bind(t),this.toggleOff=t.toggleOff.bind(t),this.sort=t.sort.bind(t),this.changeLayout=t.changeLayout.bind(t),this.multimix=t.multimix.bind(t),this.dataset=t.dataset.bind(t),this.tween=t.tween.bind(t),this.insert=t.insert.bind(t),this.insertBefore=t.insertBefore.bind(t),this.insertAfter=t.insertAfter.bind(t),this.prepend=t.prepend.bind(t),this.append=t.append.bind(t),this.remove=t.remove.bind(t),this.destroy=t.destroy.bind(t),this.forceRefresh=t.forceRefresh.bind(t),this.forceRender=t.forceRender.bind(t),this.isMixing=t.isMixing.bind(t),this.getOperation=t.getOperation.bind(t),this.getConfig=t.getConfig.bind(t),this.getState=t.getState.bind(t),this.callActions("afterConstruct",arguments),i.freeze(this),i.seal(this)},e.BaseStatic.call(e.Facade),e.Facade.prototype=Object.create(e.Base.prototype),e.Facade.prototype.constructor=e.Facade,"object"==typeof exports&&"object"==typeof module?module.exports=e:"function"==typeof define&&define.amd?define(function(){return e}):void 0!==t.mixitup&&"function"==typeof t.mixitup||(t.mixitup=e),e.BaseStatic.call(e.constructor),e.NAME="mixitup",e.CORE_VERSION="3.3.0"}(window),function(){var t;t=function(){function t(t,e){var i,s;if(this.options={target:"instafeed",get:"popular",resolution:"thumbnail",sortBy:"none",links:!0,mock:!1,useHttp:!1},"object"==typeof t)for(i in t)s=t[i],this.options[i]=s;this.context=null!=e?e:this,this.unique=this._genKey()}return t.prototype.hasNext=function(){return"string"==typeof this.context.nextUrl&&this.context.nextUrl.length>0},t.prototype.next=function(){return!!this.hasNext()&&this.run(this.context.nextUrl)},t.prototype.run=function(e){var i,s;if("string"!=typeof this.options.clientId&&"string"!=typeof this.options.accessToken)throw new Error("Missing clientId or accessToken.");if("string"!=typeof this.options.accessToken&&"string"!=typeof this.options.clientId)throw new Error("Missing clientId or accessToken.");return null!=this.options.before&&"function"==typeof this.options.before&&this.options.before.call(this),"undefined"!=typeof document&&null!==document&&((s=document.createElement("script")).id="instafeed-fetcher",s.src=e||this._buildUrl(),document.getElementsByTagName("head")[0].appendChild(s),i="instafeedCache"+this.unique,window[i]=new t(this.options,this),window[i].unique=this.unique),!0},t.prototype.parse=function(t){var e,i,s,n,o,r,a,l,c,h,u,d,f,p,m,g,v,y,b,_,w,x,C,S,I,T,A,E;if("object"!=typeof t){if(null!=this.options.error&&"function"==typeof this.options.error)return this.options.error.call(this,"Invalid JSON data"),!1;throw new Error("Invalid JSON response")}if(200!==t.meta.code){if(null!=this.options.error&&"function"==typeof this.options.error)return this.options.error.call(this,t.meta.error_message),!1;throw new Error("Error from Instagram: "+t.meta.error_message)}if(0===t.data.length){if(null!=this.options.error&&"function"==typeof this.options.error)return this.options.error.call(this,"No images were returned from Instagram"),!1;throw new Error("No images were returned from Instagram")}if(null!=this.options.success&&"function"==typeof this.options.success&&this.options.success.call(this,t),this.context.nextUrl="",null!=t.pagination&&(this.context.nextUrl=t.pagination.next_url),"none"!==this.options.sortBy)switch(T="random"===this.options.sortBy?["","random"]:this.options.sortBy.split("-"),I="least"===T[0],T[1]){case"random":t.data.sort(function(){return.5-Math.random()});break;case"recent":t.data=this._sortBy(t.data,"created_time",I);break;case"liked":t.data=this._sortBy(t.data,"likes.count",I);break;case"commented":t.data=this._sortBy(t.data,"comments.count",I);break;default:throw new Error("Invalid option for sortBy: '"+this.options.sortBy+"'.")}if("undefined"!=typeof document&&null!==document&&!1===this.options.mock){if(d=t.data,S=parseInt(this.options.limit,10),null!=this.options.limit&&d.length>S&&(d=d.slice(0,S)),r=document.createDocumentFragment(),null!=this.options.filter&&"function"==typeof this.options.filter&&(d=this._filter(d,this.options.filter)),null!=this.options.template&&"string"==typeof this.options.template){for(a="","","",E=document.createElement("div"),l=0,_=d.length;l<_;l++){if(c=d[l],"object"!=typeof(h=c.images[this.options.resolution]))throw o="No image found for resolution: "+this.options.resolution+".",new Error(o);m="square",(g=h.width)>(p=h.height)&&(m="landscape"),g<p&&(m="portrait"),u=h.url,window.location.protocol.indexOf("http")>=0&&!this.options.useHttp&&(u=u.replace(/https?:\/\//,"//")),a+=this._makeTemplate(this.options.template,{model:c,id:c.id,link:c.link,type:c.type,image:u,width:g,height:p,orientation:m,caption:this._getObjectProperty(c,"caption.text"),likes:c.likes.count,comments:c.comments.count,location:this._getObjectProperty(c,"location.name")})}for(E.innerHTML=a,n=[],s=0,i=E.childNodes.length;s<i;)n.push(E.childNodes[s]),s+=1;for(y=0,w=n.length;y<w;y++)C=n[y],r.appendChild(C)}else for(b=0,x=d.length;b<x;b++){if(c=d[b],f=document.createElement("img"),"object"!=typeof(h=c.images[this.options.resolution]))throw o="No image found for resolution: "+this.options.resolution+".",new Error(o);u=h.url,window.location.protocol.indexOf("http")>=0&&!this.options.useHttp&&(u=u.replace(/https?:\/\//,"//")),f.src=u,!0===this.options.links?((e=document.createElement("a")).href=c.link,e.appendChild(f),r.appendChild(e)):r.appendChild(f)}if("string"==typeof(A=this.options.target)&&(A=document.getElementById(A)),null==A)throw o='No element with id="'+this.options.target+'" on page.',new Error(o);A.appendChild(r),document.getElementsByTagName("head")[0].removeChild(document.getElementById("instafeed-fetcher")),v="instafeedCache"+this.unique,window[v]=void 0;try{delete window[v]}catch(t){t}}return null!=this.options.after&&"function"==typeof this.options.after&&this.options.after.call(this),!0},t.prototype._buildUrl=function(){var t,e,i;switch(t="https://api.instagram.com/v1",this.options.get){case"popular":e="media/popular";break;case"tagged":if(!this.options.tagName)throw new Error("No tag name specified. Use the 'tagName' option.");e="tags/"+this.options.tagName+"/media/recent";break;case"location":if(!this.options.locationId)throw new Error("No location specified. Use the 'locationId' option.");e="locations/"+this.options.locationId+"/media/recent";break;case"user":if(!this.options.userId)throw new Error("No user specified. Use the 'userId' option.");e="users/"+this.options.userId+"/media/recent";break;default:throw new Error("Invalid option for get: '"+this.options.get+"'.")}return i=t+"/"+e,null!=this.options.accessToken?i+="?access_token="+this.options.accessToken:i+="?client_id="+this.options.clientId,null!=this.options.limit&&(i+="&count="+this.options.limit),i+="&callback=instafeedCache"+this.unique+".parse"},t.prototype._genKey=function(){var t;return""+(t=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)})()+t()+t()+t()},t.prototype._makeTemplate=function(t,e){var i,s,n,o,r;for(s=/(?:\{{2})([\w\[\]\.]+)(?:\}{2})/,i=t;s.test(i);)o=i.match(s)[1],r=null!=(n=this._getObjectProperty(e,o))?n:"",i=i.replace(s,function(){return""+r});return i},t.prototype._getObjectProperty=function(t,e){var i,s;for(s=(e=e.replace(/\[(\w+)\]/g,".$1")).split(".");s.length;){if(i=s.shift(),!(null!=t&&i in t))return null;t=t[i]}return t},t.prototype._sortBy=function(t,e,i){var s;return s=function(t,s){var n,o;return n=this._getObjectProperty(t,e),o=this._getObjectProperty(s,e),i?n>o?1:-1:n<o?1:-1},t.sort(s.bind(this)),t},t.prototype._filter=function(t,e){var i,s,n,o;for(i=[],s=function(t){if(e(t))return i.push(t)},n=0,o=t.length;n<o;n++)s(t[n]);return i},t}(),function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():t.Instafeed=e()}(this,function(){return t})}.call(this),function(t){t.fn.jflickrfeed=function(e,i){var s,n=(e=t.extend(!0,{flickrbase:"https://api.flickr.com/services/feeds/",feedapi:"photos_public.gne",limit:20,qstrings:{lang:"en-us",format:"json",jsoncallback:"?"},cleanDescription:!0,useTemplate:!0,itemTemplate:"",itemCallback:function(){}},e)).flickrbase+e.feedapi+"?",o=!0;for(s in e.qstrings)o||(n+="&"),n+=s+"="+e.qstrings[s],o=!1;return t(this).each(function(){var s=t(this),o=this;t.getJSON(n,function(n){t.each(n.items,function(t,i){var n,r,a,l;if(t<e.limit){if(e.cleanDescription&&(n=/<p>(.*?)<\/p>/g,r=i.description,n.test(r)&&(i.description=r.match(n)[2],void 0!==i.description&&(i.description=i.description.replace("<p>","").replace("</p>","")))),i.image_s=i.media.m.replace("_m","_s"),i.image_t=i.media.m.replace("_m","_t"),i.image_m=i.media.m.replace("_m","_m"),i.image=i.media.m.replace("_m",""),i.image_b=i.media.m.replace("_m","_b"),i.image_q=i.media.m.replace("_m","_q"),delete i.media,e.useTemplate){l=e.itemTemplate;for(a in i)n=new RegExp("{{"+a+"}}","g"),l=l.replace(n,i[a]);s.append(l)}e.itemCallback.call(o,i)}}),t.isFunction(i)&&i.call(o,n)})})}}(jQuery),function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():e()}(0,function(){function t(t){return t.replace(/<b[^>]*>(.*?)<\/b>/gi,function(t,e){return e}).replace(/class="(?!(tco-hidden|tco-display|tco-ellipsis))+.*?"|data-query-source=".*?"|dir=".*?"|rel=".*?"/gi,"")}function e(t){for(var e=t.getElementsByTagName("a"),i=e.length-1;i>=0;i--)e[i].setAttribute("target","_blank"),e[i].setAttribute("rel","noopener")}function i(t,e){for(var i=[],s=new RegExp("(^| )"+e+"( |$)"),n=t.getElementsByTagName("*"),o=0,r=n.length;o<r;o++)s.test(n[o].className)&&i.push(n[o]);return i}function s(t){if(void 0!==t&&t.innerHTML.indexOf("data-image")>=0){for(var e=t.innerHTML.match(/data-image=\"([A-z0-9]+:\/\/[A-z0-9]+\.[A-z0-9]+\.[A-z0-9]+\/[A-z0-9]+\/[A-z0-9\-]+)\"/gi),i=0;i<e.length;i++)e[i]=e[i].match(/data-image=\"([A-z0-9]+:\/\/[A-z0-9]+\.[A-z0-9]+\.[A-z0-9]+\/[A-z0-9]+\/[A-z0-9\-]+)\"/i)[1],e[i]=decodeURIComponent(e[i])+".jpg";return e}}var n="",o=20,r=!0,a=[],l=!1,c=!0,h=!0,u=null,d=!0,f=!0,p=null,m=!0,g=!1,v=!1,y=!0,b=!0,_=!1,w=null,x={fetch:function(t){if(void 0===t.maxTweets&&(t.maxTweets=20),void 0===t.enableLinks&&(t.enableLinks=!0),void 0===t.showUser&&(t.showUser=!0),void 0===t.showTime&&(t.showTime=!0),void 0===t.dateFunction&&(t.dateFunction="default"),void 0===t.showRetweet&&(t.showRetweet=!0),void 0===t.customCallback&&(t.customCallback=null),void 0===t.showInteraction&&(t.showInteraction=!0),void 0===t.showImages&&(t.showImages=!1),void 0===t.useEmoji&&(t.useEmoji=!1),void 0===t.linksInNewWindow&&(t.linksInNewWindow=!0),void 0===t.showPermalinks&&(t.showPermalinks=!0),void 0===t.dataOnly&&(t.dataOnly=!1),l)a.push(t);else{l=!0,n=t.domId,o=t.maxTweets,r=t.enableLinks,h=t.showUser,c=t.showTime,f=t.showRetweet,u=t.dateFunction,p=t.customCallback,m=t.showInteraction,g=t.showImages,v=t.useEmoji,y=t.linksInNewWindow,b=t.showPermalinks,_=t.dataOnly;var e=document.getElementsByTagName("head")[0];null!==w&&e.removeChild(w),(w=document.createElement("script")).type="text/javascript",void 0!==t.list?w.src="https://syndication.twitter.com/timeline/list?callback=__twttrf.callback&dnt=false&list_slug="+t.list.listSlug+"&screen_name="+t.list.screenName+"&suppress_response_codes=true&lang="+(t.lang||"en")+"&rnd="+Math.random():void 0!==t.profile?w.src="https://syndication.twitter.com/timeline/profile?callback=__twttrf.callback&dnt=false&screen_name="+t.profile.screenName+"&suppress_response_codes=true&lang="+(t.lang||"en")+"&rnd="+Math.random():void 0!==t.likes?w.src="https://syndication.twitter.com/timeline/likes?callback=__twttrf.callback&dnt=false&screen_name="+t.likes.screenName+"&suppress_response_codes=true&lang="+(t.lang||"en")+"&rnd="+Math.random():w.src="https://cdn.syndication.twimg.com/widgets/timelines/"+t.id+"?&lang="+(t.lang||"en")+"&callback=__twttrf.callback&suppress_response_codes=true&rnd="+Math.random(),e.appendChild(w)}},callback:function(w){function C(t){var e=t.getElementsByTagName("img")[0];if(e)e.src=e.getAttribute("data-src-2x");else{var i=t.getElementsByTagName("a")[0].getAttribute("href").split("twitter.com/")[1],s=document.createElement("img");s.setAttribute("src","https://twitter.com/"+i+"/profile_image?size=bigger"),t.prepend(s)}return t}if(void 0===w||void 0===w.body)return l=!1,void(a.length>0&&(x.fetch(a[0]),a.splice(0,1)));v||(w.body=w.body.replace(/(<img[^c]*class="Emoji[^>]*>)|(<img[^c]*class="u-block[^>]*>)/g,"")),g||(w.body=w.body.replace(/(<img[^c]*class="NaturalImage-image[^>]*>|(<img[^c]*class="CroppedImage-image[^>]*>))/g,"")),h||(w.body=w.body.replace(/(<img[^c]*class="Avatar"[^>]*>)/g,""));var S=document.createElement("div");S.innerHTML=w.body,void 0===S.getElementsByClassName&&(d=!1);var I=[],T=[],A=[],E=[],k=[],O=[],P=[],D=0;if(d)for(M=S.getElementsByClassName("timeline-Tweet");D<M.length;)M[D].getElementsByClassName("timeline-Tweet-retweetCredit").length>0?k.push(!0):k.push(!1),(!k[D]||k[D]&&f)&&(I.push(M[D].getElementsByClassName("timeline-Tweet-text")[0]),O.push(M[D].getAttribute("data-tweet-id")),h&&T.push(C(M[D].getElementsByClassName("timeline-Tweet-author")[0])),A.push(M[D].getElementsByClassName("dt-updated")[0]),P.push(M[D].getElementsByClassName("timeline-Tweet-timestamp")[0]),void 0!==M[D].getElementsByClassName("timeline-Tweet-media")[0]?E.push(M[D].getElementsByClassName("timeline-Tweet-media")[0]):E.push(void 0)),D++;else for(var M=i(S,"timeline-Tweet");D<M.length;)i(M[D],"timeline-Tweet-retweetCredit").length>0?k.push(!0):k.push(!1),(!k[D]||k[D]&&f)&&(I.push(i(M[D],"timeline-Tweet-text")[0]),O.push(M[D].getAttribute("data-tweet-id")),h&&T.push(C(i(M[D],"timeline-Tweet-author")[0])),A.push(i(M[D],"dt-updated")[0]),P.push(i(M[D],"timeline-Tweet-timestamp")[0]),void 0!==i(M[D],"timeline-Tweet-media")[0]?E.push(i(M[D],"timeline-Tweet-media")[0]):E.push(void 0)),D++;I.length>o&&(I.splice(o,I.length-o),T.splice(o,T.length-o),A.splice(o,A.length-o),k.splice(o,k.length-o),E.splice(o,E.length-o),P.splice(o,P.length-o));var z=[],D=I.length,N=0;if(_)for(;N<D;)z.push({tweet:I[N].innerHTML,author:T[N]?T[N].innerHTML:"Unknown Author",author_data:{profile_url:T[N]?T[N].querySelector('[data-scribe="element:user_link"]').href:null,profile_image:T[N]?"https://twitter.com/"+T[N].querySelector('[data-scribe="element:screen_name"]').title.split("@")[1]+"/profile_image?size=bigger":null,profile_image_2x:T[N]?"https://twitter.com/"+T[N].querySelector('[data-scribe="element:screen_name"]').title.split("@")[1]+"/profile_image?size=original":null,screen_name:T[N]?T[N].querySelector('[data-scribe="element:screen_name"]').title:null,name:T[N]?T[N].querySelector('[data-scribe="element:name"]').title:null},time:A[N].textContent,timestamp:A[N].getAttribute("datetime").replace("+0000","Z").replace(/([\+\-])(\d\d)(\d\d)/,"$1$2:$3"),image:s(E[N])?s(E[N])[0]:void 0,images:s(E[N]),rt:k[N],tid:O[N],permalinkURL:void 0===P[N]?"":P[N].href}),N++;else for(;N<D;){if("string"!=typeof u){var L=A[N].getAttribute("datetime"),R=new Date(A[N].getAttribute("datetime").replace(/-/g,"/").replace("T"," ").split("+")[0]),F=u(R,L);if(A[N].setAttribute("aria-label",F),I[N].textContent)if(d)A[N].textContent=F;else{var B=document.createElement("p"),$=document.createTextNode(F);B.appendChild($),B.setAttribute("aria-label",F),A[N]=B}else A[N].textContent=F}var j="";if(r?(y&&(e(I[N]),h&&e(T[N])),h&&(j+='<div class="user">'+t(T[N].innerHTML)+"</div>"),j+='<p class="tweet">'+t(I[N].innerHTML)+"</p>",c&&(j+=b?'<p class="timePosted"><a href="'+P[N]+'">'+A[N].getAttribute("aria-label")+"</a></p>":'<p class="timePosted">'+A[N].getAttribute("aria-label")+"</p>")):(I[N].textContent,h&&(j+='<p class="user">'+T[N].textContent+"</p>"),j+='<p class="tweet">'+I[N].textContent+"</p>",c&&(j+='<p class="timePosted">'+A[N].textContent+"</p>")),m&&(j+='<p class="interact"><a href="https://twitter.com/intent/tweet?in_reply_to='+O[N]+'" class="twitter_reply_icon"'+(y?' target="_blank" rel="noopener">':">")+'Reply</a><a href="https://twitter.com/intent/retweet?tweet_id='+O[N]+'" class="twitter_retweet_icon"'+(y?' target="_blank" rel="noopener">':">")+'Retweet</a><a href="https://twitter.com/intent/favorite?tweet_id='+O[N]+'" class="twitter_fav_icon"'+(y?' target="_blank" rel="noopener">':">")+"Favorite</a></p>"),g&&void 0!==E[N]&&void 0!==s(E[N]))for(var H=s(E[N]),q=0;q<H.length;q++)j+='<div class="media"><img src="'+H[q]+'" alt="Image from tweet" /></div>';g?z.push(j):!g&&I[N].textContent.length&&z.push(j),N++}!function(t){if(null===p){for(var e=t.length,i=0,s=document.getElementById(n),o="<ul>";i<e;)o+="<li>"+t[i]+"</li>",i++;o+="</ul>",s.innerHTML=o}else p(t)}(z),l=!1,a.length>0&&(x.fetch(a[0]),a.splice(0,1))}};return window.__twttrf=x,window.twitterFetcher=x,x}),[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach(function(t){t.hasOwnProperty("prepend")||Object.defineProperty(t,"prepend",{configurable:!0,enumerable:!0,writable:!0,value:function(){var t=Array.prototype.slice.call(arguments),e=document.createDocumentFragment();t.forEach(function(t){var i=t instanceof Node;e.appendChild(i?t:document.createTextNode(String(t)))}),this.insertBefore(e,this.firstChild)}})}),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){"use strict";function e(t){var e=t.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(e)}function i(t){return function(i){var s=i.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(s)for(var n=0,o=s.length;n<o;++n){var a=s[n].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),l=e(a[0]),c=a[1]||"",h=a[3]||"",u=null;a=a[2],r.hasOwnProperty(a)&&(u=r[a],u=Number(t[u])),null!==u&&("!"===c&&(u=function(t,e){var i="s",s="";t&&(1===(t=t.replace(/(:|;|\s)/gi,"").split(/\,/)).length?i=t[0]:(s=t[0],i=t[1]));return Math.abs(e)>1?i:s}(h,u)),""===c&&u<10&&(u="0"+u.toString()),i=i.replace(l,u.toString()))}return i=i.replace(/%%/,"%")}}var s=[],n=[],o={precision:100,elapse:!1,defer:!1};n.push(/^[0-9]*$/.source),n.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),n.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),n=new RegExp(n.join("|"));var r={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"},a=function(e,i,n){this.el=e,this.$el=t(e),this.interval=null,this.offset={},this.options=t.extend({},o),this.instanceNumber=s.length,s.push(this),this.$el.data("countdown-instance",this.instanceNumber),n&&("function"==typeof n?(this.$el.on("update.countdown",n),this.$el.on("stoped.countdown",n),this.$el.on("finish.countdown",n)):this.options=t.extend({},o,n)),this.setFinalDate(i),!1===this.options.defer&&this.start()};t.extend(a.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var t=this;this.update(),this.interval=setInterval(function(){t.update.call(t)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),s[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(t){this.finalDate=function(t){if(t instanceof Date)return t;if(String(t).match(n))return String(t).match(/^[0-9]*$/)&&(t=Number(t)),String(t).match(/\-/)&&(t=String(t).replace(/\-/g,"/")),new Date(t);throw new Error("Couldn't cast `"+t+"` to a date object.")}(t)},update:function(){if(0!==this.$el.closest("html").length){var e,i=void 0!==t._data(this.el,"events"),s=new Date;e=this.finalDate.getTime()-s.getTime(),e=Math.ceil(e/1e3),e=!this.options.elapse&&e<0?0:Math.abs(e),this.totalSecsLeft!==e&&i&&(this.totalSecsLeft=e,this.elapsed=s>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-s.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))}else this.remove()},dispatchEvent:function(e){var s=t.Event(e+".countdown");s.finalDate=this.finalDate,s.elapsed=this.elapsed,s.offset=t.extend({},this.offset),s.strftime=i(this.offset),this.$el.trigger(s)}}),t.fn.countdown=function(){var e=Array.prototype.slice.call(arguments,0);return this.each(function(){var i=t(this).data("countdown-instance");if(void 0!==i){var n=s[i],o=e[0];a.prototype.hasOwnProperty(o)?n[o].apply(n,e.slice(1)):null===String(o).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(n.setFinalDate.call(n,o),n.start()):t.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,o))}else new a(this,e[0],e[1])})}}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(t){var e,i,s,n,o,r,a="mfp-ready",l="mfp-prevent-close",c=function(){},h=!!window.jQuery,u=t(window),d=function(t,i){e.ev.on("mfp"+t+".mfp",i)},f=function(e,i,s,n){var o=document.createElement("div");return o.className="mfp-"+e,s&&(o.innerHTML=s),n?i&&i.appendChild(o):(o=t(o),i&&o.appendTo(i)),o},p=function(i,s){e.ev.triggerHandler("mfp"+i,s),e.st.callbacks&&(i=i.charAt(0).toLowerCase()+i.slice(1),e.st.callbacks[i]&&e.st.callbacks[i].apply(e,t.isArray(s)?s:[s]))},m=function(i){return i===r&&e.currTemplate.closeBtn||(e.currTemplate.closeBtn=t(e.st.closeMarkup.replace("%title%",e.st.tClose)),r=i),e.currTemplate.closeBtn},g=function(){t.magnificPopup.instance||((e=new c).init(),t.magnificPopup.instance=e)};c.prototype={constructor:c,init:function(){var i=navigator.appVersion;e.isLowIE=e.isIE8=document.all&&!document.addEventListener,e.isAndroid=/android/gi.test(i),e.isIOS=/iphone|ipad|ipod/gi.test(i),e.supportsTransition=function(){var t=document.createElement("p").style,e=["ms","O","Moz","Webkit"];if(void 0!==t.transition)return!0;for(;e.length;)if(e.pop()+"Transition"in t)return!0;return!1}(),e.probablyMobile=e.isAndroid||e.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),s=t(document),e.popupsCache={}},open:function(i){var n;if(!1===i.isObj){e.items=i.items.toArray(),e.index=0;var r,l=i.items;for(n=0;n<l.length;n++)if((r=l[n]).parsed&&(r=r.el[0]),r===i.el[0]){e.index=n;break}}else e.items=t.isArray(i.items)?i.items:[i.items],e.index=i.index||0;{if(!e.isOpen){e.types=[],o="",i.mainEl&&i.mainEl.length?e.ev=i.mainEl.eq(0):e.ev=s,i.key?(e.popupsCache[i.key]||(e.popupsCache[i.key]={}),e.currTemplate=e.popupsCache[i.key]):e.currTemplate={},e.st=t.extend(!0,{},t.magnificPopup.defaults,i),e.fixedContentPos="auto"===e.st.fixedContentPos?!e.probablyMobile:e.st.fixedContentPos,e.st.modal&&(e.st.closeOnContentClick=!1,e.st.closeOnBgClick=!1,e.st.showCloseBtn=!1,e.st.enableEscapeKey=!1),e.bgOverlay||(e.bgOverlay=f("bg").on("click.mfp",function(){e.close()}),e.wrap=f("wrap").attr("tabindex",-1).on("click.mfp",function(t){e._checkIfClose(t.target)&&e.close()}),e.container=f("container",e.wrap)),e.contentContainer=f("content"),e.st.preloader&&(e.preloader=f("preloader",e.container,e.st.tLoading));var c=t.magnificPopup.modules;for(n=0;n<c.length;n++){var h=c[n];h=h.charAt(0).toUpperCase()+h.slice(1),e["init"+h].call(e)}p("BeforeOpen"),e.st.showCloseBtn&&(e.st.closeBtnInside?(d("MarkupParse",function(t,e,i,s){i.close_replaceWith=m(s.type)}),o+=" mfp-close-btn-in"):e.wrap.append(m())),e.st.alignTop&&(o+=" mfp-align-top"),e.fixedContentPos?e.wrap.css({overflow:e.st.overflowY,overflowX:"hidden",overflowY:e.st.overflowY}):e.wrap.css({top:u.scrollTop(),position:"absolute"}),(!1===e.st.fixedBgPos||"auto"===e.st.fixedBgPos&&!e.fixedContentPos)&&e.bgOverlay.css({height:s.height(),position:"absolute"}),e.st.enableEscapeKey&&s.on("keyup.mfp",function(t){27===t.keyCode&&e.close()}),u.on("resize.mfp",function(){e.updateSize()}),e.st.closeOnContentClick||(o+=" mfp-auto-cursor"),o&&e.wrap.addClass(o);var g=e.wH=u.height(),v={};if(e.fixedContentPos&&e._hasScrollBar(g)){var y=e._getScrollbarSize();y&&(v.marginRight=y)}e.fixedContentPos&&(e.isIE7?t("body, html").css("overflow","hidden"):v.overflow="hidden");var b=e.st.mainClass;return e.isIE7&&(b+=" mfp-ie7"),b&&e._addClassToMFP(b),e.updateItemHTML(),p("BuildControls"),t("html").css(v),e.bgOverlay.add(e.wrap).prependTo(e.st.prependTo||t(document.body)),e._lastFocusedEl=document.activeElement,setTimeout(function(){e.content?(e._addClassToMFP(a),e._setFocus()):e.bgOverlay.addClass(a),s.on("focusin.mfp",e._onFocusIn)},16),e.isOpen=!0,e.updateSize(g),p("Open"),i}e.updateItemHTML()}},close:function(){e.isOpen&&(p("BeforeClose"),e.isOpen=!1,e.st.removalDelay&&!e.isLowIE&&e.supportsTransition?(e._addClassToMFP("mfp-removing"),setTimeout(function(){e._close()},e.st.removalDelay)):e._close())},_close:function(){p("Close");var i="mfp-removing mfp-ready ";if(e.bgOverlay.detach(),e.wrap.detach(),e.container.empty(),e.st.mainClass&&(i+=e.st.mainClass+" "),e._removeClassFromMFP(i),e.fixedContentPos){var n={marginRight:""};e.isIE7?t("body, html").css("overflow",""):n.overflow="",t("html").css(n)}s.off("keyup.mfp focusin.mfp"),e.ev.off(".mfp"),e.wrap.attr("class","mfp-wrap").removeAttr("style"),e.bgOverlay.attr("class","mfp-bg"),e.container.attr("class","mfp-container"),!e.st.showCloseBtn||e.st.closeBtnInside&&!0!==e.currTemplate[e.currItem.type]||e.currTemplate.closeBtn&&e.currTemplate.closeBtn.detach(),e.st.autoFocusLast&&e._lastFocusedEl&&t(e._lastFocusedEl).focus(),e.currItem=null,e.content=null,e.currTemplate=null,e.prevHeight=0,p("AfterClose")},updateSize:function(t){if(e.isIOS){var i=document.documentElement.clientWidth/window.innerWidth,s=window.innerHeight*i;e.wrap.css("height",s),e.wH=s}else e.wH=t||u.height();e.fixedContentPos||e.wrap.css("height",e.wH),p("Resize")},updateItemHTML:function(){var i=e.items[e.index];e.contentContainer.detach(),e.content&&e.content.detach(),i.parsed||(i=e.parseEl(e.index));var s=i.type;if(p("BeforeChange",[e.currItem?e.currItem.type:"",s]),e.currItem=i,!e.currTemplate[s]){var o=!!e.st[s]&&e.st[s].markup;p("FirstMarkupParse",o),e.currTemplate[s]=!o||t(o)}n&&n!==i.type&&e.container.removeClass("mfp-"+n+"-holder");var r=e["get"+s.charAt(0).toUpperCase()+s.slice(1)](i,e.currTemplate[s]);e.appendContent(r,s),i.preloaded=!0,p("Change",i),n=i.type,e.container.prepend(e.contentContainer),p("AfterChange")},appendContent:function(t,i){e.content=t,t?e.st.showCloseBtn&&e.st.closeBtnInside&&!0===e.currTemplate[i]?e.content.find(".mfp-close").length||e.content.append(m()):e.content=t:e.content="",p("BeforeAppend"),e.container.addClass("mfp-"+i+"-holder"),e.contentContainer.append(e.content)},parseEl:function(i){var s,n=e.items[i];if(n.tagName?n={el:t(n)}:(s=n.type,n={data:n,src:n.src}),n.el){for(var o=e.types,r=0;r<o.length;r++)if(n.el.hasClass("mfp-"+o[r])){s=o[r];break}n.src=n.el.attr("data-mfp-src"),n.src||(n.src=n.el.attr("href"))}return n.type=s||e.st.type||"inline",n.index=i,n.parsed=!0,e.items[i]=n,p("ElementParse",n),e.items[i]},addGroup:function(t,i){var s=function(s){s.mfpEl=this,e._openClick(s,t,i)};i||(i={});var n="click.magnificPopup";i.mainEl=t,i.items?(i.isObj=!0,t.off(n).on(n,s)):(i.isObj=!1,i.delegate?t.off(n).on(n,i.delegate,s):(i.items=t,t.off(n).on(n,s)))},_openClick:function(i,s,n){if((void 0!==n.midClick?n.midClick:t.magnificPopup.defaults.midClick)||!(2===i.which||i.ctrlKey||i.metaKey||i.altKey||i.shiftKey)){var o=void 0!==n.disableOn?n.disableOn:t.magnificPopup.defaults.disableOn;if(o)if(t.isFunction(o)){if(!o.call(e))return!0}else if(u.width()<o)return!0;i.type&&(i.preventDefault(),e.isOpen&&i.stopPropagation()),n.el=t(i.mfpEl),n.delegate&&(n.items=s.find(n.delegate)),e.open(n)}},updateStatus:function(t,s){if(e.preloader){i!==t&&e.container.removeClass("mfp-s-"+i),s||"loading"!==t||(s=e.st.tLoading);var n={status:t,text:s};p("UpdateStatus",n),t=n.status,s=n.text,e.preloader.html(s),e.preloader.find("a").on("click",function(t){t.stopImmediatePropagation()}),e.container.addClass("mfp-s-"+t),i=t}},_checkIfClose:function(i){if(!t(i).hasClass(l)){var s=e.st.closeOnContentClick,n=e.st.closeOnBgClick;if(s&&n)return!0;if(!e.content||t(i).hasClass("mfp-close")||e.preloader&&i===e.preloader[0])return!0;if(i===e.content[0]||t.contains(e.content[0],i)){if(s)return!0}else if(n&&t.contains(document,i))return!0;return!1}},_addClassToMFP:function(t){e.bgOverlay.addClass(t),e.wrap.addClass(t)},_removeClassFromMFP:function(t){this.bgOverlay.removeClass(t),e.wrap.removeClass(t)},_hasScrollBar:function(t){return(e.isIE7?s.height():document.body.scrollHeight)>(t||u.height())},_setFocus:function(){(e.st.focus?e.content.find(e.st.focus).eq(0):e.wrap).focus()},_onFocusIn:function(i){if(i.target!==e.wrap[0]&&!t.contains(e.wrap[0],i.target))return e._setFocus(),!1},_parseMarkup:function(e,i,s){var n;s.data&&(i=t.extend(s.data,i)),p("MarkupParse",[e,i,s]),t.each(i,function(i,s){if(void 0===s||!1===s)return!0;if((n=i.split("_")).length>1){var o=e.find(".mfp-"+n[0]);if(o.length>0){var r=n[1];"replaceWith"===r?o[0]!==s[0]&&o.replaceWith(s):"img"===r?o.is("img")?o.attr("src",s):o.replaceWith(t("<img>").attr("src",s).attr("class",o.attr("class"))):o.attr(n[1],s)}}else e.find(".mfp-"+i).html(s)})},_getScrollbarSize:function(){if(void 0===e.scrollbarSize){var t=document.createElement("div");t.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(t),e.scrollbarSize=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return e.scrollbarSize}},t.magnificPopup={instance:null,proto:c.prototype,modules:[],open:function(e,i){return g(),e=e?t.extend(!0,{},e):{},e.isObj=!0,e.index=i||0,this.instance.open(e)},close:function(){return t.magnificPopup.instance&&t.magnificPopup.instance.close()},registerModule:function(e,i){i.options&&(t.magnificPopup.defaults[e]=i.options),t.extend(this.proto,i.proto),this.modules.push(e)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},t.fn.magnificPopup=function(i){g();var s=t(this);if("string"==typeof i)if("open"===i){var n,o=h?s.data("magnificPopup"):s[0].magnificPopup,r=parseInt(arguments[1],10)||0;o.items?n=o.items[r]:(n=s,o.delegate&&(n=n.find(o.delegate)),n=n.eq(r)),e._openClick({mfpEl:n},s,o)}else e.isOpen&&e[i].apply(e,Array.prototype.slice.call(arguments,1));else i=t.extend(!0,{},i),h?s.data("magnificPopup",i):s[0].magnificPopup=i,e.addGroup(s,i);return s};var v,y,b,_=function(){b&&(y.after(b.addClass(v)).detach(),b=null)};t.magnificPopup.registerModule("inline",{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){e.types.push("inline"),d("Close.inline",function(){_()})},getInline:function(i,s){if(_(),i.src){var n=e.st.inline,o=t(i.src);if(o.length){var r=o[0].parentNode;r&&r.tagName&&(y||(v=n.hiddenClass,y=f(v),v="mfp-"+v),b=o.after(y).detach().removeClass(v)),e.updateStatus("ready")}else e.updateStatus("error",n.tNotFound),o=t("<div>");return i.inlineElement=o,o}return e.updateStatus("ready"),e._parseMarkup(s,{},i),s}}});var w,x=function(){w&&t(document.body).removeClass(w)},C=function(){x(),e.req&&e.req.abort()};t.magnificPopup.registerModule("ajax",{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){e.types.push("ajax"),w=e.st.ajax.cursor,d("Close.ajax",C),d("BeforeChange.ajax",C)},getAjax:function(i){w&&t(document.body).addClass(w),e.updateStatus("loading");var s=t.extend({url:i.src,success:function(s,n,o){var r={data:s,xhr:o};p("ParseAjax",r),e.appendContent(t(r.data),"ajax"),i.finished=!0,x(),e._setFocus(),setTimeout(function(){e.wrap.addClass(a)},16),e.updateStatus("ready"),p("AjaxContentAdded")},error:function(){x(),i.finished=i.loadError=!0,e.updateStatus("error",e.st.ajax.tError.replace("%url%",i.src))}},e.st.ajax.settings);return e.req=t.ajax(s),""}}});var S;t.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var i=e.st.image;e.types.push("image"),d("Open.image",function(){"image"===e.currItem.type&&i.cursor&&t(document.body).addClass(i.cursor)}),d("Close.image",function(){i.cursor&&t(document.body).removeClass(i.cursor),u.off("resize.mfp")}),d("Resize.image",e.resizeImage),e.isLowIE&&d("AfterChange",e.resizeImage)},resizeImage:function(){var t=e.currItem;if(t&&t.img&&e.st.image.verticalFit){var i=0;e.isLowIE&&(i=parseInt(t.img.css("padding-top"),10)+parseInt(t.img.css("padding-bottom"),10)),t.img.css("max-height",e.wH-i)}},_onImageHasSize:function(t){t.img&&(t.hasSize=!0,S&&clearInterval(S),t.isCheckingImgSize=!1,p("ImageHasSize",t),t.imgHidden&&(e.content&&e.content.removeClass("mfp-loading"),t.imgHidden=!1))},findImageSize:function(t){var i=0,s=t.img[0],n=function(o){S&&clearInterval(S),S=setInterval(function(){s.naturalWidth>0?e._onImageHasSize(t):(i>200&&clearInterval(S),3===++i?n(10):40===i?n(50):100===i&&n(500))},o)};n(1)},getImage:function(i,s){var n=0,o=function(){i&&(i.img[0].complete?(i.img.off(".mfploader"),i===e.currItem&&(e._onImageHasSize(i),e.updateStatus("ready")),i.hasSize=!0,i.loaded=!0,p("ImageLoadComplete")):++n<200?setTimeout(o,100):r())},r=function(){i&&(i.img.off(".mfploader"),i===e.currItem&&(e._onImageHasSize(i),e.updateStatus("error",a.tError.replace("%url%",i.src))),i.hasSize=!0,i.loaded=!0,i.loadError=!0)},a=e.st.image,l=s.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",i.el&&i.el.find("img").length&&(c.alt=i.el.find("img").attr("alt")),i.img=t(c).on("load.mfploader",o).on("error.mfploader",r),c.src=i.src,l.is("img")&&(i.img=i.img.clone()),(c=i.img[0]).naturalWidth>0?i.hasSize=!0:c.width||(i.hasSize=!1)}return e._parseMarkup(s,{title:function(i){if(i.data&&void 0!==i.data.title)return i.data.title;var s=e.st.image.titleSrc;if(s){if(t.isFunction(s))return s.call(e,i);if(i.el)return i.el.attr(s)||""}return""}(i),img_replaceWith:i.img},i),e.resizeImage(),i.hasSize?(S&&clearInterval(S),i.loadError?(s.addClass("mfp-loading"),e.updateStatus("error",a.tError.replace("%url%",i.src))):(s.removeClass("mfp-loading"),e.updateStatus("ready")),s):(e.updateStatus("loading"),i.loading=!0,i.hasSize||(i.imgHidden=!0,s.addClass("mfp-loading"),e.findImageSize(i)),s)}}});var I;t.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(t){return t.is("img")?t:t.find("img")}},proto:{initZoom:function(){var t,i=e.st.zoom;if(i.enabled&&e.supportsTransition){var s,n,o=i.duration,r=function(t){var e=t.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),s="all "+i.duration/1e3+"s "+i.easing,n={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},o="transition";return n["-webkit-"+o]=n["-moz-"+o]=n["-o-"+o]=n[o]=s,e.css(n),e},a=function(){e.content.css("visibility","visible")};d("BuildControls.zoom",function(){if(e._allowZoom()){if(clearTimeout(s),e.content.css("visibility","hidden"),!(t=e._getItemToZoom()))return void a();(n=r(t)).css(e._getOffset()),e.wrap.append(n),s=setTimeout(function(){n.css(e._getOffset(!0)),s=setTimeout(function(){a(),setTimeout(function(){n.remove(),t=n=null,p("ZoomAnimationEnded")},16)},o)},16)}}),d("BeforeClose.zoom",function(){if(e._allowZoom()){if(clearTimeout(s),e.st.removalDelay=o,!t){if(!(t=e._getItemToZoom()))return;n=r(t)}n.css(e._getOffset(!0)),e.wrap.append(n),e.content.css("visibility","hidden"),setTimeout(function(){n.css(e._getOffset())},16)}}),d("Close.zoom",function(){e._allowZoom()&&(a(),n&&n.remove(),t=null)})}},_allowZoom:function(){return"image"===e.currItem.type},_getItemToZoom:function(){return!!e.currItem.hasSize&&e.currItem.img},_getOffset:function(i){var s,n=(s=i?e.currItem.img:e.st.zoom.opener(e.currItem.el||e.currItem)).offset(),o=parseInt(s.css("padding-top"),10),r=parseInt(s.css("padding-bottom"),10);n.top-=t(window).scrollTop()-o;var a={width:s.width(),height:(h?s.innerHeight():s[0].offsetHeight)-r-o};return void 0===I&&(I=void 0!==document.createElement("p").style.MozTransform),I?a["-moz-transform"]=a.transform="translate("+n.left+"px,"+n.top+"px)":(a.left=n.left,a.top=n.top),a}}});var T=function(t){if(e.currTemplate.iframe){var i=e.currTemplate.iframe.find("iframe");i.length&&(t||(i[0].src="//about:blank"),e.isIE8&&i.css("display",t?"block":"none"))}};t.magnificPopup.registerModule("iframe",{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){e.types.push("iframe"),d("BeforeChange",function(t,e,i){e!==i&&("iframe"===e?T():"iframe"===i&&T(!0))}),d("Close.iframe",function(){T()})},getIframe:function(i,s){var n=i.src,o=e.st.iframe;t.each(o.patterns,function(){if(n.indexOf(this.index)>-1)return this.id&&(n="string"==typeof this.id?n.substr(n.lastIndexOf(this.id)+this.id.length,n.length):this.id.call(this,n)),n=this.src.replace("%id%",n),!1});var r={};return o.srcAction&&(r[o.srcAction]=n),e._parseMarkup(s,r,i),e.updateStatus("ready"),s}}});var A=function(t){var i=e.items.length;return t>i-1?t-i:t<0?i+t:t},E=function(t,e,i){return t.replace(/%curr%/gi,e+1).replace(/%total%/gi,i)};t.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var i=e.st.gallery,n=".mfp-gallery";if(e.direction=!0,!i||!i.enabled)return!1;o+=" mfp-gallery",d("Open"+n,function(){i.navigateByImgClick&&e.wrap.on("click"+n,".mfp-img",function(){if(e.items.length>1)return e.next(),!1}),s.on("keydown"+n,function(t){37===t.keyCode?e.prev():39===t.keyCode&&e.next()})}),d("UpdateStatus"+n,function(t,i){i.text&&(i.text=E(i.text,e.currItem.index,e.items.length))}),d("MarkupParse"+n,function(t,s,n,o){var r=e.items.length;n.counter=r>1?E(i.tCounter,o.index,r):""}),d("BuildControls"+n,function(){if(e.items.length>1&&i.arrows&&!e.arrowLeft){var s=i.arrowMarkup,n=e.arrowLeft=t(s.replace(/%title%/gi,i.tPrev).replace(/%dir%/gi,"left")).addClass(l),o=e.arrowRight=t(s.replace(/%title%/gi,i.tNext).replace(/%dir%/gi,"right")).addClass(l);n.click(function(){e.prev()}),o.click(function(){e.next()}),e.container.append(n.add(o))}}),d("Change"+n,function(){e._preloadTimeout&&clearTimeout(e._preloadTimeout),e._preloadTimeout=setTimeout(function(){e.preloadNearbyImages(),e._preloadTimeout=null},16)}),d("Close"+n,function(){s.off(n),e.wrap.off("click"+n),e.arrowRight=e.arrowLeft=null})},next:function(){e.direction=!0,e.index=A(e.index+1),e.updateItemHTML()},prev:function(){e.direction=!1,e.index=A(e.index-1),e.updateItemHTML()},goTo:function(t){e.direction=t>=e.index,e.index=t,e.updateItemHTML()},preloadNearbyImages:function(){var t,i=e.st.gallery.preload,s=Math.min(i[0],e.items.length),n=Math.min(i[1],e.items.length);for(t=1;t<=(e.direction?n:s);t++)e._preloadItem(e.index+t);for(t=1;t<=(e.direction?s:n);t++)e._preloadItem(e.index-t)},_preloadItem:function(i){if(i=A(i),!e.items[i].preloaded){var s=e.items[i];s.parsed||(s=e.parseEl(i)),p("LazyLoad",s),"image"===s.type&&(s.img=t('<img class="mfp-img" />').on("load.mfploader",function(){s.hasSize=!0}).on("error.mfploader",function(){s.hasSize=!0,s.loadError=!0,p("LazyLoadError",s)}).attr("src",s.src)),s.preloaded=!0}}}});t.magnificPopup.registerModule("retina",{options:{replaceSrc:function(t){return t.src.replace(/\.\w+$/,function(t){return"@2x"+t})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var t=e.st.retina,i=t.ratio;(i=isNaN(i)?i():i)>1&&(d("ImageHasSize.retina",function(t,e){e.img.css({"max-width":e.img[0].naturalWidth/i,width:"100%"})}),d("ElementParse.retina",function(e,s){s.src=t.replaceSrc(s,i)}))}}}}),g()}),function(){var t,e,i,s,n=function(t,e){return function(){return t.apply(e,arguments)}},o={}.hasOwnProperty;(s=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,i,s,n,o,r;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:t.label,title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),r=[],i=0,s=(o=t.childNodes).length;i<s;i++)n=o[i],r.push(this.add_option(n,e,t.disabled));return r},t.prototype.add_option=function(t,e,i){if("OPTION"===t.nodeName.toUpperCase())return""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,title:t.title?t.title:void 0,selected:t.selected,disabled:!0===i?i:t.disabled,group_array_index:e,group_label:null!=e?this.parsed[e].label:null,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},t}()).select_to_array=function(t){var e,i,n,o,r;for(o=new s,i=0,n=(r=t.childNodes).length;i<n;i++)e=r[i],o.add_node(e);return o.parsed},e=function(){function t(e,i){this.form_field=e,this.options=null!=i?i:{},this.label_click_handler=n(this.label_click_handler,this),t.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return t.prototype.set_default_values=function(){return this.click_test_action=function(t){return function(e){return t.test_active_click(e)}}(this),this.activate_action=function(t){return function(e){return t.activate_field(e)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},t.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.choice_label=function(t){return this.include_group_label_in_selected&&null!=t.group_label?"<b class='group-name'>"+this.escape_html(t.group_label)+"</b>"+t.html:t.html},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(t){if(this.is_multiple){if(!this.active_field)return setTimeout(function(t){return function(){return t.container_mousedown()}}(this),50)}else if(!this.active_field)return this.activate_field()},t.prototype.input_blur=function(t){if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(t){return function(){return t.blur_test()}}(this),100)},t.prototype.label_click_handler=function(t){return this.is_multiple?this.container_mousedown(t):this.activate_field()},t.prototype.results_option_build=function(t){var e,i,s,n,o,r,a;for(e="",a=0,n=0,o=(r=this.results_data).length;n<o&&(i=r[n],s="",""!==(s=i.group?this.result_add_group(i):this.result_add_option(i))&&(a++,e+=s),(null!=t?t.first:void 0)&&(i.selected&&this.is_multiple?this.choice_build(i):i.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(i))),!(a>=this.max_shown_results));n++);return e},t.prototype.result_add_option=function(t){var e,i;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),i=document.createElement("li"),i.className=e.join(" "),t.style&&(i.style.cssText=t.style),i.setAttribute("data-option-array-index",t.array_index),i.innerHTML=t.highlighted_html||t.html,t.title&&(i.title=t.title),this.outerHTML(i)):""},t.prototype.result_add_group=function(t){var e,i;return(t.search_match||t.group_match)&&t.active_options>0?((e=[]).push("group-result"),t.classes&&e.push(t.classes),i=document.createElement("li"),i.className=e.join(" "),i.innerHTML=t.highlighted_html||this.escape_html(t.label),t.title&&(i.title=t.title),this.outerHTML(i)):""},t.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},t.prototype.reset_single_select_options=function(){var t,e,i,s,n;for(n=[],t=0,e=(i=this.results_data).length;t<e;t++)(s=i[t]).selected?n.push(s.selected=!1):n.push(void 0);return n},t.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},t.prototype.results_search=function(t){return this.results_showing?this.winnow_results():this.results_show()},t.prototype.winnow_results=function(t){var e,i,s,n,o,r,a,l,c,h,u,d,f,p,m;for(this.no_results_clear(),h=0,e=(a=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),c=this.get_search_regex(e),s=0,n=(l=this.results_data).length;s<n;s++)(o=l[s]).search_match=!1,u=null,d=null,o.highlighted_html="",this.include_option_in_results(o)&&(o.group&&(o.group_match=!1,o.active_options=0),null!=o.group_array_index&&this.results_data[o.group_array_index]&&(0===(u=this.results_data[o.group_array_index]).active_options&&u.search_match&&(h+=1),u.active_options+=1),m=o.group?o.label:o.text,o.group&&!this.group_search||(d=this.search_string_match(m,c),o.search_match=null!=d,o.search_match&&!o.group&&(h+=1),o.search_match?(a.length&&(f=d.index,r=m.slice(0,f),i=m.slice(f,f+a.length),p=m.slice(f+a.length),o.highlighted_html=this.escape_html(r)+"<em>"+this.escape_html(i)+"</em>"+this.escape_html(p)),null!=u&&(u.group_match=!0)):null!=o.group_array_index&&this.results_data[o.group_array_index].search_match&&(o.search_match=!0)));return this.result_clear_highlight(),h<1&&a.length?(this.update_results_content(""),this.no_results(a)):(this.update_results_content(this.results_option_build()),(null!=t?t.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var e,i;return i=this.search_contains?t:"(^|\\s|\\b)"+t+"[^\\s]*",this.enable_split_word_search||this.search_contains||(i="^"+i),e=this.case_sensitive_search?"":"i",new RegExp(i,e)},t.prototype.search_string_match=function(t,e){var i;return i=e.exec(t),!this.search_contains&&(null!=i?i[1]:void 0)&&(i.index+=1),i},t.prototype.choices_count=function(){var t,e,i;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,t=0,e=(i=this.form_field.options).length;t<e;t++)i[t].selected&&(this.selected_option_count+=1);return this.selected_option_count},t.prototype.choices_click=function(t){if(t.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},t.prototype.keydown_checker=function(t){var e,i;switch(i=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),8!==i&&this.pending_backstroke&&this.clear_backstroke(),i){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&t.preventDefault();break;case 32:this.disable_search&&t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},t.prototype.keyup_checker=function(t){var e,i;switch(i=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),i){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:t.preventDefault(),this.results_showing&&this.result_select(t);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},t.prototype.clipboard_event_checker=function(t){if(!this.is_disabled)return setTimeout(function(t){return function(){return t.results_search()}}(this),50)},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:((e=document.createElement("div")).appendChild(t),e.innerHTML)},t.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_no_results_html=function(t){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(t)+"</span>\n</li>"},t.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),(t=jQuery).fn.extend({chosen:function(s){return e.browser_is_supported()?this.each(function(e){var n,o;o=(n=t(this)).data("chosen"),"destroy"!==s?o instanceof i||n.data("chosen",new i(this,s)):o instanceof i&&o.destroy()}):this}}),i=function(i){function n(){return n.__super__.constructor.apply(this,arguments)}return function(t,e){function i(){this.constructor=t}for(var s in e)o.call(e,s)&&(t[s]=e[s]);i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(n,e),n.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},n.prototype.set_up_html=function(){var e,i;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),i={class:e.join(" "),title:this.form_field.title},this.form_field.id.length&&(i.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("<div />",i),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},n.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},n.prototype.register_observers=function(){return this.container.on("touchstart.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("touchend.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mousedown.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("mouseup.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mouseenter.chosen",function(t){return function(e){t.mouse_enter(e)}}(this)),this.container.on("mouseleave.chosen",function(t){return function(e){t.mouse_leave(e)}}(this)),this.search_results.on("mouseup.chosen",function(t){return function(e){t.search_results_mouseup(e)}}(this)),this.search_results.on("mouseover.chosen",function(t){return function(e){t.search_results_mouseover(e)}}(this)),this.search_results.on("mouseout.chosen",function(t){return function(e){t.search_results_mouseout(e)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(t){return function(e){t.search_results_mousewheel(e)}}(this)),this.search_results.on("touchstart.chosen",function(t){return function(e){t.search_results_touchstart(e)}}(this)),this.search_results.on("touchmove.chosen",function(t){return function(e){t.search_results_touchmove(e)}}(this)),this.search_results.on("touchend.chosen",function(t){return function(e){t.search_results_touchend(e)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(t){return function(e){t.results_update_field(e)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(t){return function(e){t.activate_field(e)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(t){return function(e){t.close_field(e)}}(this)),this.search_field.on("blur.chosen",function(t){return function(e){t.input_blur(e)}}(this)),this.search_field.on("keyup.chosen",function(t){return function(e){t.keyup_checker(e)}}(this)),this.search_field.on("keydown.chosen",function(t){return function(e){t.keydown_checker(e)}}(this)),this.search_field.on("focus.chosen",function(t){return function(e){t.input_focus(e)}}(this)),this.search_field.on("cut.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.search_field.on("paste.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(t){return function(e){t.choices_click(e)}}(this)):this.container.on("click.chosen",function(t){t.preventDefault()})},n.prototype.destroy=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},n.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},n.prototype.container_mousedown=function(e){var i;if(!this.is_disabled)return!e||"mousedown"!==(i=e.type)&&"touchstart"!==i||this.results_showing||e.preventDefault(),null!=e&&t(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},n.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},n.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())},n.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},n.prototype.close_field=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},n.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},n.prototype.test_active_click=function(e){var i;return(i=t(e.target).closest(".chosen-container")).length&&this.container[0]===i[0]?this.active_field=!0:this.close_field()},n.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=s.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},n.prototype.result_do_highlight=function(t){var e,i,s,n,o;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),s=parseInt(this.search_results.css("maxHeight"),10),o=this.search_results.scrollTop(),n=s+o,i=this.result_highlight.position().top+this.search_results.scrollTop(),(e=i+this.result_highlight.outerHeight())>=n)return this.search_results.scrollTop(e-s>0?e-s:0);if(i<o)return this.search_results.scrollTop(i)}},n.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},n.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},n.prototype.update_results_content=function(t){return this.search_results.html(t)},n.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},n.prototype.set_tab_index=function(t){var e;if(this.form_field.tabIndex)return e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e},n.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.on("click.chosen",this.label_click_handler)},n.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},n.prototype.search_results_mouseup=function(e){var i;if((i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first()).length)return this.result_highlight=i,this.result_select(e),this.search_field.focus()},n.prototype.search_results_mouseover=function(e){var i;if(i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(i)},n.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result")||t(e.target).parents(".active-result").first())return this.result_clear_highlight()},n.prototype.choice_build=function(e){var i,s;return i=t("<li />",{class:"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?i.addClass("search-choice-disabled"):((s=t("<a />",{class:"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",function(t){return function(e){return t.choice_destroy_link_click(e)}}(this)),i.append(s)),this.search_container.before(i)},n.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},n.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},n.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},n.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},n.prototype.result_select=function(t){var e,i;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),i=this.results_data[e[0].getAttribute("data-option-array-index")],i.selected=!0,this.form_field.options[i.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(i):this.single_set_selected_text(this.choice_label(i)),this.is_multiple&&(!this.hide_results_on_select||t.metaKey||t.ctrlKey)?t.metaKey||t.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[i.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())},n.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(t)},n.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},n.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},n.prototype.get_search_field_value=function(){return this.search_field.val()},n.prototype.get_search_text=function(){return t.trim(this.get_search_field_value())},n.prototype.escape_html=function(e){return t("<div/>").text(e).html()},n.prototype.winnow_results_set_highlight=function(){var t,e;if(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),null!=(t=e.length?e.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(t)},n.prototype.no_results=function(t){var e;return e=this.get_no_results_html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},n.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},n.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},n.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},n.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},n.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},n.prototype.search_field_scale=function(){var e,i,s,n,o,r,a;if(this.is_multiple){for(o={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},i=0,s=(r=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;i<s;i++)o[n=r[i]]=this.search_field.css(n);return(e=t("<div />").css(o)).text(this.get_search_field_value()),t("body").append(e),a=e.width()+25,e.remove(),this.container.is(":visible")&&(a=Math.min(this.container.outerWidth()-10,a)),this.search_field.width(a)}},n.prototype.trigger_form_field_change=function(t){return this.form_field_jq.trigger("input",t),this.form_field_jq.trigger("change",t)},n}()}.call(this),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},s=i[t]=i[t]||[];return-1==s.indexOf(e)&&s.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var s=i.indexOf(e);return-1!=s&&i.splice(s,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var s=this._onceEvents&&this._onceEvents[t],n=0;n<i.length;n++){var o=i[n];s&&s[o]&&(this.off(t,o),delete s[o]),o.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,function(t,e){function i(t,e){for(var i in e)t[i]=e[i];return t}function s(t,e,n){if(!(this instanceof s))return new s(t,e,n);var o=t;return"string"==typeof t&&(o=document.querySelectorAll(t)),o?(this.elements=function(t){return Array.isArray(t)?t:"object"==typeof t&&"number"==typeof t.length?l.call(t):[t]}(o),this.options=i({},this.options),"function"==typeof e?n=e:i(this.options,e),n&&this.on("always",n),this.getImages(),r&&(this.jqDeferred=new r.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(o||t))}function n(t){this.img=t}function o(t,e){this.url=t,this.element=e,this.img=new Image}var r=t.jQuery,a=t.console,l=Array.prototype.slice;(s.prototype=Object.create(e.prototype)).options={},s.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},s.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&c[e]){for(var i=t.querySelectorAll("img"),s=0;s<i.length;s++){var n=i[s];this.addImage(n)}if("string"==typeof this.options.background){var o=t.querySelectorAll(this.options.background);for(s=0;s<o.length;s++){var r=o[s];this.addElementBackgroundImages(r)}}}};var c={1:!0,9:!0,11:!0};return s.prototype.addElementBackgroundImages=function(t){var e=getComputedStyle(t);if(e)for(var i=/url\((['"])?(.*?)\1\)/gi,s=i.exec(e.backgroundImage);null!==s;){var n=s&&s[2];n&&this.addBackground(n,t),s=i.exec(e.backgroundImage)}},s.prototype.addImage=function(t){var e=new n(t);this.images.push(e)},s.prototype.addBackground=function(t,e){var i=new o(t,e);this.images.push(i)},s.prototype.check=function(){function t(t,i,s){setTimeout(function(){e.progress(t,i,s)})}var e=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(e){e.once("progress",t),e.check()}):void this.complete()},s.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,t,e)},s.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){var e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},n.prototype=Object.create(e.prototype),n.prototype.check=function(){return this.getIsImageComplete()?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},n.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},n.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},n.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},n.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},n.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},o.prototype=Object.create(n.prototype),o.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},o.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},o.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},s.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(r=e,r.fn.imagesLoaded=function(t,e){return new s(this,t,e).jqDeferred.promise(r(this))})},s.makeJQueryPlugin(),s}),function(){function t(t,e,i){l[l.length]=this,o||((o=t).event.special.typewriterDestroyed={remove:function(t){t.handler()}},a=document.createElement("textarea")),r="",this.layrs=[];var s=e[0];if((s=!!s.hasOwnProperty("opt")&&s.opt)&&s.hasOwnProperty("responsiveLevels")&&(s=s.responsiveLevels),Array.isArray(s)&&(this.levels=s),this.slider=e.on("typewriterDestroyed",n),i.each(this.writeLayerData.bind(this)),r){var h=document.head||document.body;if(h){var u=document.createElement("style");u.type="text/css",u.innerHTML=r,h.appendChild(u)}}for(var d=c.length,f=0;f<d;f++)e.on("revolution.slide."+c[f],this.eventCallback.bind(this))}function e(t,e,n,a){var l,c,u,d,f,p,m,g,v,y,b,_,w,x=JSON.parse(t.getAttribute("data-typewriter")),C=e.replace(/(_|\|)$/,""),S=t.className,I=x.lines,T=e,A=[];t.className=S+" hide-typewriter-cursor";for(var E in x)x.hasOwnProperty(E)&&(y=x[E],this[E=E.replace(/_([a-z])/g,i)]="on"===y?1:"off"===y?0:!1===isNaN(y)?parseInt(y,10):y);if(this.blinking&&(r+="#"+t.id+":after {"+h.replace("[char]","one"===this.cursorType?"_":"|").replace("[speed]",.001*parseInt(this.blinkingSpeed,10))+"}#"+t.id+'.hide-typewriter-cursor:after {content: ""}',this.background))if(c=t.getAttribute("data-width").replace(/[\[\]']+/g,"").split(","),n)for(v=c.length,w=0;w<v;w++)(d=n[w])!==u&&(m="auto"===(m=c[w])||"none"===m,w>0?(m=m?"static":"absolute",r+="@media screen and (max-width: "+d+"px) {#"+t.id+".tp-caption[data-typewriter]:after {position: "+m+"}}"):m&&t.setAttribute("data-typewriter-blinking","true"),u=d);else"none"!==(m=c[0])&&"auto"!==m||t.setAttribute("data-typewriter-blinking","true");if(this.sequenced&&I){for(e=[s(unescape(e))],v=(I=I.split(",")).length,w=0;w<v;w++)(g=o.trim(I[w]))&&(e[e.length]=s(unescape(g)));t.setAttribute("data-typewriter-sequenced","true")}else{for(this.looped=!1,this.sequenced=!1,this.newlineDelay=this.linebreakDelay,v=(I=s(e,!0).split(/\r?\n|\r/g)).length,e=[],w=0;w<v;w++)e[e.length]=o.trim(I[w]),e[e.length]="";for(;""===e[0];)e.shift();for(;""===e[e.length-1];)e.pop()}if(this.wordDelay)if(l=x.delays){for(v=(l=l.split(",")).length,p=0,w=0;w<v;w++)b=(f=unescape(l[w]).split("|"))[0],_=f[1],!1===isNaN(b)&&!1===isNaN(_)&&(A[(b=parseInt(b))+p-1]=parseInt(_),p+=b);this.spaces=A}else this.wordDelay=!1;this.el=t,this.txt=e,this.orig=T,this.clean=C,this.revapi=a,this.len=e.length,this.statc=-1!==S.search("tp-static-layer"),o.data(t,"typewriter",this)}function i(t){return t[1].toUpperCase()}function s(t,e){return t=t.replace(/<(?!br\s*\/?)[^>]+>/g,"").replace(/(_|\|)$/,""),t=e?t.replace(/\r?\n|\r/g," ").replace(/<br[^>]*>/gi,"\n"):t.replace(/\r?\n|\r/g,"±").replace(/<br[^>]*>/gi,"µ").replace(/±µ|µ±/g,"µ").replace(/^±+|±+$/g,"").replace(/^µ+|µ+$/g,""),a.innerHTML=t,a.value}function n(){for(var t,e=l.length;e--;)if((t=l[e])[0]===this){!function(t){var e=t.layrs,i=e.length;for(;i--;)o.removeData(e[i].el,"typewriter");for(var s in t)t.hasOwnProperty(s)&&delete t[s]}(t),l=l.splice(e,1);break}}var o,r,a,l=[],c=["onbeforeswap","layeraction","beforeredraw","afterdraw"],h='content: "[char]"; animation: tp-typewriter [speed]s steps(2, start) infinite';window.RsTypewriterAddOn=function(e,i){if(i){var s=i.find(".tp-caption[data-typewriter]");s.length&&new t(e,i,s)}},t.prototype={eventCallback:function(t,e){this[t.namespace.replace(".slide","")](e)},onbeforeswap:function(t){var e,i=this.layrs,s=i.length;if(t=t.currentslide[0])for(;s--;)(e=i[s]).statc||(clearTimeout(e.timer),e.running=!1,e.active=!1,t.contains(e.el)||(e.el.innerHTML=e.orig,e.el.className=e.el.className+" hide-typewriter-cursor"))},layeraction:function(t){if("enterstage"===t.eventtype){var e=o.data(t.layer[0],"typewriter");e&&"html"===t.layertype&&(e.active=!0,e.start())}},beforeredraw:function(t){for(var e=this.layrs,i=e.length;i--;)e[i].onRedraw()},afterdraw:function(){for(var t=this.layrs,e=t.length;e--;)t[e].onRedraw(!0)},writeLayerData:function(t,i){var s=o.trim(i.innerHTML);s?(i.getAttribute("data-whiteboard")&&("undefined"!=typeof console&&console.log("Whiteboard is disabled for Layers with Typewriter Add-On effect enabled"),i.removeAttribute("data-whiteboard")),this.layrs[this.layrs.length]=new e(i,s,this.levels,this.slider)):i.removeAttribute("data-typewriter")}},e.prototype={start:function(t,e){clearTimeout(this.timer),this.paused||(this.line=0,this.step=0,this.words=0,this.skip=!1,this.rewind=!1,this.rstart=!1,this.breaker=!1,this.paused=!1,this.rpaused=!1,this.str=this.txt[this.line],this.len=this.str.length,e?(this.timer=setTimeout(this.onStart.bind(this),t),this.revapi.trigger("revolution.slide.typewriterlooped",[this.el])):(this.el.innerHTML=" ",this.el.className=this.el.className.replace(/ hide-typewriter-cursor/g,""),this.timer=setTimeout(this.onStart.bind(this),this.startDelay)),this.running=!0,this.revapi.trigger("revolution.slide.typewriterstarted",[this.el]),this.revapi.trigger("revolution.slide.typewriternewline",[this.el,this.line+1,this.txt[this.line]]))},onStart:function(){this.el.innerHTML="",this.animate()},animate:function(){var t,e,i,s,n=this.str,o=this.txt,r=this.step,a=this.rewind,l=a?this.deletionSpeed:this.speed;if(r<this.len)a?(n=n.slice(0,-1),this.str=n,this.el.innerHTML=n.replace(/µ/g,"<br>")||" "):(this.breaker?(e="<br>",l=this.skip?this.linebreakDelay:this.newlineDelay,this.breaker=!1,this.skip=!1,this.words=0,this.step--):"µ"===(e=n[r])&&(this.skip=!0,this.breaker=!0,l=this.linebreakDelay),this.breaker||(" "===(s=this.el.innerHTML)&&(s=""),this.el.innerHTML=s+e,this.wordDelay&&" "===e&&(i=this.words,(s=this.spaces[i])?(l=s,this.words=i<this.spaces.length-1?i+1:0):this.words+=1))),this.step++,t=!0;else{if(this.rstart)return void(this.paused?(this.rpaused=!0,this.lastSpeed=this.newlineDelay):this.start(this.newlineDelay,!0));this.line<o.length&&(this.line++,this.step=0,this.skip=!1,n=o[this.line],this.str=n,""===n&&(this.line++,this.breaker=!0,l=this.newlineDelay),this.line<o.length?(this.sequenced?((a=!a)?(this.line--,this.str=o[this.line],l=this.deletionDelay):(this.str=o[this.line],this.len=this.str.length,l=this.newlineDelay),this.rewind=a):(this.str=o[this.line],this.len=this.str.length),t=!0,this.words=0,this.rewind||this.revapi.trigger("revolution.slide.typewriternewline",[this.el,this.line+1,o[this.line]])):this.looped&&(this.rewind=!0,this.rstart=!0,this.words=0,this.line--,this.str=o[this.line],t=!0,l=this.deletionDelay))}if(t){if(this.paused)return void(this.lastSpeed=l);l?this.timer=setTimeout(this.animate.bind(this),l):this.animate()}else this.running=!1,this.hideCursor&&(this.el.className=this.el.className+" hide-typewriter-cursor"),this.revapi.trigger("revolution.slide.typewriterended",[this.el])},onRedraw:function(t){if(t)this.el.innerHTML=this.state;else{var e=window.getComputedStyle(this.el,":after").getPropertyValue("position");this.state=this.el.innerHTML,this.el.innerHTML="absolute"===e?this.orig:this.clean}},pause:function(){this.active&&(clearTimeout(this.timer),this.paused=!0)},resume:function(){this.active&&(this.running?this.paused&&(this.rpaused?this.start(this.lastSpeed,!0):(this.paused=!1,this.lastSpeed?this.timer=setTimeout(this.animate.bind(this),this.lastSpeed):this.animate())):this.restart())},restart:function(){this.active&&(clearTimeout(this.timer),this.rpaused=!1,this.paused=!1,this.start())},restore:function(t){this.active&&(clearTimeout(this.timer),this.el.innerHTML=this.clean,t&&(this.el.className=this.el.className+" hide-typewriter-cursor"))}}}(),function(){function t(t,e){this.slides=[],this.slider=t,this.options=e,this.timer=this.onTimer.bind(this),t[0].opt.fallbacks.disableFocusListener||a(window).on("focus.rsaddonbeforeafter",this.onFocus.bind(this)),t.one("revolution.slide.onloaded",this.onLoaded.bind(this)).one("rsBeforeAfterDestroyed",this.destroy.bind(this))}function e(t,e,i,s,n,o,r,l,c,h,u,d,f,p){this.id=t,this.bg=e,this.index=p,this.slide=s,this.inner=i,this.after=c,this.before=h,this.slider=u,this.videoBg=n,this.bgInner=r,this.globals=d,this.videoSolo=o,this.carousel=f,this.animateOut=l.out,this.direction=l.direction,this.moveto=l.moveto.split("|"),this.timing=.001*parseInt(l.time,10),this.delay=.001*parseInt(l.delay,10);var m=l.easing.split(".");if(this.animation=punchgs[m[0]][m[1]],"horizontal"===this.direction?(this.normal=!0,this.axis="left",this.size="width"):(this.axis="top",this.size="height"),this.globals.hasOwnProperty("onClick")){var g=this.globals.onClick.easing.split(".");this.time=.001*parseInt(this.globals.onClick.time,10),this.transition=punchgs[g[0]][g[1]]}this.mouseUp=this.onMouseUp.bind(this),this.mouseMove=this.onMouseMove.bind(this),this.mouseClick=this.onClick.bind(this),this.complete=this.onComplete.bind(this),l.hasOwnProperty("bounceArrows")&&(this.bounceArrows=l.bounceArrows,this.bounceDelay=parseInt(l.bounceDelay,10),this.readyArrows=this.arrowsReady.bind(this),this.bounceDelay&&(this.delayBounce=this.bounceReady.bind(this))),l.hasOwnProperty("shiftOffset")&&(this.shiftArrows=l.shiftOffset),this.videoBg&&!this.videoSolo&&(this.videoPlay=this.playVideo.bind(this)),this.createDrag(),a.data(s[0],"rs-addon-beforeafter",this)}function i(t){t>0&&this.removeAttribute("data-beforeafter")}function s(){var t=a(this).find(".tp-caption");t.length>1&&t.each(i)}function n(t){var e=t+5;this.style.zIndex=e.toString()}function o(t,e,i,s,n,o,r,a,l,c){return"@-webkit-keyframes "+t+"-"+e+"-rs-beforeafter-bounce-"+i+" {0%, 20%, 50%, 80%, 100% {-webkit-transform: translate"+r+"(0);transform: translate"+r+"(0)}40% {-webkit-transform: translate"+r+"("+s+"px);transform: translate"+r+"("+a+s+"px)}60% {-webkit-transform: translate"+r+"("+n+"px);transform: translate"+r+"("+a+n+"px)}}@keyframes "+t+"-"+e+"-rs-beforeafter-bounce-"+i+" {0%, 20%, 50%, 80%, 100% {-webkit-transform: translate"+r+"(0);transform: translate"+r+"(0)}40% {-webkit-transform: translate"+r+"("+s+"px);transform: translate"+r+"("+a+s+"px)}60% {-webkit-transform: translate"+r+"("+n+"px);transform: translate"+r+"("+a+n+"px)}}.rs-beforeafter-bounce-arrows .rs-"+t+"-"+e+"-rs-beforeafter-bounce-"+i+" {-webkit-animation: "+t+"-"+e+"-rs-beforeafter-bounce-"+i+" "+o+"s "+c+" "+l+";animation: "+t+"-"+e+"-rs-beforeafter-bounce-"+i+" "+o+"s "+c+" "+l+"}"}function r(t,e,i,s,n){return".rs-beforeafter-shift-arrows .rs-"+t+"-"+e+"-rs-beforeafter-shift {-webkit-transition: all "+i+"s "+s+" "+n+"s;transition: all "+i+"s "+s+" "+n+"s}"}var a;window.RevSliderBeforeAfter=function(e,i,s){e&&i&&"undefined"!=typeof punchgs&&((a=e).event.special.rsBeforeAfterDestroyed={remove:function(t){t.handler()}},new t(i,s))},t.prototype={init:function(){var t=this.slider[0].opt,e=t.responsiveLevels,i=t.gridwidth;Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]),this.levels=e,this.widths=i,this.resize=this.onResize.bind(this),this.slider.addClass("rs-before-after-addon").on("revolution.slide.onbeforeswap",this.beforeSwap.bind(this)).on("revolution.slide.onafterswap",this.afterSwap.bind(this))},onLoaded:function(){var t=this,i=this.slider[0].id,n=this.slider.find(".tp-static-layers");this.carousel=this.options.carousel,this.carousel&&this.slider.addClass("before-after-carousel"),n.length||(n=this.slider.find(".tp-revslider-mainul")),this.slider.data("before-after-placer",n).data("beforeafter-slides").each(function(){var n,o,r=a(this);r.find(".tp-parallax-wrap").each(s);var l=r.find('.tp-caption[data-beforeafter="before"]').toArray().map(function(t){var e=(t=a(t)).closest(".rev_row_zone");return e.length?e:t.closest(".tp-parallax-wrap")}),c=r.find('.tp-caption[data-beforeafter="after"]').toArray().map(function(t){var e=(t=a(t)).closest(".rev_row_zone");return e.length?e:t.closest(".tp-parallax-wrap")}),h=r.data("beforeafter-options");r.addClass("rs-addon-beforeafter rs-addon-beforeafter-"+h.direction),t.carousel||r.find("*").attr("draggable",!1);var u=a('<div class="rs-addon-beforeafter-revealer rs-addon-beforeafter-before" />').append(l).appendTo(r),d=a('<div class="rs-addon-beforeafter-revealer rs-addon-beforeafter-after" />'),f=a('<div class="rs-addon-beforeafter-inner" />').append(c)[0],p=document.createElement("div"),m=document.createElement("div"),g=h.bgType;if("image"===g||"external"===g)p.style.backgroundImage="url("+h.bgImage+")",p.style.backgroundPosition=h.bgPos,p.style.backgroundRepeat=h.bgRepeat,p.style.backgroundSize=h.bgFit;else if("solid"===g)p.style.background=h.bgColor;else if("trans"!==g){var v=r.data("beforeafter-video");v&&(v.closest(".tp-parallax-wrap").addClass("rs-video-beforeafter"),t.carousel||(o=v,n=0===r.find(".rs-background-video-layer").length))}r.attr("data-link")&&"back"===r.attr("data-slideindex")&&(u.addClass("rs-beforeafter-pointers"),d.addClass("rs-beforeafter-pointers"));var y="rs-addon-beforeafter-bg-inner";h.filter&&(y+=" "+h.filter),m.className="rs-addon-beforeafter-bg",p.className=y,m.appendChild(p),r.find(".slotholder").append(m),d.append(f).insertBefore(u),t.slides[t.slides.length]=new e(i,m,f,r,o,n,p,h,d[0],u[0],t.slider,t.options,t.carousel,r.attr("data-index"))}),this.init()},beforeSwap:function(t,e){if(!this.checkRemoved()){this.slide=!1;var i;e.currentslide.length&&(i=a.data(e.currentslide[0],"rs-addon-beforeafter"))&&(i.removeEvents(),i[i.animateOut]()),(i=a.data(e.nextslide[0],"rs-addon-beforeafter"))&&i.setup&&i.reset()}},afterSwap:function(t,e){this.checkRemoved()||e.currentslide.hasClass("rs-addon-beforeafter")&&(this.slide=a.data(e.currentslide[0],"rs-addon-beforeafter"),this.slide.setup||(this.onResize(!1,!0),this.slide.onSetup(),this.slider.on("revolution.slide.afterdraw",this.resize)),this.slide.reset(!0),this.slide.reveal(),this.slide.addEvents())},checkRemoved:function(){return(!this.slider||!document.body.contains(this.slider[0]))&&(this.destroy(),!0)},onVideoPlay:function(t,e){this.slide&&this.slide.videoBg&&!this.slide.videoSolo&&this.slide.playVideo()},destroy:function(){if(a(window).off(".rsaddonbeforeafter"),this.slides)for(;this.slides.length;)this.slides[0].destroy(),this.slides.shift();for(var t in this)this.hasOwnProperty(t)&&delete this[t]},onFocus:function(){clearTimeout(this.timer);for(var t=this.slides.length;t--;)this.slides[t].supress=!0;this.focusTimer=setTimeout(this.timer,100)},onTimer:function(){for(var t=this.slides.length;t--;)this.slides[t].supress=!1},onResize:function(t,e){if(t&&this.carousel)return clearTimeout(this.resizeTimer),void(this.resizeTimer=setTimeout(this.resize,250));var i=this.slide;if(i){var s,n,o,r=0,a=this.levels.length;this.carousel?(s=i.slide.width(),n=i.slide.height()):(s=this.slider.width(),n=this.slider.height());for(var l=0;l<a;l++)s<this.levels[l]&&(r=l);e||(punchgs.TweenLite.killTweensOf(i.bg),punchgs.TweenLite.killTweensOf(i.after),punchgs.TweenLite.killTweensOf(i.before),punchgs.TweenLite.killTweensOf(i.revealBtn),i.revealLine&&punchgs.TweenLite.killTweensOf(i.revealLine));for(var c=s/this.widths[r],h=this.slides.length;h--;)(o=this.slides[h]).level=r,o.scale=c,o.blurred=!1,o.sliderWidth=s,o.sliderHeight=n,o.normal?(o.bgInner.style.width=s+"px",o.inner.style.width=s+"px"):(o.bgInner.style.height=n+"px",o.inner.style.height=n+"px");if(!e){var u,d;i.normal?(-1===(u=i.moveto[i.level]).search("%")&&(u=(parseInt(u,10)*c).toFixed(0)+"px"),d="50%"):(u="50%",-1===(d=i.moveto[i.level]).search("%")&&(d=(parseInt(d,10)*c).toFixed(0)+"px")),i.resetDrag(u,d)}}}},e.prototype={createDrag:function(){var t=this.globals,e=t.boxShadow,i=t.arrowStyles,s=t.arrowShadow,n=t.arrowBorder,o=t.dividerStyles,r=t.dividerShadow,l=parseInt(i.spacing,10),c='<span class="rs-addon-beforeafter-btn rs-before-after-element rs-addon-beforeafter-btn-'+this.direction+'" style="color: '+i.color+";font-size: "+parseInt(i.size,10)+"px;background-color:"+i.bgColor+";padding: "+parseInt(i.padding,10)+"px;border-radius: "+i.borderRadius+";cursor: "+t.cursor;e&&(c+="; box-shadow: 0px 0px "+parseInt(e.blur,10)+"px "+parseInt(e.strength,10)+"px "+e.color+";"),n&&(c+="; border: "+parseInt(n.size,10)+"px solid "+n.color+";"),s&&(c+="; text-shadow: 0px 0px "+parseInt(s.blur,10)+"px "+s.color+";");var h,u,d,f,p,m="",g="",v="",y="",b=this.shiftArrows?" rs-"+this.id+"-"+this.index+"-rs-beforeafter-shift":"";this.normal?(f="padding-right",p="padding-left",h=i.leftIcon,u=i.rightIcon,this.bounceArrows&&(m=(d=" rs-"+this.id+"-"+this.index+"-rs-beforeafter-bounce-")+"left",g=d+"right"),this.shiftArrows&&(v="transform: translateX(-"+this.shiftArrows+"px);",y="transform: translateX("+this.shiftArrows+"px);")):(f="margin-bottom",p="margin-top",h=i.topIcon,u=i.bottomIcon,this.bounceArrows&&(m=(d=" rs-"+this.id+"-"+this.index+"-rs-beforeafter-bounce-")+"top",g=d+"bottom"),this.shiftArrows&&(v="transform: translateY(-"+this.shiftArrows+"px);",y="transform: translateY("+this.shiftArrows+"px);")),c+='" />',this.btn1=a('<i class="'+h+b+m+'" style="'+v+f+": "+l+'px">'),this.btn2=a('<i class="'+u+b+g+'" style="'+y+p+": "+l+'px">'),this.btn=a(c).on("mousedown touchstart",this.onMouseDown.bind(this)),this.btn[0].appendChild(this.btn1[0]),this.btn[0].appendChild(this.btn2[0]);var _=parseInt(o.width,10),w=[];if(_){var x=this.normal?"margin-left: ":"margin-top: ",C=-Math.floor(.5*_),S='<span class="rs-addon-beforeafter-line rs-before-after-element rs-beforeafter-'+this.direction+'" style="'+this.size+": "+_+"px; "+x+C+"px; background-color: "+o.color;r&&(S+="; box-shadow: 0px 0px "+parseInt(r.blur,10)+"px "+parseInt(r.strength,10)+"px "+r.color+";"),S+='"></span>',this.revealLine=a(S)[0],this.pixel=_%2==0?0:1,w[0]=this.revealLine}this.revealBtn=this.btn[0],w[w.length]=this.revealBtn,this.carousel?this.slide.append(w):a(w).insertAfter(this.slider.data("before-after-placer"))},onSetup:function(){var t=this.btn.outerWidth(!0),e=this.btn.outerHeight(!0),i=Math.max(t,e),s=0,n=0;this.revealLine&&(this.normal?s+=this.pixel:n+=this.pixel);var o=Math.floor(.5*i);this.buffer=o,this.setup=!0,this.btn.css({width:i,height:i,marginTop:-o+n,marginLeft:-o+s}),delete this.btn},addEvents:function(){var t=this.carousel?this.slide:this.slider;t.on("mouseup.rsaddonbeforeafter mouseleave.rsaddonbeforeafter touchend.rsaddonbeforeafter",this.mouseUp).on("mousemove.rsaddonbeforeafter touchmove.rsaddonbeforeafter",this.mouseMove),this.transition&&t.on("click.rsaddonbeforeafter",this.mouseClick)},removeEvents:function(){this.onMouseUp();(this.carousel?this.slide:this.slider).off(".rsaddonbeforeafter"),this.shiftArrows&&this.btn1.off(".rsaddonbeforeafter"),this.bounceDelay&&clearTimeout(this.bounceTimer)},updateDrag:function(t,e){if(this.before){var i,s;this.normal?(i=t,s=this.sliderWidth-t,e=Math.min(this.sliderHeight-this.buffer,Math.max(e,this.buffer))):(i=e,s=this.sliderHeight-e,t=Math.min(this.sliderWidth-this.buffer,Math.max(t,this.buffer))),this.revealBtn.style.left=t+"px",this.revealBtn.style.top=e+"px",this.before.style[this.size]=i+"px",this.after.style[this.size]=s+"px",this.bg.style[this.size]=s+"px",this.revealLine&&(this.revealLine.style[this.axis]=i+"px")}},resetDrag:function(t,e){if(this.before){var i,s;this.normal?(i=t,s=parseInt(t,10),s=-1!==t.search("%")?100-s+"%":this.sliderWidth-s+"px"):(i=e,s=parseInt(e,10),s=-1!==e.search("%")?100-s+"%":this.sliderHeight-s+"px"),this.revealBtn.style.left=t,this.revealBtn.style.top=e,this.before.style[this.size]=i,this.after.style[this.size]=s,this.bg.style[this.size]=s,this.revealLine&&(this.revealLine.style[this.axis]=i)}},onMouseDown:function(t){this.prevent=!0,this.canDrag=!0,this.slider.addClass("dragging"),this.shiftArrows&&(this.btn1.off(".rsaddonbeforeafter"),this.slider.addClass("rs-beforeafter-shift-arrows")),this.bounceArrows&&(this.bounceDelay&&clearTimeout(this.bounceTimer),this.slider.removeClass("rs-beforeafter-bounce-arrows")),this.carousel&&t.stopImmediatePropagation()},onMouseMove:function(t){if(!this.supress&&this.canDrag){var e=t.originalEvent.touches;e&&(t=e[0]);var i=(this.carousel?this.slide:this.slider).offset(),s=t.pageX-i.left,n=t.pageY-i.top;(this.normal?s>0&&s<this.sliderWidth:n>0&&n<this.sliderHeight)&&this.updateDrag(s,n)}},onMouseUp:function(t){this.canDrag=!1,this.slider.removeClass("dragging"),t&&"infinite"===this.bounceArrows&&(this.bounceDelay?this.bounceTimer=setTimeout(this.delayBounce,this.bounceDelay):(this.shiftArrows&&this.slider.removeClass("rs-beforeafter-shift-arrows"),this.slider.addClass("rs-beforeafter-bounce-arrows")))},onClick:function(t){if(!this.supress&&!this.blurred)if(this.prevent)this.prevent=!1;else{var e=t.target,i=/tparrows|tp-bullet|tp-tab|tp-thumb|tp-withaction/;if(!("A"===t.target.tagName||i.test(e.className)||function(t,e){for(;t.parentNode;)if("A"===(t=t.parentNode).tagName||e.test(t.className))return!0;return!1}(e,i))){var s,n,o=(this.carousel?this.slide:this.slider).offset(),r=t.pageX-o.left,a=t.pageY-o.top;this.normal?(n=r,s=this.sliderWidth,a=Math.min(this.sliderHeight-this.buffer,Math.max(a,this.buffer))):(n=a,s=this.sliderHeight,r=Math.min(this.sliderWidth-this.buffer,Math.max(r,this.buffer))),punchgs.TweenLite.to(this.revealBtn,this.time,{left:r,top:a,ease:this.transition});var l={ease:this.transition};l[this.size]=s-n,punchgs.TweenLite.to(this.bg,this.time,l),(l={ease:this.transition})[this.size]=n,punchgs.TweenLite.to(this.before,this.time,l),(l={ease:this.transition})[this.size]=s-n,punchgs.TweenLite.to(this.after,this.time,l),(l={ease:this.transition})[this.axis]=n,this.revealLine&&punchgs.TweenLite.to(this.revealLine,this.time,l)}}},bounceReady:function(){this.slider.removeClass("rs-beforeafter-shift-arrows").addClass("rs-beforeafter-bounce-arrows")},arrowsReady:function(){this.bounceDelay?this.bounceTimer=setTimeout(this.delayBounce,this.bounceDelay):this.bounceReady()},onComplete:function(){this.supress=!1,this.shiftArrows?(this.bounceArrows&&this.btn1.one("webkitTransitionEnd.rsaddonbeforeafter transitionend.rsaddonbeforeafter",this.readyArrows),this.slider.addClass("rs-beforeafter-shift-arrows")):this.bounceArrows&&this.arrowsReady()},fade:function(){punchgs.TweenLite.to(this.bg,.3,{opacity:0,ease:punchgs.Power2.easeInOut}),punchgs.TweenLite.to(this.revealBtn,.3,{autoAlpha:0,ease:punchgs.Power2.easeInOut}),this.revealLine&&punchgs.TweenLite.to(this.revealLine,.3,{autoAlpha:0,ease:punchgs.Power2.easeInOut})},collapse:function(){(t={ease:this.animation})[this.size]=0,punchgs.TweenLite.to(this.bg,this.timing,t);var t={ease:this.animation};t[this.size]="100%",punchgs.TweenLite.to(this.before,this.timing,t),(t={ease:this.animation})[this.size]=0,punchgs.TweenLite.to(this.after,this.timing,t),(t={autoAlpha:0,ease:this.animation})[this.axis]="100%",this.revealLine&&punchgs.TweenLite.to(this.revealLine,this.timing,t),(t={autoAlpha:0,ease:this.animation})[this.axis]="100%",punchgs.TweenLite.to(this.revealBtn,this.timing,t)},reset:function(t){this.supress=!0,this.normal?(this.revealBtn.style.top="50%",this.revealBtn.style.left="100%"):(this.revealBtn.style.top="100%",this.revealBtn.style.left="50%"),this.before.style[this.size]="100%",this.after.style[this.size]="0",this.bg.style[this.size]="0",this.revealLine&&(this.revealLine.style[this.axis]="100%"),this.shiftArrows&&this.btn1.off(".rsaddonbeforeafter"),this.bounceDelay&&clearTimeout(this.bounceTimer),t&&(this.shiftArrows&&this.slider.removeClass("rs-beforeafter-shift-arrows"),this.bounceArrows&&this.slider.removeClass("rs-beforeafter-bounce-arrows"))},playVideo:function(){a.fn.revolution.playAnimationFrame({caption:this.videoBg,opt:this.slider[0].opt,frame:"frame_0",triggerdirection:"in",triggerframein:"frame_0",triggerframeout:"frame_999"})},checkVideo:function(){var t=this.slide.find(".rs-background-video-layer video");t.length?t.off(".rsaddonbeforeafter").on("play.rsaddonbeforeafter",this.videoPlay):this.playVideo()},reveal:function(){this.videoBg&&(this.videoSolo?this.playVideo():this.checkVideo());var t,e,i,s,n=this.moveto[this.level],o=-1!==n.search("%"),r=parseInt(n,10);this.normal?(o?(i=t=n,e=100-r+"%"):(n=t=i=r*this.scale,e=this.sliderWidth-n),s="50%"):(o?(s=t=n,e=100-r+"%"):(n=t=s=r*this.scale,e=this.sliderHeight-n),i="50%"),(a={ease:this.animation,delay:this.delay})[this.size]=e,this.bg.style.opacity="1",punchgs.TweenLite.to(this.bg,this.timing,a);var a={ease:this.animation,delay:this.delay};a[this.size]=t,punchgs.TweenLite.to(this.before,this.timing,a),(a={ease:this.animation,delay:this.delay})[this.size]=e,this.after.style.opacity="1",punchgs.TweenLite.to(this.after,this.timing,a),this.revealLine&&((a={ease:this.animation,delay:this.delay})[this.axis]=n,punchgs.TweenLite.to(this.revealLine,.3,{autoAlpha:1,ease:punchgs.Power2.easeOut}),punchgs.TweenLite.to(this.revealLine,this.timing,a)),punchgs.TweenLite.to(this.revealBtn,.3,{autoAlpha:1,ease:punchgs.Power2.easeOut}),punchgs.TweenLite.to(this.revealBtn,this.timing,{delay:this.delay,left:i,top:s,ease:this.animation,onComplete:this.complete})},destroy:function(){punchgs.TweenLite.killTweensOf(this.bg),punchgs.TweenLite.killTweensOf(this.after),punchgs.TweenLite.killTweensOf(this.before),punchgs.TweenLite.killTweensOf(this.revealBtn),this.revealLine&&punchgs.TweenLite.killTweensOf(this.revealLine),a.removeData(this.slide[0],"rs-addon-beforeafter",this);for(var t in this)this.hasOwnProperty(t)&&delete this[t]}},"undefined"!=typeof jQuery&&jQuery(".rev_slider").each(function(){var t="",e=jQuery(this),i=e[0].id,s=e.find("li[data-beforeafter]");if(s.length){if(s.each(function(){var e,s=jQuery(this),a=s.attr("data-index"),l=JSON.parse(s.attr("data-beforeafter"));if(s.data("beforeafter-options",l),/html5|youtube|vimeo/.test(l.bgType)){var c,h="['100%','100%','100%','100%']",u='<div class="tp-caption tp-resizeme fullscreenvideo disabled_lc tp-videolayer" id="slide-'+s.attr("data-index").replace("rs-","")+'-layer-0" data-type="video" data-x="[\'0\',\'0\',\'0\',\'0\']" data-y="[\'0\',\'0\',\'0\',\'0\']" data-beforeafter="after" data-basealign="slide" data-responsive_offset="on" data-exitfullscreenonpause="off" data-videocontrols="none" data-videowidth="'+h+'" data-videoheight="'+h+'" data-videopreload="auto" data-paddingtop="[0,0,0,0]" data-paddingright="[0,0,0,0]" data-paddingbottom="[0,0,0,0]" data-paddingleft="[0,0,0,0]" data-autoplay="on" data-frames=\''+('[{"delay":"'+(l.carousel?"10":"bytrigger")+'","speed":0,"frame":"0","to":"o:1;","ease":"Linear.easeNone"},{"delay":"wait","speed":0,"frame":"999","ease":"Linear.easeNone"}]')+"' data-textAlign=\"['inherit','inherit','inherit','inherit']\" data-videoloop=\""+l.loopVideo+'" data-aspectratio="'+l.aspectRatio+'" ';switch(l.forceCover&&(u+='data-forceCover="1" '),"none"!==l.dottedOverlay&&(u+='data-dottedoverlay="'+l.dottedOverlay+'" '),l.nextSlideOnEnd&&(u+='data-nextslideatend="true" '),l.rewindOnStart&&(u+='data-forcerewind="on" '),l.videoStartAt&&(u+='data-videostartat="'+l.videoStartAt+'" '),l.videoEndAt&&(u+='data-videoendat="'+l.videoEndAt+'" '),l.bgType){case"html5":l.muteVideo&&(u+='data-volume="mute" ');var d=l.videoOgv,f=l.videoWebm,p=l.videoMpeg;(p||d||f)&&(u+='data-videoogv="'+d+'" ',u+='data-videowebm="'+f+'" ',u+='data-videomp4="'+p+'" ',c=!0);break;case"youtube":var m=l.videoId;m&&(u+='data-ytid="'+m+'" ',u+='data-videorate="'+l.videoSpeed+'" ',u+='data-videoattributes="'+l.youtubeArgs+'" ',l.muteVideo?u+='data-volume="mute" ':u+='data-volume="'+l.videoVolume+'" ',c=!0);break;case"vimeo":var g=l.videoId;g&&(u+='data-vimeoid="'+g+'" ',u+='data-videoattributes="'+l.vimeoArgs+'" ',l.muteVideo?u+='data-volume="mute" ':u+='data-volume="'+l.videoVolume+'" ',c=!0)}if(c){s.find(".tp-caption").each(n);var v=jQuery(u+'style="z-index: 5"><div class="rs-fullvideo-cover"></div></div>').insertAfter(s.find(".rev-slidebg"));s.data("beforeafter-video",v)}}if(l.hasOwnProperty("bounceArrows")){e=.001*parseInt(l.bounceSpeed,10);var y,b,_="initial"!==l.bounceArrows?"infinite":"1",w=parseInt(l.bounceAmount,10),x="repel"===l.bounceType,C=Math.round(.5*w);"horizontal"===l.direction?(y="X",b=["left","right"]):(y="Y",b=["top","bottom"]);for(var S=0;S<2;S++){var I=x?0===S?"-":"":0===S?"":"-";t+=o(i,a,b[S],w,C,e.toFixed(2),y,I,_,l.bounceEasing)}}if(l.hasOwnProperty("shiftOffset")){e=.001*parseInt(l.shiftTiming,10);for(var T=.001*parseInt(l.shiftDelay,10),A=0;A<2;A++)t+=r(i,a,e,l.shiftEasing,T)}}),t){var a=document.createElement("style");a.type="text/css",a.innerHTML=t,document.head.appendChild(a)}e.data("beforeafter-slides",s)}})}();