(function(n,t){typeof define=="function"&&define.amd?define(["jquery"],function(n){return t(n)}):typeof module=="object"&&module.exports?module.exports=t(require("jquery")):t(n.jQuery)})(this,function(n){(function(){"use strict";function t(t,r){if(this.el=t,this.$el=n(t),this.s=n.extend({},i,r),this.s.dynamic&&this.s.dynamicEl!=="undefined"&&this.s.dynamicEl.constructor===Array&&!this.s.dynamicEl.length)throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.modules={},this.lGalleryOn=!1,this.lgBusy=!1,this.hideBartimeout=!1,this.isTouch="ontouchstart"in document.documentElement,this.s.slideEndAnimatoin&&(this.s.hideControlOnEnd=!1),this.$items=this.s.dynamic?this.s.dynamicEl:this.s.selector==="this"?this.$el:this.s.selector!==""?this.s.selectWithin?n(this.s.selectWithin).find(this.s.selector):this.$el.find(n(this.s.selector)):this.$el.children(),this.$slide="",this.$outer="",this.init(),this}var i={mode:"lg-slide",cssEasing:"ease",easing:"linear",speed:600,height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:150,hideBarsDelay:6e3,useLeft:!1,closable:!0,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimatoin:!0,hideControlOnEnd:!1,mousewheel:!0,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:1,showAfterLoad:!0,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:!1,iframeMaxWidth:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],galleryId:1};t.prototype.init=function(){var t=this,i;if(t.s.preload>t.$items.length&&(t.s.preload=t.$items.length),i=window.location.hash,i.indexOf("lg="+this.s.galleryId)>0&&(t.index=parseInt(i.split("&slide=")[1],10),n("body").addClass("lg-from-hash"),n("body").hasClass("lg-on")||(setTimeout(function(){t.build(t.index)}),n("body").addClass("lg-on"))),t.s.dynamic)t.$el.trigger("onBeforeOpen.lg"),t.index=t.s.index||0,n("body").hasClass("lg-on")||setTimeout(function(){t.build(t.index);n("body").addClass("lg-on")});else t.$items.on("click.lgcustom",function(i){try{i.preventDefault();i.preventDefault()}catch(r){i.returnValue=!1}t.$el.trigger("onBeforeOpen.lg");t.index=t.s.index||t.$items.index(this);n("body").hasClass("lg-on")||(t.build(t.index),n("body").addClass("lg-on"))})};t.prototype.build=function(t){var i=this;if(i.structure(),n.each(n.fn.lightGallery.modules,function(t){i.modules[t]=new n.fn.lightGallery.modules[t](i.el)}),i.slide(t,!1,!1,!1),i.s.keyPress&&i.keyPress(),i.$items.length>1)i.arrow(),setTimeout(function(){i.enableDrag();i.enableSwipe()},50),i.s.mousewheel&&i.mousewheel();else i.$slide.on("click.lg",function(){i.$el.trigger("onSlideClick.lg")});i.counter();i.closeGallery();i.$el.trigger("onAfterOpen.lg");i.$outer.on("mousemove.lg click.lg touchstart.lg",function(){i.$outer.removeClass("lg-hide-items");clearTimeout(i.hideBartimeout);i.hideBartimeout=setTimeout(function(){i.$outer.addClass("lg-hide-items")},i.s.hideBarsDelay)});i.$outer.trigger("mousemove.lg")};t.prototype.structure=function(){var u="",f="",t=0,e="",o,i=this,r;for(n("body").append('