/** * Lightbox v2.7.1 * by Lokesh Dhakar - http://lokeshdhakar.com/projects/lightbox2/ * * @license http://creativecommons.org/licenses/by/2.5/ * - Free for use in both personal and commercial projects * - Attribution requires leaving author name, author link, and the license info intact */ (function() { // Use local alias var $ = jQuery; var LightboxOptions = (function() { function LightboxOptions() { this.fadeDuration = 500; this.fitImagesInViewport = true; this.resizeDuration = 700; this.positionFromTop = 50; this.showImageNumberLabel = true; this.alwaysShowNavOnTouchDevices = false; this.wrapAround = false; } // Change to localize to non-english language LightboxOptions.prototype.albumLabel = function(curImageNum, albumSize) { return "Image " + curImageNum + " of " + albumSize; }; return LightboxOptions; })(); var Lightbox = (function() { function Lightbox(options) { this.options = options; this.album = []; this.currentImageIndex = void 0; this.init(); } Lightbox.prototype.init = function() { this.enable(); this.build(); }; // Loop through anchors and areamaps looking for either data-lightbox attributes or rel attributes // that contain 'lightbox'. When these are clicked, start lightbox. Lightbox.prototype.enable = function() { var self = this; $('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]', function(event) { self.start($(event.currentTarget)); return false; }); }; // Build html for the lightbox and the overlay. // Attach event handlers to the new DOM elements. click click click Lightbox.prototype.build = function() { var self = this; //À쵀 $("
").appendTo($('body')); $("