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