PageSourceSearch

https://paideuma.tv/sites/default/files/js/js_itlKlN355Zt2Qvcfh2RiWoczY8BbhA-_q8vKHCX03sc.js

js paideuma.tv collected 2026-10-02 21:57:13 UTC 191,137 bytes, 3,370 lines download raw bytes

vendor: 5,192 bytes, lines 1-6
1/*!
2  hey, [be]Lazy.js - v1.8.2 - 2016.10.25
3  A fast, small and dependency free lazy load script (https://github.com/dinbror/blazy)
4  (c) Bjoern Klinggaard - @bklinggaard - http://dinbror.dk/blazy
5*/
6  (function(q,m){"function"===typeof define&&define.amd?define(m):"object"===typeof exports?module.exports=m():q.Blazy=m()})(this,function(){function q(b){var c=b._util;c.elements=E(b.options);c.count=c.elements.length;c.destroyed&&(c.destroyed=!1,b.options.container&&l(b.options.container,function(a){n(a,"scroll",c.validateT)}),n(window,"resize",c.saveViewportOffsetT),n(window,"resize",c.validateT),n(window,"scroll",c.validateT));m(b)}function m(b){for(var c=b._util,a=0;a<c.count;a++){var d=c.elements[a],e;a:{var g=d;e=b.options;var p=g.getBoundingClientRect();if(e.container&&y&&(g=g.closest(e.containerClass))){g=g.getBoundingClientRect();e=r(g,f)?r(p,{top:g.top-e.offset,right:g.right+e.offset,bottom:g.bottom+e.offset,left:g.left-e.offset}):!1;break a}e=r(p,f)}if(e||t(d,b.options.successClass))b.load(d),c.elements.splice(a,1),c.count--,a--}0===c.count&&b.destroy()}function r(b,c){return b.right>=c.left&&b.bottom>=c.top&&b.left<=c.right&&b.top<=c.bottom}function z(b,c,a){if(!t(b,a.successClass)&&(c||a.loadInvisible||0<b.offsetWidth&&0<b.offsetHeight))if(c=b.getAttribute(u)||b.getAttribute(a.src)){c=c.split(a.separator);var d=c[A&&1<c.length?1:0],e=b.getAttribute(a.srcset),g="img"===b.nodeName.toLowerCase(),p=(c=b.parentNode)&&"picture"===c.nodeName.toLowerCase();if(g||void 0===b.src){var h=new Image,w=function(){a.error&&a.error(b,"invalid");v(b,a.errorClass);k(h,"error",w);k(h,"load",f)},f=function(){g?p||B(b,d,e):b.style.backgroundImage='url("'+d+'")';x(b,a);k(h,"load",f);k(h,"error",w)};p&&(h=b,l(c.getElementsByTagName("source"),function(b){var c=a.srcset,e=b.getAttribute(c);e&&(b.setAttribute("srcset",e),b.removeAttribute(c))}));n(h,"error",w);n(h,"load",f);B(h,d,e)}else b.src=d,x(b,a)}else"video"===b.nodeName.toLowerCase()?(l(b.getElementsByTagName("source"),function(b){var c=a.src,e=b.getAttribute(c);e&&(b.setAttribute("src",e),b.removeAttribute(c))}),b.load(),x(b,a)):(a.error&&a.error(b,"missing"),v(b,a.errorClass))}function x(b,c){v(b,c.successClass);c.success&&c.success(b);b.removeAttribute(c.src);b.removeAttribute(c.srcset);l(c.breakpoints,function(a){b.removeAttribute(a.src)})}function B(b,c,a){a&&b.setAttribute("srcset",a);b.src=c}function t(b,c){return-1!==(" "+b.className+" ").indexOf(" "+c+" ")}function v(b,c){t(b,c)||(b.className+=" "+c)}function E(b){var c=[];b=b.root.querySelectorAll(b.selector);for(var a=b.length;a--;c.unshift(b[a]));return c}function C(b){f.bottom=(window.innerHeight||document.documentElement.clientHeight)+b;f.right=(window.innerWidth||document.documentElement.clientWidth)+b}function n(b,c,a){b.attachEvent?b.attachEvent&&b.attachEvent("on"+c,a):b.addEventListener(c,a,{capture:!1,passive:!0})}function k(b,c,a){b.detachEvent?b.detachEvent&&b.detachEvent("on"+c,a):b.removeEventListener(c,a,{capture:!1,passive:!0})}function l(b,c){if(b&&c)for(var a=b.length,d=0;d<a&&!1!==c(b[d],d);d++);}function D(b,c,a){var d=0;return function(){var e=+new Date;e-d<c||(d=e,b.apply(a,arguments))}}var u,f,A,y;return function(b){if(!document.querySelectorAll){var c=document.createStyleSheet();document.querySelectorAll=function(a,b,d,h,f){f=document.all;b=[];a=a.replace(/\[for\b/gi,"[htmlFor").split(",");for(d=a.length;d--;){c.addRule(a[d],"k:v");for(h=f.length;h--;)f[h].currentStyle.k&&b.push(f[h]);c.removeRule(0)}return b}}var a=this,d=a._util={};d.elements=[];d.destroyed=!0;a.options=b||{};a.options.error=a.options.error||!1;a.options.offset=a.options.offset||100;a.options.root=a.options.root||document;a.options.success=a.options.success||!1;a.options.selector=a.options.selector||".b-lazy";a.options.separator=a.options.separator||"|";a.options.containerClass=a.options.container;a.options.container=a.options.containerClass?document.querySelectorAll(a.options.containerClass):!1;a.options.errorClass=a.options.errorClass||"b-error";a.options.breakpoints=a.options.breakpoints||!1;a.options.loadInvisible=a.options.loadInvisible||!1;a.options.successClass=a.options.successClass||"b-loaded";a.options.validateDelay=a.options.validateDelay||25;a.options.saveViewportOffsetDelay=a.options.saveViewportOffsetDelay||50;a.options.srcset=a.options.srcset||"data-srcset";a.options.src=u=a.options.src||"data-src";y=Element.prototype.closest;A=1<window.devicePixelRatio;f={};f.top=0-a.options.offset;f.left=0-a.options.offset;a.revalidate=function(){q(a)};a.load=function(a,b){var c=this.options;void 0===a.length?z(a,b,c):l(a,function(a){z(a,b,c)})};a.destroy=function(){var a=this._util;this.options.container&&l(this.options.container,function(b){k(b,"scroll",a.validateT)});k(window,"scroll",a.validateT);k(window,"resize",a.validateT);k(window,"resize",a.saveViewportOffsetT);a.count=0;a.elements.length=0;a.destroyed=!0};d.validateT=D(function(){m(a)},a.options.validateDelay,a);d.saveViewportOffsetT=D(function(){C(a.options.offset)},a.options.saveViewportOffsetDelay,a);C(a.options.offset);l(a.options.breakpoints,function(a){if(a.width>=window.screen.width)return u=a.src,!1});setTimeout(function(){q(a)})}});
6;
7!function(t,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.dBlazy=e()}(this,function(){"use strict";var t={};return t.matches=function(t,e){var n=Element.prototype;return n.matches||(n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector||function(t){for(var e=(window.document||window.ownerDocument).querySelectorAll(t),n=e.length;--n>=0&&e.item(n)!==this;);return n>-1}),!!t.matches(e)},t.pixelRatio=function(){return window.devicePixelRatio||1},t.windowWidth=function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||window.screen.width},t.activeWidth=function(t,e){var n=this,i=Object.keys(t),a=i[0],r=i[i.length-1],o=function(t){var i=n.windowWidth()*n.pixelRatio();return e?t<=n.windowWidth():t>=i},c=i.filter(o).map(function(e){return t[e]})[e?"pop":"shift"]();return"undefined"===c?t[n.windowWidth()>=r?r:a]:c},t.equal=function(t,e){return null!==t&&t.nodeName.toLowerCase()===e},t.closest=function(e,n){for(;e&&!(e instanceof HTMLDocument);e=e.parentNode)if(t.matches(e,n))return e;return null},t.extend=Object.assign||function(t){t=t||{};for(var e=1,n=arguments.length;e<n;e++)if(arguments[e])for(var i in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],i)&&(t[i]=arguments[e][i]);return t},t.forEach=function(t,e,n){var i=Object.prototype;if("[object Object]"===i.toString.call(t))for(var a in t)i.hasOwnProperty.call(t,a)&&e.call(n,t[a],a,t);else if(t)for(var r=0,o=t.length;r<o;r++)e.call(n,t[r],r,t)},t.hasClass=function(t,e){return t.classList?t.classList.contains(e):-1!==t.className.indexOf(e)},t.addClass=function(e,n){e.classList?e.classList.add(n):t.hasClass(e,n)||(e.className+=" "+n)},t.setAttr=function(t,e,n){if(t.hasAttribute("data-"+e)){var i=t.getAttribute("data-"+e);"src"===e?t.src=i:t.setAttribute(e,i),n&&t.removeAttribute("data-"+e)}},t.setAttrs=function(t,e,n){var i=this;i.forEach(e,function(e){i.setAttr(t,e,n)})},t.setAttrsWithSources=function(t,e,n){var i=this,a=t.parentNode||null,r=a&&i.equal(a,"picture"),o=r?a.getElementsByTagName("source"):t.getElementsByTagName("source");e=e||(r?"srcset":"src"),o.length&&i.forEach(o,function(t){i.setAttr(t,e,n)})},t.updateBg=function(t,e){var n=this,i=n.parse(t.getAttribute("data-backgrounds"));if(i){var a=n.activeWidth(i,e);a&&"undefined"!==a&&(t.style.backgroundImage='url("'+a.src+'")',t.style.paddingBottom=a.ratio+"%")}},t.removeAttrs=function(t,e){this.forEach(e,function(e){t.removeAttribute("data-"+e)})},t.on=function(e,n,i,a){e&&e.addEventListener(n,function(e){for(var n=e.target;n&&n!==this;)t.matches(n,i)&&a.call(n,e),n=n.parentNode})},t.once=function(t){var e,n=!1;return function(){return n?e:(n=!0,e=t.apply(this,arguments),t=null,e)}},t.parse=function(t){try{return JSON.parse(t)}catch(t){return!1}},t.animate=function(t){function e(){t.classList.remove("animated",i),t.removeEventListener("animationend",e),n.forEach(a,function(e){t.style.removeProperty(e)})}var n=this,i=t.dataset.animation,a=["animation","animation-duration","animation-delay","animation-iteration-count"];t.classList.add("animated",i),n.forEach(["Duration","Delay","IterationCount"],function(e){"animation"+e in t.dataset&&(t.style["animation"+e]=t.dataset["animation"+e])}),n.removeAttrs(t,a),t.addEventListener("animationend",e)},t.throttle=function(t,e,n){var i=0;return function(){var a=+new Date;a-i<e||(i=a,t.apply(n,arguments))}},t.resize=function(t,e){return window.onresize=function(){window.clearTimeout(e),e=window.setTimeout(t,200)},t},t.trigger=function(t,e,n){var i,a={detail:n||{},bubbles:!0,cancelable:!0};window.CustomEvent?i=new CustomEvent(e,a):(i=document.createEvent("CustomEvent"),i.initCustomEvent(e,!0,!0,a)),t.dispatchEvent(i)},t});
8;
9!function(o,t){"use strict";"function"==typeof define&&define.amd?define([window.dBlazy],t):"object"==typeof exports?module.exports=t(window.dBlazy):o.Bio=t(window.dBlazy)}(this,function(o){"use strict";function t(o){var t=this;t.options=s.extend({},t.defaults,o||{}),c=!1,u=!1,n(t)}function n(o){var t={rootMargin:o.options.rootMargin,threshold:o.options.threshold};
9o.elms=(o.options.root||e).querySelectorAll(o.options.selector+":not(."+o.options.successClass+")"),o.count=o.elms.length,o.windowWidth=s.windowWidth(),o.prepare(),o.observer=new IntersectionObserver(o.observing.bind(o),t),u||(o.observe(),u=!0)}var e=document,s=o,i=0,r=0,c=!1,u=!1,d=t.prototype;return d.constructor=t,d.count=0,d.counted=-1,d.erCounted=0,d._er=-1,d._ok=1,d.defaults={root:null,disconnect:!1,error:!1,success:!1,intersecting:!1,observing:!1,useAjax:!1,successClass:"b-loaded",selector:".b-lazy",errorClass:"b-error",bgClass:"b-bg",rootMargin:"0px",threshold:[0]},d.load=function(o){var t=this;t.isValid(o)?t.intersecting(o):s.forEach(o,function(o){t.isValid(o)&&t.intersecting(o)}),c||t.disconnect()},d.isLoaded=function(o){return s.hasClass(o,this.options.successClass)},d.isValid=function(o){return"object"==typeof o&&void 0===o.length&&!this.isLoaded(o)},d.prepare=function(){},d.revalidate=function(o){var t=this;(!0===o||t.count!==t.counted)&&r<t.counted&&(c=!1,t.elms=(t.options.root||e).querySelectorAll(t.options.selector),t.observe(),r++)},d.intersecting=function(o){var t=this;"function"==typeof t.options.intersecting&&t.options.intersecting(o,t.options),s.trigger(o,"bio.intersecting",{options:t.options}),t.lazyLoad(o),t.counted++,c||t.observer.unobserve(o)},d.lazyLoad=function(o){},d.success=function(o,t,n){var e=this;"function"==typeof e.options.success&&e.options.success(o,t,n,e.options),e.erCounted>0&&e.erCounted--},d.error=function(o,t,n){var e=this;"function"==typeof e.options.error&&e.options.error(o,t,n,e.options),e.erCounted++},d.loaded=function(o,t,n){var e=this;o.classList.add(t===e._ok?e.options.successClass:e.options.errorClass),e[t===e._ok?"success":"error"](o,t,n)},d.observe=function(){var o=this;i=o.elms.length,s.forEach(o.elms,function(t){o.isLoaded(t)||o.observer.observe(t)})},d.observing=function(o,t){var n=this;n.entries=o,c||(s.forEach(o,function(o){"function"==typeof n.options.observing&&n.options.observing(o,t,n.options),(o.isIntersecting||o.intersectionRatio>0)&&(n.isLoaded(o.target)||n.intersecting(o.target),i--)}),n.disconnect())},d.disconnect=function(o){var t=this;t.erCounted>0&&!o||((0===i||t.count===t.counted)&&t.options.disconnect||o)&&(t.observer.disconnect(),c=!0)},d.destroy=function(o){var t=this;t.disconnect(o),t.observer=null},d.disconnected=function(){return c},d.reinit=function(){c=!1,u=!1,n(this)},t});
10;
11!function(t,e){"use strict";"function"==typeof define&&define.amd?define([window.dBlazy,window.Bio],e):"object"==typeof exports?module.exports=e(window.dBlazy,window.Bio):t.BioMedia=e(window.dBlazy,window.Bio)}(this,function(t,e){"use strict";var a=t,o=e,s="src",u="srcset",c="data-src",d="data-src",l="data-srcset",r=[s],p=[u,s];function i(t){return o.apply(this,arguments)}var n,f,e=i.prototype=Object.create(e.prototype);return e.constructor=i,e.prepare=(n=e.prepare,function(){var e,o=this;return o.options.breakpoints&&(e=[],a.forEach(o.options.breakpoints,function(t){if(r.push(t.src.replace("data-","")),t.width>=o.windowWidth)return c=t.src,e.push(c),!1}),0<e.length&&(c=e[0])),n.call(this)}),e.lazyLoad=(f=e.lazyLoad,function(t){if(!t.hasAttribute("data-bio-hit")){var e=this,o=t.parentNode,i=a.equal(t,"img"),r=void 0===t.src&&t.classList.contains(e.options.bgClass),n=o&&a.equal(o,"picture"),o=a.equal(t,"video");return n?(a.setAttrsWithSources(t,u,!0),a.setAttr(t,s,!0),e.loaded(t,e._ok)):o?(a.setAttrsWithSources(t,s,!0),t.load(),e.loaded(t,e._ok)):i||r?e.setImage(t,r):t.getAttribute(d)&&t.hasAttribute(s)&&(a.setAttr(t,s,!0),e.loaded(t,e._ok)),t.setAttribute("data-bio-hit",1),f.apply(this,arguments)}}),e.promise=function(r,n){var s=this;return new Promise(function(t,e){function o(){n?s.setBg(r):a.setAttrs(r,p,!1)}var i=new Image;i.onload=function(){o(),t(s._ok)},i.onerror=function(){o(),e(s._er)},i.src=r.getAttribute(n?c:d),r.hasAttribute(l)&&(i.srcset=r.getAttribute(l))})},e.setImage=function(e,o){var i=this;return i.promise(e,o).then(function(t){i.loaded(e,t),a.removeAttrs(e,o?r:p)}).catch(function(t){i.loaded(e,t),e.removeAttribute("data-bio-hit")}).finally(function(){a.trigger(e,"bio.finally",{options:i.options})})},e.setBg=function(t){t.hasAttribute(c)&&(t.style.backgroundImage='url("'+t.getAttribute(c)+'")',t.removeAttribute(s))},i});
12;
vendor: 11,960 bytes, lines 13-18
13/*!
14	Colorbox 1.6.4
15	license: MIT
16	http://www.jacklmoore.com/colorbox
17*/
18(function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!U){U=$=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("<div/>"),w()}}function p(){x||(V=!1,E=t(i),x=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),L=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),y=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('<button type="button"/>').attr({id:Z+"Previous"}),K=t('<button type="button"/>').attr({id:Z+"Next"}),S=t('<button type="button"/>').attr({id:Z+"Slideshow"}),L),B=t('<button type="button"/>').attr({id:Z+"Close"}),y.append(n(se).append(n(se,"TopLeft"),T=n(se,"TopCenter"),n(se,"TopRight")),n(se,!1,"clear:left").append(C=n(se,"MiddleLeft"),b,H=n(se,"MiddleRight")),n(se,!1,"clear:left").append(n(se,"BottomLeft"),k=n(se,"BottomCenter"),n(se,"BottomRight"))).find("div div").css({"float":"left"}),M=n(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=K.add(P).add(R).add(S)),e.body&&!x.parent().length&&t(e.body).append(v,x.append(y,M))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return x?(V||(V=!0,K.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;U&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),U&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),K.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++le;if($=!0,q=!1,u(he),u(ie),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-N-j:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-z-D:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){L.show()},100),_.get("inline")){var c=t(e).eq(0);r=t("<div>").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),q=_.get("createImg"),t(q).addClass(Z+"Photo").bind("error."+Z,function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var e;_.get("retinaImage")&&i.devicePixelRatio>1&&(q.height=q.height/i.devicePixelRatio,q.width=q.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){q.height-=q.height*e,q.width-=q.width*e},_.mw&&q.width>_.mw&&(e=(q.width-_.mw)/q.width,o()),_.mh&&q.height>_.mh&&(e=(q.height-_.mh)/q.height,o())),_.h&&(q.style.marginTop=Math.max(_.mh-q.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(q.style.cursor="pointer",t(q).bind("click."+Z,function(){J.next()})),q.style.width=q.width+"px",q.style.height=q.height+"px",h(q)},1)}),q.src=e):e&&M.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,x,y,b,T,C,H,k,W,E,I,M,L,F,R,S,K,P,B,O,_,j,D,N,z,A,q,U,$,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("<a/>"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){S.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),x.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),S.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),x.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,S.hide(),t(),ae.unbind(ne,e).unbind(ie,t),x.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),S.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("<a/>"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(x[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(x[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=x.offset();if(E.unbind("resize."+Z),x.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,x.css({position:"fixed"})):(l=h,d=s,x.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),x.css({top:c.top,left:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||x.css(r),x.dequeue().animate(r,{duration:e||0,complete:function(){n(),$=!1,y[0].style.width=_.w+z+D+"px",y[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;U&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if(U){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(se,"LoadedContent").append(i),I.hide().appendTo(M.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),M.hide(),t(q).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&x[0].style.removeAttribute("filter")}var n,o,a=W.length;U&&(o=function(){clearTimeout(Q),L.hide(),u(ne),_.get("onComplete")},F.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&R.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?x.fadeTo(g,1,i):i())},"fade"===_.get("transition")?x.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!$&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!$&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){U&&!G&&(G=!0,U=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),x.stop().fadeTo(_.get("fadeOut")||0,0,function(){x.hide(),v.hide(),u(he),I.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){x&&(x.stop(),t[Y].close(),x.stop(!1,!0).remove(),v.remove(),G=!1,x=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window);
18;
19!function(t,a,e,i,n,s){"use strict";function o(t){var e=a.blazy,n=t.getAttribute("data-blazy"),s=n&&"1"!==n?i.parse(n)||{}:{};e.revalidate=e.revalidate||i.hasClass(t,"blazy--revalidate"),i.addClass(t,"blazy--on"),r(t,s)}a.blazy=a.blazy||{init:null,loopRatio:!1,windowWidth:0,blazySettings:{},ioSettings:{},isForced:!1,revalidate:!1,options:{},globals:function(){var t=this,a={success:t.clearing.bind(t),error:t.clearing.bind(t),selector:".b-lazy",errorClass:"b-error",successClass:"b-loaded"};return i.extend(t.blazySettings,t.ioSettings,a)},clearing:function(t){var a=this,e=i.hasClass(t,"b-responsive")&&t.hasAttribute("data-pfsrc"),s=i.closest(t,".media"),o=[t,i.closest(t,".is-loading"),i.closest(t,'[class*="loading"]')];i.forEach(o,function(t){null!==t&&(t.className=t.className.replace(/(\S+)loading/,""))}),n.picturefill&&e&&n.picturefill({reevaluate:!0,elements:[t]}),a.updateContainer(t,s),a.isLoaded(t)&&(a.has(s,"data-animation")||a.has(t,"data-animation"))&&i.animate(a.has(s,"data-animation")?s:t),i.trigger(t,"blazy.done",{options:a.options})},isLoaded:function(t){return null!==t&&i.hasClass(t,this.options.successClass)},has:function(t,a){return null!==t&&t.hasAttribute(a)},updateContainer:function(t,a){var e=this;e.isLoaded(t)&&(i.equal(t.parentNode,"picture")&&e.has(a,"data-dimensions")&&e.updatePicture(t,a),e.has(t,"data-backgrounds")&&i.updateBg(t,e.options.mobileFirst))},updatePicture:function(t,a){a.style.paddingBottom=Math.round(t.naturalHeight/t.naturalWidth*100,2)+"%"},updateRatio:function(t){var a=this,e=i.parse(t.getAttribute("data-dimensions"))||"dimensions"in a.options&&a.options.dimensions;if(!e)return void a.updateFallbackRatio(t);var n=null!==t.querySelector("picture"),s=i.activeWidth(e,n);"undefined"!==s&&(t.style.paddingBottom=s+"%"),(n||a.has(t,"data-backgrounds"))&&a.updateContainer(n?t.querySelector("img"):t,t)},updateFallbackRatio:function(t){!t.hasAttribute("style")&&t.hasAttribute("data-ratio")&&(t.style.paddingBottom=t.getAttribute("data-ratio")+"%")},doNativeLazy:function(t){var a=this;i.setAttrs(t,["srcset","src"],!0),i.setAttrsWithSources(t,!1,!0),i.addClass(t,a.options.successClass),a.clearing(t)},isNativeLazy:function(){return"loading"in HTMLImageElement.prototype},isIo:function(){return this.ioSettings&&this.ioSettings.enabled&&"IntersectionObserver"in n},isBlazy:function(){return!this.isIo()&&"Blazy"in n},forEach:function(t){var a=t.querySelector("[data-blazy]"),e=t.querySelectorAll(".blazy:not(.blazy--on)");e.length>0&&i.forEach(e,o,t),null===a&&r(t)},run:function(t){return this.isIo()?new BioMedia(t):new Blazy(t)},afterInit:function(t){var a=this,e=null===t.querySelector(".media--ratio")?[]:t.querySelectorAll(".media--ratio"),s=function(){a.windowWidth=i.windowWidth(),e.length>0&&i.forEach(e,a.updateRatio.bind(a),t),a.isNativeLazy()||!a.isBlazy()&&!a.revalidate||a.init.revalidate(!0)};s(),n.addEventListener("resize",i.throttle(s,200,a),!1)}};var r=function(t,e){var n=a.blazy,o=t instanceof HTMLDocument?t:i.closest(t,"html");if(e=e||{},e.mobileFirst=e.mobileFirst||!1,s.documentElement.isSameNode(o)||(e.root=o),n.options=i.extend({},n.globals(),e),n.isNativeLazy()||n.isForced){var r=t.querySelectorAll(n.options.selector+"[loading]:not(."+n.options.successClass+")");r.length>0&&i.forEach(r,n.doNativeLazy.bind(n))}n.init=n.run(n.options),n.afterInit(t)};a.behaviors.blazy={attach:function(t){"length"in(t=t||s)&&(t=t[0]);var n=a.blazy;n.blazySettings=e.blazy||{},n.ioSettings=e.blazyIo||{},i.once(n.forEach(t))}}}(jQuery,Drupal,Drupal.settings,dBlazy,this,this.document);
20;
21/*jslint browser: true */ /*global jQuery: true */
22
23/**
24 * jQuery Cookie plugin
25 *
26 * Copyright (c) 2010 Klaus Hartl (stilbuero.de)
27 * Dual licensed under the MIT and GPL licenses:
28 * http://www.opensource.org/licenses/mit-license.php
29 * http://www.gnu.org/licenses/gpl.html
30 *
31 */
32
33// TODO JsDoc
34
35/**
36 * Create a cookie with the given key and value and other optional parameters.
37 *
38 * @example $.cookie('the_cookie', 'the_value');
39 * @desc Set the value of a cookie.
40 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
41 * @desc Create a cookie with all available options.
42 * @example $.cookie('the_cookie', 'the_value');
43 * @desc Create a session cookie.
44 * @example $.cookie('the_cookie', null);
45 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
46 *       used when the cookie was set.
47 *
48 * @param String key The key of the cookie.
49 * @param String value The value of the cookie.
50 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
51 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
52 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
53 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
54 *                             when the the browser exits.
55 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
56 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
57 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
58 *                        require a secure protocol (like HTTPS).
59 * @type undefined
60 *
61 * @name $.cookie
62 * @cat Plugins/Cookie
63 * @author Klaus Hartl/[email protected]
64 */
65
66/**
67 * Get the value of a cookie with the given key.
68 *
69 * @example $.cookie('the_cookie');
70 * @desc Get the value of a cookie.
71 *
72 * @param String key The key of the cookie.
73 * @return The value of the cookie.
74 * @type String
75 *
76 * @name $.cookie
77 * @cat Plugins/Cookie
78 * @author Klaus Hartl/[email protected]
79 */
80jQuery.cookie = function (key, value, options) {
81
82    // key and value given, set cookie...
83    if (arguments.length > 1 && (value === null || typeof value !== "object")) {
84        options = jQuery.extend({}, options);
85
86        if (value === null) {
87            options.expires = -1;
88        }
89
90        if (typeof options.expires === 'number') {
91            var days = options.expires, t = options.expires = new Date();
92            t.setDate(t.getDate() + days);
93        }
94
95        return (document.cookie = [
96            encodeURIComponent(key), '=',
97            options.raw ? String(value) : encodeURIComponent(String(value)),
98            options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
99            options.path ? '; path=' + options.path : '',
100            options.domain ? '; domain=' + options.domain : '',
101            options.secure ? '; secure' : ''
102        ].join(''));
103    }
104
105    // key and possibly options given, get cookie...
106    options = value || {};
107    var result, decode = options.raw ? function (s) { return s; }
107 : decodeURIComponent;
108    return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
109};
110;
111/*!
112 * jQuery Form Plugin
113 * version: 4.2.1
114 * Requires jQuery v1.7 or later
115 * Copyright 2017 Kevin Morris
116 * Copyright 2006 M. Alsup
117 * Project repository: https://github.com/jquery-form/form
118 * Dual licensed under the MIT and LGPLv3 licenses.
119 * https://github.com/jquery-form/form#license
120 */
121!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){"use strict";function b(b){var c=b.data;b.isDefaultPrevented()||(b.preventDefault(),a(b.target).closest("form").ajaxSubmit(c))}function c(b){var c=b.target,d=a(c);if(!d.is("[type=submit],[type=image]")){var e=d.closest("[type=submit]");if(0===e.length)return;c=e[0]}var f=c.form;if(f.clk=c,"image"===c.type)if(void 0!==b.offsetX)f.clk_x=b.offsetX,f.clk_y=b.offsetY;else if("function"==typeof a.fn.offset){var g=d.offset();f.clk_x=b.pageX-g.left,f.clk_y=b.pageY-g.top}else f.clk_x=b.pageX-c.offsetLeft,f.clk_y=b.pageY-c.offsetTop;setTimeout(function(){f.clk=f.clk_x=f.clk_y=null},100)}function d(){if(a.fn.ajaxSubmit.debug){var b="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(b):window.opera&&window.opera.postError&&window.opera.postError(b)}}var e={};e.fileapi=void 0!==a('<input type="file">').get(0).files,e.formdata=void 0!==window.FormData;var f=!!a.fn.prop;a.fn.attr2=function(){if(!f)return this.attr.apply(this,arguments);var a=this.prop.apply(this,arguments);return a&&a.jquery||"string"==typeof a?a:this.attr.apply(this,arguments)},a.fn.ajaxSubmit=function(b,c,g,h){function i(c){var d,e,f=a.param(c,b.traditional).split("&"),g=f.length,h=[];for(d=0;d<g;d++)f[d]=f[d].replace(/\+/g," "),e=f[d].split("="),h.push([decodeURIComponent(e[0]),decodeURIComponent(e[1])]);return h}function j(c){for(var d=new FormData,e=0;e<c.length;e++)d.append(c[e].name,c[e].value);if(b.extraData){var f=i(b.extraData);for(e=0;e<f.length;e++)f[e]&&d.append(f[e][0],f[e][1])}b.data=null;var g=a.extend(!0,{},a.ajaxSettings,b,{contentType:!1,processData:!1,cache:!1,type:l||"POST"});b.uploadProgress&&(g.xhr=function(){var c=a.ajaxSettings.xhr();return c.upload&&c.upload.addEventListener("progress",function(a){var c=0,d=a.loaded||a.position,e=a.total;a.lengthComputable&&(c=Math.ceil(d/e*100)),b.uploadProgress(a,d,e,c)},!1),c}),g.data=null;var h=g.beforeSend;return g.beforeSend=function(a,c){b.formData?c.data=b.formData:c.data=d,h&&h.call(this,a,c)},a.ajax(g)}function k(c){function e(a){var b=null;try{a.contentWindow&&(b=a.contentWindow.document)}catch(a){d("cannot get iframe.contentWindow document: "+a)}if(b)return b;try{b=a.contentDocument?a.contentDocument:a.document}catch(c){d("cannot get iframe.contentDocument: "+c),b=a.document}return b}function g(){function b(){try{var a=e(q).readyState;d("state = "+a),a&&"uninitialized"===a.toLowerCase()&&setTimeout(b,50)}catch(a){d("Server abort: ",a," (",a.name,")"),h(2),w&&clearTimeout(w),w=void 0}}var c=o.attr2("target"),f=o.attr2("action"),g=o.attr("enctype")||o.attr("encoding")||"multipart/form-data";x.setAttribute("target",n),l&&!/post/i.test(l)||x.setAttribute("method","POST"),f!==k.url&&x.setAttribute("action",k.url),k.skipEncodingOverride||l&&!/post/i.test(l)||o.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),k.timeout&&(w=setTimeout(function(){v=!0,h(1)},k.timeout));var i=[];try{if(k.extraData)for(var j in k.extraData)k.extraData.hasOwnProperty(j)&&(a.isPlainObject(k.extraData[j])&&k.extraData[j].hasOwnProperty("name")&&k.extraData[j].hasOwnProperty("value")?i.push(a('<input type="hidden" name="'+k.extraData[j].name+'">',z).val(k.extraData[j].value).appendTo(x)[0]):i.push(a('<input type="hidden" name="'+j+'">',z).val(k.extraData[j]).appendTo(x)[0]));k.iframeTarget||p.appendTo(A),q.attachEvent?q.attachEvent("onload",h):q.addEventListener("load",h,!1),setTimeout(b,15);try{x.submit()}catch(a){var m=document.createElement("form").submit;m.apply(x)}}finally{x.setAttribute("action",f),x.setAttribute("enctype",g),c?x.setAttribute("target",c):o.removeAttr("target"),a(i).remove()}}function h(b){if(!r.aborted&&!F){if(E=e(q),E||(d("cannot access response document"),b=2),1===b&&r)return r.abort("timeout"),void y.reject(r,"timeout");if(2===b&&r)return r.abort("server abort"),void y.reject(r,"error","server abort");if(E&&E.location.href!==k.iframeSrc||v){q.detachEvent?q.detachEvent("onload",h):q.removeEventListener("load",h,!1);var c,f="success";try{if(v)throw"timeout";var g="xml"===k.dataType||E.XMLDocument||a.isXMLDoc(E);if(d("isXml="+g),!g&&window.opera&&(null===E.body||!E.body.innerHTML)&&--G)return d("requeing onLoad callback, DOM not available"),void setTimeout(h,250);var i=E.body?E.body:E.documentElement;r.responseText=i?i.innerHTML:null,r.responseXML=E.XMLDocument?E.XMLDocument:E,g&&(k.dataType="xml"),r.getResponseHeader=function(a){return{"content-type":k.dataType}[a.toLowerCase()]},i&&(r.status=Number(i.getAttribute("status"))||r.status,r.statusText=i.getAttribute("statusText")||r.statusText);var j=(k.dataType||"").toLowerCase(),l=/(json|script|text)/.test(j);if(l||k.textarea){var n=E.getElementsByTagName("textarea")[0];if(n)r.responseText=n.value,r.status=Number(n.getAttribute("status"))||r.status,r.statusText=n.getAttribute("statusText")||r.statusText;else if(l){var o=E.getElementsByTagName("pre")[0],s=E.getElementsByTagName("body")[0];o?r.responseText=o.textContent?o.textContent:o.innerText:s&&(r.responseText=s.textContent?s.textContent:s.innerText)}}else"xml"===j&&!r.responseXML&&r.responseText&&(r.responseXML=H(r.responseText));try{D=J(r,j,k)}catch(a){f="parsererror",r.error=c=a||f}}catch(a){d("error caught: ",a),f="error",r.error=c=a||f}r.aborted&&(d("upload aborted"),f=null),r.status&&(f=r.status>=200&&r.status<300||304===r.status?"success":"error"),"success"===f?(k.success&&k.success.call(k.
121context,D,"success",r),y.resolve(r.responseText,"success",r),m&&a.event.trigger("ajaxSuccess",[r,k])):f&&(void 0===c&&(c=r.statusText),k.error&&k.error.call(k.context,r,f,c),y.reject(r,"error",c),m&&a.event.trigger("ajaxError",[r,k,c])),m&&a.event.trigger("ajaxComplete",[r,k]),m&&!--a.active&&a.event.trigger("ajaxStop"),k.complete&&k.complete.call(k.context,r,f),F=!0,k.timeout&&clearTimeout(w),setTimeout(function(){k.iframeTarget?p.attr("src",k.iframeSrc):p.remove(),r.responseXML=null},100)}}}var i,j,k,m,n,p,q,r,t,u,v,w,x=o[0],y=a.Deferred();if(y.abort=function(a){r.abort(a)},c)for(j=0;j<s.length;j++)i=a(s[j]),f?i.prop("disabled",!1):i.removeAttr("disabled");k=a.extend(!0,{},a.ajaxSettings,b),k.context=k.context||k,n="jqFormIO"+(new Date).getTime();var z=x.ownerDocument,A=o.closest("body");if(k.iframeTarget?(p=a(k.iframeTarget,z),u=p.attr2("name"),u?n=u:p.attr2("name",n)):(p=a('<iframe name="'+n+'" src="'+k.iframeSrc+'" />',z),p.css({position:"absolute",top:"-1000px",left:"-1000px"})),q=p[0],r={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(b){var c="timeout"===b?"timeout":"aborted";d("aborting upload... "+c),this.aborted=1;try{q.contentWindow.document.execCommand&&q.contentWindow.document.execCommand("Stop")}catch(a){}p.attr("src",k.iframeSrc),r.error=c,k.error&&k.error.call(k.context,r,c,b),m&&a.event.trigger("ajaxError",[r,k,c]),k.complete&&k.complete.call(k.context,r,c)}},m=k.global,m&&0==a.active++&&a.event.trigger("ajaxStart"),m&&a.event.trigger("ajaxSend",[r,k]),k.beforeSend&&k.beforeSend.call(k.context,r,k)===!1)return k.global&&a.active--,y.reject(),y;if(r.aborted)return y.reject(),y;(t=x.clk)&&(u=t.name)&&!t.disabled&&(k.extraData=k.extraData||{},k.extraData[u]=t.value,"image"===t.type&&(k.extraData[u+".x"]=x.clk_x,k.extraData[u+".y"]=x.clk_y));var B=a("meta[name=csrf-token]").attr("content"),C=a("meta[name=csrf-param]").attr("content");C&&B&&(k.extraData=k.extraData||{},k.extraData[C]=B),k.forceSync?g():setTimeout(g,10);var D,E,F,G=50,H=a.parseXML||function(a,b){return window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)):b=(new DOMParser).parseFromString(a,"text/xml"),b&&b.documentElement&&"parsererror"!==b.documentElement.nodeName?b:null},I=a.parseJSON||function(a){return window.eval("("+a+")")},J=function(b,c,d){var e=b.getResponseHeader("content-type")||"",f=("xml"===c||!c)&&e.indexOf("xml")>=0,g=f?b.responseXML:b.responseText;return f&&"parsererror"===g.documentElement.nodeName&&a.error&&a.error("parsererror"),d&&d.dataFilter&&(g=d.dataFilter(g,c)),"string"==typeof g&&(("json"===c||!c)&&e.indexOf("json")>=0?g=I(g):("script"===c||!c)&&e.indexOf("javascript")>=0&&a.globalEval(g)),g};return y}if(!this.length)return d("ajaxSubmit: skipping submit process - no element selected"),this;var l,m,n,o=this;"function"==typeof b?b={success:b}:"string"==typeof b||b===!1&&arguments.length>0?(b={url:b,data:c,dataType:g},"function"==typeof h&&(b.success=h)):void 0===b&&(b={}),l=b.method||b.type||this.attr2("method"),m=b.url||this.attr2("action"),n="string"==typeof m?a.trim(m):"",n=n||window.location.href||"",n&&(n=(n.match(/^([^#]+)/)||[])[1]),b=a.extend(!0,{url:n,success:a.ajaxSettings.success,type:l||a.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},b);var p={};if(this.trigger("form-pre-serialize",[this,b,p]),p.veto)return d("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(b.beforeSerialize&&b.beforeSerialize(this,b)===!1)return d("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var q=b.traditional;void 0===q&&(q=a.ajaxSettings.traditional);var r,s=[],t=this.formToArray(b.semantic,s,b.filtering);if(b.data){var u=a.isFunction(b.data)?b.data(t):b.data;b.extraData=u,r=a.param(u,q)}if(b.beforeSubmit&&b.beforeSubmit(t,this,b)===!1)return d("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[t,this,b,p]),p.veto)return d("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var v=a.param(t,q);r&&(v=v?v+"&"+r:r),"GET"===b.type.toUpperCase()?(b.url+=(b.url.indexOf("?")>=0?"&":"?")+v,b.data=null):b.data=v;var w=[];if(b.resetForm&&w.push(function(){o.resetForm()}),b.clearForm&&w.push(function(){o.clearForm(b.includeHidden)}),!b.dataType&&b.target){var x=b.success||function(){};w.push(function(c,d,e){var f=arguments,g=b.replaceTarget?"replaceWith":"html";a(b.target)[g](c).each(function(){x.apply(this,f)})})}
121else b.success&&(a.isArray(b.success)?a.merge(w,b.success):w.push(b.success));if(b.success=function(a,c,d){for(var e=b.context||this,f=0,g=w.length;f<g;f++)w[f].apply(e,[a,c,d||o,o])},b.error){var y=b.error;b.error=function(a,c,d){var e=b.context||this;y.apply(e,[a,c,d,o])}}if(b.complete){var z=b.complete;b.complete=function(a,c){var d=b.context||this;z.apply(d,[a,c,o])}}var A=a("input[type=file]:enabled",this).filter(function(){return""!==a(this).val()}),B=A.length>0,C="multipart/form-data",D=o.attr("enctype")===C||o.attr("encoding")===C,E=e.fileapi&&e.formdata;d("fileAPI :"+E);var F,G=(B||D)&&!E;b.iframe!==!1&&(b.iframe||G)?b.closeKeepAlive?a.get(b.closeKeepAlive,function(){F=k(t)}):F=k(t):F=(B||D)&&E?j(t):a.ajax(b),o.removeData("jqxhr").data("jqxhr",F);for(var H=0;H<s.length;H++)s[H]=null;return this.trigger("form-submit-notify",[this,b]),this},a.fn.ajaxForm=function(e,f,g,h){if(("string"==typeof e||e===!1&&arguments.length>0)&&(e={url:e,data:f,dataType:g},"function"==typeof h&&(e.success=h)),e=e||{},e.delegation=e.delegation&&a.isFunction(a.fn.on),!e.delegation&&0===this.length){var i={s:this.selector,c:this.context};return!a.isReady&&i.s?(d("DOM not ready, queuing ajaxForm"),a(function(){a(i.s,i.c).ajaxForm(e)}),this):(d("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)")),this)}return e.delegation?(a(document).off("submit.form-plugin",this.selector,b).off("click.form-plugin",this.selector,c).on("submit.form-plugin",this.selector,e,b).on("click.form-plugin",this.selector,e,c),this):this.ajaxFormUnbind().on("submit.form-plugin",e,b).on("click.form-plugin",e,c)},a.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},a.fn.formToArray=function(b,c,d){var f=[];if(0===this.length)return f;var g,h=this[0],i=this.attr("id"),j=b||void 0===h.elements?h.getElementsByTagName("*"):h.elements;if(j&&(j=a.makeArray(j)),i&&(b||/(Edge|Trident)\//.test(navigator.userAgent))&&(g=a(':input[form="'+i+'"]').get(),g.length&&(j=(j||[]).concat(g))),!j||!j.length)return f;a.isFunction(d)&&(j=a.map(j,d));var k,l,m,n,o,p,q;for(k=0,p=j.length;k<p;k++)if(o=j[k],(m=o.name)&&!o.disabled)if(b&&h.clk&&"image"===o.type)h.clk===o&&(f.push({name:m,value:a(o).val(),type:o.type}),f.push({name:m+".x",value:h.clk_x},{name:m+".y",value:h.clk_y}));else if((n=a.fieldValue(o,!0))&&n.constructor===Array)for(c&&c.push(o),l=0,q=n.length;l<q;l++)f.push({name:m,value:n[l]});else if(e.fileapi&&"file"===o.type){c&&c.push(o);var r=o.files;if(r.length)for(l=0;l<r.length;l++)f.push({name:m,value:r[l],type:o.type});else f.push({name:m,value:"",type:o.type})}else null!==n&&void 0!==n&&(c&&c.push(o),f.push({name:m,value:n,type:o.type,required:o.required}));if(!b&&h.clk){var s=a(h.clk),t=s[0];m=t.name,m&&!t.disabled&&"image"===t.type&&(f.push({name:m,value:s.val()}),f.push({name:m+".x",value:h.clk_x},{name:m+".y",value:h.clk_y}))}return f},a.fn.formSerialize=function(b){return a.param(this.formToArray(b))},a.fn.fieldSerialize=function(b){var c=[];return this.each(function(){var d=this.name;if(d){var e=a.fieldValue(this,b);if(e&&e.constructor===Array)for(var f=0,g=e.length;f<g;f++)c.push({name:d,value:e[f]});else null!==e&&void 0!==e&&c.push({name:this.name,value:e})}}),a.param(c)},a.fn.fieldValue=function(b){for(var c=[],d=0,e=this.length;d<e;d++){var f=this[d],g=a.fieldValue(f,b);null===g||void 0===g||g.constructor===Array&&!g.length||(g.constructor===Array?a.merge
121(c,g):c.push(g))}return c},a.fieldValue=function(b,c){var d=b.name,e=b.type,f=b.tagName.toLowerCase();if(void 0===c&&(c=!0),c&&(!d||b.disabled||"reset"===e||"button"===e||("checkbox"===e||"radio"===e)&&!b.checked||("submit"===e||"image"===e)&&b.form&&b.form.clk!==b||"select"===f&&b.selectedIndex===-1))return null;if("select"===f){var g=b.selectedIndex;if(g<0)return null;for(var h=[],i=b.options,j="select-one"===e,k=j?g+1:i.length,l=j?g:0;l<k;l++){var m=i[l];if(m.selected&&!m.disabled){var n=m.value;if(n||(n=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),j)return n;h.push(n)}}return h}return a(b).val().replace(/\r?\n/g,"\r\n")},a.fn.clearForm=function(b){return this.each(function(){a("input,select,textarea",this).clearFields(b)})},a.fn.clearFields=a.fn.clearInputs=function(b){var c=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var d=this.type,e=this.tagName.toLowerCase();c.test(d)||"textarea"===e?this.value="":"checkbox"===d||"radio"===d?this.checked=!1:"select"===e?this.selectedIndex=-1:"file"===d?/MSIE/.test(navigator.userAgent)?a(this).replaceWith(a(this).clone(!0)):a(this).val(""):b&&(b===!0&&/hidden/.test(d)||"string"==typeof b&&a(this).is(b))&&(this.value="")})},a.fn.resetForm=function(){return this.each(function(){var b=a(this),c=this.tagName.toLowerCase();switch(c){case"input":this.checked=this.defaultChecked;case"textarea":return this.value=this.defaultValue,!0;case"option":case"optgroup":var d=b.parents("select");return d.length&&d[0].multiple?"option"===c?this.selected=this.defaultSelected:b.find("option").resetForm():d.resetForm(),!0;case"select":return b.find("option").each(function(a){if(this.selected=this.defaultSelected,this.defaultSelected&&!b[0].multiple)return b[0].selectedIndex=a,!1}),!0;case"label":var e=a(b.attr("for")),f=b.find("input,select,textarea");return e[0]&&f.unshift(e[0]),f.resetForm(),!0;case"form":return("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset(),!0;default:return b.find("form,input,label,select,textarea").resetForm(),!0}})},a.fn.enable=function(a){return void 0===a&&(a=!0),this.each(function(){this.disabled=!a})},a.fn.selected=function(b){return void 0===b&&(b=!0),this.each(function(){var c=this.type;if("checkbox"===c||"radio"===c)this.checked=b;else if("option"===this.tagName.toLowerCase()){var d=a(this).parent("select");b&&d[0]&&"select-one"===d[0].type&&d.find("option").selected(!1),this.selected=b}})},a.fn.ajaxSubmit.debug=!1});
122;
123!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.o
123ptions.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
123slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:
123parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
123,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0}
vendor: 5,619 bytes, line 123
123,100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};
123!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
123):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
123o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
123,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}});
124;
125(function ($) {
126  Drupal.viewsSlideshow = Drupal.viewsSlideshow || {};
127
128  /**
129   * Views Slideshow Controls
130   */
131  Drupal.viewsSlideshowControls = Drupal.viewsSlideshowControls || {};
132
133  /**
134   * Implement the play hook for controls.
135   */
136  Drupal.viewsSlideshowControls.play = function (options) {
137    // Route the control call to the correct control type.
138    // Need to use try catch so we don't have to check to make sure every part
139    // of the object is defined.
140    try {
141      if (typeof Drupal.settings.viewsSlideshowControls[options.slideshowID].top.type != "undefined" && typeof Drupal[Drupal.settings.viewsSlideshowControls[options.slideshowID].top.type].play == 'function') {
142        Drupal[Drupal.settings.viewsSlideshowControls[options.slideshowID].top.type].play(options);
143      }
144    }
145    catch(err) {
146      // Don't need to do anything on error.
147    }
148
149    try {
150      if (typeof Drupal.settings.viewsSlideshowControls[options.slideshowID].bottom.type != "undefined" && typeof Drupal[Drupal.settings.viewsSlideshowControls[options.slideshowID].bottom.type].play == 'function') {
151        Drupal[Drupal.settings.viewsSlideshowControls[options.slideshowID].bottom.type].play(options);
152      }
153    }
154    catch(err) {
155      // Don't need to do anything on error.
156    }
157  };
158
159  /**
160   * Implement the pause hook for controls.
161   */
162  Drupal.viewsSlideshowControls.pause = function (options) {
163    // Route the control call to the correct control type.
164    // Need to use try catch so we don't have to check to make sure every part
165    // of the object is defined.
166    try {
167      if (typeof Drupal.settings.viewsSlideshowControls[options.slideshowID].top.type != "undefined" && typeof Drupal[Drupal.settings.viewsSlideshowControls[options.slideshowID].top.type].pause == 'function') {
168        Drupal[Drupal.settings.viewsSlideshowControls[options.slideshowID].top.type].pause(options);
169      }
170    }
171    catch(err) {
172      // Don't need to do anything on error.
173    }
174
175    try {
176      if (typeof Drupal.settings.viewsSlideshowControls[options.slideshowID].bottom.type != "undefined" && typeof Drupal[Drupal.settings.viewsSlideshowControls[options.slideshowID].bottom.type].pause == 'function') {
177        Drupal[Drupal.settings.viewsSlideshowControls[options.slideshowID].bottom.type].pause(options);
178      }
179    }
180    catch(err) {
181      // Don't need to do anything on error.
182    }
183  };
184
185
186  /**
187   * Views Slideshow Text Controls
188   */
189
190  // Add views slideshow api calls for views slideshow text controls.
191  Drupal.behaviors.viewsSlideshowControlsText = {
192    attach: function (context) {
193
194      // Process previous link
195      $('.views_slideshow_controls_text_previous:not(.views-slideshow-controls-text-previous-processed)', context).addClass('views-slideshow-controls-text-previous-processed').each(function() {
196        var uniqueID = $(this).attr('id').replace('views_slideshow_controls_text_previous_', '');
197        $(this).click(function() {
198          Drupal.viewsSlideshow.action({ "action": 'previousSlide', "slideshowID": uniqueID });
199          return false;
200        });
201      });
202
203      // Process next link
204      $('.views_slideshow_controls_text_next:not(.views-slideshow-controls-text-next-processed)', context).addClass('views-slideshow-controls-text-next-processed').each(function() {
205        var uniqueID = $(this).attr('id').replace('views_slideshow_controls_text_next_', '');
206        $(this).click(function() {
207          Drupal.viewsSlideshow.action({ "action": 'nextSlide', "slideshowID": uniqueID });
208          return false;
209        });
210      });
211
212      // Process pause link
213      $('.views_slideshow_controls_text_pause:not(.views-slideshow-controls-text-pause-processed)', context).addClass('views-slideshow-controls-text-pause-processed').each(function() {
214        var uniqueID = $(this).attr('id').replace('views_slideshow_controls_text_pause_', '');
215        $(this).click(function() {
216          if (Drupal.settings.viewsSlideshow[uniqueID].paused) {
217            Drupal.viewsSlideshow.action({ "action": 'play', "slideshowID": uniqueID, "force": true });
218          }
219          else {
220            Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": uniqueID, "force": true });
221          }
222          return false;
223        });
224      });
225    }
226  };
227
228  Drupal.viewsSlideshowControlsText = Drupal.viewsSlideshowControlsText || {};
229
230  /**
231   * Implement the pause hook for text controls.
232   */
233  Drupal.viewsSlideshowControlsText.pause = function (options) {
234    var pauseText = Drupal.theme.prototype['viewsSlideshowControlsPause'] ? Drupal.theme('viewsSlideshowControlsPause') : '';
235    $('#views_slideshow_controls_text_pause_' + options.slideshowID + ' a').text(pauseText);
236    $('#views_slideshow_controls_text_pause_' + options.slideshowID).removeClass('views-slideshow-controls-text-status-play');
237    $('#views_slideshow_controls_text_pause_' + options.slideshowID).addClass('views-slideshow-controls-text-status-pause');
238  };
239
240  /**
241   * Implement the play hook for text controls.
242   */
243  Drupal.viewsSlideshowControlsText.play = function (options) {
244    var playText = Drupal.theme.prototype['viewsSlideshowControlsPlay'] ? Drupal.theme('viewsSlideshowControlsPlay') : '';
245    $('#views_slideshow_controls_text_pause_' + options.slideshowID + ' a').text(playText);
246    $('#views_slideshow_controls_text_pause_' + options.slideshowID).removeClass('views-slideshow-controls-text-status-pause');
247    $('#views_slideshow_controls_text_pause_' + options.slideshowID).addClass('views-slideshow-controls-text-status-play');
248  };
249
250  // Theme the resume control.
251  Drupal.theme.prototype.viewsSlideshowControlsPause = function () {
252    return Drupal.t('Resume');
253  };
254
255  // Theme the pause control.
256  Drupal.theme.prototype.viewsSlideshowControlsPlay = function () {
257    return Drupal.t('Pause');
258  };
259
260  /**
261   * Views Slideshow Pager
262   */
263  Drupal.viewsSlideshowPager = Drupal.viewsSlideshowPager || {};
264
265  /**
266   * Implement the transitionBegin hook for pagers.
267   */
268  Drupal.viewsSlideshowPager.transitionBegin = function (options) {
269    // Route the pager call to the correct pager type.
270    // Need to use try catch so we don't have to check to make sure every part
271    // of the object is defined.
272    try {
273      if (typeof Drupal.settings.viewsSlideshowPager != "undefined" && typeof Drupal.settings.viewsSlideshowPager[options.slideshowID].top.type != "undefined" && typeof Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].top.type].transitionBegin == 'function') {
274        Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].top.type].transitionBegin(options);
275        if (Drupal.settings.viewsSlideshowPager[options.slideshowID].top.master_pager === 1) {
276          $.each(Drupal.settings.viewsSlideshow, function(i, obj) {
277            if (i != options.slideshowID) {
278              options.slideshowID = i;
279              options.action = 'goToSlide';
280              Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].top.type].goToSlide(options);
281            }
282          });
283        }
284      }
285    }
286    catch(err) {
287      // Don't need to do anything on error.
288    }
289
290    try {
291      if (typeof Drupal.settings.viewsSlideshowPager != "undefined" && typeof Drupal.settings.viewsSlideshowPager[options.slideshowID].bottom.type != "undefined" && typeof Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].bottom.type].transitionBegin == 'function') {
292        Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].bottom.type].transitionBegin(options);
293        if (Drupal.settings.viewsSlideshowPager[options.slideshowID].bottom.master_pager === 1) {
294          $.each(Drupal.settings.viewsSlideshow, function(i, obj) {
295            if (i != options.slideshowID) {
296              options.slideshowID = i;
297              options.action = 'goToSlide';
298              Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].bottom.type].goToSlide(options);
299            }
300          });
301        }
302      }
303    }
304    catch(err) {
305      // Don't need to do anything on error.
306    }
307  };
308
309  /**
310   * Implement the goToSlide hook for pagers.
311   */
312  Drupal.viewsSlideshowPager.goToSlide = function (options) {
313    // Route the pager call to the correct pager type.
314    // Need to use try catch so we don't have to check to make sure every part
315    // of the object is defined.
316    try {
317      if (typeof Drupal.settings.viewsSlideshowPager[options.slideshowID].top.type != "undefined" && typeof Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].top.type].goToSlide == 'function') {
318        Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].top.type].goToSlide(options);
319      }
320    }
321    catch(err) {
322      // Don't need to do anything on error.
323    }
324
325    try {
326      if (typeof Drupal.settings.viewsSlideshowPager[options.slideshowID].bottom.type != "undefined" && typeof Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].bottom.type].goToSlide == 'function') {
327        Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].bottom.type].goToSlide(options);
328      }
329    }
330    catch(err) {
331      // Don't need to do anything on error.
332    }
333  };
334
335  /**
336   * Implement the previousSlide hook for pagers.
337   */
338  Drupal.viewsSlideshowPager.previousSlide = function (options) {
339    // Route the pager call to the correct pager type.
340    // Need to use try catch so we don't have to check to make sure every part
341    // of the object is defined.
342    try {
343      if (typeof Drupal.settings.viewsSlideshowPager[options.slideshowID].top.type != "undefined" && typeof Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].top.type].previousSlide == 'function') {
344        Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].top.type].previousSlide(options);
345      }
346    }
347    catch(err) {
348      // Don't need to do anything on error.
349    }
350
351    try {
352      if (typeof Drupal.settings.viewsSlideshowPager[options.slideshowID].bottom.type != "undefined" && typeof Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].bottom.type].previousSlide == 'function') {
353        Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].bottom.type].previousSlide(options);
354      }
355    }
356    catch(err) {
357      // Don't need to do anything on error.
358    }
359  };
360
361  /**
362   * Implement the nextSlide hook for pagers.
363   */
364  Drupal.viewsSlideshowPager.nextSlide = function (options) {
365    // Route the pager call to the correct pager type.
366    // Need to use try catch so we don't have to check to make sure every part
367    // of the object is defined.
368    try {
369      if (typeof Drupal.settings.viewsSlideshowPager[options.slideshowID].top.type != "undefined" && typeof Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].top.type].nextSlide == 'function') {
370        Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].top.type].nextSlide(options);
371      }
372    }
373    catch(err) {
374      // Don't need to do anything on error.
375    }
376
377    try {
378      if (typeof Drupal.settings.viewsSlideshowPager[options.slideshowID].bottom.type != "undefined" && typeof Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].bottom.type].nextSlide == 'function') {
379        Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].bottom.type].nextSlide(options);
380      }
381    }
382    catch(err) {
383      // Don't need to do anything on error.
384    }
385  };
386
387
388  /**
389   * Views Slideshow Pager Fields
390   */
391
392  // Add views slideshow api calls for views slideshow pager fields.
393  Drupal.behaviors.viewsSlideshowPagerFields = {
394    attach: function (context) {
395      // Process pause on hover.
396      $('.views_slideshow_pager_field:not(.views-slideshow-pager-field-processed)', context).addClass('views-slideshow-pager-field-processed').each(function() {
397        // Parse out the location and unique id from the full id.
398        var pagerInfo = $(this).attr('id').split('_');
399        var location = pagerInfo[2];
400        pagerInfo.splice(0, 3);
401        var uniqueID = pagerInfo.join('_');
402
403        // Add the activate and pause on pager hover event to each pager item.
404        if (Drupal.settings.viewsSlideshowPagerFields[uniqueID][location].activatePauseOnHover) {
405          $(this).children().each(function(index, pagerItem) {
406            var mouseIn = function() {
407              Drupal.viewsSlideshow.action({ "action": 'goToSlide', "slideshowID": uniqueID, "slideNum": index });
408              Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": uniqueID });
409            };
410
411            var mouseOut = function() {
412              Drupal.viewsSlideshow.action({ "action": 'play', "slideshowID": uniqueID });
413            };
414
415            if (jQuery.fn.hoverIntent) {
416              $(pagerItem).hoverIntent(mouseIn, mouseOut);
417            }
418            else {
419              $(pagerItem).hover(mouseIn, mouseOut);
420            }
421          });
422        }
423        else {
424          $(this).children().each(function(index, pagerItem) {
425            $(pagerItem).click(function() {
426              Drupal.viewsSlideshow.action({ "action": 'goToSlide', "slideshowID": uniqueID, "slideNum": index });
427            });
428          });
429        }
430      });
431    }
432  };
433
434  Drupal.viewsSlideshowPagerFields = Drupal.viewsSlideshowPagerFields || {};
435
436  /**
437   * Implement the transitionBegin hook for pager fields pager.
438   */
439  Drupal.viewsSlideshowPagerFields.transitionBegin = function (options) {
440    for (pagerLocation in Drupal.settings.viewsSlideshowPager[options.slideshowID]) {
441      // Remove active class from pagers
442      $('[id^="views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '"]').removeClass('active');
443
444      // Add active class to active pager.
445      $('#views_slideshow_pager_field_item_'+ pagerLocation + '_' + options.slideshowID + '_' + options.slideNum).addClass('active');
446    }
447  };
448
449  /**
450   * Implement the goToSlide hook for pager fields pager.
451   */
452  Drupal.viewsSlideshowPagerFields.goToSlide = function (options) {
453    for (pagerLocation in Drupal.settings.viewsSlideshowPager[options.slideshowID]) {
454      // Remove active class from pagers
455      $('[id^="views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '"]').removeClass('active');
456
457      // Add active class to active pager.
458      $('#views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '_' + options.slideNum).addClass('active');
459    }
460  };
461
462  /**
463   * Implement the previousSlide hook for pager fields pager.
464   */
465  Drupal.viewsSlideshowPagerFields.previousSlide = function (options) {
466    for (pagerLocation in Drupal.settings.viewsSlideshowPager[options.slideshowID]) {
467      // Get the current active pager.
468      var pagerNum = $('[id^="views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '"].active').attr('id').replace('views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '_', '');
469
470      // If we are on the first pager then activate the last pager.
471      // Otherwise activate the previous pager.
472      if (pagerNum == 0) {
473        pagerNum = $('[id^="views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '"]').length() - 1;
474      }
475      else {
476        pagerNum--;
477      }
478
479      // Remove active class from pagers
480      $('[id^="views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '"]').removeClass('active');
481
482      // Add active class to active pager.
483      $('#views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '_' + pagerNum).addClass('active');
484    }
485  };
486
487  /**
488   * Implement the nextSlide hook for pager fields pager.
489   */
490  Drupal.viewsSlideshowPagerFields.nextSlide = function (options) {
491    for (pagerLocation in Drupal.settings.viewsSlideshowPager[options.slideshowID]) {
492      // Get the current active pager.
493      var pagerNum = $('[id^="views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '"].active').attr('id').replace('views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '_', '');
494      var totalPagers = $('[id^="views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '"]').length();
495
496      // If we are on the last pager then activate the first pager.
497      // Otherwise activate the next pager.
498      pagerNum++;
499      if (pagerNum == totalPagers) {
500        pagerNum = 0;
501      }
502
503      // Remove active class from pagers
504      $('[id^="views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '"]').removeClass('active');
505
506      // Add active class to active pager.
507      $('#views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '_' + slideNum).addClass('active');
508    }
509  };
510
511
512  /**
513   * Views Slideshow Slide Counter
514   */
515
516  Drupal.viewsSlideshowSlideCounter = Drupal.viewsSlideshowSlideCounter || {};
517
518  /**
519   * Implement the transitionBegin for the slide counter.
520   */
521  Drupal.viewsSlideshowSlideCounter.transitionBegin = function (options) {
522    $('#views_slideshow_slide_counter_' + options.slideshowID + ' .num').text(options.slideNum + 1);
523  };
524
525  /**
526   * This is used as a router to process actions for the slideshow.
527   */
528  Drupal.viewsSlideshow.action = function (options) {
529    // Set default values for our return status.
530    var status = {
531      'value': true,
532      'text': ''
533    };
534
535    // If an action isn't specified return false.
536    if (typeof options.action == 'undefined' || options.action == '') {
537      status.value = false;
538      status.text =  Drupal.t('There was no action specified.');
539      return error;
540    }
541
542    // If we are using pause or play switch paused state accordingly.
543    if (options.action == 'pause') {
544      Drupal.settings.viewsSlideshow[options.slideshowID].paused = 1;
545      // If the calling method is forcing a pause then mark it as such.
546      if (options.force) {
547        Drupal.settings.viewsSlideshow[options.slideshowID].pausedForce = 1;
548      }
549    }
550    else if (options.action == 'play') {
551      // If the slideshow isn't forced pause or we are forcing a play then play
552      // the slideshow.
553      // Otherwise return telling the calling method that it was forced paused.
554      if (!Drupal.settings.viewsSlideshow[options.slideshowID].pausedForce || options.force) {
555        Drupal.settings.viewsSlideshow[options.slideshowID].paused = 0;
556        Drupal.settings.viewsSlideshow[options.slideshowID].pausedForce = 0;
557      }
558      else {
559        status.value = false;
560        status.text += ' ' + Drupal.t('This slideshow is forced paused.');
561        return status;
562      }
563    }
564
565    // We use a switch statement here mainly just to limit the type of actions
566    // that are available.
567    switch (options.action) {
568      case "goToSlide":
569      case "transitionBegin":
570      case "transitionEnd":
571        // The three methods above require a slide number. Checking if it is
572        // defined and it is a number that is an integer.
573        if (typeof options.slideNum == 'undefined' || typeof options.slideNum !== 'number' || parseInt(options.slideNum) != (options.slideNum - 0)) {
574          status.value = false;
575          status.text = Drupal.t('An invalid integer was specified for slideNum.');
576        }
577      case "pause":
578      case "play":
579      case "nextSlide":
580      case "previousSlide":
581        // Grab our list of methods.
582        var methods = Drupal.settings.viewsSlideshow[options.slideshowID]['methods'];
583
584        // if the calling method specified methods that shouldn't be called then
585        // exclude calling them.
586        var excludeMethodsObj = {};
587        if (typeof options.excludeMethods !== 'undefined') {
588          // We need to turn the excludeMethods array into an object so we can use the in
589          // function.
590          for (var i=0; i < excludeMethods.length; i++) {
591            excludeMethodsObj[excludeMethods[i]] = '';
592          }
593        }
594
595        // Call every registered method and don't call excluded ones.
596        for (i = 0; i < methods[options.action].length; i++) {
597          if (Drupal[methods[options.action][i]] != undefined && typeof Drupal[methods[options.action][i]][options.action] == 'function' && !(methods[options.action][i] in excludeMethodsObj)) {
598            Drupal[methods[options.action][i]][options.action](options);
599          }
600        }
601        break;
602
vendor: 27,465 bytes, lines 603-1835
603      // If it gets here it's because it's an invalid action.
604      default:
605        status.value = false;
606        status.text = Drupal.t('An invalid action "!action" was specified.', { "!action": options.action });
607    }
608    return status;
609  };
610})(jQuery);
611;
612/*! Magnific Popup - v1.1.0 - 2016-02-20
613* http://dimsemenov.com/plugins/magnific-popup/
614* Copyright (c) 2016 Dmitry Semenov; */
615;(function (factory) { 
616if (typeof define === 'function' && define.amd) { 
617 // AMD. Register as an anonymous module. 
618 define(['jquery'], factory); 
619 } else if (typeof exports === 'object') { 
620 // Node/CommonJS 
621 factory(require('jquery')); 
622 } else { 
623 // Browser globals 
624 factory(window.jQuery || window.Zepto); 
625 } 
626 }(function($) { 
627
628/*>>core*/
629/**
630 * 
631 * Magnific Popup Core JS file
632 * 
633 */
634
635
636/**
637 * Private static constants
638 */
639var CLOSE_EVENT = 'Close',
640	BEFORE_CLOSE_EVENT = 'BeforeClose',
641	AFTER_CLOSE_EVENT = 'AfterClose',
642	BEFORE_APPEND_EVENT = 'BeforeAppend',
643	MARKUP_PARSE_EVENT = 'MarkupParse',
644	OPEN_EVENT = 'Open',
645	CHANGE_EVENT = 'Change',
646	NS = 'mfp',
647	EVENT_NS = '.' + NS,
648	READY_CLASS = 'mfp-ready',
649	REMOVING_CLASS = 'mfp-removing',
650	PREVENT_CLOSE_CLASS = 'mfp-prevent-close';
651
652
653/**
654 * Private vars 
655 */
656/*jshint -W079 */
657var mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this'
658	MagnificPopup = function(){},
659	_isJQ = !!(window.jQuery),
660	_prevStatus,
661	_window = $(window),
662	_document,
663	_prevContentType,
664	_wrapClasses,
665	_currPopupType;
666
667
668/**
669 * Private functions
670 */
671var _mfpOn = function(name, f) {
672		mfp.ev.on(NS + name + EVENT_NS, f);
673	},
674	_getEl = function(className, appendTo, html, raw) {
675		var el = document.createElement('div');
676		el.className = 'mfp-'+className;
677		if(html) {
678			el.innerHTML = html;
679		}
680		if(!raw) {
681			el = $(el);
682			if(appendTo) {
683				el.appendTo(appendTo);
684			}
685		} else if(appendTo) {
686			appendTo.appendChild(el);
687		}
688		return el;
689	},
690	_mfpTrigger = function(e, data) {
691		mfp.ev.triggerHandler(NS + e, data);
692
693		if(mfp.st.callbacks) {
694			// converts "mfpEventName" to "eventName" callback and triggers it if it's present
695			e = e.charAt(0).toLowerCase() + e.slice(1);
696			if(mfp.st.callbacks[e]) {
697				mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]);
698			}
699		}
700	},
701	_getCloseBtn = function(type) {
702		if(type !== _currPopupType || !mfp.currTemplate.closeBtn) {
703			mfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace('%title%', mfp.st.tClose ) );
704			_currPopupType = type;
705		}
706		return mfp.currTemplate.closeBtn;
707	},
708	// Initialize Magnific Popup only when called at least once
709	_checkInstance = function() {
710		if(!$.magnificPopup.instance) {
711			/*jshint -W020 */
712			mfp = new MagnificPopup();
713			mfp.init();
714			$.magnificPopup.instance = mfp;
715		}
716	},
717	// CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr
718	supportsTransitions = function() {
719		var s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist
720			v = ['ms','O','Moz','Webkit']; // 'v' for vendor
721
722		if( s['transition'] !== undefined ) {
723			return true; 
724		}
725			
726		while( v.length ) {
727			if( v.pop() + 'Transition' in s ) {
728				return true;
729			}
730		}
731				
732		return false;
733	};
734
735
736
737/**
738 * Public functions
739 */
740MagnificPopup.prototype = {
741
742	constructor: MagnificPopup,
743
744	/**
745	 * Initializes Magnific Popup plugin. 
746	 * This function is triggered only once when $.fn.magnificPopup or $.magnificPopup is executed
747	 */
748	init: function() {
749		var appVersion = navigator.appVersion;
750		mfp.isLowIE = mfp.isIE8 = document.all && !document.addEventListener;
751		mfp.isAndroid = (/android/gi).test(appVersion);
752		mfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion);
753		mfp.supportsTransition = supportsTransitions();
754
755		// We disable fixed positioned lightbox on devices that don't handle it nicely.
756		// If you know a better way of detecting this - let me know.
757		mfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) );
758		_document = $(document);
759
760		mfp.popupsCache = {};
761	},
762
763	/**
764	 * Opens popup
765	 * @param  data [description]
766	 */
767	open: function(data) {
768
769		var i;
770
771		if(data.isObj === false) { 
772			// convert jQuery collection to array to avoid conflicts later
773			mfp.items = data.items.toArray();
774
775			mfp.index = 0;
776			var items = data.items,
777				item;
778			for(i = 0; i < items.length; i++) {
779				item = items[i];
780				if(item.parsed) {
781					item = item.el[0];
782				}
783				if(item === data.el[0]) {
784					mfp.index = i;
785					break;
786				}
787			}
788		} else {
789			mfp.items = $.isArray(data.items) ? data.items : [data.items];
790			mfp.index = data.index || 0;
791		}
792
793		// if popup is already opened - we just update the content
794		if(mfp.isOpen) {
795			mfp.updateItemHTML();
796			return;
797		}
798		
799		mfp.types = []; 
800		_wrapClasses = '';
801		if(data.mainEl && data.mainEl.length) {
802			mfp.ev = data.mainEl.eq(0);
803		} else {
804			mfp.ev = _document;
805		}
806
807		if(data.key) {
808			if(!mfp.popupsCache[data.key]) {
809				mfp.popupsCache[data.key] = {};
810			}
811			mfp.currTemplate = mfp.popupsCache[data.key];
812		} else {
813			mfp.currTemplate = {};
814		}
815
816
817
818		mfp.st = $.extend(true, {}, $.magnificPopup.defaults, data ); 
819		mfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos;
820
821		if(mfp.st.modal) {
822			mfp.st.closeOnContentClick = false;
823			mfp.st.closeOnBgClick = false;
824			mfp.st.showCloseBtn = false;
825			mfp.st.enableEscapeKey = false;
826		}
827		
828
829		// Building markup
830		// main containers are created only once
831		if(!mfp.bgOverlay) {
832
833			// Dark overlay
834			mfp.bgOverlay = _getEl('bg').on('click'+EVENT_NS, function() {
835				mfp.close();
836			});
837
838			mfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) {
839				if(mfp._checkIfClose(e.target)) {
840					mfp.close();
841				}
842			});
843
844			mfp.container = _getEl('container', mfp.wrap);
845		}
846
847		mfp.contentContainer = _getEl('content');
848		if(mfp.st.preloader) {
849			mfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading);
850		}
851
852
853		// Initializing modules
854		var modules = $.magnificPopup.modules;
855		for(i = 0; i < modules.length; i++) {
856			var n = modules[i];
857			n = n.charAt(0).toUpperCase() + n.slice(1);
858			mfp['init'+n].call(mfp);
859		}
860		_mfpTrigger('BeforeOpen');
861
862
863		if(mfp.st.showCloseBtn) {
864			// Close button
865			if(!mfp.st.closeBtnInside) {
866				mfp.wrap.append( _getCloseBtn() );
867			} else {
868				_mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) {
869					values.close_replaceWith = _getCloseBtn(item.type);
870				});
871				_wrapClasses += ' mfp-close-btn-in';
872			}
873		}
874
875		if(mfp.st.alignTop) {
876			_wrapClasses += ' mfp-align-top';
877		}
878
879	
880
881		if(mfp.fixedContentPos) {
882			mfp.wrap.css({
883				overflow: mfp.st.overflowY,
884				overflowX: 'hidden',
885				overflowY: mfp.st.overflowY
886			});
887		} else {
888			mfp.wrap.css({ 
889				top: _window.scrollTop(),
890				position: 'absolute'
891			});
892		}
893		if( mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos) ) {
894			mfp.bgOverlay.css({
895				height: _document.height(),
896				position: 'absolute'
897			});
898		}
899
900		
901
902		if(mfp.st.enableEscapeKey) {
903			// Close on ESC key
904			_document.on('keyup' + EVENT_NS, function(e) {
905				if(e.keyCode === 27) {
906					mfp.close();
907				}
908			});
909		}
910
911		_window.on('resize' + EVENT_NS, function() {
912			mfp.updateSize();
913		});
914
915
916		if(!mfp.st.closeOnContentClick) {
917			_wrapClasses += ' mfp-auto-cursor';
918		}
919		
920		if(_wrapClasses)
921			mfp.wrap.addClass(_wrapClasses);
922
923
924		// this triggers recalculation of layout, so we get it once to not to trigger twice
925		var windowHeight = mfp.wH = _window.height();
926
927		
928		var windowStyles = {};
929
930		if( mfp.fixedContentPos ) {
931            if(mfp._hasScrollBar(windowHeight)){
932                var s = mfp._getScrollbarSize();
933                if(s) {
934                    windowStyles.marginRight = s;
935                }
936            }
937        }
938
939		if(mfp.fixedContentPos) {
940			if(!mfp.isIE7) {
941				windowStyles.overflow = 'hidden';
942			} else {
943				// ie7 double-scroll bug
944				$('body, html').css('overflow', 'hidden');
945			}
946		}
947
948		
949		
950		var classesToadd = mfp.st.mainClass;
951		if(mfp.isIE7) {
952			classesToadd += ' mfp-ie7';
953		}
954		if(classesToadd) {
955			mfp._addClassToMFP( classesToadd );
956		}
957
958		// add content
959		mfp.updateItemHTML();
960
961		_mfpTrigger('BuildControls');
962
963		// remove scrollbar, add margin e.t.c
964		$('html').css(windowStyles);
965		
966		// add everything to DOM
967		mfp.bgOverlay.add(mfp.wrap).prependTo( mfp.st.prependTo || $(document.body) );
968
969		// Save last focused element
970		mfp._lastFocusedEl = document.activeElement;
971		
972		// Wait for next cycle to allow CSS transition
973		setTimeout(function() {
974			
975			if(mfp.content) {
976				mfp._addClassToMFP(READY_CLASS);
977				mfp._setFocus();
978			} else {
979				// if content is not defined (not loaded e.t.c) we add class only for BG
980				mfp.bgOverlay.addClass(READY_CLASS);
981			}
982			
983			// Trap the focus in popup
984			_document.on('focusin' + EVENT_NS, mfp._onFocusIn);
985
986		}, 16);
987
988		mfp.isOpen = true;
989		mfp.updateSize(windowHeight);
990		_mfpTrigger(OPEN_EVENT);
991
992		return data;
993	},
994
995	/**
996	 * Closes the popup
997	 */
998	close: function() {
999		if(!mfp.isOpen) return;
1000		_mfpTrigger(BEFORE_CLOSE_EVENT);
1001
1002		mfp.isOpen = false;
1003		// for CSS3 animation
1004		if(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition )  {
1005			mfp._addClassToMFP(REMOVING_CLASS);
1006			setTimeout(function() {
1007				mfp._close();
1008			}, mfp.st.removalDelay);
1009		} else {
1010			mfp._close();
1011		}
1012	},
1013
1014	/**
1015	 * Helper for close() function
1016	 */
1017	_close: function() {
1018		_mfpTrigger(CLOSE_EVENT);
1019
1020		var classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' ';
1021
1022		mfp.bgOverlay.detach();
1023		mfp.wrap.detach();
1024		mfp.container.empty();
1025
1026		if(mfp.st.mainClass) {
1027			classesToRemove += mfp.st.mainClass + ' ';
1028		}
1029
1030		mfp._removeClassFromMFP(classesToRemove);
1031
1032		if(mfp.fixedContentPos) {
1033			var windowStyles = {marginRight: ''};
1034			if(mfp.isIE7) {
1035				$('body, html').css('overflow', '');
1036			} else {
1037				windowStyles.overflow = '';
1038			}
1039			$('html').css(windowStyles);
1040		}
1041		
1042		_document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS);
1043		mfp.ev.off(EVENT_NS);
1044
1045		// clean up DOM elements that aren't removed
1046		mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style');
1047		mfp.bgOverlay.attr('class', 'mfp-bg');
1048		mfp.container.attr('class', 'mfp-container');
1049
1050		// remove close button from target element
1051		if(mfp.st.showCloseBtn &&
1052		(!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) {
1053			if(mfp.currTemplate.closeBtn)
1054				mfp.currTemplate.closeBtn.detach();
1055		}
1056
1057
1058		if(mfp.st.autoFocusLast && mfp._lastFocusedEl) {
1059			$(mfp._lastFocusedEl).focus(); // put tab focus back
1060		}
1061		mfp.currItem = null;	
1062		mfp.content = null;
1063		mfp.currTemplate = null;
1064		mfp.prevHeight = 0;
1065
1066		_mfpTrigger(AFTER_CLOSE_EVENT);
1067	},
1068	
1069	updateSize: function(winHeight) {
1070
1071		if(mfp.isIOS) {
1072			// fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2
1073			var zoomLevel = document.documentElement.clientWidth / window.innerWidth;
1074			var height = window.innerHeight * zoomLevel;
1075			mfp.wrap.css('height', height);
1076			mfp.wH = height;
1077		} else {
1078			mfp.wH = winHeight || _window.height();
1079		}
1080		// Fixes #84: popup incorrectly positioned with position:relative on body
1081		if(!mfp.fixedContentPos) {
1082			mfp.wrap.css('height', mfp.wH);
1083		}
1084
1085		_mfpTrigger('Resize');
1086
1087	},
1088
1089	/**
1090	 * Set content of popup based on current index
1091	 */
1092	updateItemHTML: function() {
1093		var item = mfp.items[mfp.index];
1094
1095		// Detach and perform modifications
1096		mfp.contentContainer.detach();
1097
1098		if(mfp.content)
1099			mfp.content.detach();
1100
1101		if(!item.parsed) {
1102			item = mfp.parseEl( mfp.index );
1103		}
1104
1105		var type = item.type;
1106
1107		_mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]);
1108		// BeforeChange event works like so:
1109		// _mfpOn('BeforeChange', function(e, prevType, newType) { });
1110
1111		mfp.currItem = item;
1112
1113		if(!mfp.currTemplate[type]) {
1114			var markup = mfp.st[type] ? mfp.st[type].markup : false;
1115
1116			// allows to modify markup
1117			_mfpTrigger('FirstMarkupParse', markup);
1118
1119			if(markup) {
1120				mfp.currTemplate[type] = $(markup);
1121			} else {
1122				// if there is no markup found we just define that template is parsed
1123				mfp.currTemplate[type] = true;
1124			}
1125		}
1126
1127		if(_prevContentType && _prevContentType !== item.type) {
1128			mfp.container.removeClass('mfp-'+_prevContentType+'-holder');
1129		}
1130
1131		var newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]);
1132		mfp.appendContent(newContent, type);
1133
1134		item.preloaded = true;
1135
1136		_mfpTrigger(CHANGE_EVENT, item);
1137		_prevContentType = item.type;
1138
1139		// Append container back after its content changed
1140		mfp.container.prepend(mfp.contentContainer);
1141
1142		_mfpTrigger('AfterChange');
1143	},
1144
1145
1146	/**
1147	 * Set HTML content of popup
1148	 */
1149	appendContent: function(newContent, type) {
1150		mfp.content = newContent;
1151
1152		if(newContent) {
1153			if(mfp.st.showCloseBtn && mfp.st.closeBtnInside &&
1154				mfp.currTemplate[type] === true) {
1155				// if there is no markup, we just append close button element inside
1156				if(!mfp.content.find('.mfp-close').length) {
1157					mfp.content.append(_getCloseBtn());
1158				}
1159			} else {
1160				mfp.content = newContent;
1161			}
1162		} else {
1163			mfp.content = '';
1164		}
1165
1166		_mfpTrigger(BEFORE_APPEND_EVENT);
1167		mfp.container.addClass('mfp-'+type+'-holder');
1168
1169		mfp.contentContainer.append(mfp.content);
1170	},
1171
1172
1173	/**
1174	 * Creates Magnific Popup data object based on given data
1175	 * @param  {int} index Index of item to parse
1176	 */
1177	parseEl: function(index) {
1178		var item = mfp.items[index],
1179			type;
1180
1181		if(item.tagName) {
1182			item = { el: $(item) };
1183		} else {
1184			type = item.type;
1185			item = { data: item, src: item.src };
1186		}
1187
1188		if(item.el) {
1189			var types = mfp.types;
1190
1191			// check for 'mfp-TYPE' class
1192			for(var i = 0; i < types.length; i++) {
1193				if( item.el.hasClass('mfp-'+types[i]) ) {
1194					type = types[i];
1195					break;
1196				}
1197			}
1198
1199			item.src = item.el.attr('data-mfp-src');
1200			if(!item.src) {
1201				item.src = item.el.attr('href');
1202			}
1203		}
1204
1205		item.type = type || mfp.st.type || 'inline';
1206		item.index = index;
1207		item.parsed = true;
1208		mfp.items[index] = item;
1209		_mfpTrigger('ElementParse', item);
1210
1211		return mfp.items[index];
1212	},
1213
1214
1215	/**
1216	 * Initializes single popup or a group of popups
1217	 */
1218	addGroup: function(el, options) {
1219		var eHandler = function(e) {
1220			e.mfpEl = this;
1221			mfp._openClick(e, el, options);
1222		};
1223
1224		if(!options) {
1225			options = {};
1226		}
1227
1228		var eName = 'click.magnificPopup';
1229		options.mainEl = el;
1230
1231		if(options.items) {
1232			options.isObj = true;
1233			el.off(eName).on(eName, eHandler);
1234		} else {
1235			options.isObj = false;
1236			if(options.delegate) {
1237				el.off(eName).on(eName, options.delegate , eHandler);
1238			} else {
1239				options.items = el;
1240				el.off(eName).on(eName, eHandler);
1241			}
1242		}
1243	},
1244	_openClick: function(e, el, options) {
1245		var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick;
1246
1247
1248		if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey ) ) {
1249			return;
1250		}
1251
1252		var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn;
1253
1254		if(disableOn) {
1255			if($.isFunction(disableOn)) {
1256				if( !disableOn.call(mfp) ) {
1257					return true;
1258				}
1259			} else { // else it's number
1260				if( _window.width() < disableOn ) {
1261					return true;
1262				}
1263			}
1264		}
1265
1266		if(e.type) {
1267			e.preventDefault();
1268
1269			// This will prevent popup from closing if element is inside and popup is already opened
1270			if(mfp.isOpen) {
1271				e.stopPropagation();
1272			}
1273		}
1274
1275		options.el = $(e.mfpEl);
1276		if(options.delegate) {
1277			options.items = el.find(options.delegate);
1278		}
1279		mfp.open(options);
1280	},
1281
1282
1283	/**
1284	 * Updates text on preloader
1285	 */
1286	updateStatus: function(status, text) {
1287
1288		if(mfp.preloader) {
1289			if(_prevStatus !== status) {
1290				mfp.container.removeClass('mfp-s-'+_prevStatus);
1291			}
1292
1293			if(!text && status === 'loading') {
1294				text = mfp.st.tLoading;
1295			}
1296
1297			var data = {
1298				status: status,
1299				text: text
1300			};
1301			// allows to modify status
1302			_mfpTrigger('UpdateStatus', data);
1303
1304			status = data.status;
1305			text = data.text;
1306
1307			mfp.preloader.html(text);
1308
1309			mfp.preloader.find('a').on('click', function(e) {
1310				e.stopImmediatePropagation();
1311			});
1312
1313			mfp.container.addClass('mfp-s-'+status);
1314			_prevStatus = status;
1315		}
1316	},
1317
1318
1319	/*
1320		"Private" helpers that aren't private at all
1321	 */
1322	// Check to close popup or not
1323	// "target" is an element that was clicked
1324	_checkIfClose: function(target) {
1325
1326		if($(target).hasClass(PREVENT_CLOSE_CLASS)) {
1327			return;
1328		}
1329
1330		var closeOnContent = mfp.st.closeOnContentClick;
1331		var closeOnBg = mfp.st.closeOnBgClick;
1332
1333		if(closeOnContent && closeOnBg) {
1334			return true;
1335		} else {
1336
1337			// We close the popup if click is on close button or on preloader. Or if there is no content.
1338			if(!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0]) ) {
1339				return true;
1340			}
1341
1342			// if click is outside the content
1343			if(  (target !== mfp.content[0] && !$.contains(mfp.content[0], target))  ) {
1344				if(closeOnBg) {
1345					// last check, if the clicked element is in DOM, (in case it's removed onclick)
1346					if( $.contains(document, target) ) {
1347						return true;
1348					}
1349				}
1350			} else if(closeOnContent) {
1351				return true;
1352			}
1353
1354		}
1355		return false;
1356	},
1357	_addClassToMFP: function(cName) {
1358		mfp.bgOverlay.addClass(cName);
1359		mfp.wrap.addClass(cName);
1360	},
1361	_removeClassFromMFP: function(cName) {
1362		this.bgOverlay.removeClass(cName);
1363		mfp.wrap.removeClass(cName);
1364	},
1365	_hasScrollBar: function(winHeight) {
1366		return (  (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) );
1367	},
1368	_setFocus: function() {
1369		(mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus();
1370	},
1371	_onFocusIn: function(e) {
1372		if( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) {
1373			mfp._setFocus();
1374			return false;
1375		}
1376	},
1377	_parseMarkup: function(template, values, item) {
1378		var arr;
1379		if(item.data) {
1380			values = $.extend(item.data, values);
1381		}
1382		_mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item] );
1383
1384		$.each(values, function(key, value) {
1385			if(value === undefined || value === false) {
1386				return true;
1387			}
1388			arr = key.split('_');
1389			if(arr.length > 1) {
1390				var el = template.find(EVENT_NS + '-'+arr[0]);
1391
1392				if(el.length > 0) {
1393					var attr = arr[1];
1394					if(attr === 'replaceWith') {
1395						if(el[0] !== value[0]) {
1396							el.replaceWith(value);
1397						}
1398					} else if(attr === 'img') {
1399						if(el.is('img')) {
1400							el.attr('src', value);
1401						} else {
1402							el.replaceWith( $('<img>').attr('src', value).attr('class', el.attr('class')) );
1403						}
1404					} else {
1405						el.attr(arr[1], value);
1406					}
1407				}
1408
1409			} else {
1410				template.find(EVENT_NS + '-'+key).html(value);
1411			}
1412		});
1413	},
1414
1415	_getScrollbarSize: function() {
1416		// thx David
1417		if(mfp.scrollbarSize === undefined) {
1418			var scrollDiv = document.createElement("div");
1419			scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';
1420			document.body.appendChild(scrollDiv);
1421			mfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;
1422			document.body.removeChild(scrollDiv);
1423		}
1424		return mfp.scrollbarSize;
1425	}
1426
1427}; /* MagnificPopup core prototype end */
1428
1429
1430
1431
1432/**
1433 * Public static functions
1434 */
1435$.magnificPopup = {
1436	instance: null,
1437	proto: MagnificPopup.prototype,
1438	modules: [],
1439
1440	open: function(options, index) {
1441		_checkInstance();
1442
1443		if(!options) {
1444			options = {};
1445		} else {
1446			options = $.extend(true, {}, options);
1447		}
1448
1449		options.isObj = true;
1450		options.index = index || 0;
1451		return this.instance.open(options);
1452	},
1453
1454	close: function() {
1455		return $.magnificPopup.instance && $.magnificPopup.instance.close();
1456	},
1457
1458	registerModule: function(name, module) {
1459		if(module.options) {
1460			$.magnificPopup.defaults[name] = module.options;
1461		}
1462		$.extend(this.proto, module.proto);
1463		this.modules.push(name);
1464	},
1465
1466	defaults: {
1467
1468		// Info about options is in docs:
1469		// http://dimsemenov.com/plugins/magnific-popup/documentation.html#options
1470
1471		disableOn: 0,
1472
1473		key: null,
1474
1475		midClick: false,
1476
1477		mainClass: '',
1478
1479		preloader: true,
1480
1481		focus: '', // CSS selector of input to focus after popup is opened
1482
1483		closeOnContentClick: false,
1484
1485		closeOnBgClick: true,
1486
1487		closeBtnInside: true,
1488
1489		showCloseBtn: true,
1490
1491		enableEscapeKey: true,
1492
1493		modal: false,
1494
1495		alignTop: false,
1496
1497		removalDelay: 0,
1498
1499		prependTo: null,
1500
1501		fixedContentPos: 'auto',
1502
1503		fixedBgPos: 'auto',
1504
1505		overflowY: 'auto',
1506
1507		closeMarkup: '<button title="%title%" type="button" class="mfp-close">&#215;</button>',
1508
1509		tClose: 'Close (Esc)',
1510
1511		tLoading: 'Loading...',
1512
1513		autoFocusLast: true
1514
1515	}
1516};
1517
1518
1519
1520$.fn.magnificPopup = function(options) {
1521	_checkInstance();
1522
1523	var jqEl = $(this);
1524
1525	// We call some API method of first param is a string
1526	if (typeof options === "string" ) {
1527
1528		if(options === 'open') {
1529			var items,
1530				itemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup,
1531				index = parseInt(arguments[1], 10) || 0;
1532
1533			if(itemOpts.items) {
1534				items = itemOpts.items[index];
1535			} else {
1536				items = jqEl;
1537				if(itemOpts.delegate) {
1538					items = items.find(itemOpts.delegate);
1539				}
1540				items = items.eq( index );
1541			}
1542			mfp._openClick({mfpEl:items}, jqEl, itemOpts);
1543		} else {
1544			if(mfp.isOpen)
1545				mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1));
1546		}
1547
1548	} else {
1549		// clone options obj
1550		options = $.extend(true, {}, options);
1551
1552		/*
1553		 * As Zepto doesn't support .data() method for objects
1554		 * and it works only in normal browsers
1555		 * we assign "options" object directly to the DOM element. FTW!
1556		 */
1557		if(_isJQ) {
1558			jqEl.data('magnificPopup', options);
1559		} else {
1560			jqEl[0].magnificPopup = options;
1561		}
1562
1563		mfp.addGroup(jqEl, options);
1564
1565	}
1566	return jqEl;
1567};
1568
1569/*>>core*/
1570
1571/*>>inline*/
1572
1573var INLINE_NS = 'inline',
1574	_hiddenClass,
1575	_inlinePlaceholder,
1576	_lastInlineElement,
1577	_putInlineElementsBack = function() {
1578		if(_lastInlineElement) {
1579			_inlinePlaceholder.after( _lastInlineElement.addClass(_hiddenClass) ).detach();
1580			_lastInlineElement = null;
1581		}
1582	};
1583
1584$.magnificPopup.registerModule(INLINE_NS, {
1585	options: {
1586		hiddenClass: 'hide', // will be appended with `mfp-` prefix
1587		markup: '',
1588		tNotFound: 'Content not found'
1589	},
1590	proto: {
1591
1592		initInline: function() {
1593			mfp.types.push(INLINE_NS);
1594
1595			_mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function() {
1596				_putInlineElementsBack();
1597			});
1598		},
1599
1600		getInline: function(item, template) {
1601
1602			_putInlineElementsBack();
1603
1604			if(item.src) {
1605				var inlineSt = mfp.st.inline,
1606					el = $(item.src);
1607
1608				if(el.length) {
1609
1610					// If target element has parent - we replace it with placeholder and put it back after popup is closed
1611					var parent = el[0].parentNode;
1612					if(parent && parent.tagName) {
1613						if(!_inlinePlaceholder) {
1614							_hiddenClass = inlineSt.hiddenClass;
1615							_inlinePlaceholder = _getEl(_hiddenClass);
1616							_hiddenClass = 'mfp-'+_hiddenClass;
1617						}
1618						// replace target inline element with placeholder
1619						_lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass);
1620					}
1621
1622					mfp.updateStatus('ready');
1623				} else {
1624					mfp.updateStatus('error', inlineSt.tNotFound);
1625					el = $('<div>');
1626				}
1627
1628				item.inlineElement = el;
1629				return el;
1630			}
1631
1632			mfp.updateStatus('ready');
1633			mfp._parseMarkup(template, {}, item);
1634			return template;
1635		}
1636	}
1637});
1638
1639/*>>inline*/
1640
1641/*>>ajax*/
1642var AJAX_NS = 'ajax',
1643	_ajaxCur,
1644	_removeAjaxCursor = function() {
1645		if(_ajaxCur) {
1646			$(document.body).removeClass(_ajaxCur);
1647		}
1648	},
1649	_destroyAjaxRequest = function() {
1650		_removeAjaxCursor();
1651		if(mfp.req) {
1652			mfp.req.abort();
1653		}
1654	};
1655
1656$.magnificPopup.registerModule(AJAX_NS, {
1657
1658	options: {
1659		settings: null,
1660		cursor: 'mfp-ajax-cur',
1661		tError: '<a href="%url%">The content</a> could not be loaded.'
1662	},
1663
1664	proto: {
1665		initAjax: function() {
1666			mfp.types.push(AJAX_NS);
1667			_ajaxCur = mfp.st.ajax.cursor;
1668
1669			_mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest);
1670			_mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest);
1671		},
1672		getAjax: function(item) {
1673
1674			if(_ajaxCur) {
1675				$(document.body).addClass(_ajaxCur);
1676			}
1677
1678			mfp.updateStatus('loading');
1679
1680			var opts = $.extend({
1681				url: item.src,
1682				success: function(data, textStatus, jqXHR) {
1683					var temp = {
1684						data:data,
1685						xhr:jqXHR
1686					};
1687
1688					_mfpTrigger('ParseAjax', temp);
1689
1690					mfp.appendContent( $(temp.data), AJAX_NS );
1691
1692					item.finished = true;
1693
1694					_removeAjaxCursor();
1695
1696					mfp._setFocus();
1697
1698					setTimeout(function() {
1699						mfp.wrap.addClass(READY_CLASS);
1700					}, 16);
1701
1702					mfp.updateStatus('ready');
1703
1704					_mfpTrigger('AjaxContentAdded');
1705				},
1706				error: function() {
1707					_removeAjaxCursor();
1708					item.finished = item.loadError = true;
1709					mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src));
1710				}
1711			}, mfp.st.ajax.settings);
1712
1713			mfp.req = $.ajax(opts);
1714
1715			return '';
1716		}
1717	}
1718});
1719
1720/*>>ajax*/
1721
1722/*>>image*/
1723var _imgInterval,
1724	_getTitle = function(item) {
1725		if(item.data && item.data.title !== undefined)
1726			return item.data.title;
1727
1728		var src = mfp.st.image.titleSrc;
1729
1730		if(src) {
1731			if($.isFunction(src)) {
1732				return src.call(mfp, item);
1733			} else if(item.el) {
1734				return item.el.attr(src) || '';
1735			}
1736		}
1737		return '';
1738	};
1739
1740$.magnificPopup.registerModule('image', {
1741
1742	options: {
1743		markup: '<div class="mfp-figure">'+
1744					'<div class="mfp-close"></div>'+
1745					'<figure>'+
1746						'<div class="mfp-img"></div>'+
1747						'<figcaption>'+
1748							'<div class="mfp-bottom-bar">'+
1749								'<div class="mfp-title"></div>'+
1750								'<div class="mfp-counter"></div>'+
1751							'</div>'+
1752						'</figcaption>'+
1753					'</figure>'+
1754				'</div>',
1755		cursor: 'mfp-zoom-out-cur',
1756		titleSrc: 'title',
1757		verticalFit: true,
1758		tError: '<a href="%url%">The image</a> could not be loaded.'
1759	},
1760
1761	proto: {
1762		initImage: function() {
1763			var imgSt = mfp.st.image,
1764				ns = '.image';
1765
1766			mfp.types.push('image');
1767
1768			_mfpOn(OPEN_EVENT+ns, function() {
1769				if(mfp.currItem.type === 'image' && imgSt.cursor) {
1770					$(document.body).addClass(imgSt.cursor);
1771				}
1772			});
1773
1774			_mfpOn(CLOSE_EVENT+ns, function() {
1775				if(imgSt.cursor) {
1776					$(document.body).removeClass(imgSt.cursor);
1777				}
1778				_window.off('resize' + EVENT_NS);
1779			});
1780
1781			_mfpOn('Resize'+ns, mfp.resizeImage);
1782			if(mfp.isLowIE) {
1783				_mfpOn('AfterChange', mfp.resizeImage);
1784			}
1785		},
1786		resizeImage: function() {
1787			var item = mfp.currItem;
1788			if(!item || !item.img) return;
1789
1790			if(mfp.st.image.verticalFit) {
1791				var decr = 0;
1792				// fix box-sizing in ie7/8
1793				if(mfp.isLowIE) {
1794					decr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10);
1795				}
1796				item.img.css('max-height', mfp.wH-decr);
1797			}
1798		},
1799		_onImageHasSize: function(item) {
1800			if(item.img) {
1801
1802				item.hasSize = true;
1803
1804				if(_imgInterval) {
1805					clearInterval(_imgInterval);
1806				}
1807
1808				item.isCheckingImgSize = false;
1809
1810				_mfpTrigger('ImageHasSize', item);
1811
1812				if(item.imgHidden) {
1813					if(mfp.content)
1814						mfp.content.removeClass('mfp-loading');
1815
1816					item.imgHidden = false;
1817				}
1818
1819			}
1820		},
1821
1822		/**
1823		 * Function that loops until the image has size to display elements that rely on it asap
1824		 */
1825		findImageSize: function(item) {
1826
1827			var counter = 0,
1828				img = item.img[0],
1829				mfpSetInterval = function(delay) {
1830
1831					if(_imgInterval) {
1832						clearInterval(_imgInterval);
1833					}
1834					// decelerating interval that checks for size of an image
1835					_imgInterval = setInterval(function() {
1836						if(img.naturalWidth > 0) {
1837							mfp._onImageHasSize(item);
1838							return;
1839						}
1840
1841						if(counter > 200) {
1842							clearInterval(_imgInterval);
1843						}
1844
1845						counter++;
1846						if(counter === 3) {
1847							mfpSetInterval(10);
1848						} else if(counter === 40) {
1849							mfpSetInterval(50);
1850						} else if(counter === 100) {
1851							mfpSetInterval(500);
1852						}
1853					}, delay);
1854				};
1855
1856			mfpSetInterval(1);
1857		},
1858
1859		getImage: function(item, template) {
1860
1861			var guard = 0,
1862
1863				// image load complete handler
1864				onLoadComplete = function() {
1865					if(item) {
1866						if (item.img[0].complete) {
1867							item.img.off('.mfploader');
1868
1869							if(item === mfp.currItem){
1870								mfp._onImageHasSize(item);
1871
1872								mfp.updateStatus('ready');
1873							}
1874
1875							item.hasSize = true;
1876							item.loaded = true;
1877
1878							_mfpTrigger('ImageLoadComplete');
1879
1880						}
1881						else {
1882							// if image complete check fails 200 times (20 sec), we assume that there was an error.
1883							guard++;
1884							if(guard < 200) {
1885								setTimeout(onLoadComplete,100);
1886							} else {
1887								onLoadError();
1888							}
1889						}
1890					}
1891				},
1892
1893				// image error handler
1894				onLoadError = function() {
1895					if(item) {
1896						item.img.off('.mfploader');
1897						if(item === mfp.currItem){
1898							mfp._onImageHasSize(item);
1899							mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
1900						}
1901
1902						item.hasSize = true;
1903						item.loaded = true;
1904						item.loadError = true;
1905					}
1906				},
1907				imgSt = mfp.st.image;
1908
1909
1910			var el = template.find('.mfp-img');
1911			if(el.length) {
1912				var img = document.createElement('img');
1913				img.className = 'mfp-img';
1914				if(item.el && item.el.find('img').length) {
1915					img.alt = item.el.find('img').attr('alt');
1916				}
1917				item.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError);
1918				img.src = item.src;
1919
1920				// without clone() "error" event is not firing when IMG is replaced by new IMG
vendor: 8,584 bytes, lines 1921-2304
1921				// TODO: find a way to avoid such cloning
1922				if(el.is('img')) {
1923					item.img = item.img.clone();
1924				}
1925
1926				img = item.img[0];
1927				if(img.naturalWidth > 0) {
1928					item.hasSize = true;
1929				} else if(!img.width) {
1930					item.hasSize = false;
1931				}
1932			}
1933
1934			mfp._parseMarkup(template, {
1935				title: _getTitle(item),
1936				img_replaceWith: item.img
1937			}, item);
1938
1939			mfp.resizeImage();
1940
1941			if(item.hasSize) {
1942				if(_imgInterval) clearInterval(_imgInterval);
1943
1944				if(item.loadError) {
1945					template.addClass('mfp-loading');
1946					mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
1947				} else {
1948					template.removeClass('mfp-loading');
1949					mfp.updateStatus('ready');
1950				}
1951				return template;
1952			}
1953
1954			mfp.updateStatus('loading');
1955			item.loading = true;
1956
1957			if(!item.hasSize) {
1958				item.imgHidden = true;
1959				template.addClass('mfp-loading');
1960				mfp.findImageSize(item);
1961			}
1962
1963			return template;
1964		}
1965	}
1966});
1967
1968/*>>image*/
1969
1970/*>>zoom*/
1971var hasMozTransform,
1972	getHasMozTransform = function() {
1973		if(hasMozTransform === undefined) {
1974			hasMozTransform = document.createElement('p').style.MozTransform !== undefined;
1975		}
1976		return hasMozTransform;
1977	};
1978
1979$.magnificPopup.registerModule('zoom', {
1980
1981	options: {
1982		enabled: false,
1983		easing: 'ease-in-out',
1984		duration: 300,
1985		opener: function(element) {
1986			return element.is('img') ? element : element.find('img');
1987		}
1988	},
1989
1990	proto: {
1991
1992		initZoom: function() {
1993			var zoomSt = mfp.st.zoom,
1994				ns = '.zoom',
1995				image;
1996
1997			if(!zoomSt.enabled || !mfp.supportsTransition) {
1998				return;
1999			}
2000
2001			var duration = zoomSt.duration,
2002				getElToAnimate = function(image) {
2003					var newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),
2004						transition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing,
2005						cssObj = {
2006							position: 'fixed',
2007							zIndex: 9999,
2008							left: 0,
2009							top: 0,
2010							'-webkit-backface-visibility': 'hidden'
2011						},
2012						t = 'transition';
2013
2014					cssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition;
2015
2016					newImg.css(cssObj);
2017					return newImg;
2018				},
2019				showMainContent = function() {
2020					mfp.content.css('visibility', 'visible');
2021				},
2022				openTimeout,
2023				animatedImg;
2024
2025			_mfpOn('BuildControls'+ns, function() {
2026				if(mfp._allowZoom()) {
2027
2028					clearTimeout(openTimeout);
2029					mfp.content.css('visibility', 'hidden');
2030
2031					// Basically, all code below does is clones existing image, puts in on top of the current one and animated it
2032
2033					image = mfp._getItemToZoom();
2034
2035					if(!image) {
2036						showMainContent();
2037						return;
2038					}
2039
2040					animatedImg = getElToAnimate(image);
2041
2042					animatedImg.css( mfp._getOffset() );
2043
2044					mfp.wrap.append(animatedImg);
2045
2046					openTimeout = setTimeout(function() {
2047						animatedImg.css( mfp._getOffset( true ) );
2048						openTimeout = setTimeout(function() {
2049
2050							showMainContent();
2051
2052							setTimeout(function() {
2053								animatedImg.remove();
2054								image = animatedImg = null;
2055								_mfpTrigger('ZoomAnimationEnded');
2056							}, 16); // avoid blink when switching images
2057
2058						}, duration); // this timeout equals animation duration
2059
2060					}, 16); // by adding this timeout we avoid short glitch at the beginning of animation
2061
2062
2063					// Lots of timeouts...
2064				}
2065			});
2066			_mfpOn(BEFORE_CLOSE_EVENT+ns, function() {
2067				if(mfp._allowZoom()) {
2068
2069					clearTimeout(openTimeout);
2070
2071					mfp.st.removalDelay = duration;
2072
2073					if(!image) {
2074						image = mfp._getItemToZoom();
2075						if(!image) {
2076							return;
2077						}
2078						animatedImg = getElToAnimate(image);
2079					}
2080
2081					animatedImg.css( mfp._getOffset(true) );
2082					mfp.wrap.append(animatedImg);
2083					mfp.content.css('visibility', 'hidden');
2084
2085					setTimeout(function() {
2086						animatedImg.css( mfp._getOffset() );
2087					}, 16);
2088				}
2089
2090			});
2091
2092			_mfpOn(CLOSE_EVENT+ns, function() {
2093				if(mfp._allowZoom()) {
2094					showMainContent();
2095					if(animatedImg) {
2096						animatedImg.remove();
2097					}
2098					image = null;
2099				}
2100			});
2101		},
2102
2103		_allowZoom: function() {
2104			return mfp.currItem.type === 'image';
2105		},
2106
2107		_getItemToZoom: function() {
2108			if(mfp.currItem.hasSize) {
2109				return mfp.currItem.img;
2110			} else {
2111				return false;
2112			}
2113		},
2114
2115		// Get element postion relative to viewport
2116		_getOffset: function(isLarge) {
2117			var el;
2118			if(isLarge) {
2119				el = mfp.currItem.img;
2120			} else {
2121				el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem);
2122			}
2123
2124			var offset = el.offset();
2125			var paddingTop = parseInt(el.css('padding-top'),10);
2126			var paddingBottom = parseInt(el.css('padding-bottom'),10);
2127			offset.top -= ( $(window).scrollTop() - paddingTop );
2128
2129
2130			/*
2131
2132			Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.
2133
2134			 */
2135			var obj = {
2136				width: el.width(),
2137				// fix Zepto height+padding issue
2138				height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop
2139			};
2140
2141			// I hate to do this, but there is no another option
2142			if( getHasMozTransform() ) {
2143				obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';
2144			} else {
2145				obj.left = offset.left;
2146				obj.top = offset.top;
2147			}
2148			return obj;
2149		}
2150
2151	}
2152});
2153
2154
2155
2156/*>>zoom*/
2157
2158/*>>iframe*/
2159
2160var IFRAME_NS = 'iframe',
2161	_emptyPage = '//about:blank',
2162
2163	_fixIframeBugs = function(isShowing) {
2164		if(mfp.currTemplate[IFRAME_NS]) {
2165			var el = mfp.currTemplate[IFRAME_NS].find('iframe');
2166			if(el.length) {
2167				// reset src after the popup is closed to avoid "video keeps playing after popup is closed" bug
2168				if(!isShowing) {
2169					el[0].src = _emptyPage;
2170				}
2171
2172				// IE8 black screen bug fix
2173				if(mfp.isIE8) {
2174					el.css('display', isShowing ? 'block' : 'none');
2175				}
2176			}
2177		}
2178	};
2179
2180$.magnificPopup.registerModule(IFRAME_NS, {
2181
2182	options: {
2183		markup: '<div class="mfp-iframe-scaler">'+
2184					'<div class="mfp-close"></div>'+
2185					'<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>'+
2186				'</div>',
2187
2188		srcAction: 'iframe_src',
2189
2190		// we don't care and support only one default type of URL by default
2191		patterns: {
2192			youtube: {
2193				index: 'youtube.com',
2194				id: 'v=',
2195				src: '//www.youtube.com/embed/%id%?autoplay=1'
2196			},
2197			vimeo: {
2198				index: 'vimeo.com/',
2199				id: '/',
2200				src: '//player.vimeo.com/video/%id%?autoplay=1'
2201			},
2202			gmaps: {
2203				index: '//maps.google.',
2204				src: '%id%&output=embed'
2205			}
2206		}
2207	},
2208
2209	proto: {
2210		initIframe: function() {
2211			mfp.types.push(IFRAME_NS);
2212
2213			_mfpOn('BeforeChange', function(e, prevType, newType) {
2214				if(prevType !== newType) {
2215					if(prevType === IFRAME_NS) {
2216						_fixIframeBugs(); // iframe if removed
2217					} else if(newType === IFRAME_NS) {
2218						_fixIframeBugs(true); // iframe is showing
2219					}
2220				}// else {
2221					// iframe source is switched, don't do anything
2222				//}
2223			});
2224
2225			_mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() {
2226				_fixIframeBugs();
2227			});
2228		},
2229
2230		getIframe: function(item, template) {
2231			var embedSrc = item.src;
2232			var iframeSt = mfp.st.iframe;
2233
2234			$.each(iframeSt.patterns, function() {
2235				if(embedSrc.indexOf( this.index ) > -1) {
2236					if(this.id) {
2237						if(typeof this.id === 'string') {
2238							embedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length);
2239						} else {
2240							embedSrc = this.id.call( this, embedSrc );
2241						}
2242					}
2243					embedSrc = this.src.replace('%id%', embedSrc );
2244					return false; // break;
2245				}
2246			});
2247
2248			var dataObj = {};
2249			if(iframeSt.srcAction) {
2250				dataObj[iframeSt.srcAction] = embedSrc;
2251			}
2252			mfp._parseMarkup(template, dataObj, item);
2253
2254			mfp.updateStatus('ready');
2255
2256			return template;
2257		}
2258	}
2259});
2260
2261
2262
2263/*>>iframe*/
2264
2265/*>>gallery*/
2266/**
2267 * Get looped index depending on number of slides
2268 */
2269var _getLoopedId = function(index) {
2270		var numSlides = mfp.items.length;
2271		if(index > numSlides - 1) {
2272			return index - numSlides;
2273		} else  if(index < 0) {
2274			return numSlides + index;
2275		}
2276		return index;
2277	},
2278	_replaceCurrTotal = function(text, curr, total) {
2279		return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total);
2280	};
2281
2282$.magnificPopup.registerModule('gallery', {
2283
2284	options: {
2285		enabled: false,
2286		arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
2287		preload: [0,2],
2288		navigateByImgClick: true,
2289		arrows: true,
2290
2291		tPrev: 'Previous (Left arrow key)',
2292		tNext: 'Next (Right arrow key)',
2293		tCounter: '%curr% of %total%'
2294	},
2295
2296	proto: {
2297		initGallery: function() {
2298
2299			var gSt = mfp.st.gallery,
2300				ns = '.mfp-gallery';
2301
2302			mfp.direction = true; // true - next, false - prev
2303
2304			if(!gSt || !gSt.enabled ) return false;
2305
2306			_wrapClasses += ' mfp-gallery';
2307
2308			_mfpOn(OPEN_EVENT+ns, function() {
2309
2310				if(gSt.navigateByImgClick) {
2311					mfp.wrap.on('click'+ns, '.mfp-img', function() {
2312						if(mfp.items.length > 1) {
2313							mfp.next();
2314							return false;
2315						}
2316					});
2317				}
2318
2319				_document.on('keydown'+ns, function(e) {
2320					if (e.keyCode === 37) {
2321						mfp.prev();
2322					} else if (e.keyCode === 39) {
2323						mfp.next();
2324					}
2325				});
2326			});
2327
2328			_mfpOn('UpdateStatus'+ns, function(e, data) {
2329				if(data.text) {
2330					data.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length);
2331				}
2332			});
2333
2334			_mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) {
2335				var l = mfp.items.length;
2336				values.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : '';
2337			});
2338
2339			_mfpOn('BuildControls' + ns, function() {
2340				if(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) {
2341					var markup = gSt.arrowMarkup,
2342						arrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS),
2343						arrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS);
2344
2345					arrowLeft.click(function() {
2346						mfp.prev();
2347					});
2348					arrowRight.click(function() {
2349						mfp.next();
2350					});
2351
2352					mfp.container.append(arrowLeft.add(arrowRight));
2353				}
2354			});
2355
2356			_mfpOn(CHANGE_EVENT+ns, function() {
2357				if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout);
2358
2359				mfp._preloadTimeout = setTimeout(function() {
2360					mfp.preloadNearbyImages();
2361					mfp._preloadTimeout = null;
2362				}, 16);
2363			});
2364
2365
2366			_mfpOn(CLOSE_EVENT+ns, function() {
2367				_document.off(ns);
2368				mfp.wrap.off('click'+ns);
2369				mfp.arrowRight = mfp.arrowLeft = null;
2370			});
2371
2372		},
2373		next: function() {
2374			mfp.direction = true;
2375			mfp.index = _getLoopedId(mfp.index + 1);
2376			mfp.updateItemHTML();
2377		},
2378		prev: function() {
2379			mfp.direction = false;
2380			mfp.index = _getLoopedId(mfp.index - 1);
2381			mfp.updateItemHTML();
2382		},
2383		goTo: function(newIndex) {
2384			mfp.direction = (newIndex >= mfp.index);
2385			mfp.index = newIndex;
2386			mfp.updateItemHTML();
2387		},
2388		preloadNearbyImages: function() {
2389			var p = mfp.st.gallery.preload,
2390				preloadBefore = Math.min(p[0], mfp.items.length),
2391				preloadAfter = Math.min(p[1], mfp.items.length),
2392				i;
2393
2394			for(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) {
2395				mfp._preloadItem(mfp.index+i);
2396			}
2397			for(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) {
2398				mfp._preloadItem(mfp.index-i);
2399			}
2400		},
2401		_preloadItem: function(index) {
2402			index = _getLoopedId(index);
2403
2404			if(mfp.items[index].preloaded) {
2405				return;
2406			}
2407
2408			var item = mfp.items[index];
2409			if(!item.parsed) {
2410				item = mfp.parseEl( index );
2411			}
2412
2413			_mfpTrigger('LazyLoad', item);
2414
2415			if(item.type === 'image') {
2416				item.img = $('<img class="mfp-img" />').on('load.mfploader', function() {
2417					item.hasSize = true;
2418				}).on('error.mfploader', function() {
2419					item.hasSize = true;
2420					item.loadError = true;
2421					_mfpTrigger('LazyLoadError', item);
2422				}).attr('src', item.src);
2423			}
2424
2425
2426			item.preloaded = true;
2427		}
2428	}
2429});
2430
2431/*>>gallery*/
2432
2433/*>>retina*/
2434
2435var RETINA_NS = 'retina';
2436
2437$.magnificPopup.registerModule(RETINA_NS, {
2438	options: {
2439		replaceSrc: function(item) {
2440			return item.src.replace(/\.\w+$/, function(m) { return '@2x' + m; });
2441		},
2442		ratio: 1 // Function or number.  Set to 1 to disable.
2443	},
2444	proto: {
2445		initRetina: function() {
2446			if(window.devicePixelRatio > 1) {
2447
2448				var st = mfp.st.retina,
2449					ratio = st.ratio;
2450
2451				ratio = !isNaN(ratio) ? ratio : ratio();
2452
2453				if(ratio > 1) {
2454					_mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) {
2455						item.img.css({
2456							'max-width': item.img[0].naturalWidth / ratio,
2457							'width': '100%'
2458						});
2459					});
2460					_mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) {
2461						item.src = st.replaceSrc(item, ratio);
2462					});
2463				}
2464			}
2465
2466		}
2467	}
2468});
2469
2470/*>>retina*/
2471 _checkInstance(); }));;
2472!function(o,e,t,i){"use strict";function a(e,a){function n(){o("body").removeClass(function(o,e){return(e.match(/(^|\s)colorbox-\S+/g)||[]).join(" ")})}function d(){i.clearTimeout(r);
2472var e={width:c.width||t.colorbox.maxWidth,height:c.height||t.colorbox.maxHeight};r=i.setTimeout(function(){if(o("#cboxOverlay").is(":visible")){var t=o("#cboxLoadedContent"),i=o(".cboxIframe",t);i.length?(t.addClass("media media--ratio"),i.attr("width",e.width).attr("height",e.height).addClass("media__element"),t.css({paddingBottom:e.height/e.width*100+"%",height:0}),o.colorbox.resize({innerWidth:e.width,innerHeight:e.height})):(t.removeClass("media media--ratio"),t.css({paddingBottom:"",height:e.height}).removeClass("media__element"))}},10)}var l=o(a),c=l.data("media")||{},h="image"!==c.type,m={rel:c.rel||null,iframe:h,title:function(){var o=l.next(".litebox-caption");return o.length?o.html():""},onComplete:function(){n(),o("body").addClass("colorbox-on colorbox-on--"+c.type),h&&(d(),o("body").addClass("colorbox-on--media"))},onClosed:function(){n()}};l.colorbox(o.extend({},t.colorbox,m))}var r;e.behaviors.blazyColorbox={attach:function(e){if(t.colorbox){if(t.colorbox.mobiledetect&&i.matchMedia){if(i.matchMedia("(max-device-width: "+t.colorbox.mobiledevicewidth+")").matches)return}o("[data-colorbox-trigger]",e).once("blazy-colorbox",a)}}}}(jQuery,Drupal,Drupal.settings,this);
2473;
2474(function ($) {
2475  // Sanity check because sometimes we might be included on a page with jQuery
2476  // < 1.7, in which case Magnific Popup's use of $().on/$().off will blow up.
2477  if (!("off" in $.fn)) {
2478    if (window.console) {
2479      console.log('Magnific Popup disabled: legacy jQuery detected (no "off" method).');
2480    }
2481    return;
2482  }
2483  Drupal.settings.magnific_popup = Drupal.settings.magnific_popup || {};
2484  Drupal.settings.magnific_popup_api = Drupal.settings.magnific_popup_api || {};
2485  Drupal.settings.magnific_popup.common_options = {
2486    disableOn: 300,
2487    mainClass: 'mfp-fade',
2488    removalDelay: 160,
2489    preloader: false,
2490    fixedContentPos: 'auto'
2491  };
2492  var youtube_id = function (url) {
2493    // Get video ID and extra params (if they exist). Sometimes the order of
2494    // parameters in "/watch?"-style URLs can change, so allow "v=" to appear
2495    // anywhere.
2496    // Example URLs:
2497    //  http://www.youtube.com/watch?v=VIDEOID&t=60&list=PLAYLISTID
2498    //  https://www.youtube.com/v/VIDEOID?t=60&list=PLAYLISTID
2499    //  https://www.youtube.com/embed/VIDEOID?t=60&list=PLAYLISTID
2500    //  https://youtu.be/VIDEOID?t=60&list=PLAYLISTID
2501    var video_ID = /(youtu\.be\/|youtube\.com\/(embed|v)\/|watch\?v=|watch\?.*&v=)([a-zA-Z0-9_-]+)/.exec(url);
2502    if (!video_ID || !video_ID.length || typeof video_ID[3] === 'undefined') {
2503      return false;
2504    }
2505    var video_params_test = /\?+(.+)/.exec(url), video_params = '';
2506    if (!!video_params_test && typeof video_params_test[1] !== 'undefined') {
2507      video_params = '&' + video_params_test[1];
2508      // Remove redundant video param, if it exists.
2509      video_params = video_params.replace(/&v=.*?(?=$|&)/gi, '');
2510      // Remove autoplay param, if it exists.
2511      video_params = video_params.replace(/&autoplay=.*?(?=$|&)/gi, '');
2512      // Convert "t"/"time_continue" to "start" param.
2513      video_params = video_params.replace(/&(t|time_continue)=/gi, '&start=');
2514      // Adjust "start" param; the YT share GUI generates URLs like ?t=1h2m3s
2515      // but the embed endpoint requires time in seconds with no units or text
2516      // chars of any kind.
2517      var start_times = /&start=((\d+h)?(\d+m)?(\d+s)?)/i.exec(video_params);
2518      if (start_times && start_times.length && start_times[1] !== '') {
2519        var time = 0;
2520        for (var i = 2; i < start_times.length; ++i) {
2521          if (typeof start_times[i] !== 'undefined') {
2522            time += parseInt(start_times[i]) * Math.pow(60, 4 - i);
2523          }
2524        }
2525        video_params = video_params.replace(/&start=.*?(?=$|&)/gi, '&start=' + time);
2526      }
2527    }
2528    return video_ID[3] + '?autoplay=1' + video_params;
2529  };
2530  Drupal.settings.magnific_popup.common_options_iframe = {
2531    type: 'iframe',
2532    iframe: {
2533      markup: '<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" id="mfp-iframe" frameborder="0" seamless="seamless" allowfullscreen="allowfullscreen"></iframe></div>',
2534      patterns: {
2535        youtube_short: {
2536          index: 'youtu.be/',
2537          id: youtube_id,
2538          src: '//www.youtube.com/embed/%id%'
2539        },
2540        // To override the default "youtube" handler, we need to name ours the
2541        // same.
2542        youtube: {
2543          index: 'www.youtube.com/',
2544          id: youtube_id,
2545          src: '//www.youtube.com/embed/%id%'
2546        }
2547      }
2548    }
2549  };
2550  Drupal.behaviors.magnific_popup = {
2551    attach: function (context, settings) {
2552      settings.magnific_popup = settings.magnific_popup || {
2553          common_options: {},
2554          common_options_iframe: {}
2555        };
2556      var common_options = settings.magnific_popup.common_options || {};
2557      var common_options_iframe = settings.magnific_popup.common_options_iframe || {};
2558      // Allow modules to extend the set of patterns we support via iframe.
2559      if (settings.magnific_popup_api && settings.magnific_popup_api.iframe_patterns) {
2560        jQuery.extend(settings.magnific_popup.common_options_iframe.iframe.patterns, settings.magnific_popup_api.iframe_patterns);
2561        // There are some bugs around the delete operator, so make sure we never
2562        // double-up on iframe patterns.
2563        settings.magnific_popup_api.iframe_patterns = {};
2564        // Attempt to delete the iframe patterns from our settings object.
2565        delete settings.magnific_popup_api.iframe_patterns;
2566      }
2567      var common_options_image = {
2568        type: 'image',
2569        image: {
2570          titleSrc: function (item) {
2571            return $('img.mfp-thumbnail,span.mfp-title', item.el).attr('title') || '';
2572          }
2573        }
2574      };
2575      var common_options_gallery = {
2576        gallery: {enabled: true},
2577        delegate: 'a'
2578      };
2579      // Instantiate no-gallery, images.
2580      var options = {};
2581      $.extend(options, common_options, common_options_image);
2582      $('.mfp-nogallery-image .mfp-item', context).once('magnific_popup').magnificPopup(options);
2583      // Instantiate no-gallery, iframes.
2584      options = {};
2585      $.extend(options, common_options, common_options_iframe);
2586      $('.mfp-nogallery-iframe .mfp-item', context).once('magnific_popup').magnificPopup(options);
2587      // Instantiate galleries, images.
2588      options = {};
2589      $.extend(options, common_options, common_options_image, common_options_gallery);
2590      $('.mfp-gallery-image', context).once('magnific_popup').each(function (el, i) {
2591        $(this).magnificPopup(options);
2592      });
2593      // Instantiate galleries, iframes.
2594      options = {};
2595      $.extend(options, common_options, common_options_iframe, common_options_gallery);
2596      $('.mfp-gallery-iframe', context).once('magnific_popup').each(function (el, i) {
2597        $(this).magnificPopup(options);
2598      });
2599    }
2600  }
2601})(jQuery);
2602;
2603(function ($) {
2604
2605/**
2606 * Prevents consecutive form submissions of identical form values.
2607 *
2608 * Repetitive form submissions that would submit the identical form values are
2609 * prevented, unless the form values are different from the previously
2610 * submitted values.
2611 *
2612 * This is a simplified re-implementation of a user-agent behavior that should
2613 * be natively supported by major web browsers, but at this time, only Firefox
2614 * has a built-in protection.
2615 *
2616 * A form value-based approach ensures that the constraint is triggered for
2617 * consecutive, identical form submissions only. Compared to that, a form
2618 * button-based approach would (1) rely on [visible] buttons to exist where
2619 * technically not required and (2) require more complex state management if
2620 * there are multiple buttons in a form.
2621 *
2622 * This implementation is based on form-level submit events only and relies on
2623 * jQuery's serialize() method to determine submitted form values. As such, the
2624 * following limitations exist:
2625 *
2626 * - Event handlers on form buttons that preventDefault() do not receive a
2627 *   double-submit protection. That is deemed to be fine, since such button
2628 *   events typically trigger reversible client-side or server-side operations
2629 *   that are local to the context of a form only.
2630 * - Changed values in advanced form controls, such as file inputs, are not part
2631 *   of the form values being compared between consecutive form submits (due to
2632 *   limitations of jQuery.serialize()). That is deemed to be acceptable,
2633 *   because if the user forgot to attach a file, then the size of HTTP payload
2634 *   will most likely be small enough to be fully passed to the server endpoint
2635 *   within (milli)seconds. If a user mistakenly attached a wrong file and is
2636 *   technically versed enough to cancel the form submission (and HTTP payload)
2637 *   in order to attach a different file, then that edge-case is not supported
2638 *   here.
2639 *
2640 * Lastly, all forms submitted via HTTP GET are idempotent by definition of HTTP
2641 * standards, so excluded in this implementation.
2642 */
2643Drupal.behaviors.formSingleSubmit = {
2644  attach: function () {
2645    function onFormSubmit (e) {
2646      var $form = $(e.currentTarget);
2647      var formValues = $form.serialize();
2648      var previousValues = $form.attr('data-drupal-form-submit-last');
2649      if (previousValues === formValues) {
2650        e.preventDefault();
2651      }
2652      else {
2653        $form.attr('data-drupal-form-submit-last', formValues);
2654      }
2655    }
2656
2657    $('body').once('form-single-submit')
2658      .delegate('form:not([method~="GET"])', 'submit.singleSubmit', onFormSubmit);
2659  }
2660};
2661
2662})(jQuery);
2663;
2664(function ($) {
2665
2666/**
2667 * Provides Ajax page updating via jQuery $.ajax (Asynchronous JavaScript and XML).
2668 *
2669 * Ajax is a method of making a request via JavaScript while viewing an HTML
2670 * page. The request returns an array of commands encoded in JSON, which is
2671 * then executed to make any changes that are necessary to the page.
2672 *
2673 * Drupal uses this file to enhance form elements with #ajax['path'] and
2674 * #ajax['wrapper'] properties. If set, this file will automatically be included
2675 * to provide Ajax capabilities.
2676 */
2677
2678Drupal.ajax = Drupal.ajax || {};
2679
2680Drupal.settings.urlIsAjaxTrusted = Drupal.settings.urlIsAjaxTrusted || {};
2681
2682/**
2683 * Attaches the Ajax behavior to each Ajax form element.
2684 */
2685Drupal.behaviors.AJAX = {
2686  attach: function (context, settings) {
2687    // Load all Ajax behaviors specified in the settings.
2688    for (var base in settings.ajax) {
2689      if (!$('#' + base + '.ajax-processed').length) {
2690        var element_settings = settings.ajax[base];
2691
2692        if (typeof element_settings.selector == 'undefined') {
2693          element_settings.selector = '#' + base;
2694        }
2695        $(element_settings.selector).each(function () {
2696          element_settings.element = this;
2697          Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
2698        });
2699
2700        $('#' + base).addClass('ajax-processed');
2701      }
2702    }
2703
2704    // Bind Ajax behaviors to all items showing the class.
2705    $('.use-ajax:not(.ajax-processed)').addClass('ajax-processed').each(function () {
2706      var element_settings = {};
2707      // Clicked links look better with the throbber than the progress bar.
2708      element_settings.progress = { 'type': 'throbber' };
2709
2710      // For anchor tags, these will go to the target of the anchor rather
2711      // than the usual location.
2712      if ($(this).attr('href')) {
2713        element_settings.url = $(this).attr('href');
2714        element_settings.event = 'click';
2715      }
2716      var base = $(this).attr('id');
2717      Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
2718    });
2719
2720    // This class means to submit the form to the action using Ajax.
2721    $('.use-ajax-submit:not(.ajax-processed)').addClass('ajax-processed').each(function () {
2722      var element_settings = {};
2723
2724      // Ajax submits specified in this manner automatically submit to the
2725      // normal form action.
2726      element_settings.url = $(this.form).attr('action');
2727      // Form submit button clicks need to tell the form what was clicked so
2728      // it gets passed in the POST request.
2729      element_settings.setClick = true;
2730      // Form buttons use the 'click' event rather than mousedown.
2731      element_settings.event = 'click';
2732      // Clicked form buttons look better with the throbber than the progress bar.
2733      element_settings.progress = { 'type': 'throbber' };
2734
2735      var base = $(this).attr('id');
2736      Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
2737    });
2738  }
2739};
2740
2741/**
2742 * Ajax object.
2743 *
2744 * All Ajax objects on a page are accessible through the global Drupal.ajax
2745 * object and are keyed by the submit button's ID. You can access them from
2746 * your module's JavaScript file to override properties or functions.
2747 *
2748 * For example, if your Ajax enabled button has the ID 'edit-submit', you can
2749 * redefine the function that is called to insert the new content like this
2750 * (inside a Drupal.behaviors attach block):
2751 * @code
2752 *    Drupal.behaviors.myCustomAJAXStuff = {
2753 *      attach: function (context, settings) {
2754 *        Drupal.ajax['edit-submit'].commands.insert = function (ajax, response, status) {
2755 *          new_content = $(response.data);
2756 *          $('#my-wrapper').append(new_content);
2757 *          alert('New content was appended to #my-wrapper');
2758 *        }
2759 *      }
2760 *    };
2761 * @endcode
2762 */
2763Drupal.ajax = function (base, element, element_settings) {
2764  var defaults = {
2765    url: 'system/ajax',
2766    event: 'mousedown',
2767    keypress: true,
2768    selector: '#' + base,
2769    effect: 'none',
2770    speed: 'none',
2771    method: 'replaceWith',
2772    progress: {
2773      type: 'throbber',
2774      message: Drupal.t('Please wait...')
2775    },
2776    submit: {
2777      'js': true
2778    }
2779  };
2780
2781  $.extend(this, defaults, element_settings);
2782
2783  this.element = element;
2784  this.element_settings = element_settings;
2785
2786  // Replacing 'nojs' with 'ajax' in the URL allows for an easy method to let
2787  // the server detect when it needs to degrade gracefully.
2788  // There are five scenarios to check for:
2789  // 1. /nojs/
2790  // 2. /nojs$ - The end of a URL string.
2791  // 3. /nojs? - Followed by a query (with clean URLs enabled).
2792  //      E.g.: path/nojs?destination=foobar
2793  // 4. /nojs& - Followed by a query (without clean URLs enabled).
2794  //      E.g.: ?q=path/nojs&destination=foobar
2795  // 5. /nojs# - Followed by a fragment.
2796  //      E.g.: path/nojs#myfragment
2797  this.url = element_settings.url.replace(/\/nojs(\/|$|\?|&|#)/g, '/ajax$1');
2798  // If the 'nojs' version of the URL is trusted, also trust the 'ajax' version.
2799  if (Drupal.settings.urlIsAjaxTrusted[element_settings.url]) {
2800    Drupal.settings.urlIsAjaxTrusted[this.url] = true;
2801  }
2802
2803  this.wrapper = '#' + element_settings.wrapper;
2804
2805  // If there isn't a form, jQuery.ajax() will be used instead, allowing us to
2806  // bind Ajax to links as well.
2807  if (this.element.form) {
2808    this.form = $(this.element.form);
2809  }
2810
2811  // Set the options for the ajaxSubmit function.
2812  // The 'this' variable will not persist inside of the options object.
2813  var ajax = this;
2814  ajax.options = {
2815    url: Drupal.sanitizeAjaxUrl(ajax.url),
2816    data: ajax.submit,
2817    beforeSerialize: function (element_settings, options) {
2818      return ajax.beforeSerialize(element_settings, options);
2819    },
2820    beforeSubmit: function (form_values, element_settings, options) {
2821      ajax.ajaxing = true;
2822      return ajax.beforeSubmit(form_values, element_settings, options);
2823    },
2824    beforeSend: function (xmlhttprequest, options) {
2825      ajax.ajaxing = true;
2826      return ajax.beforeSend(xmlhttprequest, options);
2827    },
2828    success: function (response, status, xmlhttprequest) {
2829      // Sanity check for browser support (object expected).
2830      // When using iFrame uploads, responses must be returned as a string.
2831      if (typeof response == 'string') {
2832        response = $.parseJSON(response);
2833      }
2834
2835      // Prior to invoking the response's commands, verify that they can be
2836      // trusted by checking for a response header. See
2837      // ajax_set_verification_header() for details.
2838      // - Empty responses are harmless so can bypass verification. This avoids
2839      //   an alert message for server-generated no-op responses that skip Ajax
2840      //   rendering.
2841      // - Ajax objects with trusted URLs (e.g., ones defined server-side via
2842      //   #ajax) can bypass header verification. This is especially useful for
2843      //   Ajax with multipart forms. Because IFRAME transport is used, the
2844      //   response headers cannot be accessed for verification.
2845      if (response !== null && !Drupal.settings.urlIsAjaxTrusted[ajax.url]) {
2846        if (xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token') !== '1') {
2847          var customMessage = Drupal.t("The response failed verification so will not be processed.");
2848          return ajax.error(xmlhttprequest, ajax.url, customMessage);
2849        }
2850      }
2851
2852      return ajax.success(response, status);
2853    },
2854    complete: function (xmlhttprequest, status) {
2855      ajax.ajaxing = false;
2856      if (status == 'error' || status == 'parsererror') {
2857        return ajax.error(xmlhttprequest, ajax.url);
2858      }
2859    },
2860    dataType: 'json',
2861    jsonp: false,
2862    type: 'POST'
2863  };
2864
2865  // For multipart forms (e.g., file uploads), jQuery Form targets the form
2866  // submission to an iframe instead of using an XHR object. The initial "src"
2867  // of the iframe, prior to the form submission, is set to options.iframeSrc.
2868  // "about:blank" is the semantically correct, standards-compliant, way to
2869  // initialize a blank iframe; however, some old IE versions (possibly only 6)
2870  // incorrectly report a mixed content warning when iframes with an
2871  // "about:blank" src are added to a parent document with an https:// origin.
2872  // jQuery Form works around this by defaulting to "javascript:false" instead,
2873  // but that breaks on Chrome 83, so here we force the semantically correct
2874  // behavior for all browsers except old IE.
2875  // @see https://www.drupal.org/project/drupal/issues/3143016
2876  // @see https://github.com/jquery-form/form/blob/df9cb101b9c9c085c8d75ad980c7ff1cf62063a1/jquery.form.js#L68
2877  // @see https://bugs.chromium.org/p/chromium/issues/detail?id=1084874
2878  // @see https://html.spec.whatwg.org/multipage/browsers.html#creating-browsing-contexts
2879  // @see https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy
2880  if (navigator.userAgent.indexOf("MSIE") === -1) {
2881    ajax.options.iframeSrc = 'about:blank';
2882  }
2883
2884  // Bind the ajaxSubmit function to the element event.
2885  $(ajax.element).bind(element_settings.event, function (event) {
2886    if (!Drupal.settings.urlIsAjaxTrusted[ajax.url] && !Drupal.urlIsLocal(ajax.url)) {
2887      throw new Error(Drupal.t('The callback URL is not local and not trusted: !url', {'!url': ajax.url}));
2888    }
2889    return ajax.eventResponse(this, event);
2890  });
2891
2892  // If necessary, enable keyboard submission so that Ajax behaviors
2893  // can be triggered through keyboard input as well as e.g. a mousedown
2894  // action.
2895  if (element_settings.keypress) {
2896    $(ajax.element).keypress(function (event) {
2897      return ajax.keypressResponse(this, event);
2898    });
2899  }
2900
2901  // If necessary, prevent the browser default action of an additional event.
2902  // For example, prevent the browser default action of a click, even if the
2903  // AJAX behavior binds to mousedown.
2904  if (element_settings.prevent) {
2905    $(ajax.element).bind(element_settings.prevent, false);
2906  }
2907};
2908
2909/**
2910 * Handle a key press.
2911 *
2912 * The Ajax object will, if instructed, bind to a key press response. This
2913 * will test to see if the key press is valid to trigger this event and
2914 * if it is, trigger it for us and prevent other keypresses from triggering.
2915 * In this case we're handling RETURN and SPACEBAR keypresses (event codes 13
2916 * and 32. RETURN is often used to submit a form when in a textfield, and 
2917 * SPACE is often used to activate an element without submitting. 
2918 */
2919Drupal.ajax.prototype.keypressResponse = function (element, event) {
2920  // Create a synonym for this to reduce code confusion.
2921  var ajax = this;
2922
2923  // Detect enter key and space bar and allow the standard response for them,
2924  // except for form elements of type 'text' and 'textarea', where the 
2925  // spacebar activation causes inappropriate activation if #ajax['keypress'] is 
2926  // TRUE. On a text-type widget a space should always be a space.
2927  if (event.which == 13 || (event.which == 32 && element.type != 'text' && element.type != 'textarea')) {
2928    $(ajax.element_settings.element).trigger(ajax.element_settings.event);
2929    return false;
2930  }
2931};
2932
2933/**
2934 * Handle an event that triggers an Ajax response.
2935 *
2936 * When an event that triggers an Ajax response happens, this method will
2937 * perform the actual Ajax call. It is bound to the event using
2938 * bind() in the constructor, and it uses the options specified on the
2939 * ajax object.
2940 */
2941Drupal.ajax.prototype.eventResponse = function (element, event) {
2942  // Create a synonym for this to reduce code confusion.
2943  var ajax = this;
2944
2945  // Do not perform another ajax command if one is already in progress.
2946  if (ajax.ajaxing) {
2947    return false;
2948  }
2949
2950  try {
2951    if (ajax.form) {
2952      // If setClick is set, we must set this to ensure that the button's
2953      // value is passed.
2954      if (ajax.setClick) {
2955        // Mark the clicked button. 'form.clk' is a special variable for
2956        // ajaxSubmit that tells the system which element got clicked to
2957        // trigger the submit. Without it there would be no 'op' or
2958        // equivalent.
2959        element.form.clk = element;
2960      }
2961
2962      ajax.form.ajaxSubmit(ajax.options);
2963    }
2964    else {
2965      ajax.beforeSerialize(ajax.element, ajax.options);
2966      $.ajax(ajax.options);
2967    }
2968  }
2969  catch (e) {
2970    // Unset the ajax.ajaxing flag here because it won't be unset during
2971    // the complete response.
2972    ajax.ajaxing = false;
2973    alert("An error occurred while attempting to process " + ajax.options.url + ": " + e.message);
2974  }
2975
2976  // For radio/checkbox, allow the default event. On IE, this means letting
2977  // it actually check the box.
2978  if (typeof element.type != 'undefined' && (element.type == 'checkbox' || element.type == 'radio')) {
2979    return true;
2980  }
2981  else {
2982    return false;
2983  }
2984
2985};
2986
2987/**
2988 * Handler for the form serialization.
2989 *
2990 * Runs before the beforeSend() handler (see below), and unlike that one, runs
2991 * before field data is collected.
2992 */
2993Drupal.ajax.prototype.beforeSerialize = function (element, options) {
2994  // Allow detaching behaviors to update field values before collecting them.
2995  // This is only needed when field values are added to the POST data, so only
2996  // when there is a form such that this.form.ajaxSubmit() is used instead of
2997  // $.ajax(). When there is no form and $.ajax() is used, beforeSerialize()
2998  // isn't called, but don't rely on that: explicitly check this.form.
2999  if (this.form) {
3000    var settings = this.settings || Drupal.settings;
3001    Drupal.detachBehaviors(this.form, settings, 'serialize');
3002  }
3003
3004  // Prevent duplicate HTML ids in the returned markup.
3005  // @see drupal_html_id()
3006  options.data['ajax_html_ids[]'] = [];
3007  $('[id]').each(function () {
3008    options.data['ajax_html_ids[]'].push(this.id);
3009  });
3010
3011  // Allow Drupal to return new JavaScript and CSS files to load without
3012  // returning the ones already loaded.
3013  // @see ajax_base_page_theme()
3014  // @see drupal_get_css()
3015  // @see drupal_get_js()
3016  options.data['ajax_page_state[theme]'] = Drupal.settings.ajaxPageState.theme;
3017  options.data['ajax_page_state[theme_token]'] = Drupal.settings.ajaxPageState.theme_token;
3018  for (var key in Drupal.settings.ajaxPageState.css) {
3019    options.data['ajax_page_state[css][' + key + ']'] = 1;
3020  }
3021  for (var key in Drupal.settings.ajaxPageState.js) {
3022    options.data['ajax_page_state[js][' + key + ']'] = 1;
3023  }
3024};
3025
3026/**
3027 * Modify form values prior to form submission.
3028 */
3029Drupal.ajax.prototype.beforeSubmit = function (form_values, element, options) {
3030  // This function is left empty to make it simple to override for modules
3031  // that wish to add functionality here.
3032};
3033
3034/**
3035 * Prepare the Ajax request before it is sent.
3036 */
3037Drupal.ajax.prototype.beforeSend = function (xmlhttprequest, options) {
3038  // For forms without file inputs, the jQuery Form plugin serializes the form
3039  // values, and then calls jQuery's $.ajax() function, which invokes this
3040  // handler. In this circumstance, options.extraData is never used. For forms
3041  // with file inputs, the jQuery Form plugin uses the browser's normal form
3042  // submission mechanism, but captures the response in a hidden IFRAME. In this
3043  // circumstance, it calls this handler first, and then appends hidden fields
3044  // to the form to submit the values in options.extraData. There is no simple
3045  // way to know which submission mechanism will be used, so we add to extraData
3046  // regardless, and allow it to be ignored in the former case.
3047  if (this.form) {
3048    options.extraData = options.extraData || {};
3049
3050    // Let the server know when the IFRAME submission mechanism is used. The
3051    // server can use this information to wrap the JSON response in a TEXTAREA,
3052    // as per http://jquery.malsup.com/form/#file-upload.
3053    options.extraData.ajax_iframe_upload = '1';
3054
3055    // The triggering element is about to be disabled (see below), but if it
3056    // contains a value (e.g., a checkbox, textfield, select, etc.), ensure that
3057    // value is included in the submission. As per above, submissions that use
3058    // $.ajax() are already serialized prior to the element being disabled, so
3059    // this is only needed for IFRAME submissions.
3060    var v = $.fieldValue(this.element);
3061    if (v !== null) {
3062      options.extraData[this.element.name] = Drupal.checkPlain(v);
3063    }
3064  }
3065
3066  // Disable the element that received the change to prevent user interface
3067  // interaction while the Ajax request is in progress. ajax.ajaxing prevents
3068  // the element from triggering a new request, but does not prevent the user
3069  // from changing its value.
3070  $(this.element).addClass('progress-disabled').attr('disabled', true);
3071
3072  // Insert progressbar or throbber.
3073  if (this.progress.type == 'bar') {
3074    var progressBar = new Drupal.progressBar('ajax-progress-' + this.element.i
3074d, $.noop, this.progress.method, $.noop);
3075    if (this.progress.message) {
3076      progressBar.setProgress(-1, this.progress.message);
3077    }
3078    if (this.progress.url) {
3079      progressBar.startMonitoring(this.progress.url, this.progress.interval || 1500);
3080    }
3081    this.progress.element = $(progressBar.element).addClass('ajax-progress ajax-progress-bar');
3082    this.progress.object = progressBar;
3083    $(this.element).after(this.progress.element);
3084  }
3085  else if (this.progress.type == 'throbber') {
3086    this.progress.element = $('<div class="ajax-progress ajax-progress-throbber"><div class="throbber">&nbsp;</div></div>');
3087    if (this.progress.message) {
3088      $('.throbber', this.progress.element).after('<div class="message">' + this.progress.message + '</div>');
3089    }
3090    $(this.element).after(this.progress.element);
3091  }
3092};
3093
3094/**
3095 * Handler for the form redirection completion.
3096 */
3097Drupal.ajax.prototype.success = function (response, status) {
3098  // Remove the progress element.
3099  if (this.progress.element) {
3100    $(this.progress.element).remove();
3101  }
3102  if (this.progress.object) {
3103    this.progress.object.stopMonitoring();
3104  }
3105  $(this.element).removeClass('progress-disabled').removeAttr('disabled');
3106
3107  Drupal.freezeHeight();
3108
3109  for (var i in response) {
3110    if (response.hasOwnProperty(i) && response[i]['command'] && this.commands[response[i]['command']]) {
3111      this.commands[response[i]['command']](this, response[i], status);
3112    }
3113  }
3114
3115  // Reattach behaviors, if they were detached in beforeSerialize(). The
3116  // attachBehaviors() called on the new content from processing the response
3117  // commands is not sufficient, because behaviors from the entire form need
3118  // to be reattached.
3119  if (this.form) {
3120    var settings = this.settings || Drupal.settings;
3121    Drupal.attachBehaviors(this.form, settings);
3122  }
3123
3124  Drupal.unfreezeHeight();
3125
3126  // Remove any response-specific settings so they don't get used on the next
3127  // call by mistake.
3128  this.settings = null;
3129};
3130
3131/**
3132 * Build an effect object which tells us how to apply the effect when adding new HTML.
3133 */
3134Drupal.ajax.prototype.getEffect = function (response) {
3135  var type = response.effect || this.effect;
3136  var speed = response.speed || this.speed;
3137
3138  var effect = {};
3139  if (type == 'none') {
3140    effect.showEffect = 'show';
3141    effect.hideEffect = 'hide';
3142    effect.showSpeed = '';
3143  }
3144  else if (type == 'fade') {
3145    effect.showEffect = 'fadeIn';
3146    effect.hideEffect = 'fadeOut';
3147    effect.showSpeed = speed;
3148  }
3149  else {
3150    effect.showEffect = type + 'Toggle';
3151    effect.hideEffect = type + 'Toggle';
3152    effect.showSpeed = speed;
3153  }
3154
3155  return effect;
3156};
3157
3158/**
3159 * Handler for the form redirection error.
3160 */
3161Drupal.ajax.prototype.error = function (xmlhttprequest, uri, customMessage) {
3162  Drupal.displayAjaxError(Drupal.ajaxError(xmlhttprequest, uri, customMessage));
3163  // Remove the progress element.
3164  if (this.progress.element) {
3165    $(this.progress.element).remove();
3166  }
3167  if (this.progress.object) {
3168    this.progress.object.stopMonitoring();
3169  }
3170  // Undo hide.
3171  $(this.wrapper).show();
3172  // Re-enable the element.
3173  $(this.element).removeClass('progress-disabled').removeAttr('disabled');
3174  // Reattach behaviors, if they were detached in beforeSerialize().
3175  if (this.form) {
3176    var settings = this.settings || Drupal.settings;
3177    Drupal.attachBehaviors(this.form, settings);
3178  }
3179};
3180
3181/**
3182 * Provide a series of commands that the server can request the client perform.
3183 */
3184Drupal.ajax.prototype.commands = {
3185  /**
3186   * Command to insert new content into the DOM.
3187   */
3188  insert: function (ajax, response, status) {
3189    // Get information from the response. If it is not there, default to
3190    // our presets.
3191    var wrapper = response.selector ? $(response.selector) : $(ajax.wrapper);
3192    var method = response.method || ajax.method;
3193    var effect = ajax.getEffect(response);
3194
3195    // We don't know what response.data contains: it might be a string of text
3196    // without HTML, so don't rely on jQuery correctly iterpreting
3197    // $(response.data) as new HTML rather than a CSS selector. Also, if
3198    // response.data contains top-level text nodes, they get lost with either
3199    // $(response.data) or $('<div></div>').replaceWith(response.data).
3200    var new_content_wrapped = $('<div></div>').html(response.data);
3201    var new_content = new_content_wrapped.contents();
3202
3203    // For legacy reasons, the effects processing code assumes that new_content
3204    // consists of a single top-level element. Also, it has not been
3205    // sufficiently tested whether attachBehaviors() can be successfully called
3206    // with a context object that includes top-level text nodes. However, to
3207    // give developers full control of the HTML appearing in the page, and to
3208    // enable Ajax content to be inserted in places where DIV elements are not
3209    // allowed (e.g., within TABLE, TR, and SPAN parents), we check if the new
3210    // content satisfies the requirement of a single top-level element, and
3211    // only use the container DIV created above when it doesn't. For more
3212    // information, please see http://drupal.org/node/736066.
3213    if (new_content.length != 1 || new_content.get(0).nodeType != 1) {
3214      new_content = new_content_wrapped;
3215    }
3216
3217    // If removing content from the wrapper, detach behaviors first.
3218    switch (method) {
3219      case 'html':
3220      case 'replaceWith':
3221      case 'replaceAll':
3222      case 'empty':
3223      case 'remove':
3224        var settings = response.settings || ajax.settings || Drupal.settings;
3225        Drupal.detachBehaviors(wrapper, settings);
3226    }
3227
3228    // Add the new content to the page.
3229    wrapper[method](new_content);
3230
3231    // Immediately hide the new content if we're using any effects.
3232    if (effect.showEffect != 'show') {
3233      new_content.hide();
3234    }
3235
3236    // Determine which effect to use and what content will receive the
3237    // effect, then show the new content.
3238    if ($('.ajax-new-content', new_content).length > 0) {
3239      $('.ajax-new-content', new_content).hide();
3240      new_content.show();
3241      $('.ajax-new-content', new_content)[effect.showEffect](effect.showSpeed);
3242    }
3243    else if (effect.showEffect != 'show') {
3244      new_content[effect.showEffect](effect.showSpeed);
3245    }
3246
3247    // Attach all JavaScript behaviors to the new content, if it was successfully
3248    // added to the page, this if statement allows #ajax['wrapper'] to be
3249    // optional.
3250    if (new_content.parents('html').length > 0) {
3251      // Apply any settings from the returned JSON if available.
3252      var settings = response.settings || ajax.settings || Drupal.settings;
3253      Drupal.attachBehaviors(new_content, settings);
3254    }
3255  },
3256
3257  /**
3258   * Command to remove a chunk from the page.
3259   */
3260  remove: function (ajax, response, status) {
3261    var settings = response.settings || ajax.settings || Drupal.settings;
3262    Drupal.detachBehaviors($(response.selector), settings);
3263    $(response.selector).remove();
3264  },
3265
3266  /**
3267   * Command to mark a chunk changed.
3268   */
3269  changed: function (ajax, response, status) {
3270    if (!$(response.selector).hasClass('ajax-changed')) {
3271      $(response.selector).addClass('ajax-changed');
3272      if (response.asterisk) {
3273        $(response.selector).find(response.asterisk).append(' <span class="ajax-changed">*</span> ');
3274      }
3275    }
3276  },
3277
3278  /**
3279   * Command to provide an alert.
3280   */
3281  alert: function (ajax, response, status) {
3282    alert(response.text, response.title);
3283  },
3284
3285  /**
3286   * Command to provide the jQuery css() function.
3287   */
3288  css: function (ajax, response, status) {
3289    $(response.selector).css(response.argument);
3290  },
3291
3292  /**
3293   * Command to set the settings that will be used for other commands in this response.
3294   */
3295  settings: function (ajax, response, status) {
3296    if (response.merge) {
3297      $.extend(true, Drupal.settings, response.settings);
3298    }
3299    else {
3300      ajax.settings = response.settings;
3301    }
3302  },
3303
3304  /**
3305   * Command to attach data using jQuery's data API.
3306   */
3307  data: function (ajax, response, status) {
3308    $(response.selector).data(response.name, response.value);
3309  },
3310
3311  /**
3312   * Command to apply a jQuery method.
3313   */
3314  invoke: function (ajax, response, status) {
3315    var $element = $(response.selector);
3316    $element[response.method].apply($element, response.arguments);
3317  },
3318
3319  /**
3320   * Command to restripe a table.
3321   */
3322  restripe: function (ajax, response, status) {
3323    // :even and :odd are reversed because jQuery counts from 0 and
3324    // we count from 1, so we're out of sync.
3325    // Match immediate children of the parent element to allow nesting.
3326    $('> tbody > tr:visible, > tr:visible', $(response.selector))
3327      .removeClass('odd even')
3328      .filter(':even').addClass('odd').end()
3329      .filter(':odd').addClass('even');
3330  },
3331
3332  /**
3333   * Command to add css.
3334   *
3335   * Uses the proprietary addImport method if available as browsers which
3336   * support that method ignore @import statements in dynamically added
3337   * stylesheets.
3338   */
3339  add_css: function (ajax, response, status) {
3340    // Add the styles in the normal way.
3341    $('head').prepend(response.data);
3342    // Add imports in the styles using the addImport method if available.
3343    var match, importMatch = /^@import url\("(.*)"\);$/igm;
3344    if (document.styleSheets[0].addImport && importMatch.test(response.data)) {
3345      importMatch.lastIndex = 0;
3346      while (match = importMatch.exec(response.data)) {
3347        document.styleSheets[0].addImport(match[1]);
3348      }
3349    }
3350  },
3351
3352  /**
3353   * Command to update a form's build ID.
3354   */
3355  updateBuildId: function(ajax, response, status) {
3356    $('input[name="form_build_id"][value="' + response['old'] + '"]').val(response['new']);
3357  }
3358};
3359
3360})(jQuery);
3361;
3362(function (D) {
3363  var beforeSerialize = D.ajax.prototype.beforeSerialize;
3364  D.ajax.prototype.beforeSerialize = function (element, options) {
3365    beforeSerialize.call(this, element, options);
3366    options.data['ajax_page_state[jquery_version]'] = D.settings.ajaxPageState.jquery_version;
3367    options.data['ajax_page_state[jquery_version_token]'] = D.settings.ajaxPageState.jquery_version_token;
3368  }
3369})(Drupal);
3370;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.