/*! * lightbox v2.10.0 * by lokesh dhakar * * more info: * http://lokeshdhakar.com/projects/lightbox2/ * * copyright 2007, 2018 lokesh dhakar * released under the mit license * https://github.com/lokesh/lightbox2/blob/master/license * * @preserve */ !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.lightbox=b(a.jquery)}(this,function(a){function b(b){this.album=[],this.currentimageindex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}return b.defaults={albumlabel:"image %1 of %2",alwaysshownavontouchdevices:!1,fadeduration:600,fitimagesinviewport:!0,imagefadeduration:600,positionfromtop:50,resizeduration:700,showimagenumberlabel:!0,wraparound:!1,disablescrolling:!1,sanitizetitle:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imagecountlabel=function(a,b){return this.options.albumlabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){var b=this;a(document).ready(function(){b.enable(),b.build()})},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currenttarget)),!1})},b.prototype.build=function(){if(!(a("#lightbox").length>0)){var b=this;a('
').appendto(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxoverlay"),this.$outercontainer=this.$lightbox.find(".lb-outercontainer"),this.$container=this.$lightbox.find(".lb-container"),this.$image=this.$lightbox.find(".lb-image"),this.$nav=this.$lightbox.find(".lb-nav"),this.containerpadding={top:parseint(this.$container.css("padding-top"),10),right:parseint(this.$container.css("padding-right"),10),bottom:parseint(this.$container.css("padding-bottom"),10),left:parseint(this.$container.css("padding-left"),10)},this.imageborderwidth={top:parseint(this.$image.css("border-top-width"),10),right:parseint(this.$image.css("border-right-width"),10),bottom:parseint(this.$image.css("border-bottom-width"),10),left:parseint(this.$image.css("border-left-width"),10)},this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$outercontainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentimageindex?b.changeimage(b.album.length-1):b.changeimage(b.currentimageindex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentimageindex===b.album.length-1?b.changeimage(0):b.changeimage(b.currentimageindex+1),!1}),this.$nav.on("mousedown",function(a){3===a.which&&(b.$nav.css("pointer-events","none"),b.$lightbox.one("contextmenu",function(){settimeout(function(){this.$nav.css("pointer-events","auto")}.bind(b),0)}))}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})}},b.prototype.start=function(b){function c(a){d.album.push({alt:a.attr("data-alt"),link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeoverlay,this)),a("select, object, embed").css({visibility:"hidden"}),this.sizeoverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagname")+'[data-lightbox="'+h+'"]');for(var i=0;i