!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,n){return void 0===n&&(n="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(n),n;}:e(jQuery);}(function(e){"use strict";function t(e,n){if(!(this instanceof t)){var r=new t(e,n);return r.open(),r}this.id=t.id++,this.setup(e,n),this.chainCallbacks(t._callbackChain);}function n(e,t){var n={};for(var r in e)r in t&&(n[r]=e[r],delete e[r]);return n;}function r(e,t){var n={},r=new RegExp("^"+t+"([A-Z])(.*)");for(var i in e){var s=i.match(r);if(s){var o=(s[1]+s[2].replace(/([A-Z])/g,"-$1")).toLowerCase();n[o]=e[i]}}return n;}if("undefined"==typeof e)return void ("console"in window&&window.console.info("Too much lightness, Featherlight needs jQuery."));if(e.fn.jquery.match(/-ajax/))return void ("console"in window&&window.console.info("Featherlight needs regular jQuery, not the slim version."));var i=[],s=function(t){return i=e.grep(i,function(e){return e!==t&&e.$instance.closest("body").length>0;});},o={allow:1,allowfullscreen:1,frameborder:1,height:1,longdesc:1,marginheight:1,marginwidth:1,mozallowfullscreen:1,name:1,referrerpolicy:1,sandbox:1,scrolling:1,src:1,srcdoc:1,style:1,webkitallowfullscreen:1,width:1},u={keyup:"onKeyUp",resize:"onResize"},a=function(n){e.each(t.opened().reverse(),function(){return n.isDefaultPrevented()||!1!==this[u[n.type]](n)?void 0:(n.preventDefault(),n.stopPropagation(),!1);});},f=function(n){if(n!==t._globalHandlerInstalled){t._globalHandlerInstalled=n;var r=e.map(u,function(e,n){return n+"."+t.prototype.namespace;}).join(" ");e(window)[n?"on":"off"](r,a)}};t.prototype={constructor:t,namespace:"featherlight",targetAttr:"data-featherlight",variant:null,resetCss:!1,background:null,openTrigger:"click",closeTrigger:"click",filter:null,root:"body",openSpeed:250,closeSpeed:250,closeOnClick:"background",closeOnEsc:!0,closeIcon:"✕",loading:"",persist:!1,otherClose:null,beforeOpen:e.noop,beforeContent:e.noop,beforeClose:e.noop,afterOpen:e.noop,afterContent:e.noop,afterClose:e.noop,onKeyUp:e.noop,onResize:e.noop,type:null,contentFilters:["jquery","image","html","ajax","iframe","text"],setup:function(t,n){"object"!=typeof t||t instanceof e!=!1||n||(n=t,t=void 0);var r=e.extend(this,n,{target:t}),i=r.resetCss?r.namespace+"-reset":r.namespace,s=e(r.background||['
','
','",'
'+r.loading+"
","
","
"].join("")),o="."+r.namespace+"-close"+(r.otherClose?","+r.otherClose:"");return r.$instance=s.clone().addClass(r.variant),r.$instance.on(r.closeTrigger+"."+r.namespace,function(t){if(!t.isDefaultPrevented()){var n=e(t.target);("background"===r.closeOnClick&&n.is("."+r.namespace)||"anywhere"===r.closeOnClick||n.closest(o).length)&&(r.close(t),t.preventDefault())}}),this;},getContent:function(){if(this.persist!==!1&&this.$content)return this.$content;var t=this,n=this.constructor.contentFilters,r=function(e){return t.$currentTarget&&t.$currentTarget.attr(e);},i=r(t.targetAttr),s=t.target||i||"",o=n[t.type];if(!o&&s in n&&(o=n[s],s=t.target&&i),s=s||r("href")||"",!o)for(var u in n)t[u]&&(o=n[u],s=t[u]);if(!o){var a=s;if(s=null,e.each(t.contentFilters,function(){return o=n[this],o.test&&(s=o.test(a)),!s&&o.regex&&a.match&&a.match(o.regex)&&(s=a),!s;}),!s)return"console"in window&&window.console.error("Featherlight: no content filter found "+(a?' for "'+a+'"':" (no target specified)")),!1}return o.process.call(t,s);},setContent:function(t){return this.$instance.removeClass(this.namespace+"-loading"),this.$instance.toggleClass(this.namespace+"-iframe",t.is("iframe")),this.$instance.find("."+this.namespace+"-inner").not(t).slice(1).remove().end().replaceWith(e.contains(this.$instance[0],t[0])?"":t),this.$content=t.addClass(this.namespace+"-inner"),this;},open:function(t){var n=this;if(n.$instance.hide().appendTo(n.root),!(t&&t.isDefaultPrevented()||n.beforeOpen(t)===!1)){t&&t.preventDefault();var r=n.getContent();if(r)return i.push(n),f(!0),n.$instance.fadeIn(n.openSpeed),n.beforeContent(t),e.when(r).always(function(e){e&&(n.setContent(e),n.afterContent(t));}).then(n.$instance.promise()).done(function(){n.afterOpen(t);})}return n.$instance.detach(),e.Deferred().reject().promise();},close:function(t){var n=this,r=e.Deferred();return n.beforeClose(t)===!1?r.reject():(0===s(n).length&&f(!1),n.$instance.fadeOut(n.closeSpeed,function(){n.$instance.detach(),n.afterClose(t),r.resolve();})),r.promise();},resize:function(e,t){if(e&&t){this.$content.css("width","").css("height","");var n=Math.max(e/(this.$content.parent().width()-1),t/(this.$content.parent().height()-1));n>1&&(n=t/Math.floor(t/n),this.$content.css("width",""+e/n+"px").css("height",""+t/n+"px"))}},chainCallbacks:function(t){for(var n in t)this[n]=e.proxy(t[n],this,e.proxy(this[n],this));}},e.extend(t,{id:0,autoBind:"[data-featherlight]",defaults:t.prototype,contentFilters:{jquery:{regex:/^[#.]\w/,test:function(t){return t instanceof e&&t;},process:function(t){return this.persist!==!1?e(t):e(t).clone(!0);}},image:{regex:/\.(png|jpg|jpeg|gif|tiff?|bmp|svg)(\?\S*)?$/i,process:function(t){var n=this,r=e.Deferred(),i=new Image,s=e('');return i.onload=function(){s.naturalWidth=i.width,s.naturalHeight=i.height,r.resolve(s);},i.onerror=function(){r.reject(s);},i.src=t,r.promise();}},html:{regex:/^\s*<[\w!][^<]*>/,process:function(t){return e(t);}},ajax:{regex:/./,process:function(t){var n=e.Deferred(),r=e("").load(t,function(e,t){"error"!==t&&n.resolve(r.contents()),n.reject();});return n.promise();}},iframe:{process:function(t){var i=new e.Deferred,s=e(""),u=r(this,"iframe"),a=n(u,o);return s.hide().attr("src",t).attr(a).css(u).on("load",function(){i.resolve(s.show());}).appendTo(this.$instance.find("."+this.namespace+"-content")),i.promise();}},text:{process:function(t){return e("
",{text:t});}}},functionAttributes:["beforeOpen","afterOpen","beforeContent","afterContent","beforeClose","afterClose"],readElementConfig:function(t,n){var r=this,i=new RegExp("^data-"+n+"-(.*)"),s={};return t&&t.attributes&&e.each(t.attributes,function(){var t=this.name.match(i);if(t){var n=this.value,o=e.camelCase(t[1]);if(e.inArray(o,r.functionAttributes)>=0)n=new Function(n);else try{n=JSON.parse(n)}catch(u){}s[o]=n}}),s;},extend:function(t,n){var r=function(){this.constructor=t;};return r.prototype=this.prototype,t.prototype=new r,t.__super__=this.prototype,e.extend(t,this,n),t.defaults=t.prototype,t;},attach:function(t,n,r){var i=this;"object"!=typeof n||n instanceof e!=!1||r||(r=n,n=void 0),r=e.extend({},r);var s,o=r.namespace||i.defaults.namespace,u=e.extend({},i.defaults,i.readElementConfig(t[0],o),r),a=function(o){var a=e(o.currentTarget),f=e.extend({$source:t,$currentTarget:a},i.readElementConfig(t[0],u.namespace),i.readElementConfig(o.currentTarget,u.namespace),r),l=s||a.data("featherlight-persisted")||new i(n,f);"shared"===l.persist?s=l:l.persist!==!1&&a.data("featherlight-persisted",l),f.$currentTarget.blur&&f.$currentTarget.blur(),l.open(o);};return t.on(u.openTrigger+"."+u.namespace,u.filter,a),{filter:u.filter,handler:a};},current:function(){var e=this.opened();return e[e.length-1]||null;},opened:function(){var t=this;return s(),e.grep(i,function(e){return e instanceof t;});},close:function(e){var t=this.current();return t?t.close(e):void 0;},_onReady:function(){var t=this;if(t.autoBind){var n=e(t.autoBind);n.each(function(){t.attach(e(this));}),e(document).on("click",t.autoBind,function(r){if(!r.isDefaultPrevented()){var i=e(r.currentTarget),s=n.length;if(n=n.add(i),s!==n.length){var o=t.attach(i);(!o.filter||e(r.target).parentsUntil(i,o.filter).length>0)&&o.handler(r)}}})}},_callbackChain:{onKeyUp:function(t,n){return 27===n.keyCode?(this.closeOnEsc&&e.featherlight.close(n),!1):t(n);},beforeOpen:function(t,n){return e(document.documentElement).addClass("with-featherlight"),this._previouslyActive=document.activeElement,this._$previouslyTabbable=e("a, input, select, textarea, iframe, button, iframe, [contentEditable=true]").not("[tabindex]").not(this.$instance.find("button")),this._$previouslyWithTabIndex=e("[tabindex]").not('[tabindex="-1"]'),this._previousWithTabIndices=this._$previouslyWithTabIndex.map(function(t,n){return e(n).attr("tabindex");}),this._$previouslyWithTabIndex.add(this._$previouslyTabbable).attr("tabindex",-1),document.activeElement.blur&&document.activeElement.blur(),t(n);},afterClose:function(n,r){var i=n(r),s=this;return this._$previouslyTabbable.removeAttr("tabindex"),this._$previouslyWithTabIndex.each(function(t,n){e(n).attr("tabindex",s._previousWithTabIndices[t]);}),this._previouslyActive.focus(),0===t.opened().length&&e(document.documentElement).removeClass("with-featherlight"),i;},onResize:function(e,t){return this.resize(this.$content.naturalWidth,this.$content.naturalHeight),e(t);},afterContent:function(e,t){var n=e(t);return this.$instance.find("[autofocus]:not([disabled])").focus(),this.onResize(t),n;}}}),e.featherlight=t,e.fn.featherlight=function(e,n){return t.attach(this,e,n),this;},e(document).ready(function(){t._onReady();});});!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,n){return void 0===n&&(n="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(n),n;}:e(jQuery);}(function(e){"use strict";function t(n,r){if(!(this instanceof t)){var i=new t(e.extend({$source:n,$currentTarget:n.first()},r));return i.open(),i}e.featherlight.apply(this,arguments),this.chainCallbacks(u);}var n=function(e){window.console&&window.console.warn&&window.console.warn("FeatherlightGallery: "+e);};if("undefined"==typeof e)return n("Too much lightness, Featherlight needs jQuery.");if(!e.featherlight)return n("Load the featherlight plugin before the gallery plugin");var r="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,i=e.event&&e.event.special.swipeleft&&e,s=window.Hammer&&function(e){var t=new window.Hammer.Manager(e[0]);return t.add(new window.Hammer.Swipe),t;},o=r&&(i||s);r&&!o&&n("No compatible swipe library detected; one must be included before featherlightGallery for swipe motions to navigate the galleries.");var u={afterClose:function(e,t){var n=this;return n.$instance.off("next."+n.namespace+" previous."+n.namespace),n._swiper&&(n._swiper.off("swipeleft",n._swipeleft).off("swiperight",n._swiperight),n._swiper=null),e(t);},beforeOpen:function(e,t){var n=this;return n.$instance.on("next."+n.namespace+" previous."+n.namespace,function(e){var t="next"===e.type?1:-1;n.navigateTo(n.currentNavigation()+t);}),o&&(n._swiper=o(n.$instance).on("swipeleft",n._swipeleft=function(){n.$instance.trigger("next");}).on("swiperight",n._swiperight=function(){n.$instance.trigger("previous");}),n.$instance.addClass(this.namespace+"-swipe-aware",o)),n.$instance.find("."+n.namespace+"-content").append(n.createNavigation("previous")).append(n.createNavigation("next")),e(t);},beforeContent:function(e,t){var n=this.currentNavigation(),r=this.slides().length;return this.$instance.toggleClass(this.namespace+"-first-slide",0===n).toggleClass(this.namespace+"-last-slide",n===r-1),e(t);},onKeyUp:function(e,t){var n={37:"previous",39:"next"}[t.keyCode];return n?(this.$instance.trigger(n),!1):e(t);}};e.featherlight.extend(t,{autoBind:"[data-featherlight-gallery]"}),e.extend(t.prototype,{previousIcon:"◀",nextIcon:"▶",galleryFadeIn:100,galleryFadeOut:300,slides:function(){return this.filter?this.$source.find(this.filter):this.$source;},images:function(){return n("images is deprecated, please use slides instead"),this.slides();},currentNavigation:function(){return this.slides().index(this.$currentTarget);},navigateTo:function(t){var n=this,r=n.slides(),i=r.length,s=n.$instance.find("."+n.namespace+"-inner");return t=(t%i+i)%i,this.$instance.addClass(this.namespace+"-loading"),n.$currentTarget=r.eq(t),n.beforeContent(),e.when(n.getContent(),s.fadeTo(n.galleryFadeOut,.2)).always(function(e){n.setContent(e),n.afterContent(),e.fadeTo(n.galleryFadeIn,1);});},createNavigation:function(t){var n=this;return e(''+this[t+"Icon"]+"").click(function(r){e(this).trigger(t+"."+n.namespace),r.preventDefault();});}}),e.featherlightGallery=t,e.fn.featherlightGallery=function(e){return t.attach(this,e),this;},e(document).ready(function(){t._onReady();});})