// ================================================== // fancyBox v3.0.47 // // Licensed GPLv3 for open source use // or fancyBox Commercial License for commercial use // // http://fancyapps.com/fancybox/ // Copyright 2017 fancyApps // // ================================================== ;(function (window, document, $, undefined) { 'use strict'; // If there's no jQuery, fancyBox can't work // ========================================= if ( !$ ) { return undefined; } // Private default settings // ======================== var defaults = { // Animation duration in ms speed : 330, // Enable infinite gallery navigation loop : true, // Should zoom animation change opacity, too // If opacity is 'auto', then fade-out if image and thumbnail have different aspect ratios opacity : 'auto', // Space around image, ignored if zoomed-in or viewport smaller than 800px margin : [44, 0], // Horizontal space between slides gutter : 30, // Should display toolbars infobar : true, buttons : true, // What buttons should appear in the toolbar slideShow : true, fullScreen : true, thumbs : true, closeBtn : true, // Should apply small close button at top right corner of the content // If 'auto' - will be set for content having type 'html', 'inline' or 'ajax' smallBtn : 'auto', image : { // Wait for images to load before displaying // Requires predefined image dimensions // If 'auto' - will zoom in thumbnail if 'width' and 'height' attributes are found preload : "auto", // Protect an image from downloading by right-click protect : false }, ajax : { // Object containing settings for ajax request settings : { // This helps to indicate that request comes from the modal // Feel free to change naming data : { fancybox : true } } }, iframe : { // Iframe template tpl : '', // Preload iframe before displaying it // This allows to calculate iframe content width and height // (note: Due to "Same Origin Policy", you can't get cross domain data). preload : true, // Scrolling attribute for iframe tag scrolling : 'no', // Custom CSS styling for iframe wrapping element css : {} }, // Custom CSS class for layout baseClass : '', // Custom CSS class for slide element slideClass : '', // Base template for layout baseTpl : '', // Loading indicator template spinnerTpl : '
', // Error message template errorTpl : '

The requested content cannot be loaded.
Please try again later.

', // This will be appended to html content, if "smallBtn" option is not set to false closeTpl : '', // Container is injected into this element parentEl : 'body', // Enable gestures (tap, zoom, pan and pinch) touch : true, // Enable keyboard navigation keyboard : true, // Try to focus on first focusable element after opening focus : true, // Close when clicked outside of the content closeClickOutside : true, // Callbacks beforeLoad : $.noop, afterLoad : $.noop, beforeMove : $.noop, afterMove : $.noop, onComplete : $.noop, onInit : $.noop, beforeClose : $.noop, afterClose : $.noop, onActivate : $.noop, onDeactivate : $.noop }; var $W = $(window); var $D = $(document); var called = 0; // Check if an object is a jQuery object and not a native JavaScript object // ======================================================================== var isQuery = function (obj) { return obj && obj.hasOwnProperty && obj instanceof $; }; // Handle multiple browsers for requestAnimationFrame() // ==================================================== var requestAFrame = (function() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function( callback ) { window.setTimeout(callback, 1000 / 60); }; })(); // Check if element is inside the viewport by at least 1 pixel // =========================================================== var isElementInViewport = function( el ) { var rect; if ( typeof $ === "function" && el instanceof $ ) { el = el[0]; } rect = el.getBoundingClientRect(); return rect.bottom > 0 && rect.right > 0 && rect.left < (window.innerWidth || document.documentElement.clientWidth) && rect.top < (window.innerHeight || document.documentElement.clientHeight); }; // Class definition // ================ var FancyBox = function( content, opts, index ) { var self = this; self.opts = $.extend( true, { index : index }, defaults, opts || {} ); self.id = self.opts.id || ++called; self.group = []; self.currIndex = parseInt( self.opts.index, 10 ) || 0; self.prevIndex = null; self.prevPos = null; self.currPos = 0; self.firstRun = null; // Create group elements from original item collection self.createGroup( content ); if ( !self.group.length ) { return; } // Save last active element and current scroll position self.$lastFocus = $(document.activeElement).blur(); // Collection of gallery objects self.slides = {}; self.init( content ); }; $.extend(FancyBox.prototype, { // Create DOM structure // ==================== init : function() { var self = this; var galleryHasHtml = false; var testWidth; var $container; self.scrollTop = $D.scrollTop(); self.scrollLeft = $D.scrollLeft(); if ( !$.fancybox.getInstance() ) { testWidth = $( 'body' ).width(); $( 'html' ).addClass( 'fancybox-enabled' ); if ( $.fancybox.isTouch ) { // Ugly workaround for iOS page shifting issue (when inputs get focus) // Do not apply for images, otherwise top/bottom bars will appear $.each( self.group, function( key, item ) { if ( item.type !== 'image' && item.type !== 'iframe' ) { galleryHasHtml = true; return false; } }); if ( galleryHasHtml ) { $('body').css({ position : 'fixed', width : testWidth, top : self.scrollTop * -1 }); } } else { // Compare page width after adding "overflow:hidden" testWidth = $( 'body' ).width() - testWidth; // Width has changed - compensate missing scrollbars if ( testWidth > 1 ) { $( '