<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"> 
if(typeof locale == 'undefined'){locale={};}
$.extend(locale, {
    'cartRemove': 'РЈРґР°Р»РёС‚СЊ',
    'fancyNext': 'Р’РїРµСЂРµРґ',
    'fancyPrev': 'РќР°Р·Р°Рґ',
    'countMsg1': 'Р—РґСЂР°РІСЃС‚РІСѓР№С‚Рµ, РјРµРЅСЏ РёРЅС‚РµСЂРµСЃСѓРµС‚ С‚РѕРІР°СЂ ',
    'countMsg2': ' СЃ Р°СЂС‚РёРєСѓР»РѕРј ',
    'countMsg3': " , РЅРѕ РµРіРѕ РЅРµС‚ РІ РЅР°Р»РёС‡РёРё. РЎРѕРѕР±С‰РёС‚Рµ, РїРѕР¶Р°Р»СѓР№СЃС‚Р°, Рѕ РїРѕСЃС‚СѓРїР»РµРЅРёРё СЌС‚РѕРіРѕ С‚РѕРІР°СЂР° РЅР° СЃРєР»Р°Рґ.",
    'countInStock': 'Р•СЃС‚СЊ РІ РЅР°Р»РёС‡РёРё',
    'remaining': 'РћСЃС‚Р°С‚РѕРє',
    'pcs': 'С€С‚.',
    'paymentNone': 'РЅРµС‚ РґРѕСЃС‚СѓРїРЅС‹С… СЃРїРѕСЃРѕР±РѕРІ РѕРїР»Р°С‚С‹',
    'filterNone': 'РќРµ РЅР°С€Р»РѕСЃСЊ РїРѕРґС…РѕРґСЏС‰РёС… С‚РѕРІР°СЂРѕРІ!',
    'delivery': '+ РґРѕСЃС‚Р°РІРєР°: ',
    'waitCalc': 'РџРѕРґРѕР¶РґРёС‚Рµ, РёРґРµС‚ РїРµСЂРµСЃС‡РµС‚...',
    'checkout': 'РћС„РѕСЂРјРёС‚СЊ Р·Р°РєР°Р·',
    'RecentlyViewed': 'Р’С‹ РЅРµРґР°РІРЅРѕ СЃРјРѕС‚СЂРµР»Рё',
    'MAX': 'РњР°РєСЃРёРјСѓРј',
    'productSearch': 'РџРѕРёСЃРє С‚РѕРІР°СЂРѕРІ...',
    'availibleVariants': 'Р•СЃС‚СЊ РІР°СЂРёР°РЅС‚С‹',
    'ShowInVarious': 'РџРѕРєР°Р·С‹РІР°С‚СЊ РІ РЅРµСЃРєРѕР»СЊРєРёС… РєР°С‚РµРіРѕСЂРёСЏС…',
}); 
// js РїРµСЂРµРјРµРЅРЅС‹Рµ РёР· РґРІРёР¶РєР°
var mgBaseDir = '',
    protocol = '',
    phoneMask = '',
    sessionToDB = '',
    sessionAutoUpdate = '',
    sessionLifeTime = 0,
    timeWithoutUser = 0,
    agreementClasses = '',
    langP = '',
    requiredFields = '',
    varHashProduct = '';

document.cookie.split(/; */).forEach(function (cookieraw) {
    if (cookieraw.indexOf('mg_to_script') === 0) {
        var cookie = cookieraw.split('=');
        var name = cookie[0].substr(13);
        var value = decodeURIComponent(cookie[1]);
        window[name] = tryJsonParse(value.replace(/&amp;nbsp;/g, ' '));
    }
});

// РїСЂРѕРґР»РµРЅРёРµ РїС…Рї СЃРµСЃСЃРёРё
if (sessionLifeTime &gt; 0 &amp;&amp; window.sessionUpdateActive !== true) {
    window.sessionUpdateActive = true;
    setInterval(function () {
        let dataObj = {
            actionerClass: 'Ajaxuser',
            action: 'updateSession'
        };

        let data = Object.keys(dataObj).map(function (k) {
            return encodeURIComponent(k) + '=' + encodeURIComponent(dataObj[k])
        }).join('&amp;');

        const request = new XMLHttpRequest();

        request.open('POST', mgBaseDir + '/ajaxrequest', true);
        request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');

        request.addEventListener("readystatechange", () =&gt; {
            if (request.status &lt; 200 &amp;&amp; request.status &gt;= 400) {
                console.log('Session update error!');
                console.log(request);
            }
        });

        request.send(data);

    }, (sessionLifeTime / 2 * 1000));
}


function tryJsonParse(str) {
    try {
        var res = JSON.parse(str);
        return res;
    } catch (e) {
        return str;
    }
} 
/**
 * Plugin Name: uLogin - РІРёРґР¶РµС‚ Р°РІС‚РѕСЂРёР·Р°С†РёРё С‡РµСЂРµР· СЃРѕС†РёР°Р»СЊРЅС‹Рµ СЃРµС‚Рё
 * Plugin URI:  http://ulogin.ru/
 * Description: uLogin вЂ” СЌС‚Рѕ РёРЅСЃС‚СЂСѓРјРµРЅС‚, РєРѕС‚РѕСЂС‹Р№ РїРѕР·РІРѕР»СЏРµС‚ РїРѕР»СЊР·РѕРІР°С‚РµР»СЏРј РїРѕР»СѓС‡РёС‚СЊ РµРґРёРЅС‹Р№ РґРѕСЃС‚СѓРї Рє СЂР°Р·Р»РёС‡РЅС‹Рј РРЅС‚РµСЂРЅРµС‚-СЃРµСЂРІРёСЃР°Рј Р±РµР· РЅРµРѕР±С…РѕРґРёРјРѕСЃС‚Рё РїРѕРІС‚РѕСЂРЅРѕР№ СЂРµРіРёСЃС‚СЂР°С†РёРё, Р° РІР»Р°РґРµР»СЊС†Р°Рј СЃР°Р№С‚РѕРІ вЂ” РїРѕР»СѓС‡РёС‚СЊ РґРѕРїРѕР»РЅРёС‚РµР»СЊРЅС‹Р№ РїСЂРёС‚РѕРє РєР»РёРµРЅС‚РѕРІ РёР· СЃРѕС†РёР°Р»СЊРЅС‹С… СЃРµС‚РµР№ Рё РїРѕРїСѓР»СЏСЂРЅС‹С… РїРѕСЂС‚Р°Р»РѕРІ (Google, РЇРЅРґРµРєСЃ, Mail.ru, Р’РљРѕРЅС‚Р°РєС‚Рµ, Facebook Рё РґСЂ.)
 * Version:     2.0.0
 * Author:      uLogin
 * Author URI:  http://ulogin.ru/
 * License:     GPL2
 */

var uloginSyncModule = (function () {

    return {
        lang: [], // Р»РѕРєР°Р»СЊ РїР»Р°РіРёРЅР°
        init: function () {
            $(document).ready(function () {
                var uloginNetwork = $('#ulogin_accounts').find('.ulogin_network');
                uloginNetwork.click(function () {
                    var network = $(this).attr('data-ulogin-network');
                    var identity = $(this).attr('data-ulogin-identity');
                    uloginDeleteAccount(network, identity);
                });
            });
            function uloginDeleteAccount(network, identity) {
                var query = $.ajax({
                    type: "POST",
                    url: mgBaseDir + "/ajaxrequest",
                    dataType: 'json',
                    data: {
                        mguniqueurl: "action/uloginDeleteAccount", // РґРµР№СЃС‚РІРёСЏ РґР»СЏ РІС‹РїРѕР»РЅРµРЅРёСЏ РЅР° СЃРµСЂРІРµСЂРµ
                        pluginHandler: 'ulogin',
                        data: {
                            identity: identity,
                            network: network
                        }
                    },
                    error: function (data) {
                        alert('Error');
                    },
                    success: function (data) {
                        if (data.answerType == 'error') {
                            alert(data.msg);
                        }
                        if (data.answerType == 'ok') {
                            var accounts = $('#ulogin_accounts');
                            nw = accounts.find('[data-ulogin-network=' + network + ']');
                            if (nw.length &gt; 0) nw.hide();
                            alert(data.msg);
                        }
                    }
                });

                return false;
            }
        }
    }
})();

uloginSyncModule.init(); 
/**
 * Owl Carousel v2.3.4
 * Copyright 2013-2018 David Deutsch
 * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
 */
/**
 * Owl carousel
 * @version 2.3.4
 * @author Bartosz Wojciechowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 * @todo Lazy Load Icon
 * @todo prevent animationend bubling
 * @todo itemsScaleUp
 * @todo Test Zepto
 * @todo stagePadding calculate wrong active classes
 */
;(function($, window, document, undefined) {

	/**
	 * Creates a carousel.
	 * @class The Owl Carousel.
	 * @public
	 * @param {HTMLElement|jQuery} element - The element to create the carousel for.
	 * @param {Object} [options] - The options
	 */
	function MyOwl(element, options) {

		/**
		 * Current settings for the carousel.
		 * @public
		 */
		this.settings = null;

		/**
		 * Current options set by the caller including defaults.
		 * @public
		 */
		this.options = $.extend({}, MyOwl.Defaults, options);

		/**
		 * Plugin element.
		 * @public
		 */
		this.$element = $(element);

		/**
		 * Proxied event handlers.
		 * @protected
		 */
		this._handlers = {};

		/**
		 * References to the running plugins of this carousel.
		 * @protected
		 */
		this._plugins = {};

		/**
		 * Currently suppressed events to prevent them from being retriggered.
		 * @protected
		 */
		this._supress = {};

		/**
		 * Absolute current position.
		 * @protected
		 */
		this._current = null;

		/**
		 * Animation speed in milliseconds.
		 * @protected
		 */
		this._speed = null;

		/**
		 * Coordinates of all items in pixel.
		 * @todo The name of this member is missleading.
		 * @protected
		 */
		this._coordinates = [];

		/**
		 * Current breakpoint.
		 * @todo Real media queries would be nice.
		 * @protected
		 */
		this._breakpoint = null;

		/**
		 * Current width of the plugin element.
		 */
		this._width = null;

		/**
		 * All real items.
		 * @protected
		 */
		this._items = [];

		/**
		 * All cloned items.
		 * @protected
		 */
		this._clones = [];

		/**
		 * Merge values of all items.
		 * @todo Maybe this could be part of a plugin.
		 * @protected
		 */
		this._mergers = [];

		/**
		 * Widths of all items.
		 */
		this._widths = [];

		/**
		 * Invalidated parts within the update process.
		 * @protected
		 */
		this._invalidated = {};

		/**
		 * Ordered list of workers for the update process.
		 * @protected
		 */
		this._pipe = [];

		/**
		 * Current state information for the drag operation.
		 * @todo #261
		 * @protected
		 */
		this._drag = {
			time: null,
			target: null,
			pointer: null,
			stage: {
				start: null,
				current: null
			},
			direction: null
		};

		/**
		 * Current state information and their tags.
		 * @type {Object}
		 * @protected
		 */
		this._states = {
			current: {},
			tags: {
				'initializing': [ 'busy' ],
				'animating': [ 'busy' ],
				'dragging': [ 'interacting' ]
			}
		};

		$.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler) {
			this._handlers[handler] = $.proxy(this[handler], this);
		}, this));

		$.each(MyOwl.Plugins, $.proxy(function(key, plugin) {
			this._plugins[key.charAt(0).toLowerCase() + key.slice(1)]
				= new plugin(this);
		}, this));

		$.each(MyOwl.Workers, $.proxy(function(priority, worker) {
			this._pipe.push({
				'filter': worker.filter,
				'run': $.proxy(worker.run, this)
			});
		}, this));

		this.setup();
		this.initialize();
	}

	/**
	 * Default options for the carousel.
	 * @public
	 */
	MyOwl.Defaults = {
		items: 3,
		loop: false,
		center: false,
		rewind: false,
		checkVisibility: true,

		mouseDrag: true,
		touchDrag: true,
		pullDrag: true,
		freeDrag: false,

		margin: 0,
		stagePadding: 0,

		merge: false,
		mergeFit: true,
		autoWidth: false,

		startPosition: 0,
		rtl: false,

		smartSpeed: 250,
		fluidSpeed: false,
		dragEndSpeed: false,

		responsive: {},
		responsiveRefreshRate: 200,
		responsiveBaseElement: window,

		fallbackEasing: 'swing',
		slideTransition: '',

		info: false,

		nestedItemSelector: false,
		itemElement: 'div',
		stageElement: 'div',

		refreshClass: 'owl-refresh',
		loadedClass: 'owl-loaded',
		loadingClass: 'owl-loading',
		rtlClass: 'owl-rtl',
		responsiveClass: 'owl-responsive',
		dragClass: 'owl-drag',
		itemClass: 'owl-item',
		stageClass: 'owl-stage',
		stageOuterClass: 'owl-stage-outer',
		grabClass: 'owl-grab'
	};

	/**
	 * Enumeration for width.
	 * @public
	 * @readonly
	 * @enum {String}
	 */
	MyOwl.Width = {
		Default: 'default',
		Inner: 'inner',
		Outer: 'outer'
	};

	/**
	 * Enumeration for types.
	 * @public
	 * @readonly
	 * @enum {String}
	 */
	MyOwl.Type = {
		Event: 'event',
		State: 'state'
	};

	/**
	 * Contains all registered plugins.
	 * @public
	 */
	MyOwl.Plugins = {};

	/**
	 * List of workers involved in the update process.
	 */
	MyOwl.Workers = [ {
		filter: [ 'width', 'settings' ],
		run: function() {
			this._width = this.$element.width();
		}
	}, {
		filter: [ 'width', 'items', 'settings' ],
		run: function(cache) {
			cache.current = this._items &amp;&amp; this._items[this.relative(this._current)];
		}
	}, {
		filter: [ 'items', 'settings' ],
		run: function() {
			this.$stage.children('.cloned').remove();
		}
	}, {
		filter: [ 'width', 'items', 'settings' ],
		run: function(cache) {
			var margin = this.settings.margin || '',
				grid = !this.settings.autoWidth,
				rtl = this.settings.rtl,
				css = {
					'width': 'auto',
					'margin-left': rtl ? margin : '',
					'margin-right': rtl ? '' : margin
				};

			!grid &amp;&amp; this.$stage.children().css(css);

			cache.css = css;
		}
	}, {
		filter: [ 'width', 'items', 'settings' ],
		run: function(cache) {
			var width = (this.width() / this.settings.items).toFixed(3) - this.settings.margin,
				merge = null,
				iterator = this._items.length,
				grid = !this.settings.autoWidth,
				widths = [];

			cache.items = {
				merge: false,
				width: width
			};

			while (iterator--) {
				merge = this._mergers[iterator];
				merge = this.settings.mergeFit &amp;&amp; Math.min(merge, this.settings.items) || merge;

				cache.items.merge = merge &gt; 1 || cache.items.merge;

				widths[iterator] = !grid ? this._items[iterator].width() : width * merge;
			}

			this._widths = widths;
		}
	}, {
		filter: [ 'items', 'settings' ],
		run: function() {
			var clones = [],
				items = this._items,
				settings = this.settings,
				// TODO: Should be computed from number of min width items in stage
				view = Math.max(settings.items * 2, 4),
				size = Math.ceil(items.length / 2) * 2,
				repeat = settings.loop &amp;&amp; items.length ? settings.rewind ? view : Math.max(view, size) : 0,
				append = '',
				prepend = '';

			repeat /= 2;

			while (repeat &gt; 0) {
				// Switch to only using appended clones
				clones.push(this.normalize(clones.length / 2, true));
				append = append + items[clones[clones.length - 1]][0].outerHTML;
				clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true));
				prepend = items[clones[clones.length - 1]][0].outerHTML + prepend;
				repeat -= 1;
			}

			this._clones = clones;

			$(append).addClass('cloned').appendTo(this.$stage);
			$(prepend).addClass('cloned').prependTo(this.$stage);
		}
	}, {
		filter: [ 'width', 'items', 'settings' ],
		run: function() {
			var rtl = this.settings.rtl ? 1 : -1,
				size = this._clones.length + this._items.length,
				iterator = -1,
				previous = 0,
				current = 0,
				coordinates = [];

			while (++iterator &lt; size) {
				previous = coordinates[iterator - 1] || 0;
				current = this._widths[this.relative(iterator)] + this.settings.margin;
				coordinates.push(previous + current * rtl);
			}

			this._coordinates = coordinates;
		}
	}, {
		filter: [ 'width', 'items', 'settings' ],
		run: function() {
			var padding = this.settings.stagePadding,
				coordinates = this._coordinates,
				css = {
					'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2,
					'padding-left': padding || '',
					'padding-right': padding || ''
				};

			this.$stage.css(css);
		}
	}, {
		filter: [ 'width', 'items', 'settings' ],
		run: function(cache) {
			var iterator = this._coordinates.length,
				grid = !this.settings.autoWidth,
				items = this.$stage.children();

			if (grid &amp;&amp; cache.items.merge) {
				while (iterator--) {
					cache.css.width = this._widths[this.relative(iterator)];
					items.eq(iterator).css(cache.css);
				}
			} else if (grid) {
				cache.css.width = cache.items.width;
				items.css(cache.css);
			}
		}
	}, {
		filter: [ 'items' ],
		run: function() {
			this._coordinates.length &lt; 1 &amp;&amp; this.$stage.removeAttr('style');
		}
	}, {
		filter: [ 'width', 'items', 'settings' ],
		run: function(cache) {
			cache.current = cache.current ? this.$stage.children().index(cache.current) : 0;
			cache.current = Math.max(this.minimum(), Math.min(this.maximum(), cache.current));
			this.reset(cache.current);
		}
	}, {
		filter: [ 'position' ],
		run: function() {
			this.animate(this.coordinates(this._current));
		}
	}, {
		filter: [ 'width', 'position', 'items', 'settings' ],
		run: function() {
			var rtl = this.settings.rtl ? 1 : -1,
				padding = this.settings.stagePadding * 2,
				begin = this.coordinates(this.current()) + padding,
				end = begin + this.width() * rtl,
				inner, outer, matches = [], i, n;

			for (i = 0, n = this._coordinates.length; i &lt; n; i++) {
				inner = this._coordinates[i - 1] || 0;
				outer = Math.abs(this._coordinates[i]) + padding * rtl;

				if ((this.op(inner, '&lt;=', begin) &amp;&amp; (this.op(inner, '&gt;', end)))
					|| (this.op(outer, '&lt;', begin) &amp;&amp; this.op(outer, '&gt;', end))) {
					matches.push(i);
				}
			}

			this.$stage.children('.active').removeClass('active');
			this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active');

			this.$stage.children('.center').removeClass('center');
			if (this.settings.center) {
				this.$stage.children().eq(this.current()).addClass('center');
			}
		}
	} ];

	/**
	 * Create the stage DOM element
	 */
	MyOwl.prototype.initializeStage = function() {
		this.$stage = this.$element.find('.' + this.settings.stageClass);

		// if the stage is already in the DOM, grab it and skip stage initialization
		if (this.$stage.length) {
			return;
		}

		this.$element.addClass(this.options.loadingClass);

		// create stage
		this.$stage = $('&lt;' + this.settings.stageElement + '&gt;', {
			"class": this.settings.stageClass
		}).wrap( $( '&lt;div/&gt;', {
			"class": this.settings.stageOuterClass
		}));

		// append stage
		this.$element.append(this.$stage.parent());
	};

	/**
	 * Create item DOM elements
	 */
	MyOwl.prototype.initializeItems = function() {
		var $items = this.$element.find('.owl-item');

		// if the items are already in the DOM, grab them and skip item initialization
		if ($items.length) {
			this._items = $items.get().map(function(item) {
				return $(item);
			});

			this._mergers = this._items.map(function() {
				return 1;
			});

			this.refresh();

			return;
		}

		// append content
		this.replace(this.$element.children().not(this.$stage.parent()));

		// check visibility
		if (this.isVisible()) {
			// update view
			this.refresh();
		} else {
			// invalidate width
			this.invalidate('width');
		}

		this.$element
			.removeClass(this.options.loadingClass)
			.addClass(this.options.loadedClass);
	};

	/**
	 * Initializes the carousel.
	 * @protected
	 */
	MyOwl.prototype.initialize = function() {
		this.enter('initializing');
		this.trigger('initialize');

		this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl);

		if (this.settings.autoWidth &amp;&amp; !this.is('pre-loading')) {
			var imgs, nestedSelector, width;
			imgs = this.$element.find('img');
			nestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined;
			width = this.$element.children(nestedSelector).width();

			if (imgs.length &amp;&amp; width &lt;= 0) {
				this.preloadAutoWidthImages(imgs);
			}
		}

		this.initializeStage();
		this.initializeItems();

		// register event handlers
		this.registerEventHandlers();

		this.leave('initializing');
		this.trigger('initialized');
	};

	/**
	 * @returns {Boolean} visibility of $element
	 *                    if you know the carousel will always be visible you can set `checkVisibility` to `false` to
	 *                    prevent the expensive browser layout forced reflow the $element.is(':visible') does
	 */
	MyOwl.prototype.isVisible = function() {
		return this.settings.checkVisibility
			? this.$element.is(':visible')
			: true;
	};

	/**
	 * Setups the current settings.
	 * @todo Remove responsive classes. Why should adaptive designs be brought into IE8?
	 * @todo Support for media queries by using `matchMedia` would be nice.
	 * @public
	 */
	MyOwl.prototype.setup = function() {
		var viewport = this.viewport(),
			overwrites = this.options.responsive,
			match = -1,
			settings = null;

		if (!overwrites) {
			settings = $.extend({}, this.options);
		} else {
			$.each(overwrites, function(breakpoint) {
				if (breakpoint &lt;= viewport &amp;&amp; breakpoint &gt; match) {
					match = Number(breakpoint);
				}
			});

			settings = $.extend({}, this.options, overwrites[match]);
			if (typeof settings.stagePadding === 'function') {
				settings.stagePadding = settings.stagePadding();
			}
			delete settings.responsive;

			// responsive class
			if (settings.responsiveClass) {
				this.$element.attr('class',
					this.$element.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\S+\\s', 'g'), '$1' + match)
				);
			}
		}

		this.trigger('change', { property: { name: 'settings', value: settings } });
		this._breakpoint = match;
		this.settings = settings;
		this.invalidate('settings');
		this.trigger('changed', { property: { name: 'settings', value: this.settings } });
	};

	/**
	 * Updates option logic if necessery.
	 * @protected
	 */
	MyOwl.prototype.optionsLogic = function() {
		if (this.settings.autoWidth) {
			this.settings.stagePadding = false;
			this.settings.merge = false;
		}
	};

	/**
	 * Prepares an item before add.
	 * @todo Rename event parameter `content` to `item`.
	 * @protected
	 * @returns {jQuery|HTMLElement} - The item container.
	 */
	MyOwl.prototype.prepare = function(item) {
		var event = this.trigger('prepare', { content: item });

		if (!event.data) {
			event.data = $('&lt;' + this.settings.itemElement + '/&gt;')
				.addClass(this.options.itemClass).append(item)
		}

		this.trigger('prepared', { content: event.data });

		return event.data;
	};

	/**
	 * Updates the view.
	 * @public
	 */
	MyOwl.prototype.update = function() {
		var i = 0,
			n = this._pipe.length,
			filter = $.proxy(function(p) { return this[p] }, this._invalidated),
			cache = {};

		while (i &lt; n) {
			if (this._invalidated.all || $.grep(this._pipe[i].filter, filter).length &gt; 0) {
				this._pipe[i].run(cache);
			}
			i++;
		}

		this._invalidated = {};

		!this.is('valid') &amp;&amp; this.enter('valid');
	};

	/**
	 * Gets the width of the view.
	 * @public
	 * @param {MyOwl.Width} [dimension=MyOwl.Width.Default] - The dimension to return.
	 * @returns {Number} - The width of the view in pixel.
	 */
	MyOwl.prototype.width = function(dimension) {
		dimension = dimension || MyOwl.Width.Default;
		switch (dimension) {
			case MyOwl.Width.Inner:
			case MyOwl.Width.Outer:
				return this._width;
			default:
				return this._width - this.settings.stagePadding * 2 + this.settings.margin;
		}
	};

	/**
	 * Refreshes the carousel primarily for adaptive purposes.
	 * @public
	 */
	MyOwl.prototype.refresh = function() {
		this.enter('refreshing');
		this.trigger('refresh');

		this.setup();

		this.optionsLogic();

		this.$element.addClass(this.options.refreshClass);

		this.update();

		this.$element.removeClass(this.options.refreshClass);

		this.leave('refreshing');
		this.trigger('refreshed');
	};

	/**
	 * Checks window `resize` event.
	 * @protected
	 */
	MyOwl.prototype.onThrottledResize = function() {
		window.clearTimeout(this.resizeTimer);
		this.resizeTimer = window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate);
	};

	/**
	 * Checks window `resize` event.
	 * @protected
	 */
	MyOwl.prototype.onResize = function() {
		if (!this._items.length) {
			return false;
		}

		if (this._width === this.$element.width()) {
			return false;
		}

		if (!this.isVisible()) {
			return false;
		}

		this.enter('resizing');

		if (this.trigger('resize').isDefaultPrevented()) {
			this.leave('resizing');
			return false;
		}

		this.invalidate('width');

		this.refresh();

		this.leave('resizing');
		this.trigger('resized');
	};

	/**
	 * Registers event handlers.
	 * @todo Check `msPointerEnabled`
	 * @todo #261
	 * @protected
	 */
	MyOwl.prototype.registerEventHandlers = function() {
		if ($.support.transition) {
			this.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.onTransitionEnd, this));
		}

		if (this.settings.responsive !== false) {
			this.on(window, 'resize', this._handlers.onThrottledResize);
		}

		if (this.settings.mouseDrag) {
			this.$element.addClass(this.options.dragClass);
			this.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this));
			this.$stage.on('dragstart.owl.core selectstart.owl.core', function() { return false });
		}

		if (this.settings.touchDrag){
			this.$stage.on('touchstart.owl.core', $.proxy(this.onDragStart, this));
			this.$stage.on('touchcancel.owl.core', $.proxy(this.onDragEnd, this));
		}
	};

	/**
	 * Handles `touchstart` and `mousedown` events.
	 * @todo Horizontal swipe threshold as option
	 * @todo #261
	 * @protected
	 * @param {Event} event - The event arguments.
	 */
	MyOwl.prototype.onDragStart = function(event) {
		var stage = null;

		if (event.which === 3) {
			return;
		}

		if ($.support.transform) {
			stage = this.$stage.css('transform').replace(/.*\(|\)| /g, '').split(',');
			stage = {
				x: stage[stage.length === 16 ? 12 : 4],
				y: stage[stage.length === 16 ? 13 : 5]
			};
		} else {
			stage = this.$stage.position();
			stage = {
				x: this.settings.rtl ?
					stage.left + this.$stage.width() - this.width() + this.settings.margin :
					stage.left,
				y: stage.top
			};
		}

		if (this.is('animating')) {
			$.support.transform ? this.animate(stage.x) : this.$stage.stop()
			this.invalidate('position');
		}

		this.$element.toggleClass(this.options.grabClass, event.type === 'mousedown');

		this.speed(0);

		this._drag.time = new Date().getTime();
		this._drag.target = $(event.target);
		this._drag.stage.start = stage;
		this._drag.stage.current = stage;
		this._drag.pointer = this.pointer(event);

		$(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this));

		$(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event) {
			var delta = this.difference(this._drag.pointer, this.pointer(event));

			$(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this));

			if (Math.abs(delta.x) &lt; Math.abs(delta.y) &amp;&amp; this.is('valid')) {
				return;
			}

			event.preventDefault();

			this.enter('dragging');
			this.trigger('drag');
		}, this));
	};

	/**
	 * Handles the `touchmove` and `mousemove` events.
	 * @todo #261
	 * @protected
	 * @param {Event} event - The event arguments.
	 */
	MyOwl.prototype.onDragMove = function(event) {
		var minimum = null,
			maximum = null,
			pull = null,
			delta = this.difference(this._drag.pointer, this.pointer(event)),
			stage = this.difference(this._drag.stage.start, delta);

		if (!this.is('dragging')) {
			return;
		}

		event.preventDefault();

		if (this.settings.loop) {
			minimum = this.coordinates(this.minimum());
			maximum = this.coordinates(this.maximum() + 1) - minimum;
			stage.x = (((stage.x - minimum) % maximum + maximum) % maximum) + minimum;
		} else {
			minimum = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum());
			maximum = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum());
			pull = this.settings.pullDrag ? -1 * delta.x / 5 : 0;
			stage.x = Math.max(Math.min(stage.x, minimum + pull), maximum + pull);
		}

		this._drag.stage.current = stage;

		this.animate(stage.x);
	};

	/**
	 * Handles the `touchend` and `mouseup` events.
	 * @todo #261
	 * @todo Threshold for click event
	 * @protected
	 * @param {Event} event - The event arguments.
	 */
	MyOwl.prototype.onDragEnd = function(event) {
		var delta = this.difference(this._drag.pointer, this.pointer(event)),
			stage = this._drag.stage.current,
			direction = delta.x &gt; 0 ^ this.settings.rtl ? 'left' : 'right';

		$(document).off('.owl.core');

		this.$element.removeClass(this.options.grabClass);

		if (delta.x !== 0 &amp;&amp; this.is('dragging') || !this.is('valid')) {
			this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed);
			this.current(this.closest(stage.x, delta.x !== 0 ? direction : this._drag.direction));
			this.invalidate('position');
			this.update();

			this._drag.direction = direction;

			if (Math.abs(delta.x) &gt; 3 || new Date().getTime() - this._drag.time &gt; 300) {
				this._drag.target.one('click.owl.core', function() { return false; });
			}
		}

		if (!this.is('dragging')) {
			return;
		}

		this.leave('dragging');
		this.trigger('dragged');
	};

	/**
	 * Gets absolute position of the closest item for a coordinate.
	 * @todo Setting `freeDrag` makes `closest` not reusable. See #165.
	 * @protected
	 * @param {Number} coordinate - The coordinate in pixel.
	 * @param {String} direction - The direction to check for the closest item. Ether `left` or `right`.
	 * @return {Number} - The absolute position of the closest item.
	 */
	MyOwl.prototype.closest = function(coordinate, direction) {
		var position = -1,
			pull = 30,
			width = this.width(),
			coordinates = this.coordinates();

		if (!this.settings.freeDrag) {
			// check closest item
			$.each(coordinates, $.proxy(function(index, value) {
				// on a left pull, check on current index
				if (direction === 'left' &amp;&amp; coordinate &gt; value - pull &amp;&amp; coordinate &lt; value + pull) {
					position = index;
				// on a right pull, check on previous index
				// to do so, subtract width from value and set position = index + 1
				} else if (direction === 'right' &amp;&amp; coordinate &gt; value - width - pull &amp;&amp; coordinate &lt; value - width + pull) {
					position = index + 1;
				} else if (this.op(coordinate, '&lt;', value)
					&amp;&amp; this.op(coordinate, '&gt;', coordinates[index + 1] !== undefined ? coordinates[index + 1] : value - width)) {
					position = direction === 'left' ? index + 1 : index;
				}
				return position === -1;
			}, this));
		}

		if (!this.settings.loop) {
			// non loop boundries
			if (this.op(coordinate, '&gt;', coordinates[this.minimum()])) {
				position = coordinate = this.minimum();
			} else if (this.op(coordinate, '&lt;', coordinates[this.maximum()])) {
				position = coordinate = this.maximum();
			}
		}

		return position;
	};

	/**
	 * Animates the stage.
	 * @todo #270
	 * @public
	 * @param {Number} coordinate - The coordinate in pixels.
	 */
	MyOwl.prototype.animate = function(coordinate) {
		var animate = this.speed() &gt; 0;

		this.is('animating') &amp;&amp; this.onTransitionEnd();

		if (animate) {
			this.enter('animating');
			this.trigger('translate');
		}

		if ($.support.transform3d &amp;&amp; $.support.transition) {
			this.$stage.css({
				transform: 'translate3d(' + coordinate + 'px,0px,0px)',
				transition: (this.speed() / 1000) + 's' + (
					this.settings.slideTransition ? ' ' + this.settings.slideTransition : ''
				)
			});
		} else if (animate) {
			this.$stage.animate({
				left: coordinate + 'px'
			}, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this));
		} else {
			this.$stage.css({
				left: coordinate + 'px'
			});
		}
	};

	/**
	 * Checks whether the carousel is in a specific state or not.
	 * @param {String} state - The state to check.
	 * @returns {Boolean} - The flag which indicates if the carousel is busy.
	 */
	MyOwl.prototype.is = function(state) {
		return this._states.current[state] &amp;&amp; this._states.current[state] &gt; 0;
	};

	/**
	 * Sets the absolute position of the current item.
	 * @public
	 * @param {Number} [position] - The new absolute position or nothing to leave it unchanged.
	 * @returns {Number} - The absolute position of the current item.
	 */
	MyOwl.prototype.current = function(position) {
		if (position === undefined) {
			return this._current;
		}

		if (this._items.length === 0) {
			return undefined;
		}

		position = this.normalize(position);

		if (this._current !== position) {
			var event = this.trigger('change', { property: { name: 'position', value: position } });

			if (event.data !== undefined) {
				position = this.normalize(event.data);
			}

			this._current = position;

			this.invalidate('position');

			this.trigger('changed', { property: { name: 'position', value: this._current } });
		}

		return this._current;
	};

	/**
	 * Invalidates the given part of the update routine.
	 * @param {String} [part] - The part to invalidate.
	 * @returns {Array.&lt;String&gt;} - The invalidated parts.
	 */
	MyOwl.prototype.invalidate = function(part) {
		if ($.type(part) === 'string') {
			this._invalidated[part] = true;
			this.is('valid') &amp;&amp; this.leave('valid');
		}
		return $.map(this._invalidated, function(v, i) { return i });
	};

	/**
	 * Resets the absolute position of the current item.
	 * @public
	 * @param {Number} position - The absolute position of the new item.
	 */
	MyOwl.prototype.reset = function(position) {
		position = this.normalize(position);

		if (position === undefined) {
			return;
		}

		this._speed = 0;
		this._current = position;

		this.suppress([ 'translate', 'translated' ]);

		this.animate(this.coordinates(position));

		this.release([ 'translate', 'translated' ]);
	};

	/**
	 * Normalizes an absolute or a relative position of an item.
	 * @public
	 * @param {Number} position - The absolute or relative position to normalize.
	 * @param {Boolean} [relative=false] - Whether the given position is relative or not.
	 * @returns {Number} - The normalized position.
	 */
	MyOwl.prototype.normalize = function(position, relative) {
		var n = this._items.length,
			m = relative ? 0 : this._clones.length;

		if (!this.isNumeric(position) || n &lt; 1) {
			position = undefined;
		} else if (position &lt; 0 || position &gt;= n + m) {
			position = ((position - m / 2) % n + n) % n + m / 2;
		}

		return position;
	};

	/**
	 * Converts an absolute position of an item into a relative one.
	 * @public
	 * @param {Number} position - The absolute position to convert.
	 * @returns {Number} - The converted position.
	 */
	MyOwl.prototype.relative = function(position) {
		position -= this._clones.length / 2;
		return this.normalize(position, true);
	};

	/**
	 * Gets the maximum position for the current item.
	 * @public
	 * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
	 * @returns {Number}
	 */
	MyOwl.prototype.maximum = function(relative) {
		var settings = this.settings,
			maximum = this._coordinates.length,
			iterator,
			reciprocalItemsWidth,
			elementWidth;

		if (settings.loop) {
			maximum = this._clones.length / 2 + this._items.length - 1;
		} else if (settings.autoWidth || settings.merge) {
			iterator = this._items.length;
			if (iterator) {
				reciprocalItemsWidth = this._items[--iterator].width();
				elementWidth = this.$element.width();
				while (iterator--) {
					reciprocalItemsWidth += this._items[iterator].width() + this.settings.margin;
					if (reciprocalItemsWidth &gt; elementWidth) {
						break;
					}
				}
			}
			maximum = iterator + 1;
		} else if (settings.center) {
			maximum = this._items.length - 1;
		} else {
			maximum = this._items.length - settings.items;
		}

		if (relative) {
			maximum -= this._clones.length / 2;
		}

		return Math.max(maximum, 0);
	};

	/**
	 * Gets the minimum position for the current item.
	 * @public
	 * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.
	 * @returns {Number}
	 */
	MyOwl.prototype.minimum = function(relative) {
		return relative ? 0 : this._clones.length / 2;
	};

	/**
	 * Gets an item at the specified relative position.
	 * @public
	 * @param {Number} [position] - The relative position of the item.
	 * @return {jQuery|Array.&lt;jQuery&gt;} - The item at the given position or all items if no position was given.
	 */
	MyOwl.prototype.items = function(position) {
		if (position === undefined) {
			return this._items.slice();
		}

		position = this.normalize(position, true);
		return this._items[position];
	};

	/**
	 * Gets an item at the specified relative position.
	 * @public
	 * @param {Number} [position] - The relative position of the item.
	 * @return {jQuery|Array.&lt;jQuery&gt;} - The item at the given position or all items if no position was given.
	 */
	MyOwl.prototype.mergers = function(position) {
		if (position === undefined) {
			return this._mergers.slice();
		}

		position = this.normalize(position, true);
		return this._mergers[position];
	};

	/**
	 * Gets the absolute positions of clones for an item.
	 * @public
	 * @param {Number} [position] - The relative position of the item.
	 * @returns {Array.&lt;Number&gt;} - The absolute positions of clones for the item or all if no position was given.
	 */
	MyOwl.prototype.clones = function(position) {
		var odd = this._clones.length / 2,
			even = odd + this._items.length,
			map = function(index) { return index % 2 === 0 ? even + index / 2 : odd - (index + 1) / 2 };

		if (position === undefined) {
			return $.map(this._clones, function(v, i) { return map(i) });
		}

		return $.map(this._clones, function(v, i) { return v === position ? map(i) : null });
	};

	/**
	 * Sets the current animation speed.
	 * @public
	 * @param {Number} [speed] - The animation speed in milliseconds or nothing to leave it unchanged.
	 * @returns {Number} - The current animation speed in milliseconds.
	 */
	MyOwl.prototype.speed = function(speed) {
		if (speed !== undefined) {
			this._speed = speed;
		}

		return this._speed;
	};

	/**
	 * Gets the coordinate of an item.
	 * @todo The name of this method is missleanding.
	 * @public
	 * @param {Number} position - The absolute position of the item within `minimum()` and `maximum()`.
	 * @returns {Number|Array.&lt;Number&gt;} - The coordinate of the item in pixel or all coordinates.
	 */
	MyOwl.prototype.coordinates = function(position) {
		var multiplier = 1,
			newPosition = position - 1,
			coordinate;

		if (position === undefined) {
			return $.map(this._coordinates, $.proxy(function(coordinate, index) {
				return this.coordinates(index);
			}, this));
		}

		if (this.settings.center) {
			if (this.settings.rtl) {
				multiplier = -1;
				newPosition = position + 1;
			}

			coordinate = this._coordinates[position];
			coordinate += (this.width() - coordinate + (this._coordinates[newPosition] || 0)) / 2 * multiplier;
		} else {
			coordinate = this._coordinates[newPosition] || 0;
		}

		coordinate = Math.ceil(coordinate);

		return coordinate;
	};

	/**
	 * Calculates the speed for a translation.
	 * @protected
	 * @param {Number} from - The absolute position of the start item.
	 * @param {Number} to - The absolute position of the target item.
	 * @param {Number} [factor=undefined] - The time factor in milliseconds.
	 * @returns {Number} - The time in milliseconds for the translation.
	 */
	MyOwl.prototype.duration = function(from, to, factor) {
		if (factor === 0) {
			return 0;
		}

		return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor || this.settings.smartSpeed));
	};

	/**
	 * Slides to the specified item.
	 * @public
	 * @param {Number} position - The position of the item.
	 * @param {Number} [speed] - The time in milliseconds for the transition.
	 */
	MyOwl.prototype.to = function(position, speed) {
		var current = this.current(),
			revert = null,
			distance = position - this.relative(current),
			direction = (distance &gt; 0) - (distance &lt; 0),
			items = this._items.length,
			minimum = this.minimum(),
			maximum = this.maximum();

		if (this.settings.loop) {
			if (!this.settings.rewind &amp;&amp; Math.abs(distance) &gt; items / 2) {
				distance += direction * -1 * items;
			}

			position = current + distance;
			revert = ((position - minimum) % items + items) % items + minimum;

			if (revert !== position &amp;&amp; revert - distance &lt;= maximum &amp;&amp; revert - distance &gt; 0) {
				current = revert - distance;
				position = revert;
				this.reset(current);
			}
		} else if (this.settings.rewind) {
			maximum += 1;
			position = (position % maximum + maximum) % maximum;
		} else {
			position = Math.max(minimum, Math.min(maximum, position));
		}

		this.speed(this.duration(current, position, speed));
		this.current(position);

		if (this.isVisible()) {
			this.update();
		}
	};

	/**
	 * Slides to the next item.
	 * @public
	 * @param {Number} [speed] - The time in milliseconds for the transition.
	 */
	MyOwl.prototype.next = function(speed) {
		speed = speed || false;
		this.to(this.relative(this.current()) + 1, speed);
	};

	/**
	 * Slides to the previous item.
	 * @public
	 * @param {Number} [speed] - The time in milliseconds for the transition.
	 */
	MyOwl.prototype.prev = function(speed) {
		speed = speed || false;
		this.to(this.relative(this.current()) - 1, speed);
	};

	/**
	 * Handles the end of an animation.
	 * @protected
	 * @param {Event} event - The event arguments.
	 */
	MyOwl.prototype.onTransitionEnd = function(event) {

		// if css2 animation then event object is undefined
		if (event !== undefined) {
			event.stopPropagation();

			// Catch only owl-stage transitionEnd event
			if ((event.target || event.srcElement || event.originalTarget) !== this.$stage.get(0)) {
				return false;
			}
		}

		this.leave('animating');
		this.trigger('translated');
	};

	/**
	 * Gets viewport width.
	 * @protected
	 * @return {Number} - The width in pixel.
	 */
	MyOwl.prototype.viewport = function() {
		var width;
		if (this.options.responsiveBaseElement !== window) {
			width = $(this.options.responsiveBaseElement).width();
		} else if (window.innerWidth) {
			width = window.innerWidth;
		} else if (document.documentElement &amp;&amp; document.documentElement.clientWidth) {
			width = document.documentElement.clientWidth;
		} else {
			console.warn('Can not detect viewport width.');
		}
		return width;
	};

	/**
	 * Replaces the current content.
	 * @public
	 * @param {HTMLElement|jQuery|String} content - The new content.
	 */
	MyOwl.prototype.replace = function(content) {
		this.$stage.empty();
		this._items = [];

		if (content) {
			content = (content instanceof jQuery) ? content : $(content);
		}

		if (this.settings.nestedItemSelector) {
			content = content.find('.' + this.settings.nestedItemSelector);
		}

		content.filter(function() {
			return this.nodeType === 1;
		}).each($.proxy(function(index, item) {
			item = this.prepare(item);
			this.$stage.append(item);
			this._items.push(item);
			this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
		}, this));

		this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0);

		this.invalidate('items');
	};

	/**
	 * Adds an item.
	 * @todo Use `item` instead of `content` for the event arguments.
	 * @public
	 * @param {HTMLElement|jQuery|String} content - The item content to add.
	 * @param {Number} [position] - The relative position at which to insert the item otherwise the item will be added to the end.
	 */
	MyOwl.prototype.add = function(content, position) {
		var current = this.relative(this._current);

		position = position === undefined ? this._items.length : this.normalize(position, true);
		content = content instanceof jQuery ? content : $(content);

		this.trigger('add', { content: content, position: position });

		content = this.prepare(content);

		if (this._items.length === 0 || position === this._items.length) {
			this._items.length === 0 &amp;&amp; this.$stage.append(content);
			this._items.length !== 0 &amp;&amp; this._items[position - 1].after(content);
			this._items.push(content);
			this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
		} else {
			this._items[position].before(content);
			this._items.splice(position, 0, content);
			this._mergers.splice(position, 0, content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);
		}

		this._items[current] &amp;&amp; this.reset(this._items[current].index());

		this.invalidate('items');

		this.trigger('added', { content: content, position: position });
	};

	/**
	 * Removes an item by its position.
	 * @todo Use `item` instead of `content` for the event arguments.
	 * @public
	 * @param {Number} position - The relative position of the item to remove.
	 */
	MyOwl.prototype.remove = function(position) {
		position = this.normalize(position, true);

		if (position === undefined) {
			return;
		}

		this.trigger('remove', { content: this._items[position], position: position });

		this._items[position].remove();
		this._items.splice(position, 1);
		this._mergers.splice(position, 1);

		this.invalidate('items');

		this.trigger('removed', { content: null, position: position });
	};

	/**
	 * Preloads images with auto width.
	 * @todo Replace by a more generic approach
	 * @protected
	 */
	MyOwl.prototype.preloadAutoWidthImages = function(images) {
		images.each($.proxy(function(i, element) {
			this.enter('pre-loading');
			element = $(element);
			$(new Image()).one('load', $.proxy(function(e) {
				element.attr('src', e.target.src);
				element.css('opacity', 1);
				this.leave('pre-loading');
				!this.is('pre-loading') &amp;&amp; !this.is('initializing') &amp;&amp; this.refresh();
			}, this)).attr('src', element.attr('src') || element.attr('data-src') || element.attr('data-src-retina'));
		}, this));
	};

	/**
	 * Destroys the carousel.
	 * @public
	 */
	MyOwl.prototype.destroy = function() {

		this.$element.off('.owl.core');
		this.$stage.off('.owl.core');
		$(document).off('.owl.core');

		if (this.settings.responsive !== false) {
			window.clearTimeout(this.resizeTimer);
			this.off(window, 'resize', this._handlers.onThrottledResize);
		}

		for (var i in this._plugins) {
			this._plugins[i].destroy();
		}

		this.$stage.children('.cloned').remove();

		this.$stage.unwrap();
		this.$stage.children().contents().unwrap();
		this.$stage.children().unwrap();
		this.$stage.remove();
		this.$element
			.removeClass(this.options.refreshClass)
			.removeClass(this.options.loadingClass)
			.removeClass(this.options.loadedClass)
			.removeClass(this.options.rtlClass)
			.removeClass(this.options.dragClass)
			.removeClass(this.options.grabClass)
			.attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\S+\\s', 'g'), ''))
			.removeData('owl.carousel');
	};

	/**
	 * Operators to calculate right-to-left and left-to-right.
	 * @protected
	 * @param {Number} [a] - The left side operand.
	 * @param {String} [o] - The operator.
	 * @param {Number} [b] - The right side operand.
	 */
	MyOwl.prototype.op = function(a, o, b) {
		var rtl = this.settings.rtl;
		switch (o) {
			case '&lt;':
				return rtl ? a &gt; b : a &lt; b;
			case '&gt;':
				return rtl ? a &lt; b : a &gt; b;
			case '&gt;=':
				return rtl ? a &lt;= b : a &gt;= b;
			case '&lt;=':
				return rtl ? a &gt;= b : a &lt;= b;
			default:
				break;
		}
	};

	/**
	 * Attaches to an internal event.
	 * @protected
	 * @param {HTMLElement} element - The event source.
	 * @param {String} event - The event name.
	 * @param {Function} listener - The event handler to attach.
	 * @param {Boolean} capture - Wether the event should be handled at the capturing phase or not.
	 */
	MyOwl.prototype.on = function(element, event, listener, capture) {
		if (element.addEventListener) {
			element.addEventListener(event, listener, capture);
		} else if (element.attachEvent) {
			element.attachEvent('on' + event, listener);
		}
	};

	/**
	 * Detaches from an internal event.
	 * @protected
	 * @param {HTMLElement} element - The event source.
	 * @param {String} event - The event name.
	 * @param {Function} listener - The attached event handler to detach.
	 * @param {Boolean} capture - Wether the attached event handler was registered as a capturing listener or not.
	 */
	MyOwl.prototype.off = function(element, event, listener, capture) {
		if (element.removeEventListener) {
			element.removeEventListener(event, listener, capture);
		} else if (element.detachEvent) {
			element.detachEvent('on' + event, listener);
		}
	};

	/**
	 * Triggers a public event.
	 * @todo Remove `status`, `relatedTarget` should be used instead.
	 * @protected
	 * @param {String} name - The event name.
	 * @param {*} [data=null] - The event data.
	 * @param {String} [namespace=carousel] - The event namespace.
	 * @param {String} [state] - The state which is associated with the event.
	 * @param {Boolean} [enter=false] - Indicates if the call enters the specified state or not.
	 * @returns {Event} - The event arguments.
	 */
	MyOwl.prototype.trigger = function(name, data, namespace, state, enter) {
		var status = {
			item: { count: this._items.length, index: this.current() }
		}, handler = $.camelCase(
			$.grep([ 'on', name, namespace ], function(v) { return v })
				.join('-').toLowerCase()
		), event = $.Event(
			[ name, 'owl', namespace || 'carousel' ].join('.').toLowerCase(),
			$.extend({ relatedTarget: this }, status, data)
		);

		if (!this._supress[name]) {
			$.each(this._plugins, function(name, plugin) {
				if (plugin.onTrigger) {
					plugin.onTrigger(event);
				}
			});

			this.register({ type: MyOwl.Type.Event, name: name });
			this.$element.trigger(event);

			if (this.settings &amp;&amp; typeof this.settings[handler] === 'function') {
				this.settings[handler].call(this, event);
			}
		}

		return event;
	};

	/**
	 * Enters a state.
	 * @param name - The state name.
	 */
	MyOwl.prototype.enter = function(name) {
		$.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) {
			if (this._states.current[name] === undefined) {
				this._states.current[name] = 0;
			}

			this._states.current[name]++;
		}, this));
	};

	/**
	 * Leaves a state.
	 * @param name - The state name.
	 */
	MyOwl.prototype.leave = function(name) {
		$.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) {
			this._states.current[name]--;
		}, this));
	};

	/**
	 * Registers an event or state.
	 * @public
	 * @param {Object} object - The event or state to register.
	 */
	MyOwl.prototype.register = function(object) {
		if (object.type === MyOwl.Type.Event) {
			if (!$.event.special[object.name]) {
				$.event.special[object.name] = {};
			}

			if (!$.event.special[object.name].owl) {
				var _default = $.event.special[object.name]._default;
				$.event.special[object.name]._default = function(e) {
					if (_default &amp;&amp; _default.apply &amp;&amp; (!e.namespace || e.namespace.indexOf('owl') === -1)) {
						return _default.apply(this, arguments);
					}
					return e.namespace &amp;&amp; e.namespace.indexOf('owl') &gt; -1;
				};
				$.event.special[object.name].owl = true;
			}
		} else if (object.type === MyOwl.Type.State) {
			if (!this._states.tags[object.name]) {
				this._states.tags[object.name] = object.tags;
			} else {
				this._states.tags[object.name] = this._states.tags[object.name].concat(object.tags);
			}

			this._states.tags[object.name] = $.grep(this._states.tags[object.name], $.proxy(function(tag, i) {
				return $.inArray(tag, this._states.tags[object.name]) === i;
			}, this));
		}
	};

	/**
	 * Suppresses events.
	 * @protected
	 * @param {Array.&lt;String&gt;} events - The events to suppress.
	 */
	MyOwl.prototype.suppress = function(events) {
		$.each(events, $.proxy(function(index, event) {
			this._supress[event] = true;
		}, this));
	};

	/**
	 * Releases suppressed events.
	 * @protected
	 * @param {Array.&lt;String&gt;} events - The events to release.
	 */
	MyOwl.prototype.release = function(events) {
		$.each(events, $.proxy(function(index, event) {
			delete this._supress[event];
		}, this));
	};

	/**
	 * Gets unified pointer coordinates from event.
	 * @todo #261
	 * @protected
	 * @param {Event} - The `mousedown` or `touchstart` event.
	 * @returns {Object} - Contains `x` and `y` coordinates of current pointer position.
	 */
	MyOwl.prototype.pointer = function(event) {
		var result = { x: null, y: null };

		event = event.originalEvent || event || window.event;

		event = event.touches &amp;&amp; event.touches.length ?
			event.touches[0] : event.changedTouches &amp;&amp; event.changedTouches.length ?
				event.changedTouches[0] : event;

		if (event.pageX) {
			result.x = event.pageX;
			result.y = event.pageY;
		} else {
			result.x = event.clientX;
			result.y = event.clientY;
		}

		return result;
	};

	/**
	 * Determines if the input is a Number or something that can be coerced to a Number
	 * @protected
	 * @param {Number|String|Object|Array|Boolean|RegExp|Function|Symbol} - The input to be tested
	 * @returns {Boolean} - An indication if the input is a Number or can be coerced to a Number
	 */
	MyOwl.prototype.isNumeric = function(number) {
		return !isNaN(parseFloat(number));
	};

	/**
	 * Gets the difference of two vectors.
	 * @todo #261
	 * @protected
	 * @param {Object} - The first vector.
	 * @param {Object} - The second vector.
	 * @returns {Object} - The difference.
	 */
	MyOwl.prototype.difference = function(first, second) {
		return {
			x: first.x - second.x,
			y: first.y - second.y
		};
	};

	/**
	 * The jQuery Plugin for the Owl Carousel
	 * @todo Navigation plugin `next` and `prev`
	 * @public
	 */
	$.fn.owlMyCarousel = function(option) {
		var args = Array.prototype.slice.call(arguments, 1);

		return this.each(function() {
			var $this = $(this),
				data = $this.data('owl.carousel');

			if (!data) {
				data = new MyOwl(this, typeof option == 'object' &amp;&amp; option);
				$this.data('owl.carousel', data);

				$.each([
					'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove'
				], function(i, event) {
					data.register({ type: MyOwl.Type.Event, name: event });
					data.$element.on(event + '.owl.carousel.core', $.proxy(function(e) {
						if (e.namespace &amp;&amp; e.relatedTarget !== this) {
							this.suppress([ event ]);
							data[event].apply(this, [].slice.call(arguments, 1));
							this.release([ event ]);
						}
					}, data));
				});
			}

			if (typeof option == 'string' &amp;&amp; option.charAt(0) !== '_') {
				data[option].apply(data, args);
			}
		});
	};

	/**
	 * The constructor for the jQuery Plugin
	 * @public
	 */
	$.fn.owlMyCarousel.Constructor = MyOwl;

})(window.Zepto || window.jQuery, window, document);

/**
 * AutoRefresh Plugin
 * @version 2.3.4
 * @author Artus Kolanowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($, window, document, undefined) {

	/**
	 * Creates the auto refresh plugin.
	 * @class The Auto Refresh Plugin
	 * @param {MyOwl} carousel - The Owl Carousel
	 */
	var AutoRefresh = function(carousel) {
		/**
		 * Reference to the core.
		 * @protected
		 * @type {MyOwl}
		 */
		this._core = carousel;

		/**
		 * Refresh interval.
		 * @protected
		 * @type {number}
		 */
		this._interval = null;

		/**
		 * Whether the element is currently visible or not.
		 * @protected
		 * @type {Boolean}
		 */
		this._visible = null;

		/**
		 * All event handlers.
		 * @protected
		 * @type {Object}
		 */
		this._handlers = {
			'initialized.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; this._core.settings.autoRefresh) {
					this.watch();
				}
			}, this)
		};

		// set default options
		this._core.options = $.extend({}, AutoRefresh.Defaults, this._core.options);

		// register event handlers
		this._core.$element.on(this._handlers);
	};

	/**
	 * Default options.
	 * @public
	 */
	AutoRefresh.Defaults = {
		autoRefresh: true,
		autoRefreshInterval: 500
	};

	/**
	 * Watches the element.
	 */
	AutoRefresh.prototype.watch = function() {
		if (this._interval) {
			return;
		}

		this._visible = this._core.isVisible();
		this._interval = window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval);
	};

	/**
	 * Refreshes the element.
	 */
	AutoRefresh.prototype.refresh = function() {
		if (this._core.isVisible() === this._visible) {
			return;
		}

		this._visible = !this._visible;

		this._core.$element.toggleClass('owl-hidden', !this._visible);

		this._visible &amp;&amp; (this._core.invalidate('width') &amp;&amp; this._core.refresh());
	};

	/**
	 * Destroys the plugin.
	 */
	AutoRefresh.prototype.destroy = function() {
		var handler, property;

		window.clearInterval(this._interval);

		for (handler in this._handlers) {
			this._core.$element.off(handler, this._handlers[handler]);
		}
		for (property in Object.getOwnPropertyNames(this)) {
			typeof this[property] != 'function' &amp;&amp; (this[property] = null);
		}
	};

	$.fn.owlMyCarousel.Constructor.Plugins.AutoRefresh = AutoRefresh;

})(window.Zepto || window.jQuery, window, document);

/**
 * Lazy Plugin
 * @version 2.3.4
 * @author Bartosz Wojciechowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($, window, document, undefined) {

	/**
	 * Creates the lazy plugin.
	 * @class The Lazy Plugin
	 * @param {MyOwl} carousel - The Owl Carousel
	 */
	var Lazy = function(carousel) {

		/**
		 * Reference to the core.
		 * @protected
		 * @type {MyOwl}
		 */
		this._core = carousel;

		/**
		 * Already loaded items.
		 * @protected
		 * @type {Array.&lt;jQuery&gt;}
		 */
		this._loaded = [];

		/**
		 * Event handlers.
		 * @protected
		 * @type {Object}
		 */
		this._handlers = {
			'initialized.owl.carousel change.owl.carousel resized.owl.carousel': $.proxy(function(e) {
				if (!e.namespace) {
					return;
				}

				if (!this._core.settings || !this._core.settings.lazyLoad) {
					return;
				}

				if ((e.property &amp;&amp; e.property.name == 'position') || e.type == 'initialized') {
					var settings = this._core.settings,
						n = (settings.center &amp;&amp; Math.ceil(settings.items / 2) || settings.items),
						i = ((settings.center &amp;&amp; n * -1) || 0),
						position = (e.property &amp;&amp; e.property.value !== undefined ? e.property.value : this._core.current()) + i,
						clones = this._core.clones().length,
						load = $.proxy(function(i, v) { this.load(v) }, this);
					//TODO: Need documentation for this new option
					if (settings.lazyLoadEager &gt; 0) {
						n += settings.lazyLoadEager;
						// If the carousel is looping also preload images that are to the "left"
						if (settings.loop) {
              position -= settings.lazyLoadEager;
              n++;
            }
					}

					while (i++ &lt; n) {
						this.load(clones / 2 + this._core.relative(position));
						clones &amp;&amp; $.each(this._core.clones(this._core.relative(position)), load);
						position++;
					}
				}
			}, this)
		};

		// set the default options
		this._core.options = $.extend({}, Lazy.Defaults, this._core.options);

		// register event handler
		this._core.$element.on(this._handlers);
	};

	/**
	 * Default options.
	 * @public
	 */
	Lazy.Defaults = {
		lazyLoad: false,
		lazyLoadEager: 0
	};

	/**
	 * Loads all resources of an item at the specified position.
	 * @param {Number} position - The absolute position of the item.
	 * @protected
	 */
	Lazy.prototype.load = function(position) {
		var $item = this._core.$stage.children().eq(position),
			$elements = $item &amp;&amp; $item.find('.owl-lazy');

		if (!$elements || $.inArray($item.get(0), this._loaded) &gt; -1) {
			return;
		}

		$elements.each($.proxy(function(index, element) {
			var $element = $(element), image,
                url = (window.devicePixelRatio &gt; 1 &amp;&amp; $element.attr('data-src-retina')) || $element.attr('data-src') || $element.attr('data-srcset');

			this._core.trigger('load', { element: $element, url: url }, 'lazy');

			if ($element.is('img')) {
				$element.one('load.owl.lazy', $.proxy(function() {
					$element.css('opacity', 1);
					this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
				}, this)).attr('src', url);
            } else if ($element.is('source')) {
                $element.one('load.owl.lazy', $.proxy(function() {
                    this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
                }, this)).attr('srcset', url);
			} else {
				image = new Image();
				image.onload = $.proxy(function() {
					$element.css({
						'background-image': 'url("' + url + '")',
						'opacity': '1'
					});
					this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
				}, this);
				image.src = url;
			}
		}, this));

		this._loaded.push($item.get(0));
	};

	/**
	 * Destroys the plugin.
	 * @public
	 */
	Lazy.prototype.destroy = function() {
		var handler, property;

		for (handler in this.handlers) {
			this._core.$element.off(handler, this.handlers[handler]);
		}
		for (property in Object.getOwnPropertyNames(this)) {
			typeof this[property] != 'function' &amp;&amp; (this[property] = null);
		}
	};

	$.fn.owlMyCarousel.Constructor.Plugins.Lazy = Lazy;

})(window.Zepto || window.jQuery, window, document);

/**
 * AutoHeight Plugin
 * @version 2.3.4
 * @author Bartosz Wojciechowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($, window, document, undefined) {

	/**
	 * Creates the auto height plugin.
	 * @class The Auto Height Plugin
	 * @param {MyOwl} carousel - The Owl Carousel
	 */
	var AutoHeight = function(carousel) {
		/**
		 * Reference to the core.
		 * @protected
		 * @type {MyOwl}
		 */
		this._core = carousel;

		this._previousHeight = null;

		/**
		 * All event handlers.
		 * @protected
		 * @type {Object}
		 */
		this._handlers = {
			'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; this._core.settings.autoHeight) {
					this.update();
				}
			}, this),
			'changed.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; this._core.settings.autoHeight &amp;&amp; e.property.name === 'position'){
					this.update();
				}
			}, this),
			'loaded.owl.lazy': $.proxy(function(e) {
				if (e.namespace &amp;&amp; this._core.settings.autoHeight
					&amp;&amp; e.element.closest('.' + this._core.settings.itemClass).index() === this._core.current()) {
					this.update();
				}
			}, this)
		};

		// set default options
		this._core.options = $.extend({}, AutoHeight.Defaults, this._core.options);

		// register event handlers
		this._core.$element.on(this._handlers);
		this._intervalId = null;
		var refThis = this;

		// These changes have been taken from a PR by gavrochelegnou proposed in #1575
		// and have been made compatible with the latest jQuery version
		$(window).on('load', function() {
			if (refThis._core.settings.autoHeight) {
				refThis.update();
			}
		});

		// Autoresize the height of the carousel when window is resized
		// When carousel has images, the height is dependent on the width
		// and should also change on resize
		$(window).resize(function() {
			if (refThis._core.settings.autoHeight) {
				if (refThis._intervalId != null) {
					clearTimeout(refThis._intervalId);
				}

				refThis._intervalId = setTimeout(function() {
					refThis.update();
				}, 250);
			}
		});

	};

	/**
	 * Default options.
	 * @public
	 */
	AutoHeight.Defaults = {
		autoHeight: false,
		autoHeightClass: 'owl-height'
	};

	/**
	 * Updates the view.
	 */
	AutoHeight.prototype.update = function() {
		var start = this._core._current,
			end = start + this._core.settings.items,
			lazyLoadEnabled = this._core.settings.lazyLoad,
			visible = this._core.$stage.children().toArray().slice(start, end),
			heights = [],
			maxheight = 0;

		$.each(visible, function(index, item) {
			heights.push($(item).height());
		});

		maxheight = Math.max.apply(null, heights);

		if (maxheight &lt;= 1 &amp;&amp; lazyLoadEnabled &amp;&amp; this._previousHeight) {
			maxheight = this._previousHeight;
		}

		this._previousHeight = maxheight;

		this._core.$stage.parent()
			.height(maxheight)
			.addClass(this._core.settings.autoHeightClass);
	};

	AutoHeight.prototype.destroy = function() {
		var handler, property;

		for (handler in this._handlers) {
			this._core.$element.off(handler, this._handlers[handler]);
		}
		for (property in Object.getOwnPropertyNames(this)) {
			typeof this[property] !== 'function' &amp;&amp; (this[property] = null);
		}
	};

	$.fn.owlMyCarousel.Constructor.Plugins.AutoHeight = AutoHeight;

})(window.Zepto || window.jQuery, window, document);

/**
 * Video Plugin
 * @version 2.3.4
 * @author Bartosz Wojciechowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($, window, document, undefined) {

	/**
	 * Creates the video plugin.
	 * @class The Video Plugin
	 * @param {MyOwl} carousel - The Owl Carousel
	 */
	var Video = function(carousel) {
		/**
		 * Reference to the core.
		 * @protected
		 * @type {MyOwl}
		 */
		this._core = carousel;

		/**
		 * Cache all video URLs.
		 * @protected
		 * @type {Object}
		 */
		this._videos = {};

		/**
		 * Current playing item.
		 * @protected
		 * @type {jQuery}
		 */
		this._playing = null;

		/**
		 * All event handlers.
		 * @todo The cloned content removale is too late
		 * @protected
		 * @type {Object}
		 */
		this._handlers = {
			'initialized.owl.carousel': $.proxy(function(e) {
				if (e.namespace) {
					this._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] });
				}
			}, this),
			'resize.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; this._core.settings.video &amp;&amp; this.isInFullScreen()) {
					e.preventDefault();
				}
			}, this),
			'refreshed.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; this._core.is('resizing')) {
					this._core.$stage.find('.cloned .owl-video-frame').remove();
				}
			}, this),
			'changed.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; e.property.name === 'position' &amp;&amp; this._playing) {
					this.stop();
				}
			}, this),
			'prepared.owl.carousel': $.proxy(function(e) {
				if (!e.namespace) {
					return;
				}

				var $element = $(e.content).find('.owl-video');

				if ($element.length) {
					$element.css('display', 'none');
					this.fetch($element, $(e.content));
				}
			}, this)
		};

		// set default options
		this._core.options = $.extend({}, Video.Defaults, this._core.options);

		// register event handlers
		this._core.$element.on(this._handlers);

		this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e) {
			this.play(e);
		}, this));
	};

	/**
	 * Default options.
	 * @public
	 */
	Video.Defaults = {
		video: false,
		videoHeight: false,
		videoWidth: false
	};

	/**
	 * Gets the video ID and the type (YouTube/Vimeo/vzaar only).
	 * @protected
	 * @param {jQuery} target - The target containing the video data.
	 * @param {jQuery} item - The item containing the video.
	 */
	Video.prototype.fetch = function(target, item) {
			var type = (function() {
					if (target.attr('data-vimeo-id')) {
						return 'vimeo';
					} else if (target.attr('data-vzaar-id')) {
						return 'vzaar'
					} else {
						return 'youtube';
					}
				})(),
				id = target.attr('data-vimeo-id') || target.attr('data-youtube-id') || target.attr('data-vzaar-id'),
				width = target.attr('data-width') || this._core.settings.videoWidth,
				height = target.attr('data-height') || this._core.settings.videoHeight,
				url = target.attr('href');

		if (url) {

			/*
					Parses the id's out of the following urls (and probably more):
					https://www.youtube.com/watch?v=:id
					https://youtu.be/:id
					https://vimeo.com/:id
					https://vimeo.com/channels/:channel/:id
					https://vimeo.com/groups/:group/videos/:id
					https://app.vzaar.com/videos/:id

					Visual example: https://regexper.com/#(http%3A%7Chttps%3A%7C)%5C%2F%5C%2F(player.%7Cwww.%7Capp.)%3F(vimeo%5C.com%7Cyoutu(be%5C.com%7C%5C.be%7Cbe%5C.googleapis%5C.com)%7Cvzaar%5C.com)%5C%2F(video%5C%2F%7Cvideos%5C%2F%7Cembed%5C%2F%7Cchannels%5C%2F.%2B%5C%2F%7Cgroups%5C%2F.%2B%5C%2F%7Cwatch%5C%3Fv%3D%7Cv%5C%2F)%3F(%5BA-Za-z0-9._%25-%5D*)(%5C%26%5CS%2B)%3F
			*/

			id = url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&amp;\S+)?/);

			if (id[3].indexOf('youtu') &gt; -1) {
				type = 'youtube';
			} else if (id[3].indexOf('vimeo') &gt; -1) {
				type = 'vimeo';
			} else if (id[3].indexOf('vzaar') &gt; -1) {
				type = 'vzaar';
			} else {
				throw new Error('Video URL not supported.');
			}
			id = id[6];
		} else {
			throw new Error('Missing video URL.');
		}

		this._videos[url] = {
			type: type,
			id: id,
			width: width,
			height: height
		};

		item.attr('data-video', url);

		this.thumbnail(target, this._videos[url]);
	};

	/**
	 * Creates video thumbnail.
	 * @protected
	 * @param {jQuery} target - The target containing the video data.
	 * @param {Object} info - The video info object.
	 * @see `fetch`
	 */
	Video.prototype.thumbnail = function(target, video) {
		var tnLink,
			icon,
			path,
			dimensions = video.width &amp;&amp; video.height ? 'width:' + video.width + 'px;height:' + video.height + 'px;' : '',
			customTn = target.find('img'),
			srcType = 'src',
			lazyClass = '',
			settings = this._core.settings,
			create = function(path) {
				icon = '&lt;div class="owl-video-play-icon"&gt;&lt;/div&gt;';

				if (settings.lazyLoad) {
					tnLink = $('&lt;div/&gt;',{
						"class": 'owl-video-tn ' + lazyClass,
						"srcType": path
					});
				} else {
					tnLink = $( '&lt;div/&gt;', {
						"class": "owl-video-tn",
						"style": 'opacity:1;background-image:url(' + path + ')'
					});
				}
				target.after(tnLink);
				target.after(icon);
			};

		// wrap video content into owl-video-wrapper div
		target.wrap( $( '&lt;div/&gt;', {
			"class": "owl-video-wrapper",
			"style": dimensions
		}));

		if (this._core.settings.lazyLoad) {
			srcType = 'data-src';
			lazyClass = 'owl-lazy';
		}

		// custom thumbnail
		if (customTn.length) {
			create(customTn.attr(srcType));
			customTn.remove();
			return false;
		}

		if (video.type === 'youtube') {
			path = "//img.youtube.com/vi/" + video.id + "/hqdefault.jpg";
			create(path);
		} else if (video.type === 'vimeo') {
			$.ajax({
				type: 'GET',
				url: '//vimeo.com/api/v2/video/' + video.id + '.json',
				jsonp: 'callback',
				dataType: 'jsonp',
				success: function(data) {
					path = data[0].thumbnail_large;
					create(path);
				}
			});
		} else if (video.type === 'vzaar') {
			$.ajax({
				type: 'GET',
				url: '//vzaar.com/api/videos/' + video.id + '.json',
				jsonp: 'callback',
				dataType: 'jsonp',
				success: function(data) {
					path = data.framegrab_url;
					create(path);
				}
			});
		}
	};

	/**
	 * Stops the current video.
	 * @public
	 */
	Video.prototype.stop = function() {
		this._core.trigger('stop', null, 'video');
		this._playing.find('.owl-video-frame').remove();
		this._playing.removeClass('owl-video-playing');
		this._playing = null;
		this._core.leave('playing');
		this._core.trigger('stopped', null, 'video');
	};

	/**
	 * Starts the current video.
	 * @public
	 * @param {Event} event - The event arguments.
	 */
	Video.prototype.play = function(event) {
		var target = $(event.target),
			item = target.closest('.' + this._core.settings.itemClass),
			video = this._videos[item.attr('data-video')],
			width = video.width || '100%',
			height = video.height || this._core.$stage.height(),
			html,
			iframe;

		if (this._playing) {
			return;
		}

		this._core.enter('playing');
		this._core.trigger('play', null, 'video');

		item = this._core.items(this._core.relative(item.index()));

		this._core.reset(item.index());

		html = $( '&lt;iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen &gt;&lt;/iframe&gt;' );
		html.attr( 'height', height );
		html.attr( 'width', width );
		if (video.type === 'youtube') {
			html.attr( 'src', '//www.youtube.com/embed/' + video.id + '?autoplay=1&amp;rel=0&amp;v=' + video.id );
		} else if (video.type === 'vimeo') {
			html.attr( 'src', '//player.vimeo.com/video/' + video.id + '?autoplay=1' );
		} else if (video.type === 'vzaar') {
			html.attr( 'src', '//view.vzaar.com/' + video.id + '/player?autoplay=true' );
		}

		iframe = $(html).wrap( '&lt;div class="owl-video-frame" /&gt;' ).insertAfter(item.find('.owl-video'));

		this._playing = item.addClass('owl-video-playing');
	};

	/**
	 * Checks whether an video is currently in full screen mode or not.
	 * @todo Bad style because looks like a readonly method but changes members.
	 * @protected
	 * @returns {Boolean}
	 */
	Video.prototype.isInFullScreen = function() {
		var element = document.fullscreenElement || document.mozFullScreenElement ||
				document.webkitFullscreenElement;

		return element &amp;&amp; $(element).parent().hasClass('owl-video-frame');
	};

	/**
	 * Destroys the plugin.
	 */
	Video.prototype.destroy = function() {
		var handler, property;

		this._core.$element.off('click.owl.video');

		for (handler in this._handlers) {
			this._core.$element.off(handler, this._handlers[handler]);
		}
		for (property in Object.getOwnPropertyNames(this)) {
			typeof this[property] != 'function' &amp;&amp; (this[property] = null);
		}
	};

	$.fn.owlMyCarousel.Constructor.Plugins.Video = Video;

})(window.Zepto || window.jQuery, window, document);

/**
 * Animate Plugin
 * @version 2.3.4
 * @author Bartosz Wojciechowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($, window, document, undefined) {

	/**
	 * Creates the animate plugin.
	 * @class The Navigation Plugin
	 * @param {MyOwl} scope - The Owl Carousel
	 */
	var Animate = function(scope) {
		this.core = scope;
		this.core.options = $.extend({}, Animate.Defaults, this.core.options);
		this.swapping = true;
		this.previous = undefined;
		this.next = undefined;

		this.handlers = {
			'change.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; e.property.name == 'position') {
					this.previous = this.core.current();
					this.next = e.property.value;
				}
			}, this),
			'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e) {
				if (e.namespace) {
					this.swapping = e.type == 'translated';
				}
			}, this),
			'translate.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; this.swapping &amp;&amp; (this.core.options.animateOut || this.core.options.animateIn)) {
					this.swap();
				}
			}, this)
		};

		this.core.$element.on(this.handlers);
	};

	/**
	 * Default options.
	 * @public
	 */
	Animate.Defaults = {
		animateOut: false,
		animateIn: false
	};

	/**
	 * Toggles the animation classes whenever an translations starts.
	 * @protected
	 * @returns {Boolean|undefined}
	 */
	Animate.prototype.swap = function() {

		if (this.core.settings.items !== 1) {
			return;
		}

		if (!$.support.animation || !$.support.transition) {
			return;
		}

		this.core.speed(0);

		var left,
			clear = $.proxy(this.clear, this),
			previous = this.core.$stage.children().eq(this.previous),
			next = this.core.$stage.children().eq(this.next),
			incoming = this.core.settings.animateIn,
			outgoing = this.core.settings.animateOut;

		if (this.core.current() === this.previous) {
			return;
		}

		if (outgoing) {
			left = this.core.coordinates(this.previous) - this.core.coordinates(this.next);
			previous.one($.support.animation.end, clear)
				.css( { 'left': left + 'px' } )
				.addClass('animated owl-animated-out')
				.addClass(outgoing);
		}

		if (incoming) {
			next.one($.support.animation.end, clear)
				.addClass('animated owl-animated-in')
				.addClass(incoming);
		}
	};

	Animate.prototype.clear = function(e) {
		$(e.target).css( { 'left': '' } )
			.removeClass('animated owl-animated-out owl-animated-in')
			.removeClass(this.core.settings.animateIn)
			.removeClass(this.core.settings.animateOut);
		this.core.onTransitionEnd();
	};

	/**
	 * Destroys the plugin.
	 * @public
	 */
	Animate.prototype.destroy = function() {
		var handler, property;

		for (handler in this.handlers) {
			this.core.$element.off(handler, this.handlers[handler]);
		}
		for (property in Object.getOwnPropertyNames(this)) {
			typeof this[property] != 'function' &amp;&amp; (this[property] = null);
		}
	};

	$.fn.owlMyCarousel.Constructor.Plugins.Animate = Animate;

})(window.Zepto || window.jQuery, window, document);

/**
 * Autoplay Plugin
 * @version 2.3.4
 * @author Bartosz Wojciechowski
 * @author Artus Kolanowski
 * @author David Deutsch
 * @author Tom De CaluwГ©
 * @license The MIT License (MIT)
 */
;(function($, window, document, undefined) {

	/**
	 * Creates the autoplay plugin.
	 * @class The Autoplay Plugin
	 * @param {MyOwl} scope - The Owl Carousel
	 */
	var Autoplay = function(carousel) {
		/**
		 * Reference to the core.
		 * @protected
		 * @type {MyOwl}
		 */
		this._core = carousel;

		/**
		 * The autoplay timeout id.
		 * @type {Number}
		 */
		this._call = null;

		/**
		 * Depending on the state of the plugin, this variable contains either
		 * the start time of the timer or the current timer value if it's
		 * paused. Since we start in a paused state we initialize the timer
		 * value.
		 * @type {Number}
		 */
		this._time = 0;

		/**
		 * Stores the timeout currently used.
		 * @type {Number}
		 */
		this._timeout = 0;

		/**
		 * Indicates whenever the autoplay is paused.
		 * @type {Boolean}
		 */
		this._paused = true;

		/**
		 * All event handlers.
		 * @protected
		 * @type {Object}
		 */
		this._handlers = {
			'changed.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; e.property.name === 'settings') {
					if (this._core.settings.autoplay) {
						this.play();
					} else {
						this.stop();
					}
				} else if (e.namespace &amp;&amp; e.property.name === 'position' &amp;&amp; this._paused) {
					// Reset the timer. This code is triggered when the position
					// of the carousel was changed through user interaction.
					this._time = 0;
				}
			}, this),
			'initialized.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; this._core.settings.autoplay) {
					this.play();
				}
			}, this),
			'play.owl.autoplay': $.proxy(function(e, t, s) {
				if (e.namespace) {
					this.play(t, s);
				}
			}, this),
			'stop.owl.autoplay': $.proxy(function(e) {
				if (e.namespace) {
					this.stop();
				}
			}, this),
			'mouseover.owl.autoplay': $.proxy(function() {
				if (this._core.settings.autoplayHoverPause &amp;&amp; this._core.is('rotating')) {
					this.pause();
				}
			}, this),
			'mouseleave.owl.autoplay': $.proxy(function() {
				if (this._core.settings.autoplayHoverPause &amp;&amp; this._core.is('rotating')) {
					this.play();
				}
			}, this),
			'touchstart.owl.core': $.proxy(function() {
				if (this._core.settings.autoplayHoverPause &amp;&amp; this._core.is('rotating')) {
					this.pause();
				}
			}, this),
			'touchend.owl.core': $.proxy(function() {
				if (this._core.settings.autoplayHoverPause) {
					this.play();
				}
			}, this)
		};

		// register event handlers
		this._core.$element.on(this._handlers);

		// set default options
		this._core.options = $.extend({}, Autoplay.Defaults, this._core.options);
	};

	/**
	 * Default options.
	 * @public
	 */
	Autoplay.Defaults = {
		autoplay: false,
		autoplayTimeout: 5000,
		autoplayHoverPause: false,
		autoplaySpeed: false
	};

	/**
	 * Transition to the next slide and set a timeout for the next transition.
	 * @private
	 * @param {Number} [speed] - The animation speed for the animations.
	 */
	Autoplay.prototype._next = function(speed) {
		this._call = window.setTimeout(
			$.proxy(this._next, this, speed),
			this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read()
		);

		if (this._core.is('interacting') || document.hidden) {
			return;
		}
		this._core.next(speed || this._core.settings.autoplaySpeed);
	}

	/**
	 * Reads the current timer value when the timer is playing.
	 * @public
	 */
	Autoplay.prototype.read = function() {
		return new Date().getTime() - this._time;
	};

	/**
	 * Starts the autoplay.
	 * @public
	 * @param {Number} [timeout] - The interval before the next animation starts.
	 * @param {Number} [speed] - The animation speed for the animations.
	 */
	Autoplay.prototype.play = function(timeout, speed) {
		var elapsed;

		if (!this._core.is('rotating')) {
			this._core.enter('rotating');
		}

		timeout = timeout || this._core.settings.autoplayTimeout;

		// Calculate the elapsed time since the last transition. If the carousel
		// wasn't playing this calculation will yield zero.
		elapsed = Math.min(this._time % (this._timeout || timeout), timeout);

		if (this._paused) {
			// Start the clock.
			this._time = this.read();
			this._paused = false;
		} else {
			// Clear the active timeout to allow replacement.
			window.clearTimeout(this._call);
		}

		// Adjust the origin of the timer to match the new timeout value.
		this._time += this.read() % timeout - elapsed;

		this._timeout = timeout;
		this._call = window.setTimeout($.proxy(this._next, this, speed), timeout - elapsed);
	};

	/**
	 * Stops the autoplay.
	 * @public
	 */
	Autoplay.prototype.stop = function() {
		if (this._core.is('rotating')) {
			// Reset the clock.
			this._time = 0;
			this._paused = true;

			window.clearTimeout(this._call);
			this._core.leave('rotating');
		}
	};

	/**
	 * Pauses the autoplay.
	 * @public
	 */
	Autoplay.prototype.pause = function() {
		if (this._core.is('rotating') &amp;&amp; !this._paused) {
			// Pause the clock.
			this._time = this.read();
			this._paused = true;

			window.clearTimeout(this._call);
		}
	};

	/**
	 * Destroys the plugin.
	 */
	Autoplay.prototype.destroy = function() {
		var handler, property;

		this.stop();

		for (handler in this._handlers) {
			this._core.$element.off(handler, this._handlers[handler]);
		}
		for (property in Object.getOwnPropertyNames(this)) {
			typeof this[property] != 'function' &amp;&amp; (this[property] = null);
		}
	};

	$.fn.owlMyCarousel.Constructor.Plugins.autoplay = Autoplay;

})(window.Zepto || window.jQuery, window, document);

/**
 * Navigation Plugin
 * @version 2.3.4
 * @author Artus Kolanowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($, window, document, undefined) {
	'use strict';

	/**
	 * Creates the navigation plugin.
	 * @class The Navigation Plugin
	 * @param {MyOwl} carousel - The Owl Carousel.
	 */
	var Navigation = function(carousel) {
		/**
		 * Reference to the core.
		 * @protected
		 * @type {MyOwl}
		 */
		this._core = carousel;

		/**
		 * Indicates whether the plugin is initialized or not.
		 * @protected
		 * @type {Boolean}
		 */
		this._initialized = false;

		/**
		 * The current paging indexes.
		 * @protected
		 * @type {Array}
		 */
		this._pages = [];

		/**
		 * All DOM elements of the user interface.
		 * @protected
		 * @type {Object}
		 */
		this._controls = {};

		/**
		 * Markup for an indicator.
		 * @protected
		 * @type {Array.&lt;String&gt;}
		 */
		this._templates = [];

		/**
		 * The carousel element.
		 * @type {jQuery}
		 */
		this.$element = this._core.$element;

		/**
		 * Overridden methods of the carousel.
		 * @protected
		 * @type {Object}
		 */
		this._overrides = {
			next: this._core.next,
			prev: this._core.prev,
			to: this._core.to
		};

		/**
		 * All event handlers.
		 * @protected
		 * @type {Object}
		 */
		this._handlers = {
			'prepared.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; this._core.settings.dotsData) {
					this._templates.push('&lt;div class="' + this._core.settings.dotClass + '"&gt;' +
						$(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '&lt;/div&gt;');
				}
			}, this),
			'added.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; this._core.settings.dotsData) {
					this._templates.splice(e.position, 0, this._templates.pop());
				}
			}, this),
			'remove.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; this._core.settings.dotsData) {
					this._templates.splice(e.position, 1);
				}
			}, this),
			'changed.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; e.property.name == 'position') {
					this.draw();
				}
			}, this),
			'initialized.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; !this._initialized) {
					this._core.trigger('initialize', null, 'navigation');
					this.initialize();
					this.update();
					this.draw();
					this._initialized = true;
					this._core.trigger('initialized', null, 'navigation');
				}
			}, this),
			'refreshed.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; this._initialized) {
					this._core.trigger('refresh', null, 'navigation');
					this.update();
					this.draw();
					this._core.trigger('refreshed', null, 'navigation');
				}
			}, this)
		};

		// set default options
		this._core.options = $.extend({}, Navigation.Defaults, this._core.options);

		// register event handlers
		this.$element.on(this._handlers);
	};

	/**
	 * Default options.
	 * @public
	 * @todo Rename `slideBy` to `navBy`
	 */
	Navigation.Defaults = {
		nav: false,
		navText: [
			'&lt;span aria-label="' + 'Previous' + '"&gt;&amp;#x2039;&lt;/span&gt;',
			'&lt;span aria-label="' + 'Next' + '"&gt;&amp;#x203a;&lt;/span&gt;'
		],
		navSpeed: false,
		navElement: 'button type="button" role="presentation"',
		navContainer: false,
		navContainerClass: 'owl-nav',
		navClass: [
			'owl-prev',
			'owl-next'
		],
		slideBy: 1,
		dotClass: 'owl-dot',
		dotsClass: 'owl-dots',
		dots: true,
		dotsEach: false,
		dotsData: false,
		dotsSpeed: false,
		dotsContainer: false
	};

	/**
	 * Initializes the layout of the plugin and extends the carousel.
	 * @protected
	 */
	Navigation.prototype.initialize = function() {
		var override,
			settings = this._core.settings;

		// create DOM structure for relative navigation
		this._controls.$relative = (settings.navContainer ? $(settings.navContainer)
			: $('&lt;div&gt;').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled');

		this._controls.$previous = $('&lt;' + settings.navElement + '&gt;')
			.addClass(settings.navClass[0])
			.html(settings.navText[0])
			.prependTo(this._controls.$relative)
			.on('click', $.proxy(function(e) {
				this.prev(settings.navSpeed);
			}, this));
		this._controls.$next = $('&lt;' + settings.navElement + '&gt;')
			.addClass(settings.navClass[1])
			.html(settings.navText[1])
			.appendTo(this._controls.$relative)
			.on('click', $.proxy(function(e) {
				this.next(settings.navSpeed);
			}, this));

		// create DOM structure for absolute navigation
		if (!settings.dotsData) {
			this._templates = [ $('&lt;button role="button"&gt;')
				.addClass(settings.dotClass)
				.append($('&lt;span&gt;'))
				.prop('outerHTML') ];
		}

		this._controls.$absolute = (settings.dotsContainer ? $(settings.dotsContainer)
			: $('&lt;div&gt;').addClass(settings.dotsClass).appendTo(this.$element)).addClass('disabled');

		this._controls.$absolute.on('click', 'button', $.proxy(function(e) {
			var index = $(e.target).parent().is(this._controls.$absolute)
				? $(e.target).index() : $(e.target).parent().index();

			e.preventDefault();

			this.to(index, settings.dotsSpeed);
		}, this));

		/*$el.on('focusin', function() {
			$(document).off(".carousel");

			$(document).on('keydown.carousel', function(e) {
				if(e.keyCode == 37) {
					$el.trigger('prev.owl')
				}
				if(e.keyCode == 39) {
					$el.trigger('next.owl')
				}
			});
		});*/

		// override public methods of the carousel
		for (override in this._overrides) {
			this._core[override] = $.proxy(this[override], this);
		}
	};

	/**
	 * Destroys the plugin.
	 * @protected
	 */
	Navigation.prototype.destroy = function() {
		var handler, control, property, override, settings;
		settings = this._core.settings;

		for (handler in this._handlers) {
			this.$element.off(handler, this._handlers[handler]);
		}
		for (control in this._controls) {
			if (control === '$relative' &amp;&amp; settings.navContainer) {
				this._controls[control].html('');
			} else {
				this._controls[control].remove();
			}
		}
		for (override in this.overides) {
			this._core[override] = this._overrides[override];
		}
		for (property in Object.getOwnPropertyNames(this)) {
			typeof this[property] != 'function' &amp;&amp; (this[property] = null);
		}
	};

	/**
	 * Updates the internal state.
	 * @protected
	 */
	Navigation.prototype.update = function() {
		var i, j, k,
			lower = this._core.clones().length / 2,
			upper = lower + this._core.items().length,
			maximum = this._core.maximum(true),
			settings = this._core.settings,
			size = settings.center || settings.autoWidth || settings.dotsData
				? 1 : settings.dotsEach || settings.items;

		if (settings.slideBy !== 'page') {
			settings.slideBy = Math.min(settings.slideBy, settings.items);
		}

		if (settings.dots || settings.slideBy == 'page') {
			this._pages = [];

			for (i = lower, j = 0, k = 0; i &lt; upper; i++) {
				if (j &gt;= size || j === 0) {
					this._pages.push({
						start: Math.min(maximum, i - lower),
						end: i - lower + size - 1
					});
					if (Math.min(maximum, i - lower) === maximum) {
						break;
					}
					j = 0, ++k;
				}
				j += this._core.mergers(this._core.relative(i));
			}
		}
	};

	/**
	 * Draws the user interface.
	 * @todo The option `dotsData` wont work.
	 * @protected
	 */
	Navigation.prototype.draw = function() {
		var difference,
			settings = this._core.settings,
			disabled = this._core.items().length &lt;= settings.items,
			index = this._core.relative(this._core.current()),
			loop = settings.loop || settings.rewind;

		this._controls.$relative.toggleClass('disabled', !settings.nav || disabled);

		if (settings.nav) {
			this._controls.$previous.toggleClass('disabled', !loop &amp;&amp; index &lt;= this._core.minimum(true));
			this._controls.$next.toggleClass('disabled', !loop &amp;&amp; index &gt;= this._core.maximum(true));
		}

		this._controls.$absolute.toggleClass('disabled', !settings.dots || disabled);

		if (settings.dots) {
			difference = this._pages.length - this._controls.$absolute.children().length;

			if (settings.dotsData &amp;&amp; difference !== 0) {
				this._controls.$absolute.html(this._templates.join(''));
			} else if (difference &gt; 0) {
				this._controls.$absolute.append(new Array(difference + 1).join(this._templates[0]));
			} else if (difference &lt; 0) {
				this._controls.$absolute.children().slice(difference).remove();
			}

			this._controls.$absolute.find('.active').removeClass('active');
			this._controls.$absolute.children().eq($.inArray(this.current(), this._pages)).addClass('active');
		}
	};

	/**
	 * Extends event data.
	 * @protected
	 * @param {Event} event - The event object which gets thrown.
	 */
	Navigation.prototype.onTrigger = function(event) {
		var settings = this._core.settings;

		event.page = {
			index: $.inArray(this.current(), this._pages),
			count: this._pages.length,
			size: settings &amp;&amp; (settings.center || settings.autoWidth || settings.dotsData
				? 1 : settings.dotsEach || settings.items)
		};
	};

	/**
	 * Gets the current page position of the carousel.
	 * @protected
	 * @returns {Number}
	 */
	Navigation.prototype.current = function() {
		var current = this._core.relative(this._core.current());
		return $.grep(this._pages, $.proxy(function(page, index) {
			return page.start &lt;= current &amp;&amp; page.end &gt;= current;
		}, this)).pop();
	};

	/**
	 * Gets the current succesor/predecessor position.
	 * @protected
	 * @returns {Number}
	 */
	Navigation.prototype.getPosition = function(successor) {
		var position, length,
			settings = this._core.settings;

		if (settings.slideBy == 'page') {
			position = $.inArray(this.current(), this._pages);
			length = this._pages.length;
			successor ? ++position : --position;
			position = this._pages[((position % length) + length) % length].start;
		} else {
			position = this._core.relative(this._core.current());
			length = this._core.items().length;
			successor ? position += settings.slideBy : position -= settings.slideBy;
		}

		return position;
	};

	/**
	 * Slides to the next item or page.
	 * @public
	 * @param {Number} [speed=false] - The time in milliseconds for the transition.
	 */
	Navigation.prototype.next = function(speed) {
		$.proxy(this._overrides.to, this._core)(this.getPosition(true), speed);
	};

	/**
	 * Slides to the previous item or page.
	 * @public
	 * @param {Number} [speed=false] - The time in milliseconds for the transition.
	 */
	Navigation.prototype.prev = function(speed) {
		$.proxy(this._overrides.to, this._core)(this.getPosition(false), speed);
	};

	/**
	 * Slides to the specified item or page.
	 * @public
	 * @param {Number} position - The position of the item or page.
	 * @param {Number} [speed] - The time in milliseconds for the transition.
	 * @param {Boolean} [standard=false] - Whether to use the standard behaviour or not.
	 */
	Navigation.prototype.to = function(position, speed, standard) {
		var length;

		if (!standard &amp;&amp; this._pages.length) {
			length = this._pages.length;
			$.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed);
		} else {
			$.proxy(this._overrides.to, this._core)(position, speed);
		}
	};

	$.fn.owlMyCarousel.Constructor.Plugins.Navigation = Navigation;

})(window.Zepto || window.jQuery, window, document);

/**
 * Hash Plugin
 * @version 2.3.4
 * @author Artus Kolanowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($, window, document, undefined) {
	'use strict';

	/**
	 * Creates the hash plugin.
	 * @class The Hash Plugin
	 * @param {MyOwl} carousel - The Owl Carousel
	 */
	var Hash = function(carousel) {
		/**
		 * Reference to the core.
		 * @protected
		 * @type {MyOwl}
		 */
		this._core = carousel;

		/**
		 * Hash index for the items.
		 * @protected
		 * @type {Object}
		 */
		this._hashes = {};

		/**
		 * The carousel element.
		 * @type {jQuery}
		 */
		this.$element = this._core.$element;

		/**
		 * All event handlers.
		 * @protected
		 * @type {Object}
		 */
		this._handlers = {
			'initialized.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; this._core.settings.startPosition === 'URLHash') {
					$(window).trigger('hashchange.owl.navigation');
				}
			}, this),
			'prepared.owl.carousel': $.proxy(function(e) {
				if (e.namespace) {
					var hash = $(e.content).find('[data-hash]').addBack('[data-hash]').attr('data-hash');

					if (!hash) {
						return;
					}

					this._hashes[hash] = e.content;
				}
			}, this),
			'changed.owl.carousel': $.proxy(function(e) {
				if (e.namespace &amp;&amp; e.property.name === 'position') {
					var current = this._core.items(this._core.relative(this._core.current())),
						hash = $.map(this._hashes, function(item, hash) {
							return item === current ? hash : null;
						}).join();

					if (!hash || window.location.hash.slice(1) === hash) {
						return;
					}

					window.location.hash = hash;
				}
			}, this)
		};

		// set default options
		this._core.options = $.extend({}, Hash.Defaults, this._core.options);

		// register the event handlers
		this.$element.on(this._handlers);

		// register event listener for hash navigation
		$(window).on('hashchange.owl.navigation', $.proxy(function(e) {
			var hash = window.location.hash.substring(1),
				items = this._core.$stage.children(),
				position = this._hashes[hash] &amp;&amp; items.index(this._hashes[hash]);

			if (position === undefined || position === this._core.current()) {
				return;
			}

			this._core.to(this._core.relative(position), false, true);
		}, this));
	};

	/**
	 * Default options.
	 * @public
	 */
	Hash.Defaults = {
		URLhashListener: false
	};

	/**
	 * Destroys the plugin.
	 * @public
	 */
	Hash.prototype.destroy = function() {
		var handler, property;

		$(window).off('hashchange.owl.navigation');

		for (handler in this._handlers) {
			this._core.$element.off(handler, this._handlers[handler]);
		}
		for (property in Object.getOwnPropertyNames(this)) {
			typeof this[property] != 'function' &amp;&amp; (this[property] = null);
		}
	};

	$.fn.owlMyCarousel.Constructor.Plugins.Hash = Hash;

})(window.Zepto || window.jQuery, window, document);

/**
 * Support Plugin
 *
 * @version 2.3.4
 * @author Vivid Planet Software GmbH
 * @author Artus Kolanowski
 * @author David Deutsch
 * @license The MIT License (MIT)
 */
;(function($, window, document, undefined) {

	var style = $('&lt;support&gt;').get(0).style,
		prefixes = 'Webkit Moz O ms'.split(' '),
		events = {
			transition: {
				end: {
					WebkitTransition: 'webkitTransitionEnd',
					MozTransition: 'transitionend',
					OTransition: 'oTransitionEnd',
					transition: 'transitionend'
				}
			},
			animation: {
				end: {
					WebkitAnimation: 'webkitAnimationEnd',
					MozAnimation: 'animationend',
					OAnimation: 'oAnimationEnd',
					animation: 'animationend'
				}
			}
		},
		tests = {
			csstransforms: function() {
				return !!test('transform');
			},
			csstransforms3d: function() {
				return !!test('perspective');
			},
			csstransitions: function() {
				return !!test('transition');
			},
			cssanimations: function() {
				return !!test('animation');
			}
		};

	function test(property, prefixed) {
		var result = false,
			upper = property.charAt(0).toUpperCase() + property.slice(1);

		$.each((property + ' ' + prefixes.join(upper + ' ') + upper).split(' '), function(i, property) {
			if (style[property] !== undefined) {
				result = prefixed ? property : true;
				return false;
			}
		});

		return result;
	}

	function prefixed(property) {
		return test(property, true);
	}

	if (tests.csstransitions()) {
		/* jshint -W053 */
		$.support.transition = new String(prefixed('transition'))
		$.support.transition.end = events.transition.end[ $.support.transition ];
	}

	if (tests.cssanimations()) {
		/* jshint -W053 */
		$.support.animation = new String(prefixed('animation'))
		$.support.animation.end = events.animation.end[ $.support.animation ];
	}

	if (tests.csstransforms()) {
		/* jshint -W053 */
		$.support.transform = new String(prefixed('transform'));
		$.support.transform3d = tests.csstransforms3d();
	}

})(window.Zepto || window.jQuery, window, document);
 
var InCartModule = (function() {
	return {
		pluginInCartText: 'Р’ РєРѕСЂР·РёРЅРµ',
		init: function() { 

			if (typeof locale != 'undefined' &amp;&amp; locale.pluginInCartText) {
				InCartModule.pluginInCartText = locale.pluginInCartText;
			}

			var initialBuyButton = $('.product-wrapper:first .addToCart').text();
			if (typeof initialBuyButton === "undefined" || initialBuyButton === null || !initialBuyButton) {
				initialBuyButton = $('.property-form:first .addToCart').text();
			}

			$('.deleteItemFromCart').each(function(index,element) {
				$('.addToCart[data-item-id='+$(this).data('delete-item-id')+']').text(InCartModule.pluginInCartText).addClass('alreadyInCart');
			});

			$('body').on('click', '.addToCart', function() {
				$(this).text(InCartModule.pluginInCartText).addClass('alreadyInCart');
			});

			$('body').on('click', '.deleteItemFromCart', function() {
				$('.addToCart[data-item-id='+$(this).data('delete-item-id')+']').text(initialBuyButton).removeClass('alreadyInCart');
			});
		},
	};
})();
$(document).ready(function() {
	InCartModule.init();
}); 
jQuery(document).ready(function() {

   if($(".mg-scrollTop")){
   var e = $(".mg-scrollTop");
    var speed = 700;
    
    e.click(function () {
      $("html:not(:animated), body:not(:animated)").animate({scrollTop: 0}, speed);
      return false; //РІР°Р¶РЅРѕ!
    });
    //РїРѕСЏРІР»РµРЅРёРµ
    function show_scrollTop() {
      ($(window).scrollTop() &gt; 200) ? e.fadeIn(600) : e.hide();
    }
    $(window).scroll(function () {
      show_scrollTop();
    });
    show_scrollTop();
	}

});
 
!function(e,t){"object"==typeof exports&amp;&amp;"undefined"!=typeof module?module.exports=t():"function"==typeof define&amp;&amp;define.amd?define(t):(e=e||self).Swiper=t()}(this,function(){"use strict";var f="undefined"==typeof document?{body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},location:{hash:""}}:document,ee="undefined"==typeof window?{document:f,navigator:{userAgent:""},location:{},history:{},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){}}:window,l=function(e){for(var t=0;t&lt;e.length;t+=1)this[t]=e[t];return this.length=e.length,this};function I(e,t){var a=[],i=0;if(e&amp;&amp;!t&amp;&amp;e instanceof l)return e;if(e)if("string"==typeof e){var s,r,n=e.trim();if(0&lt;=n.indexOf("&lt;")&amp;&amp;0&lt;=n.indexOf("&gt;")){var o="div";for(0===n.indexOf("&lt;li")&amp;&amp;(o="ul"),0===n.indexOf("&lt;tr")&amp;&amp;(o="tbody"),0!==n.indexOf("&lt;td")&amp;&amp;0!==n.indexOf("&lt;th")||(o="tr"),0===n.indexOf("&lt;tbody")&amp;&amp;(o="table"),0===n.indexOf("&lt;option")&amp;&amp;(o="select"),(r=f.createElement(o)).innerHTML=n,i=0;i&lt;r.childNodes.length;i+=1)a.push(r.childNodes[i])}else for(s=t||"#"!==e[0]||e.match(/[ .&lt;&gt;:~]/)?(t||f).querySelectorAll(e.trim()):[f.getElementById(e.trim().split("#")[1])],i=0;i&lt;s.length;i+=1)s[i]&amp;&amp;a.push(s[i])}else if(e.nodeType||e===ee||e===f)a.push(e);else if(0&lt;e.length&amp;&amp;e[0].nodeType)for(i=0;i&lt;e.length;i+=1)a.push(e[i]);return new l(a)}function r(e){for(var t=[],a=0;a&lt;e.length;a+=1)-1===t.indexOf(e[a])&amp;&amp;t.push(e[a]);return t}I.fn=l.prototype,I.Class=l,I.Dom7=l;var t={addClass:function(e){if(void 0===e)return this;for(var t=e.split(" "),a=0;a&lt;t.length;a+=1)for(var i=0;i&lt;this.length;i+=1)void 0!==this[i]&amp;&amp;void 0!==this[i].classList&amp;&amp;this[i].classList.add(t[a]);return this},removeClass:function(e){for(var t=e.split(" "),a=0;a&lt;t.length;a+=1)for(var i=0;i&lt;this.length;i+=1)void 0!==this[i]&amp;&amp;void 0!==this[i].classList&amp;&amp;this[i].classList.remove(t[a]);return this},hasClass:function(e){return!!this[0]&amp;&amp;this[0].classList.contains(e)},toggleClass:function(e){for(var t=e.split(" "),a=0;a&lt;t.length;a+=1)for(var i=0;i&lt;this.length;i+=1)void 0!==this[i]&amp;&amp;void 0!==this[i].classList&amp;&amp;this[i].classList.toggle(t[a]);return this},attr:function(e,t){var a=arguments;if(1===arguments.length&amp;&amp;"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var i=0;i&lt;this.length;i+=1)if(2===a.length)this[i].setAttribute(e,t);else for(var s in e)this[i][s]=e[s],this[i].setAttribute(s,e[s]);return this},removeAttr:function(e){for(var t=0;t&lt;this.length;t+=1)this[t].removeAttribute(e);return this},data:function(e,t){var a;if(void 0!==t){for(var i=0;i&lt;this.length;i+=1)(a=this[i]).dom7ElementDataStorage||(a.dom7ElementDataStorage={}),a.dom7ElementDataStorage[e]=t;return this}if(a=this[0])return a.dom7ElementDataStorage&amp;&amp;e in a.dom7ElementDataStorage?a.dom7ElementDataStorage[e]:a.getAttribute("data-"+e)||void 0},transform:function(e){for(var t=0;t&lt;this.length;t+=1){var a=this[t].style;a.webkitTransform=e,a.transform=e}return this},transition:function(e){"string"!=typeof e&amp;&amp;(e+="ms");for(var t=0;t&lt;this.length;t+=1){var a=this[t].style;a.webkitTransitionDuration=e,a.transitionDuration=e}return this},on:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a=e[0],r=e[1],n=e[2],i=e[3];function s(e){var t=e.target;if(t){var a=e.target.dom7EventData||[];if(a.indexOf(e)&lt;0&amp;&amp;a.unshift(e),I(t).is(r))n.apply(t,a);else for(var i=I(t).parents(),s=0;s&lt;i.length;s+=1)I(i[s]).is(r)&amp;&amp;n.apply(i[s],a)}}function o(e){var t=e&amp;&amp;e.target&amp;&amp;e.target.dom7EventData||[];t.indexOf(e)&lt;0&amp;&amp;t.unshift(e),n.apply(this,t)}"function"==typeof e[1]&amp;&amp;(a=e[0],n=e[1],i=e[2],r=void 0),i=i||!1;for(var l,d=a.split(" "),p=0;p&lt;this.length;p+=1){var c=this[p];if(r)for(l=0;l&lt;d.length;l+=1){var u=d[l];c.dom7LiveListeners||(c.dom7LiveListeners={}),c.dom7LiveListeners[u]||(c.dom7LiveListeners[u]=[]),c.dom7LiveListeners[u].push({listener:n,proxyListener:s}),c.addEventListener(u,s,i)}else for(l=0;l&lt;d.length;l+=1){var h=d[l];c.dom7Listeners||(c.dom7Listeners={}),c.dom7Listeners[h]||(c.dom7Listeners[h]=[]),c.dom7Listeners[h].push({listener:n,proxyListener:o}),c.addEventListener(h,o,i)}}return this},off:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a=e[0],i=e[1],s=e[2],r=e[3];"function"==typeof e[1]&amp;&amp;(a=e[0],s=e[1],r=e[2],i=void 0),r=r||!1;for(var n=a.split(" "),o=0;o&lt;n.length;o+=1)for(var l=n[o],d=0;d&lt;this.length;d+=1){var p=this[d],c=void 0;if(!i&amp;&amp;p.dom7Listeners?c=p.dom7Listeners[l]:i&amp;&amp;p.dom7LiveListeners&amp;&amp;(c=p.dom7LiveListeners[l]),c&amp;&amp;c.length)for(var u=c.length-1;0&lt;=u;--u){var h=c[u];(s&amp;&amp;h.listener===s||s&amp;&amp;h.listener&amp;&amp;h.listener.dom7proxy&amp;&amp;h.listener.dom7proxy===s||!s)&amp;&amp;(p.removeEventListener(l,h.proxyListener,r),c.splice(u,1))}}return this},trigger:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var a=e[0].split(" "),i=e[1],s=0;s&lt;a.length;s+=1)for(var r=a[s],n=0;n&lt;this.length;n+=1){var o=this[n],l=void 0;try{l=new ee.CustomEvent(r,{detail:i,bubbles:!0,cancelable:!0})}catch(e){(l=f.createEvent("Event")).initEvent(r,!0,!0),l.detail=i}o.dom7EventData=e.filter(function(e,t){return 0&lt;t}),o.dispatchEvent(l),o.dom7EventData=[],delete o.dom7EventData}return this},transitionEnd:function(t){var a,i=["webkitTransitionEnd","transitionend"],s=this;function r(e){if(e.target===this)for(t.call(this,e),a=0;a&lt;i.length;a+=1)s.off(i[a],r)}if(t)for(a=0;a&lt;i.length;a+=1)s.on(i[a],r);return this},outerWidth:function(e){if(0&lt;this.length){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(0&lt;this.length){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},offset:function(){if(0&lt;this.length){var e=this[0],t=e.getBoundingClientRect(),a=f.body,i=e.clientTop||a.clientTop||0,s=e.clientLeft||a.clientLeft||0,r=e===ee?ee.scrollY:e.scrollTop,n=e===ee?ee.scrollX:e.scrollLeft;return{top:t.top+r-i,left:t.left+n-s}}return null},css:function(e,t){var a;if(1===arguments.length){if("string"!=typeof e){for(a=0;a&lt;this.length;a+=1)for(var i in e)this[a].style[i]=e[i];return this}if(this[0])return ee.getComputedStyle(this[0],null).getPropertyValue(e)}if(2!==arguments.length||"string"!=typeof e)return this;for(a=0;a&lt;this.length;a+=1)this[a].style[e]=t;return this},each:function(e){if(!e)return this;for(var t=0;t&lt;this.length;t+=1)if(!1===e.call(this[t],t,this[t]))return this;return this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:void 0;for(var t=0;t&lt;this.length;t+=1)this[t].innerHTML=e;return this},text:function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(var t=0;t&lt;this.length;t+=1)this[t].textContent=e;return this},is:function(e){var t,a,i=this[0];if(!i||void 0===e)return!1;if("string"==typeof e){if(i.matches)return i.matches(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);for(t=I(e),a=0;a&lt;t.length;a+=1)if(t[a]===i)return!0;return!1}if(e===f)return i===f;if(e===ee)return i===ee;if(e.nodeType||e instanceof l){for(t=e.nodeType?[e]:e,a=0;a&lt;t.length;a+=1)if(t[a]===i)return!0;return!1}return!1},index:function(){var e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&amp;&amp;(e+=1);return e}},eq:function(e){if(void 0===e)return this;var t,a=this.length;return new l(a-1&lt;e?[]:e&lt;0?(t=a+e)&lt;0?[]:[this[t]]:[this[e]])},append:function(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];for(var i=0;i&lt;t.length;i+=1){e=t[i];for(var s=0;s&lt;this.length;s+=1)if("string"==typeof e){var r=f.createElement("div");for(r.innerHTML=e;r.firstChild;)this[s].appendChild(r.firstChild)}else if(e instanceof l)for(var n=0;n&lt;e.length;n+=1)this[s].appendChild(e[n]);else this[s].appendChild(e)}return this},prepend:function(e){for(var t,a=0;a&lt;this.length;a+=1)if("string"==typeof e){var i=f.createElement("div");for(i.innerHTML=e,t=i.childNodes.length-1;0&lt;=t;--t)this[a].insertBefore(i.childNodes[t],this[a].childNodes[0])}else if(e instanceof l)for(t=0;t&lt;e.length;t+=1)this[a].insertBefore(e[t],this[a].childNodes[0]);else this[a].insertBefore(e,this[a].childNodes[0]);return this},next:function(e){return 0&lt;this.length?e?this[0].nextElementSibling&amp;&amp;I(this[0].nextElementSibling).is(e)?new l([this[0].nextElementSibling]):new l([]):this[0].nextElementSibling?new l([this[0].nextElementSibling]):new l([]):new l([])},nextAll:function(e){var t=[],a=this[0];if(!a)return new l([]);for(;a.nextElementSibling;){var i=a.nextElementSibling;e&amp;&amp;!I(i).is(e)||t.push(i),a=i}return new l(t)},prev:function(e){if(0&lt;this.length){var t=this[0];return e?t.previousElementSibling&amp;&amp;I(t.previousElementSibling).is(e)?new l([t.previousElementSibling]):new l([]):t.previousElementSibling?new l([t.previousElementSibling]):new l([])}return new l([])},prevAll:function(e){var t=[],a=this[0];if(!a)return new l([]);for(;a.previousElementSibling;){var i=a.previousElementSibling;e&amp;&amp;!I(i).is(e)||t.push(i),a=i}return new l(t)},parent:function(e){for(var t=[],a=0;a&lt;this.length;a+=1)null===this[a].parentNode||e&amp;&amp;!I(this[a].parentNode).is(e)||t.push(this[a].parentNode);return I(r(t))},parents:function(e){for(var t=[],a=0;a&lt;this.length;a+=1)for(var i=this[a].parentNode;i;)e&amp;&amp;!I(i).is(e)||t.push(i),i=i.parentNode;return I(r(t))},closest:function(e){var t=this;return void 0===e?new l([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){for(var t=[],a=0;a&lt;this.length;a+=1)for(var i=this[a].querySelectorAll(e),s=0;s&lt;i.length;s+=1)t.push(i[s]);return new l(t)},children:function(e){for(var t=[],a=0;a&lt;this.length;a+=1)for(var i=this[a].childNodes,s=0;s&lt;i.length;s+=1)e?1===i[s].nodeType&amp;&amp;I(i[s]).is(e)&amp;&amp;t.push(i[s]):1===i[s].nodeType&amp;&amp;t.push(i[s]);return new l(r(t))},remove:function(){for(var e=0;e&lt;this.length;e+=1)this[e].parentNode&amp;&amp;this[e].parentNode.removeChild(this[e]);return this},add:function(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];for(e=0;e&lt;t.length;e+=1)for(var i=I(t[e]),s=0;s&lt;i.length;s+=1)this[this.length]=i[s],this.length+=1;return this},styles:function(){return this[0]?ee.getComputedStyle(this[0],null):{}}};function e(e){void 0===e&amp;&amp;(e={});var t=this;t.params=e,t.eventsListeners={},t.params&amp;&amp;t.params.on&amp;&amp;Object.keys(t.params.on).forEach(function(e){t.on(e,t.params.on[e])})}Object.keys(t).forEach(function(e){I.fn[e]=I.fn[e]||t[e]});var a,i,s,n,te={deleteProps:function(e){var t=e;Object.keys(t).forEach(function(e){try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})},nextTick:function(e,t){return void 0===t&amp;&amp;(t=0),setTimeout(e,t)},now:function(){return Date.now()},getTranslate:function(e,t){var a,i,s;void 0===t&amp;&amp;(t="x");var r=ee.getComputedStyle(e,null);return ee.WebKitCSSMatrix?(6&lt;(i=r.transform||r.webkitTransform).split(",").length&amp;&amp;(i=i.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),s=new ee.WebKitCSSMatrix("none"===i?"":i)):a=(s=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&amp;&amp;(i=ee.WebKitCSSMatrix?s.m41:16===a.length?parseFloat(a[12]):parseFloat(a[4])),"y"===t&amp;&amp;(i=ee.WebKitCSSMatrix?s.m42:16===a.length?parseFloat(a[13]):parseFloat(a[5])),i||0},parseUrlQuery:function(e){var t,a,i,s,r={},n=e||ee.location.href;if("string"==typeof n&amp;&amp;n.length)for(s=(a=(n=-1&lt;n.indexOf("?")?n.replace(/\S*\?/,""):"").split("&amp;").filter(function(e){return""!==e})).length,t=0;t&lt;s;t+=1)i=a[t].replace(/#\S+/g,"").split("="),r[decodeURIComponent(i[0])]=void 0===i[1]?void 0:decodeURIComponent(i[1])||"";return r},isObject:function(e){return"object"==typeof e&amp;&amp;null!==e&amp;&amp;e.constructor&amp;&amp;e.constructor===Object},extend:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var a=Object(e[0]),i=1;i&lt;e.length;i+=1){var s=e[i];if(null!=s)for(var r=Object.keys(Object(s)),n=0,o=r.length;n&lt;o;n+=1){var l=r[n],d=Object.getOwnPropertyDescriptor(s,l);void 0!==d&amp;&amp;d.enumerable&amp;&amp;(te.isObject(a[l])&amp;&amp;te.isObject(s[l])?te.extend(a[l],s[l]):!te.isObject(a[l])&amp;&amp;te.isObject(s[l])?(a[l]={},te.extend(a[l],s[l])):a[l]=s[l])}}return a}},ae=(s=f.createElement("div"),{touch:ee.Modernizr&amp;&amp;!0===ee.Modernizr.touch||!!(0&lt;ee.navigator.maxTouchPoints||"ontouchstart"in ee||ee.DocumentTouch&amp;&amp;f instanceof ee.DocumentTouch),pointerEvents:!!(ee.navigator.pointerEnabled||ee.PointerEvent||"maxTouchPoints"in ee.navigator&amp;&amp;0&lt;ee.navigator.maxTouchPoints),prefixedPointerEvents:!!ee.navigator.msPointerEnabled,transition:"transition"in(i=s.style)||"webkitTransition"in i||"MozTransition"in i,transforms3d:ee.Modernizr&amp;&amp;!0===ee.Modernizr.csstransforms3d||("webkitPerspective"in(a=s.style)||"MozPerspective"in a||"OPerspective"in a||"MsPerspective"in a||"perspective"in a),flexbox:function(){for(var e=s.style,t="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),a=0;a&lt;t.length;a+=1)if(t[a]in e)return!0;return!1}(),observer:"MutationObserver"in ee||"WebkitMutationObserver"in ee,passiveListener:function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});ee.addEventListener("testPassiveListener",null,t)}catch(e){}return e}(),gestures:"ongesturestart"in ee}),ie={isIE:!!ee.navigator.userAgent.match(/Trident/g)||!!ee.navigator.userAgent.match(/MSIE/g),isEdge:!!ee.navigator.userAgent.match(/Edge/g),isSafari:0&lt;=(n=ee.navigator.userAgent.toLowerCase()).indexOf("safari")&amp;&amp;n.indexOf("chrome")&lt;0&amp;&amp;n.indexOf("android")&lt;0,isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(ee.navigator.userAgent)},o={components:{configurable:!0}};e.prototype.on=function(e,t,a){var i=this;if("function"!=typeof t)return i;var s=a?"unshift":"push";return e.split(" ").forEach(function(e){i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][s](t)}),i},e.prototype.once=function(a,i,e){var s=this;if("function"!=typeof i)return s;function r(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i.apply(s,e),s.off(a,r),r.f7proxy&amp;&amp;delete r.f7proxy}return r.f7proxy=i,s.on(a,r,e)},e.prototype.off=function(e,i){var s=this;return s.eventsListeners&amp;&amp;e.split(" ").forEach(function(a){void 0===i?s.eventsListeners[a]=[]:s.eventsListeners[a]&amp;&amp;s.eventsListeners[a].length&amp;&amp;s.eventsListeners[a].forEach(function(e,t){(e===i||e.f7proxy&amp;&amp;e.f7proxy===i)&amp;&amp;s.eventsListeners[a].splice(t,1)})}),s},e.prototype.emit=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a,i,s,r=this;return r.eventsListeners&amp;&amp;(s="string"==typeof e[0]||Array.isArray(e[0])?(a=e[0],i=e.slice(1,e.length),r):(a=e[0].events,i=e[0].data,e[0].context||r),(Array.isArray(a)?a:a.split(" ")).forEach(function(e){var t;r.eventsListeners&amp;&amp;r.eventsListeners[e]&amp;&amp;(t=[],r.eventsListeners[e].forEach(function(e){t.push(e)}),t.forEach(function(e){e.apply(s,i)}))})),r},e.prototype.useModulesParams=function(a){var i=this;i.modules&amp;&amp;Object.keys(i.modules).forEach(function(e){var t=i.modules[e];t.params&amp;&amp;te.extend(a,t.params)})},e.prototype.useModules=function(i){void 0===i&amp;&amp;(i={});var s=this;s.modules&amp;&amp;Object.keys(s.modules).forEach(function(e){var a=s.modules[e],t=i[e]||{};a.instance&amp;&amp;Object.keys(a.instance).forEach(function(e){var t=a.instance[e];s[e]="function"==typeof t?t.bind(s):t}),a.on&amp;&amp;s.on&amp;&amp;Object.keys(a.on).forEach(function(e){s.on(e,a.on[e])}),a.create&amp;&amp;a.create.bind(s)(t)})},o.components.set=function(e){this.use&amp;&amp;this.use(e)},e.installModule=function(t){for(var e=[],a=arguments.length-1;0&lt;a--;)e[a]=arguments[a+1];var i=this;i.prototype.modules||(i.prototype.modules={});var s=t.name||Object.keys(i.prototype.modules).length+"_"+te.now();return(i.prototype.modules[s]=t).proto&amp;&amp;Object.keys(t.proto).forEach(function(e){i.prototype[e]=t.proto[e]}),t.static&amp;&amp;Object.keys(t.static).forEach(function(e){i[e]=t.static[e]}),t.install&amp;&amp;t.install.apply(i,e),i},e.use=function(e){for(var t=[],a=arguments.length-1;0&lt;a--;)t[a]=arguments[a+1];var i=this;return Array.isArray(e)?(e.forEach(function(e){return i.installModule(e)}),i):i.installModule.apply(i,[e].concat(t))},Object.defineProperties(e,o);var d,p,c,u,h,v,m,g,b,w={updateSize:function(){var e=this,t=e.$el,a=void 0!==e.params.width?e.params.width:t[0].clientWidth,i=void 0!==e.params.height?e.params.height:t[0].clientHeight;0===a&amp;&amp;e.isHorizontal()||0===i&amp;&amp;e.isVertical()||(a=a-parseInt(t.css("padding-left"),10)-parseInt(t.css("padding-right"),10),i=i-parseInt(t.css("padding-top"),10)-parseInt(t.css("padding-bottom"),10),te.extend(e,{width:a,height:i,size:e.isHorizontal()?a:i}))},updateSlides:function(){var e=this,t=e.params,a=e.$wrapperEl,i=e.size,s=e.rtlTranslate,r=e.wrongRTL,n=e.virtual&amp;&amp;t.virtual.enabled,o=n?e.virtual.slides.length:e.slides.length,l=a.children("."+e.params.slideClass),d=n?e.virtual.slides.length:l.length,p=[],c=[],u=[],h=t.slidesOffsetBefore;"function"==typeof h&amp;&amp;(h=t.slidesOffsetBefore.call(e));var v=t.slidesOffsetAfter;"function"==typeof v&amp;&amp;(v=t.slidesOffsetAfter.call(e));var f,m=e.snapGrid.length,g=e.snapGrid.length,b=t.spaceBetween,w=-h,y=0,x=0;if(void 0!==i){"string"==typeof b&amp;&amp;0&lt;=b.indexOf("%")&amp;&amp;(b=parseFloat(b.replace("%",""))/100*i),e.virtualSize=-b,s?l.css({marginLeft:"",marginTop:""}):l.css({marginRight:"",marginBottom:""}),1&lt;t.slidesPerColumn&amp;&amp;(f=Math.floor(d/t.slidesPerColumn)===d/e.params.slidesPerColumn?d:Math.ceil(d/t.slidesPerColumn)*t.slidesPerColumn,"auto"!==t.slidesPerView&amp;&amp;"row"===t.slidesPerColumnFill&amp;&amp;(f=Math.max(f,t.slidesPerView*t.slidesPerColumn)));for(var T,E,S,C=t.slidesPerColumn,M=f/C,P=Math.floor(d/t.slidesPerColumn),k=0;k&lt;d;k+=1){Y=0;var z,$,I,L,D,O,A,H,G,N,B,X,V,Y,F,R,q,W,j,U,K=l.eq(k);1&lt;t.slidesPerColumn&amp;&amp;($=L=z=void 0,"column"===t.slidesPerColumnFill||"row"===t.slidesPerColumnFill&amp;&amp;1&lt;t.slidesPerGroup?("column"===t.slidesPerColumnFill?($=k-(L=Math.floor(k/C))*C,(P&lt;L||L===P&amp;&amp;$===C-1)&amp;&amp;C&lt;=($+=1)&amp;&amp;($=0,L+=1)):(I=Math.floor(k/t.slidesPerGroup),L=k-($=Math.floor(k/t.slidesPerView)-I*t.slidesPerColumn)*t.slidesPerView-I*t.slidesPerView),z=L+$*f/C,K.css({"-webkit-box-ordinal-group":z,"-moz-box-ordinal-group":z,"-ms-flex-order":z,"-webkit-order":z,order:z})):L=k-($=Math.floor(k/M))*M,K.css("margin-"+(e.isHorizontal()?"top":"left"),0!==$&amp;&amp;t.spaceBetween&amp;&amp;t.spaceBetween+"px").attr("data-swiper-column",L).attr("data-swiper-row",$)),"none"!==K.css("display")&amp;&amp;("auto"===t.slidesPerView?(D=ee.getComputedStyle(K[0],null),O=K[0].style.transform,A=K[0].style.webkitTransform,O&amp;&amp;(K[0].style.transform="none"),A&amp;&amp;(K[0].style.webkitTransform="none"),Y=t.roundLengths?e.isHorizontal()?K.outerWidth(!0):K.outerHeight(!0):e.isHorizontal()?(H=parseFloat(D.getPropertyValue("width")),G=parseFloat(D.getPropertyValue("padding-left")),N=parseFloat(D.getPropertyValue("padding-right")),B=parseFloat(D.getPropertyValue("margin-left")),X=parseFloat(D.getPropertyValue("margin-right")),(V=D.getPropertyValue("box-sizing"))&amp;&amp;"border-box"===V&amp;&amp;!ie.isIE?H+B+X:H+G+N+B+X):(F=parseFloat(D.getPropertyValue("height")),R=parseFloat(D.getPropertyValue("padding-top")),q=parseFloat(D.getPropertyValue("padding-bottom")),W=parseFloat(D.getPropertyValue("margin-top")),j=parseFloat(D.getPropertyValue("margin-bottom")),(U=D.getPropertyValue("box-sizing"))&amp;&amp;"border-box"===U&amp;&amp;!ie.isIE?F+W+j:F+R+q+W+j),O&amp;&amp;(K[0].style.transform=O),A&amp;&amp;(K[0].style.webkitTransform=A),t.roundLengths&amp;&amp;(Y=Math.floor(Y))):(Y=(i-(t.slidesPerView-1)*b)/t.slidesPerView,t.roundLengths&amp;&amp;(Y=Math.floor(Y)),l[k]&amp;&amp;(e.isHorizontal()?l[k].style.width=Y+"px":l[k].style.height=Y+"px")),l[k]&amp;&amp;(l[k].swiperSlideSize=Y),u.push(Y),t.centeredSlides?(w=w+Y/2+y/2+b,0===y&amp;&amp;0!==k&amp;&amp;(w=w-i/2-b),0===k&amp;&amp;(w=w-i/2-b),Math.abs(w)&lt;.001&amp;&amp;(w=0),t.roundLengths&amp;&amp;(w=Math.floor(w)),x%t.slidesPerGroup==0&amp;&amp;p.push(w),c.push(w)):(t.roundLengths&amp;&amp;(w=Math.floor(w)),x%t.slidesPerGroup==0&amp;&amp;p.push(w),c.push(w),w=w+Y+b),e.virtualSize+=Y+b,y=Y,x+=1)}if(e.virtualSize=Math.max(e.virtualSize,i)+v,s&amp;&amp;r&amp;&amp;("slide"===t.effect||"coverflow"===t.effect)&amp;&amp;a.css({width:e.virtualSize+t.spaceBetween+"px"}),ae.flexbox&amp;&amp;!t.setWrapperSize||(e.isHorizontal()?a.css({width:e.virtualSize+t.spaceBetween+"px"}):a.css({height:e.virtualSize+t.spaceBetween+"px"})),1&lt;t.slidesPerColumn&amp;&amp;(e.virtualSize=(Y+t.spaceBetween)*f,e.virtualSize=Math.ceil(e.virtualSize/t.slidesPerColumn)-t.spaceBetween,e.isHorizontal()?a.css({width:e.virtualSize+t.spaceBetween+"px"}):a.css({height:e.virtualSize+t.spaceBetween+"px"}),t.centeredSlides)){T=[];for(var _=0;_&lt;p.length;_+=1){var Z=p[_];t.roundLengths&amp;&amp;(Z=Math.floor(Z)),p[_]&lt;e.virtualSize+p[0]&amp;&amp;T.push(Z)}p=T}if(!t.centeredSlides){T=[];for(var Q=0;Q&lt;p.length;Q+=1){var J=p[Q];t.roundLengths&amp;&amp;(J=Math.floor(J)),p[Q]&lt;=e.virtualSize-i&amp;&amp;T.push(J)}p=T,1&lt;Math.floor(e.virtualSize-i)-Math.floor(p[p.length-1])&amp;&amp;p.push(e.virtualSize-i)}0===p.length&amp;&amp;(p=[0]),0!==t.spaceBetween&amp;&amp;(e.isHorizontal()?s?l.css({marginLeft:b+"px"}):l.css({marginRight:b+"px"}):l.css({marginBottom:b+"px"})),t.centerInsufficientSlides&amp;&amp;(E=0,u.forEach(function(e){E+=e+(t.spaceBetween?t.spaceBetween:0)}),(E-=t.spaceBetween)&lt;i&amp;&amp;(S=(i-E)/2,p.forEach(function(e,t){p[t]=e-S}),c.forEach(function(e,t){c[t]=e+S}))),te.extend(e,{slides:l,snapGrid:p,slidesGrid:c,slidesSizesGrid:u}),d!==o&amp;&amp;e.emit("slidesLengthChange"),p.length!==m&amp;&amp;(e.params.watchOverflow&amp;&amp;e.checkOverflow(),e.emit("snapGridLengthChange")),c.length!==g&amp;&amp;e.emit("slidesGridLengthChange"),(t.watchSlidesProgress||t.watchSlidesVisibility)&amp;&amp;e.updateSlidesOffset()}},updateAutoHeight:function(e){var t,a,i=this,s=[],r=0;if("number"==typeof e?i.setTransition(e):!0===e&amp;&amp;i.setTransition(i.params.speed),"auto"!==i.params.slidesPerView&amp;&amp;1&lt;i.params.slidesPerView)for(t=0;t&lt;Math.ceil(i.params.slidesPerView);t+=1){var n=i.activeIndex+t;if(n&gt;i.slides.length)break;s.push(i.slides.eq(n)[0])}else s.push(i.slides.eq(i.activeIndex)[0]);for(t=0;t&lt;s.length;t+=1){void 0!==s[t]&amp;&amp;(r=r&lt;(a=s[t].offsetHeight)?a:r)}r&amp;&amp;i.$wrapperEl.css("height",r+"px")},updateSlidesOffset:function(){for(var e=this.slides,t=0;t&lt;e.length;t+=1)e[t].swiperSlideOffset=this.isHorizontal()?e[t].offsetLeft:e[t].offsetTop},updateSlidesProgress:function(e){void 0===e&amp;&amp;(e=this&amp;&amp;this.translate||0);var t=this,a=t.params,i=t.slides,s=t.rtlTranslate;if(0!==i.length){void 0===i[0].swiperSlideOffset&amp;&amp;t.updateSlidesOffset();var r=s?e:-e;i.removeClass(a.slideVisibleClass),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(var n=0;n&lt;i.length;n+=1){var o,l,d=i[n],p=(r+(a.centeredSlides?t.minTranslate():0)-d.swiperSlideOffset)/(d.swiperSlideSize+a.spaceBetween);a.watchSlidesVisibility&amp;&amp;(l=(o=-(r-d.swiperSlideOffset))+t.slidesSizesGrid[n],(0&lt;=o&amp;&amp;o&lt;t.size-1||1&lt;l&amp;&amp;l&lt;=t.size||o&lt;=0&amp;&amp;l&gt;=t.size)&amp;&amp;(t.visibleSlides.push(d),t.visibleSlidesIndexes.push(n),i.eq(n).addClass(a.slideVisibleClass))),d.progress=s?-p:p}t.visibleSlides=I(t.visibleSlides)}},updateProgress:function(e){void 0===e&amp;&amp;(e=this&amp;&amp;this.translate||0);var t=this,a=t.params,i=t.maxTranslate()-t.minTranslate(),s=t.progress,r=t.isBeginning,n=r,o=l=t.isEnd,l=0==i?r=!(s=0):(r=(s=(e-t.minTranslate())/i)&lt;=0,1&lt;=s);te.extend(t,{progress:s,isBeginning:r,isEnd:l}),(a.watchSlidesProgress||a.watchSlidesVisibility)&amp;&amp;t.updateSlidesProgress(e),r&amp;&amp;!n&amp;&amp;t.emit("reachBeginning toEdge"),l&amp;&amp;!o&amp;&amp;t.emit("reachEnd toEdge"),(n&amp;&amp;!r||o&amp;&amp;!l)&amp;&amp;t.emit("fromEdge"),t.emit("progress",s)},updateSlidesClasses:function(){var e,t=this,a=t.slides,i=t.params,s=t.$wrapperEl,r=t.activeIndex,n=t.realIndex,o=t.virtual&amp;&amp;i.virtual.enabled;a.removeClass(i.slideActiveClass+" "+i.slideNextClass+" "+i.slidePrevClass+" "+i.slideDuplicateActiveClass+" "+i.slideDuplicateNextClass+" "+i.slideDuplicatePrevClass),(e=o?t.$wrapperEl.find("."+i.slideClass+'[data-swiper-slide-index="'+r+'"]'):a.eq(r)).addClass(i.slideActiveClass),i.loop&amp;&amp;(e.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+n+'"]').addClass(i.slideDuplicateActiveClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+n+'"]').addClass(i.slideDuplicateActiveClass));var l=e.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass);i.loop&amp;&amp;0===l.length&amp;&amp;(l=a.eq(0)).addClass(i.slideNextClass);var d=e.prevAll("."+i.slideClass).eq(0).addClass(i.slidePrevClass);i.loop&amp;&amp;0===d.length&amp;&amp;(d=a.eq(-1)).addClass(i.slidePrevClass),i.loop&amp;&amp;(l.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass),d.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass))},updateActiveIndex:function(e){var t,a,i=this,s=i.rtlTranslate?i.translate:-i.translate,r=i.slidesGrid,n=i.snapGrid,o=i.params,l=i.activeIndex,d=i.realIndex,p=i.snapIndex,c=e;if(void 0===c){for(var u=0;u&lt;r.length;u+=1)void 0!==r[u+1]?s&gt;=r[u]&amp;&amp;s&lt;r[u+1]-(r[u+1]-r[u])/2?c=u:s&gt;=r[u]&amp;&amp;s&lt;r[u+1]&amp;&amp;(c=u+1):s&gt;=r[u]&amp;&amp;(c=u);o.normalizeSlideIndex&amp;&amp;(c&lt;0||void 0===c)&amp;&amp;(c=0)}(t=0&lt;=n.indexOf(s)?n.indexOf(s):Math.floor(c/o.slidesPerGroup))&gt;=n.length&amp;&amp;(t=n.length-1),c!==l?(a=parseInt(i.slides.eq(c).attr("data-swiper-slide-index")||c,10),te.extend(i,{snapIndex:t,realIndex:a,previousIndex:l,activeIndex:c}),i.emit("activeIndexChange"),i.emit("snapIndexChange"),d!==a&amp;&amp;i.emit("realIndexChange"),(i.initialized||i.runCallbacksOnInit)&amp;&amp;i.emit("slideChange")):t!==p&amp;&amp;(i.snapIndex=t,i.emit("snapIndexChange"))},updateClickedSlide:function(e){var t=this,a=t.params,i=I(e.target).closest("."+a.slideClass)[0],s=!1;if(i)for(var r=0;r&lt;t.slides.length;r+=1)t.slides[r]===i&amp;&amp;(s=!0);if(!i||!s)return t.clickedSlide=void 0,void(t.clickedIndex=void 0);t.clickedSlide=i,t.virtual&amp;&amp;t.params.virtual.enabled?t.clickedIndex=parseInt(I(i).attr("data-swiper-slide-index"),10):t.clickedIndex=I(i).index(),a.slideToClickedSlide&amp;&amp;void 0!==t.clickedIndex&amp;&amp;t.clickedIndex!==t.activeIndex&amp;&amp;t.slideToClickedSlide()}},y={getTranslate:function(e){void 0===e&amp;&amp;(e=this.isHorizontal()?"x":"y");var t=this.params,a=this.rtlTranslate,i=this.translate,s=this.$wrapperEl;if(t.virtualTranslate)return a?-i:i;var r=te.getTranslate(s[0],e);return a&amp;&amp;(r=-r),r||0},setTranslate:function(e,t){var a=this,i=a.rtlTranslate,s=a.params,r=a.$wrapperEl,n=a.progress,o=0,l=0;a.isHorizontal()?o=i?-e:e:l=e,s.roundLengths&amp;&amp;(o=Math.floor(o),l=Math.floor(l)),s.virtualTranslate||(ae.transforms3d?r.transform("translate3d("+o+"px, "+l+"px, 0px)"):r.transform("translate("+o+"px, "+l+"px)")),a.previousTranslate=a.translate,a.translate=a.isHorizontal()?o:l;var d=a.maxTranslate()-a.minTranslate();(0==d?0:(e-a.minTranslate())/d)!==n&amp;&amp;a.updateProgress(e),a.emit("setTranslate",a.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]}},x={slideTo:function(e,t,a,i){void 0===e&amp;&amp;(e=0),void 0===t&amp;&amp;(t=this.params.speed),void 0===a&amp;&amp;(a=!0);var s=this,r=e;r&lt;0&amp;&amp;(r=0);var n=s.params,o=s.snapGrid,l=s.slidesGrid,d=s.previousIndex,p=s.activeIndex,c=s.rtlTranslate;if(s.animating&amp;&amp;n.preventInteractionOnTransition)return!1;var u=Math.floor(r/n.slidesPerGroup);u&gt;=o.length&amp;&amp;(u=o.length-1),(p||n.initialSlide||0)===(d||0)&amp;&amp;a&amp;&amp;s.emit("beforeSlideChangeStart");var h,v=-o[u];if(s.updateProgress(v),n.normalizeSlideIndex)for(var f=0;f&lt;l.length;f+=1)-Math.floor(100*v)&gt;=Math.floor(100*l[f])&amp;&amp;(r=f);if(s.initialized&amp;&amp;r!==p){if(!s.allowSlideNext&amp;&amp;v&lt;s.translate&amp;&amp;v&lt;s.minTranslate())return!1;if(!s.allowSlidePrev&amp;&amp;v&gt;s.translate&amp;&amp;v&gt;s.maxTranslate()&amp;&amp;(p||0)!==r)return!1}return h=p&lt;r?"next":r&lt;p?"prev":"reset",c&amp;&amp;-v===s.translate||!c&amp;&amp;v===s.translate?(s.updateActiveIndex(r),n.autoHeight&amp;&amp;s.updateAutoHeight(),s.updateSlidesClasses(),"slide"!==n.effect&amp;&amp;s.setTranslate(v),"reset"!=h&amp;&amp;(s.transitionStart(a,h),s.transitionEnd(a,h)),!1):(0!==t&amp;&amp;ae.transition?(s.setTransition(t),s.setTranslate(v),s.updateActiveIndex(r),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,i),s.transitionStart(a,h),s.animating||(s.animating=!0,s.onSlideToWrapperTransitionEnd||(s.onSlideToWrapperTransitionEnd=function(e){s&amp;&amp;!s.destroyed&amp;&amp;e.target===this&amp;&amp;(s.$wrapperEl[0].removeEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].removeEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd),s.onSlideToWrapperTransitionEnd=null,delete s.onSlideToWrapperTransitionEnd,s.transitionEnd(a,h))}),s.$wrapperEl[0].addEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].addEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd))):(s.setTransition(0),s.setTranslate(v),s.updateActiveIndex(r),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,i),s.transitionStart(a,h),s.transitionEnd(a,h)),!0)},slideToLoop:function(e,t,a,i){void 0===e&amp;&amp;(e=0),void 0===t&amp;&amp;(t=this.params.speed),void 0===a&amp;&amp;(a=!0);var s=e;return this.params.loop&amp;&amp;(s+=this.loopedSlides),this.slideTo(s,t,a,i)},slideNext:function(e,t,a){void 0===e&amp;&amp;(e=this.params.speed),void 0===t&amp;&amp;(t=!0);var i=this,s=i.params,r=i.animating;return s.loop?!r&amp;&amp;(i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft,i.slideTo(i.activeIndex+s.slidesPerGroup,e,t,a)):i.slideTo(i.activeIndex+s.slidesPerGroup,e,t,a)},slidePrev:function(e,t,a){void 0===e&amp;&amp;(e=this.params.speed),void 0===t&amp;&amp;(t=!0);var i=this,s=i.params,r=i.animating,n=i.snapGrid,o=i.slidesGrid,l=i.rtlTranslate;if(s.loop){if(r)return!1;i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft}function d(e){return e&lt;0?-Math.floor(Math.abs(e)):Math.floor(e)}var p,c=d(l?i.translate:-i.translate),u=n.map(d),h=(o.map(d),n[u.indexOf(c)],n[u.indexOf(c)-1]);return void 0!==h&amp;&amp;(p=o.indexOf(h))&lt;0&amp;&amp;(p=i.activeIndex-1),i.slideTo(p,e,t,a)},slideReset:function(e,t,a){return void 0===e&amp;&amp;(e=this.params.speed),void 0===t&amp;&amp;(t=!0),this.slideTo(this.activeIndex,e,t,a)},slideToClosest:function(e,t,a){void 0===e&amp;&amp;(e=this.params.speed),void 0===t&amp;&amp;(t=!0);var i,s,r=this,n=r.activeIndex,o=Math.floor(n/r.params.slidesPerGroup);return o&lt;r.snapGrid.length-1&amp;&amp;(i=r.rtlTranslate?r.translate:-r.translate,s=r.snapGrid[o],(r.snapGrid[o+1]-s)/2&lt;i-s&amp;&amp;(n=r.params.slidesPerGroup)),r.slideTo(n,e,t,a)},slideToClickedSlide:function(){var e,t=this,a=t.params,i=t.$wrapperEl,s="auto"===a.slidesPerView?t.slidesPerViewDynamic():a.slidesPerView,r=t.clickedIndex;if(a.loop){if(t.animating)return;e=parseInt(I(t.clickedSlide).attr("data-swiper-slide-index"),10),a.centeredSlides?r&lt;t.loopedSlides-s/2||r&gt;t.slides.length-t.loopedSlides+s/2?(t.loopFix(),r=i.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+a.slideDuplicateClass+")").eq(0).index(),te.nextTick(function(){t.slideTo(r)})):t.slideTo(r):r&gt;t.slides.length-s?(t.loopFix(),r=i.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+a.slideDuplicateClass+")").eq(0).index(),te.nextTick(function(){t.slideTo(r)})):t.slideTo(r)}else t.slideTo(r)}},T={loopCreate:function(){var i=this,e=i.params,t=i.$wrapperEl;t.children("."+e.slideClass+"."+e.slideDuplicateClass).remove();var s=t.children("."+e.slideClass);if(e.loopFillGroupWithBlank){var a=e.slidesPerGroup-s.length%e.slidesPerGroup;if(a!==e.slidesPerGroup){for(var r=0;r&lt;a;r+=1){var n=I(f.createElement("div")).addClass(e.slideClass+" "+e.slideBlankClass);t.append(n)}s=t.children("."+e.slideClass)}}"auto"!==e.slidesPerView||e.loopedSlides||(e.loopedSlides=s.length),i.loopedSlides=parseInt(e.loopedSlides||e.slidesPerView,10),i.loopedSlides+=e.loopAdditionalSlides,i.loopedSlides&gt;s.length&amp;&amp;(i.loopedSlides=s.length);var o=[],l=[];s.each(function(e,t){var a=I(t);e&lt;i.loopedSlides&amp;&amp;l.push(t),e&lt;s.length&amp;&amp;e&gt;=s.length-i.loopedSlides&amp;&amp;o.push(t),a.attr("data-swiper-slide-index",e)});for(var d=0;d&lt;l.length;d+=1)t.append(I(l[d].cloneNode(!0)).addClass(e.slideDuplicateClass));for(var p=o.length-1;0&lt;=p;--p)t.prepend(I(o[p].cloneNode(!0)).addClass(e.slideDuplicateClass))},loopFix:function(){var e,t=this,a=t.params,i=t.activeIndex,s=t.slides,r=t.loopedSlides,n=t.allowSlidePrev,o=t.allowSlideNext,l=t.snapGrid,d=t.rtlTranslate;t.allowSlidePrev=!0,t.allowSlideNext=!0;var p=-l[i]-t.getTranslate();i&lt;r?(e=s.length-3*r+i,e+=r,t.slideTo(e,0,!1,!0)&amp;&amp;0!=p&amp;&amp;t.setTranslate((d?-t.translate:t.translate)-p)):("auto"===a.slidesPerView&amp;&amp;2*r&lt;=i||i&gt;=s.length-r)&amp;&amp;(e=-s.length+i+r,e+=r,t.slideTo(e,0,!1,!0)&amp;&amp;0!=p&amp;&amp;t.setTranslate((d?-t.translate:t.translate)-p)),t.allowSlidePrev=n,t.allowSlideNext=o},loopDestroy:function(){var e=this.$wrapperEl,t=this.params,a=this.slides;e.children("."+t.slideClass+"."+t.slideDuplicateClass+",."+t.slideClass+"."+t.slideBlankClass).remove(),a.removeAttr("data-swiper-slide-index")}},E={setGrabCursor:function(e){var t;ae.touch||!this.params.simulateTouch||this.params.watchOverflow&amp;&amp;this.isLocked||((t=this.el).style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab")},unsetGrabCursor:function(){ae.touch||this.params.watchOverflow&amp;&amp;this.isLocked||(this.el.style.cursor="")}},S={appendSlide:function(e){var t=this,a=t.$wrapperEl,i=t.params;if(i.loop&amp;&amp;t.loopDestroy(),"object"==typeof e&amp;&amp;"length"in e)for(var s=0;s&lt;e.length;s+=1)e[s]&amp;&amp;a.append(e[s]);else a.append(e);i.loop&amp;&amp;t.loopCreate(),i.observer&amp;&amp;ae.observer||t.update()},prependSlide:function(e){var t=this,a=t.params,i=t.$wrapperEl,s=t.activeIndex;a.loop&amp;&amp;t.loopDestroy();var r=s+1;if("object"==typeof e&amp;&amp;"length"in e){for(var n=0;n&lt;e.length;n+=1)e[n]&amp;&amp;i.prepend(e[n]);r=s+e.length}else i.prepend(e);a.loop&amp;&amp;t.loopCreate(),a.observer&amp;&amp;ae.observer||t.update(),t.slideTo(r,0,!1)},addSlide:function(e,t){var a=this,i=a.$wrapperEl,s=a.params,r=a.activeIndex;s.loop&amp;&amp;(r-=a.loopedSlides,a.loopDestroy(),a.slides=i.children("."+s.slideClass));var n=a.slides.length;if(e&lt;=0)a.prependSlide(t);else if(n&lt;=e)a.appendSlide(t);else{for(var o=e&lt;r?r+1:r,l=[],d=n-1;e&lt;=d;--d){var p=a.slides.eq(d);p.remove(),l.unshift(p)}if("object"==typeof t&amp;&amp;"length"in t){for(var c=0;c&lt;t.length;c+=1)t[c]&amp;&amp;i.append(t[c]);o=e&lt;r?r+t.length:r}else i.append(t);for(var u=0;u&lt;l.length;u+=1)i.append(l[u]);s.loop&amp;&amp;a.loopCreate(),s.observer&amp;&amp;ae.observer||a.update(),s.loop?a.slideTo(o+a.loopedSlides,0,!1):a.slideTo(o,0,!1)}},removeSlide:function(e){var t=this,a=t.params,i=t.$wrapperEl,s=t.activeIndex;a.loop&amp;&amp;(s-=t.loopedSlides,t.loopDestroy(),t.slides=i.children("."+a.slideClass));var r,n=s;if("object"==typeof e&amp;&amp;"length"in e){for(var o=0;o&lt;e.length;o+=1)r=e[o],t.slides[r]&amp;&amp;t.slides.eq(r).remove(),r&lt;n&amp;&amp;--n;n=Math.max(n,0)}else r=e,t.slides[r]&amp;&amp;t.slides.eq(r).remove(),r&lt;n&amp;&amp;--n,n=Math.max(n,0);a.loop&amp;&amp;t.loopCreate(),a.observer&amp;&amp;ae.observer||t.update(),a.loop?t.slideTo(n+t.loopedSlides,0,!1):t.slideTo(n,0,!1)},removeAllSlides:function(){for(var e=[],t=0;t&lt;this.slides.length;t+=1)e.push(t);this.removeSlide(e)}},C=(c=ee.navigator.userAgent,u={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:ee.cordova||ee.phonegap,phonegap:ee.cordova||ee.phonegap},h=c.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),v=c.match(/(Android);?[\s\/]+([\d.]+)?/),m=c.match(/(iPad).*OS\s([\d_]+)/),g=c.match(/(iPod)(.*OS\s([\d_]+))?/),b=!m&amp;&amp;c.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h&amp;&amp;(u.os="windows",u.osVersion=h[2],u.windows=!0),v&amp;&amp;!h&amp;&amp;(u.os="android",u.osVersion=v[2],u.android=!0,u.androidChrome=0&lt;=c.toLowerCase().indexOf("chrome")),(m||b||g)&amp;&amp;(u.os="ios",u.ios=!0),b&amp;&amp;!g&amp;&amp;(u.osVersion=b[2].replace(/_/g,"."),u.iphone=!0),m&amp;&amp;(u.osVersion=m[2].replace(/_/g,"."),u.ipad=!0),g&amp;&amp;(u.osVersion=g[3]?g[3].replace(/_/g,"."):null,u.iphone=!0),u.ios&amp;&amp;u.osVersion&amp;&amp;0&lt;=c.indexOf("Version/")&amp;&amp;"10"===u.osVersion.split(".")[0]&amp;&amp;(u.osVersion=c.toLowerCase().split("version/")[1].split(" ")[0]),u.desktop=!(u.os||u.android||u.webView),u.webView=(b||m||g)&amp;&amp;c.match(/.*AppleWebKit(?!.*Safari)/i),u.os&amp;&amp;"ios"===u.os&amp;&amp;(d=u.osVersion.split("."),p=f.querySelector('meta[name="viewport"]'),u.minimalUi=!u.webView&amp;&amp;(g||b)&amp;&amp;(7==+d[0]?1&lt;=+d[1]:7&lt;+d[0])&amp;&amp;p&amp;&amp;0&lt;=p.getAttribute("content").indexOf("minimal-ui")),u.pixelRatio=ee.devicePixelRatio||1,u);function M(){var e,t,a,i,s=this,r=s.params,n=s.el;n&amp;&amp;0===n.offsetWidth||(r.breakpoints&amp;&amp;s.setBreakpoint(),e=s.allowSlideNext,t=s.allowSlidePrev,a=s.snapGrid,s.allowSlideNext=!0,s.allowSlidePrev=!0,s.updateSize(),s.updateSlides(),r.freeMode?(i=Math.min(Math.max(s.translate,s.maxTranslate()),s.minTranslate()),s.setTranslate(i),s.updateActiveIndex(),s.updateSlidesClasses(),r.autoHeight&amp;&amp;s.updateAutoHeight()):(s.updateSlidesClasses(),("auto"===r.slidesPerView||1&lt;r.slidesPerView)&amp;&amp;s.isEnd&amp;&amp;!s.params.centeredSlides?s.slideTo(s.slides.length-1,0,!1,!0):s.slideTo(s.activeIndex,0,!1,!0)),s.autoplay&amp;&amp;s.autoplay.running&amp;&amp;s.autoplay.paused&amp;&amp;s.autoplay.run(),s.allowSlidePrev=t,s.allowSlideNext=e,s.params.watchOverflow&amp;&amp;a!==s.snapGrid&amp;&amp;s.checkOverflow())}var P,k,z,$={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,preventInteractionOnTransition:!1,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsInverse:!1,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!0,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0},L={update:w,translate:y,transition:{setTransition:function(e,t){this.$wrapperEl.transition(e),this.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&amp;&amp;(e=!0);var a=this,i=a.activeIndex,s=a.params,r=a.previousIndex;s.autoHeight&amp;&amp;a.updateAutoHeight();var n=(n=t)||(r&lt;i?"next":i&lt;r?"prev":"reset");if(a.emit("transitionStart"),e&amp;&amp;i!==r){if("reset"===n)return void a.emit("slideResetTransitionStart");a.emit("slideChangeTransitionStart"),"next"===n?a.emit("slideNextTransitionStart"):a.emit("slidePrevTransitionStart")}},transitionEnd:function(e,t){void 0===e&amp;&amp;(e=!0);var a=this,i=a.activeIndex,s=a.previousIndex;a.animating=!1,a.setTransition(0);var r=(r=t)||(s&lt;i?"next":i&lt;s?"prev":"reset");if(a.emit("transitionEnd"),e&amp;&amp;i!==s){if("reset"===r)return void a.emit("slideResetTransitionEnd");a.emit("slideChangeTransitionEnd"),"next"===r?a.emit("slideNextTransitionEnd"):a.emit("slidePrevTransitionEnd")}}},slide:x,loop:T,grabCursor:E,manipulation:S,events:{attachEvents:function(){var e=this,t=e.params,a=e.touchEvents,i=e.el,s=e.wrapperEl;e.onTouchStart=function(e){var t,a,i,s,r,n,o,l=this,d=l.touchEventsData,p=l.params,c=l.touches;l.animating&amp;&amp;p.preventInteractionOnTransition||((t=e).originalEvent&amp;&amp;(t=t.originalEvent),d.isTouchEvent="touchstart"===t.type,!d.isTouchEvent&amp;&amp;"which"in t&amp;&amp;3===t.which||!d.isTouchEvent&amp;&amp;"button"in t&amp;&amp;0&lt;t.button||d.isTouched&amp;&amp;d.isMoved||(p.noSwiping&amp;&amp;I(t.target).closest(p.noSwipingSelector?p.noSwipingSelector:"."+p.noSwipingClass)[0]?l.allowClick=!0:p.swipeHandler&amp;&amp;!I(t).closest(p.swipeHandler)[0]||(c.currentX="touchstart"===t.type?t.targetTouches[0].pageX:t.pageX,c.currentY="touchstart"===t.type?t.targetTouches[0].pageY:t.pageY,a=c.currentX,i=c.currentY,s=p.edgeSwipeDetection||p.iOSEdgeSwipeDetection,r=p.edgeSwipeThreshold||p.iOSEdgeSwipeThreshold,s&amp;&amp;(a&lt;=r||a&gt;=ee.screen.width-r)||(te.extend(d,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),c.startX=a,c.startY=i,d.touchStartTime=te.now(),l.allowClick=!0,l.updateSize(),l.swipeDirection=void 0,0&lt;p.threshold&amp;&amp;(d.allowThresholdMove=!1),"touchstart"!==t.type&amp;&amp;(n=!0,I(t.target).is(d.formElements)&amp;&amp;(n=!1),f.activeElement&amp;&amp;I(f.activeElement).is(d.formElements)&amp;&amp;f.activeElement!==t.target&amp;&amp;f.activeElement.blur(),o=n&amp;&amp;l.allowTouchMove&amp;&amp;p.touchStartPreventDefault,(p.touchStartForcePreventDefault||o)&amp;&amp;t.preventDefault()),l.emit("touchStart",t)))))}.bind(e),e.onTouchMove=function(e){var t=this,a=t.touchEventsData,i=t.params,s=t.touches,r=t.rtlTranslate,n=e;if(n.originalEvent&amp;&amp;(n=n.originalEvent),a.isTouched){if(!a.isTouchEvent||"mousemove"!==n.type){var o="touchmove"===n.type?n.targetTouches[0].pageX:n.pageX,l="touchmove"===n.type?n.targetTouches[0].pageY:n.pageY;if(n.preventedByNestedSwiper)return s.startX=o,void(s.startY=l);if(!t.allowTouchMove)return t.allowClick=!1,void(a.isTouched&amp;&amp;(te.extend(s,{startX:o,startY:l,currentX:o,currentY:l}),a.touchStartTime=te.now()));if(a.isTouchEvent&amp;&amp;i.touchReleaseOnEdges&amp;&amp;!i.loop)if(t.isVertical()){if(l&lt;s.startY&amp;&amp;t.translate&lt;=t.maxTranslate()||l&gt;s.startY&amp;&amp;t.translate&gt;=t.minTranslate())return a.isTouched=!1,void(a.isMoved=!1)}else if(o&lt;s.startX&amp;&amp;t.translate&lt;=t.maxTranslate()||o&gt;s.startX&amp;&amp;t.translate&gt;=t.minTranslate())return;if(a.isTouchEvent&amp;&amp;f.activeElement&amp;&amp;n.target===f.activeElement&amp;&amp;I(n.target).is(a.formElements))return a.isMoved=!0,void(t.allowClick=!1);if(a.allowTouchCallbacks&amp;&amp;t.emit("touchMove",n),!(n.targetTouches&amp;&amp;1&lt;n.targetTouches.length)){s.currentX=o,s.currentY=l;var d,p=s.currentX-s.startX,c=s.currentY-s.startY;if(!(t.params.threshold&amp;&amp;Math.sqrt(Math.pow(p,2)+Math.pow(c,2))&lt;t.params.threshold))if(void 0===a.isScrolling&amp;&amp;(t.isHorizontal()&amp;&amp;s.currentY===s.startY||t.isVertical()&amp;&amp;s.currentX===s.startX?a.isScrolling=!1:25&lt;=p*p+c*c&amp;&amp;(d=180*Math.atan2(Math.abs(c),Math.abs(p))/Math.PI,a.isScrolling=t.isHorizontal()?d&gt;i.touchAngle:90-d&gt;i.touchAngle)),a.isScrolling&amp;&amp;t.emit("touchMoveOpposite",n),void 0===a.startMoving&amp;&amp;(s.currentX===s.startX&amp;&amp;s.currentY===s.startY||(a.startMoving=!0)),a.isScrolling)a.isTouched=!1;else if(a.startMoving){t.allowClick=!1,n.preventDefault(),i.touchMoveStopPropagation&amp;&amp;!i.nested&amp;&amp;n.stopPropagation(),a.isMoved||(i.loop&amp;&amp;t.loopFix(),a.startTranslate=t.getTranslate(),t.setTransition(0),t.animating&amp;&amp;t.$wrapperEl.trigger("webkitTransitionEnd transitionend"),a.allowMomentumBounce=!1,!i.grabCursor||!0!==t.allowSlideNext&amp;&amp;!0!==t.allowSlidePrev||t.setGrabCursor(!0),t.emit("sliderFirstMove",n)),t.emit("sliderMove",n),a.isMoved=!0;var u=t.isHorizontal()?p:c;s.diff=u,u*=i.touchRatio,r&amp;&amp;(u=-u),t.swipeDirection=0&lt;u?"prev":"next",a.currentTranslate=u+a.startTranslate;var h=!0,v=i.resistanceRatio;if(i.touchReleaseOnEdges&amp;&amp;(v=0),0&lt;u&amp;&amp;a.currentTranslate&gt;t.minTranslate()?(h=!1,i.resistance&amp;&amp;(a.currentTranslate=t.minTranslate()-1+Math.pow(-t.minTranslate()+a.startTranslate+u,v))):u&lt;0&amp;&amp;a.currentTranslate&lt;t.maxTranslate()&amp;&amp;(h=!1,i.resistance&amp;&amp;(a.currentTranslate=t.maxTranslate()+1-Math.pow(t.maxTranslate()-a.startTranslate-u,v))),h&amp;&amp;(n.preventedByNestedSwiper=!0),!t.allowSlideNext&amp;&amp;"next"===t.swipeDirection&amp;&amp;a.currentTranslate&lt;a.startTranslate&amp;&amp;(a.currentTranslate=a.startTranslate),!t.allowSlidePrev&amp;&amp;"prev"===t.swipeDirection&amp;&amp;a.currentTranslate&gt;a.startTranslate&amp;&amp;(a.currentTranslate=a.startTranslate),0&lt;i.threshold){if(!(Math.abs(u)&gt;i.threshold||a.allowThresholdMove))return void(a.currentTranslate=a.startTranslate);if(!a.allowThresholdMove)return a.allowThresholdMove=!0,s.startX=s.currentX,s.startY=s.currentY,a.currentTranslate=a.startTranslate,void(s.diff=t.isHorizontal()?s.currentX-s.startX:s.currentY-s.startY)}i.followFinger&amp;&amp;((i.freeMode||i.watchSlidesProgress||i.watchSlidesVisibility)&amp;&amp;(t.updateActiveIndex(),t.updateSlidesClasses()),i.freeMode&amp;&amp;(0===a.velocities.length&amp;&amp;a.velocities.push({position:s[t.isHorizontal()?"startX":"startY"],time:a.touchStartTime}),a.velocities.push({position:s[t.isHorizontal()?"currentX":"currentY"],time:te.now()})),t.updateProgress(a.currentTranslate),t.setTranslate(a.currentTranslate))}}}}else a.startMoving&amp;&amp;a.isScrolling&amp;&amp;t.emit("touchMoveOpposite",n)}.bind(e),e.onTouchEnd=function(e){var t=this,a=t.touchEventsData,i=t.params,s=t.touches,r=t.rtlTranslate,n=t.$wrapperEl,o=t.slidesGrid,l=t.snapGrid,d=e;if(d.originalEvent&amp;&amp;(d=d.originalEvent),a.allowTouchCallbacks&amp;&amp;t.emit("touchEnd",d),a.allowTouchCallbacks=!1,!a.isTouched)return a.isMoved&amp;&amp;i.grabCursor&amp;&amp;t.setGrabCursor(!1),a.isMoved=!1,void(a.startMoving=!1);i.grabCursor&amp;&amp;a.isMoved&amp;&amp;a.isTouched&amp;&amp;(!0===t.allowSlideNext||!0===t.allowSlidePrev)&amp;&amp;t.setGrabCursor(!1);var p,c,u,h,v,f=te.now(),m=f-a.touchStartTime;if(t.allowClick&amp;&amp;(t.updateClickedSlide(d),t.emit("tap",d),m&lt;300&amp;&amp;300&lt;f-a.lastClickTime&amp;&amp;(a.clickTimeout&amp;&amp;clearTimeout(a.clickTimeout),a.clickTimeout=te.nextTick(function(){t&amp;&amp;!t.destroyed&amp;&amp;t.emit("click",d)},300)),m&lt;300&amp;&amp;f-a.lastClickTime&lt;300&amp;&amp;(a.clickTimeout&amp;&amp;clearTimeout(a.clickTimeout),t.emit("doubleTap",d))),a.lastClickTime=te.now(),te.nextTick(function(){t.destroyed||(t.allowClick=!0)}),!a.isTouched||!a.isMoved||!t.swipeDirection||0===s.diff||a.currentTranslate===a.startTranslate)return a.isTouched=!1,a.isMoved=!1,void(a.startMoving=!1);if(a.isTouched=!1,a.isMoved=!1,a.startMoving=!1,p=i.followFinger?r?t.translate:-t.translate:-a.currentTranslate,i.freeMode){if(p&lt;-t.minTranslate())return void t.slideTo(t.activeIndex);if(p&gt;-t.maxTranslate())return void(t.slides.length&lt;l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1));if(i.freeModeMomentum){1&lt;a.velocities.length?(c=a.velocities.pop(),u=a.velocities.pop(),h=c.position-u.position,v=c.time-u.time,t.velocity=h/v,t.velocity/=2,Math.abs(t.velocity)&lt;i.freeModeMinimumVelocity&amp;&amp;(t.velocity=0),(150&lt;v||300&lt;te.now()-c.time)&amp;&amp;(t.velocity=0)):t.velocity=0,t.velocity*=i.freeModeMomentumVelocityRatio,a.velocities.length=0;var g=1e3*i.freeModeMomentumRatio,b=t.velocity*g,w=t.translate+b;r&amp;&amp;(w=-w);var y,x,T=!1,E=20*Math.abs(t.velocity)*i.freeModeMomentumBounceRatio;if(w&lt;t.maxTranslate())i.freeModeMomentumBounce?(w+t.maxTranslate()&lt;-E&amp;&amp;(w=t.maxTranslate()-E),y=t.maxTranslate(),T=!0,a.allowMomentumBounce=!0):w=t.maxTranslate(),i.loop&amp;&amp;i.centeredSlides&amp;&amp;(x=!0);else if(w&gt;t.minTranslate())i.freeModeMomentumBounce?(w-t.minTranslate()&gt;E&amp;&amp;(w=t.minTranslate()+E),y=t.minTranslate(),T=!0,a.allowMomentumBounce=!0):w=t.minTranslate(),i.loop&amp;&amp;i.centeredSlides&amp;&amp;(x=!0);else if(i.freeModeSticky){for(var S,C=0;C&lt;l.length;C+=1)if(l[C]&gt;-w){S=C;break}w=-(Math.abs(l[S]-w)&lt;Math.abs(l[S-1]-w)||"next"===t.swipeDirection?l[S]:l[S-1])}if(x&amp;&amp;t.once("transitionEnd",function(){t.loopFix()}),0!==t.velocity)g=r?Math.abs((-w-t.translate)/t.velocity):Math.abs((w-t.translate)/t.velocity);else if(i.freeModeSticky)return void t.slideToClosest();i.freeModeMomentumBounce&amp;&amp;T?(t.updateProgress(y),t.setTransition(g),t.setTranslate(w),t.transitionStart(!0,t.swipeDirection),t.animating=!0,n.transitionEnd(function(){t&amp;&amp;!t.destroyed&amp;&amp;a.allowMomentumBounce&amp;&amp;(t.emit("momentumBounce"),t.setTransition(i.speed),t.setTranslate(y),n.transitionEnd(function(){t&amp;&amp;!t.destroyed&amp;&amp;t.transitionEnd()}))})):t.velocity?(t.updateProgress(w),t.setTransition(g),t.setTranslate(w),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,n.transitionEnd(function(){t&amp;&amp;!t.destroyed&amp;&amp;t.transitionEnd()}))):t.updateProgress(w),t.updateActiveIndex(),t.updateSlidesClasses()}else if(i.freeModeSticky)return void t.slideToClosest();(!i.freeModeMomentum||m&gt;=i.longSwipesMs)&amp;&amp;(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var M=0,P=t.slidesSizesGrid[0],k=0;k&lt;o.length;k+=i.slidesPerGroup)void 0!==o[k+i.slidesPerGroup]?p&gt;=o[k]&amp;&amp;p&lt;o[k+i.slidesPerGroup]&amp;&amp;(P=o[(M=k)+i.slidesPerGroup]-o[k]):p&gt;=o[k]&amp;&amp;(M=k,P=o[o.length-1]-o[o.length-2]);var z=(p-o[M])/P;if(m&gt;i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&amp;&amp;(z&gt;=i.longSwipesRatio?t.slideTo(M+i.slidesPerGroup):t.slideTo(M)),"prev"===t.swipeDirection&amp;&amp;(z&gt;1-i.longSwipesRatio?t.slideTo(M+i.slidesPerGroup):t.slideTo(M))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&amp;&amp;t.slideTo(M+i.slidesPerGroup),"prev"===t.swipeDirection&amp;&amp;t.slideTo(M)}}}.bind(e),e.onClick=function(e){this.allowClick||(this.params.preventClicks&amp;&amp;e.preventDefault(),this.params.preventClicksPropagation&amp;&amp;this.animating&amp;&amp;(e.stopPropagation(),e.stopImmediatePropagation()))}.bind(e);var r,n="container"===t.touchEventsTarget?i:s,o=!!t.nested;ae.touch||!ae.pointerEvents&amp;&amp;!ae.prefixedPointerEvents?(ae.touch&amp;&amp;(r=!("touchstart"!==a.start||!ae.passiveListener||!t.passiveListeners)&amp;&amp;{passive:!0,capture:!1},n.addEventListener(a.start,e.onTouchStart,r),n.addEventListener(a.move,e.onTouchMove,ae.passiveListener?{passive:!1,capture:o}:o),n.addEventListener(a.end,e.onTouchEnd,r)),(t.simulateTouch&amp;&amp;!C.ios&amp;&amp;!C.android||t.simulateTouch&amp;&amp;!ae.touch&amp;&amp;C.ios)&amp;&amp;(n.addEventListener("mousedown",e.onTouchStart,!1),f.addEventListener("mousemove",e.onTouchMove,o),f.addEventListener("mouseup",e.onTouchEnd,!1))):(n.addEventListener(a.start,e.onTouchStart,!1),f.addEventListener(a.move,e.onTouchMove,o),f.addEventListener(a.end,e.onTouchEnd,!1)),(t.preventClicks||t.preventClicksPropagation)&amp;&amp;n.addEventListener("click",e.onClick,!0),e.on(C.ios||C.android?"resize orientationchange observerUpdate":"resize observerUpdate",M,!0)},detachEvents:function(){var e,t=this,a=t.params,i=t.touchEvents,s=t.el,r=t.wrapperEl,n="container"===a.touchEventsTarget?s:r,o=!!a.nested;ae.touch||!ae.pointerEvents&amp;&amp;!ae.prefixedPointerEvents?(ae.touch&amp;&amp;(e=!("onTouchStart"!==i.start||!ae.passiveListener||!a.passiveListeners)&amp;&amp;{passive:!0,capture:!1},n.removeEventListener(i.start,t.onTouchStart,e),n.removeEventListener(i.move,t.onTouchMove,o),n.removeEventListener(i.end,t.onTouchEnd,e)),(a.simulateTouch&amp;&amp;!C.ios&amp;&amp;!C.android||a.simulateTouch&amp;&amp;!ae.touch&amp;&amp;C.ios)&amp;&amp;(n.removeEventListener("mousedown",t.onTouchStart,!1),f.removeEventListener("mousemove",t.onTouchMove,o),f.removeEventListener("mouseup",t.onTouchEnd,!1))):(n.removeEventListener(i.start,t.onTouchStart,!1),f.removeEventListener(i.move,t.onTouchMove,o),f.removeEventListener(i.end,t.onTouchEnd,!1)),(a.preventClicks||a.preventClicksPropagation)&amp;&amp;n.removeEventListener("click",t.onClick,!0),t.off(C.ios||C.android?"resize orientationchange observerUpdate":"resize observerUpdate",M)}},breakpoints:{setBreakpoint:function(){var e=this,t=e.activeIndex,a=e.initialized,i=e.loopedSlides;void 0===i&amp;&amp;(i=0);var s,r,n,o,l,d=e.params,p=d.breakpoints;!p||p&amp;&amp;0===Object.keys(p).length||(s=e.getBreakpoint(p))&amp;&amp;e.currentBreakpoint!==s&amp;&amp;((r=s in p?p[s]:void 0)&amp;&amp;["slidesPerView","spaceBetween","slidesPerGroup"].forEach(function(e){var t=r[e];void 0!==t&amp;&amp;(r[e]="slidesPerView"!==e||"AUTO"!==t&amp;&amp;"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")}),o=(n=r||e.originalParams).direction&amp;&amp;n.direction!==d.direction,l=d.loop&amp;&amp;(n.slidesPerView!==d.slidesPerView||o),o&amp;&amp;a&amp;&amp;e.changeDirection(),te.extend(e.params,n),te.extend(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),e.currentBreakpoint=s,l&amp;&amp;a&amp;&amp;(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-i+e.loopedSlides,0,!1)),e.emit("breakpoint",n))},getBreakpoint:function(e){if(e){var t=!1,a=[];Object.keys(e).forEach(function(e){a.push(e)}),a.sort(function(e,t){return parseInt(e,10)-parseInt(t,10)});for(var i=0;i&lt;a.length;i+=1){var s=a[i];this.params.breakpointsInverse?s&lt;=ee.innerWidth&amp;&amp;(t=s):s&gt;=ee.innerWidth&amp;&amp;!t&amp;&amp;(t=s)}return t||"max"}}},checkOverflow:{checkOverflow:function(){var e=this,t=e.isLocked;e.isLocked=1===e.snapGrid.length,e.allowSlideNext=!e.isLocked,e.allowSlidePrev=!e.isLocked,t!==e.isLocked&amp;&amp;e.emit(e.isLocked?"lock":"unlock"),t&amp;&amp;t!==e.isLocked&amp;&amp;(e.isEnd=!1,e.navigation.update())}},classes:{addClasses:function(){var t=this.classNames,a=this.params,e=this.rtl,i=this.$el,s=[];s.push("initialized"),s.push(a.direction),a.freeMode&amp;&amp;s.push("free-mode"),ae.flexbox||s.push("no-flexbox"),a.autoHeight&amp;&amp;s.push("autoheight"),e&amp;&amp;s.push("rtl"),1&lt;a.slidesPerColumn&amp;&amp;s.push("multirow"),C.android&amp;&amp;s.push("android"),C.ios&amp;&amp;s.push("ios"),(ie.isIE||ie.isEdge)&amp;&amp;(ae.pointerEvents||ae.prefixedPointerEvents)&amp;&amp;s.push("wp8-"+a.direction),s.forEach(function(e){t.push(a.containerModifierClass+e)}),i.addClass(t.join(" "))},removeClasses:function(){var e=this.$el,t=this.classNames;e.removeClass(t.join(" "))}},images:{loadImage:function(e,t,a,i,s,r){var n;function o(){r&amp;&amp;r()}(!e.complete||!s)&amp;&amp;t?((n=new ee.Image).onload=o,n.onerror=o,i&amp;&amp;(n.sizes=i),a&amp;&amp;(n.srcset=a),t&amp;&amp;(n.src=t)):o()},preloadImages:function(){var e=this;function t(){null!=e&amp;&amp;e&amp;&amp;!e.destroyed&amp;&amp;(void 0!==e.imagesLoaded&amp;&amp;(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&amp;&amp;(e.params.updateOnImagesReady&amp;&amp;e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(var a=0;a&lt;e.imagesToLoad.length;a+=1){var i=e.imagesToLoad[a];e.loadImage(i,i.currentSrc||i.getAttribute("src"),i.srcset||i.getAttribute("srcset"),i.sizes||i.getAttribute("sizes"),!0,t)}}}},D={},O=function(c){function u(){for(var e,s,t=[],a=arguments.length;a--;)t[a]=arguments[a];s=(s=1===t.length&amp;&amp;t[0].constructor&amp;&amp;t[0].constructor===Object?t[0]:(e=t[0],t[1]))||{},s=te.extend({},s),e&amp;&amp;!s.el&amp;&amp;(s.el=e),c.call(this,s),Object.keys(L).forEach(function(t){Object.keys(L[t]).forEach(function(e){u.prototype[e]||(u.prototype[e]=L[t][e])})});var r=this;void 0===r.modules&amp;&amp;(r.modules={}),Object.keys(r.modules).forEach(function(e){var t=r.modules[e];if(t.params){var a=Object.keys(t.params)[0],i=t.params[a];if("object"!=typeof i||null===i)return;if(!(a in s&amp;&amp;"enabled"in i))return;!0===s[a]&amp;&amp;(s[a]={enabled:!0}),"object"!=typeof s[a]||"enabled"in s[a]||(s[a].enabled=!0),s[a]||(s[a]={enabled:!1})}});var i=te.extend({},$);r.useModulesParams(i),r.params=te.extend({},i,D,s),r.originalParams=te.extend({},r.params),r.passedParams=te.extend({},s);var n=(r.$=I)(r.params.el);if(e=n[0]){if(1&lt;n.length){var o=[];return n.each(function(e,t){var a=te.extend({},s,{el:t});o.push(new u(a))}),o}e.swiper=r,n.data("swiper",r);var l,d,p=n.children("."+r.params.wrapperClass);return te.extend(r,{$el:n,el:e,$wrapperEl:p,wrapperEl:p[0],classNames:[],slides:I(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===r.params.direction},isVertical:function(){return"vertical"===r.params.direction},rtl:"rtl"===e.dir.toLowerCase()||"rtl"===n.css("direction"),rtlTranslate:"horizontal"===r.params.direction&amp;&amp;("rtl"===e.dir.toLowerCase()||"rtl"===n.css("direction")),wrongRTL:"-webkit-box"===p.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:r.params.allowSlideNext,allowSlidePrev:r.params.allowSlidePrev,touchEvents:(l=["touchstart","touchmove","touchend"],d=["mousedown","mousemove","mouseup"],ae.pointerEvents?d=["pointerdown","pointermove","pointerup"]:ae.prefixedPointerEvents&amp;&amp;(d=["MSPointerDown","MSPointerMove","MSPointerUp"]),r.touchEventsTouch={start:l[0],move:l[1],end:l[2]},r.touchEventsDesktop={start:d[0],move:d[1],end:d[2]},ae.touch||!r.params.simulateTouch?r.touchEventsTouch:r.touchEventsDesktop),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,formElements:"input, select, option, textarea, button, video",lastClickTime:te.now(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:r.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),r.useModules(),r.params.init&amp;&amp;r.init(),r}}c&amp;&amp;(u.__proto__=c);var e={extendedDefaults:{configurable:!0},defaults:{configurable:!0},Class:{configurable:!0},$:{configurable:!0}};return((u.prototype=Object.create(c&amp;&amp;c.prototype)).constructor=u).prototype.slidesPerViewDynamic=function(){var e=this,t=e.params,a=e.slides,i=e.slidesGrid,s=e.size,r=e.activeIndex,n=1;if(t.centeredSlides){for(var o,l=a[r].swiperSlideSize,d=r+1;d&lt;a.length;d+=1)a[d]&amp;&amp;!o&amp;&amp;(n+=1,s&lt;(l+=a[d].swiperSlideSize)&amp;&amp;(o=!0));for(var p=r-1;0&lt;=p;--p)a[p]&amp;&amp;!o&amp;&amp;(n+=1,s&lt;(l+=a[p].swiperSlideSize)&amp;&amp;(o=!0))}else for(var c=r+1;c&lt;a.length;c+=1)i[c]-i[r]&lt;s&amp;&amp;(n+=1);return n},u.prototype.update=function(){var e,t,a=this;function i(){var e=a.rtlTranslate?-1*a.translate:a.translate,t=Math.min(Math.max(e,a.maxTranslate()),a.minTranslate());a.setTranslate(t),a.updateActiveIndex(),a.updateSlidesClasses()}a&amp;&amp;!a.destroyed&amp;&amp;(e=a.snapGrid,(t=a.params).breakpoints&amp;&amp;a.setBreakpoint(),a.updateSize(),a.updateSlides(),a.updateProgress(),a.updateSlidesClasses(),a.params.freeMode?(i(),a.params.autoHeight&amp;&amp;a.updateAutoHeight()):(("auto"===a.params.slidesPerView||1&lt;a.params.slidesPerView)&amp;&amp;a.isEnd&amp;&amp;!a.params.centeredSlides?a.slideTo(a.slides.length-1,0,!1,!0):a.slideTo(a.activeIndex,0,!1,!0))||i(),t.watchOverflow&amp;&amp;e!==a.snapGrid&amp;&amp;a.checkOverflow(),a.emit("update"))},u.prototype.changeDirection=function(a,e){void 0===e&amp;&amp;(e=!0);var t=this,i=t.params.direction;return(a=a||("horizontal"===i?"vertical":"horizontal"))===i||"horizontal"!==a&amp;&amp;"vertical"!==a||(t.$el.removeClass(""+t.params.containerModifierClass+i+" wp8-"+i).addClass(""+t.params.containerModifierClass+a),(ie.isIE||ie.isEdge)&amp;&amp;(ae.pointerEvents||ae.prefixedPointerEvents)&amp;&amp;t.$el.addClass(t.params.containerModifierClass+"wp8-"+a),t.params.direction=a,t.slides.each(function(e,t){"vertical"===a?t.style.width="":t.style.height=""}),t.emit("changeDirection"),e&amp;&amp;t.update()),t},u.prototype.init=function(){var e=this;e.initialized||(e.emit("beforeInit"),e.params.breakpoints&amp;&amp;e.setBreakpoint(),e.addClasses(),e.params.loop&amp;&amp;e.loopCreate(),e.updateSize(),e.updateSlides(),e.params.watchOverflow&amp;&amp;e.checkOverflow(),e.params.grabCursor&amp;&amp;e.setGrabCursor(),e.params.preloadImages&amp;&amp;e.preloadImages(),e.params.loop?e.slideTo(e.params.initialSlide+e.loopedSlides,0,e.params.runCallbacksOnInit):e.slideTo(e.params.initialSlide,0,e.params.runCallbacksOnInit),e.attachEvents(),e.initialized=!0,e.emit("init"))},u.prototype.destroy=function(e,t){void 0===e&amp;&amp;(e=!0),void 0===t&amp;&amp;(t=!0);var a=this,i=a.params,s=a.$el,r=a.$wrapperEl,n=a.slides;return void 0===a.params||a.destroyed||(a.emit("beforeDestroy"),a.initialized=!1,a.detachEvents(),i.loop&amp;&amp;a.loopDestroy(),t&amp;&amp;(a.removeClasses(),s.removeAttr("style"),r.removeAttr("style"),n&amp;&amp;n.length&amp;&amp;n.removeClass([i.slideVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index").removeAttr("data-swiper-column").removeAttr("data-swiper-row")),a.emit("destroy"),Object.keys(a.eventsListeners).forEach(function(e){a.off(e)}),!1!==e&amp;&amp;(a.$el[0].swiper=null,a.$el.data("swiper",null),te.deleteProps(a)),a.destroyed=!0),null},u.extendDefaults=function(e){te.extend(D,e)},e.extendedDefaults.get=function(){return D},e.defaults.get=function(){return $},e.Class.get=function(){return c},e.$.get=function(){return I},Object.defineProperties(u,e),u}(e),A={name:"device",proto:{device:C},static:{device:C}},H={name:"support",proto:{support:ae},static:{support:ae}},G={name:"browser",proto:{browser:ie},static:{browser:ie}},N={name:"resize",create:function(){var e=this;te.extend(e,{resize:{resizeHandler:function(){e&amp;&amp;!e.destroyed&amp;&amp;e.initialized&amp;&amp;(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler:function(){e&amp;&amp;!e.destroyed&amp;&amp;e.initialized&amp;&amp;e.emit("orientationchange")}}})},on:{init:function(){ee.addEventListener("resize",this.resize.resizeHandler),ee.addEventListener("orientationchange",this.resize.orientationChangeHandler)},destroy:function(){ee.removeEventListener("resize",this.resize.resizeHandler),ee.removeEventListener("orientationchange",this.resize.orientationChangeHandler)}}},B={func:ee.MutationObserver||ee.WebkitMutationObserver,attach:function(e,t){void 0===t&amp;&amp;(t={});var a=this,i=new B.func(function(e){var t;1!==e.length?(t=function(){a.emit("observerUpdate",e[0])},ee.requestAnimationFrame?ee.requestAnimationFrame(t):ee.setTimeout(t,0)):a.emit("observerUpdate",e[0])});i.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),a.observer.observers.push(i)},init:function(){var e=this;if(ae.observer&amp;&amp;e.params.observer){if(e.params.observeParents)for(var t=e.$el.parents(),a=0;a&lt;t.length;a+=1)e.observer.attach(t[a]);e.observer.attach(e.$el[0],{childList:e.params.observeSlideChildren}),e.observer.attach(e.$wrapperEl[0],{attributes:!1})}},destroy:function(){this.observer.observers.forEach(function(e){e.disconnect()}),this.observer.observers=[]}},X={name:"observer",params:{observer:!1,observeParents:!1,observeSlideChildren:!1},create:function(){te.extend(this,{observer:{init:B.init.bind(this),attach:B.attach.bind(this),destroy:B.destroy.bind(this),observers:[]}})},on:{init:function(){this.observer.init()},destroy:function(){this.observer.destroy()}}},V={update:function(e){var t=this,a=t.params,i=a.slidesPerView,s=a.slidesPerGroup,r=a.centeredSlides,n=t.params.virtual,o=n.addSlidesBefore,l=n.addSlidesAfter,d=t.virtual,p=d.from,c=d.to,u=d.slides,h=d.slidesGrid,v=d.renderSlide,f=d.offset;t.updateActiveIndex();var m,g=t.activeIndex||0,b=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",w=r?(m=Math.floor(i/2)+s+o,Math.floor(i/2)+s+l):(m=i+(s-1)+o,s+l),y=Math.max((g||0)-w,0),x=Math.min((g||0)+m,u.length-1),T=(t.slidesGrid[y]||0)-(t.slidesGrid[0]||0);function E(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&amp;&amp;t.params.lazy.enabled&amp;&amp;t.lazy.load()}if(te.extend(t.virtual,{from:y,to:x,offset:T,slidesGrid:t.slidesGrid}),p===y&amp;&amp;c===x&amp;&amp;!e)return t.slidesGrid!==h&amp;&amp;T!==f&amp;&amp;t.slides.css(b,T+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:T,from:y,to:x,slides:function(){for(var e=[],t=y;t&lt;=x;t+=1)e.push(u[t]);return e}()}),void E();var S=[],C=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(var M=p;M&lt;=c;M+=1)(M&lt;y||x&lt;M)&amp;&amp;t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+M+'"]').remove();for(var P=0;P&lt;u.length;P+=1)y&lt;=P&amp;&amp;P&lt;=x&amp;&amp;(void 0===c||e?C.push(P):(c&lt;P&amp;&amp;C.push(P),P&lt;p&amp;&amp;S.push(P)));C.forEach(function(e){t.$wrapperEl.append(v(u[e],e))}),S.sort(function(e,t){return t-e}).forEach(function(e){t.$wrapperEl.prepend(v(u[e],e))}),t.$wrapperEl.children(".swiper-slide").css(b,T+"px"),E()},renderSlide:function(e,t){var a=this,i=a.params.virtual;if(i.cache&amp;&amp;a.virtual.cache[t])return a.virtual.cache[t];var s=i.renderSlide?I(i.renderSlide.call(a,e,t)):I('&lt;div class="'+a.params.slideClass+'" data-swiper-slide-index="'+t+'"&gt;'+e+"&lt;/div&gt;");return s.attr("data-swiper-slide-index")||s.attr("data-swiper-slide-index",t),i.cache&amp;&amp;(a.virtual.cache[t]=s),s},appendSlide:function(e){if("object"==typeof e&amp;&amp;"length"in e)for(var t=0;t&lt;e.length;t+=1)e[t]&amp;&amp;this.virtual.slides.push(e[t]);else this.virtual.slides.push(e);this.virtual.update(!0)},prependSlide:function(e){var t,a,i=this,s=i.activeIndex,r=s+1,n=1;if(Array.isArray(e)){for(var o=0;o&lt;e.length;o+=1)e[o]&amp;&amp;i.virtual.slides.unshift(e[o]);r=s+e.length,n=e.length}else i.virtual.slides.unshift(e);i.params.virtual.cache&amp;&amp;(t=i.virtual.cache,a={},Object.keys(t).forEach(function(e){a[parseInt(e,10)+n]=t[e]}),i.virtual.cache=a),i.virtual.update(!0),i.slideTo(r,0)},removeSlide:function(e){var t=this;if(null!=e){var a=t.activeIndex;if(Array.isArray(e))for(var i=e.length-1;0&lt;=i;--i)t.virtual.slides.splice(e[i],1),t.params.virtual.cache&amp;&amp;delete t.virtual.cache[e[i]],e[i]&lt;a&amp;&amp;--a,a=Math.max(a,0);else t.virtual.slides.splice(e,1),t.params.virtual.cache&amp;&amp;delete t.virtual.cache[e],e&lt;a&amp;&amp;--a,a=Math.max(a,0);t.virtual.update(!0),t.slideTo(a,0)}},removeAllSlides:function(){var e=this;e.virtual.slides=[],e.params.virtual.cache&amp;&amp;(e.virtual.cache={}),e.virtual.update(!0),e.slideTo(0,0)}},Y={name:"virtual",params:{virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,addSlidesBefore:0,addSlidesAfter:0}},create:function(){var e=this;te.extend(e,{virtual:{update:V.update.bind(e),appendSlide:V.appendSlide.bind(e),prependSlide:V.prependSlide.bind(e),removeSlide:V.removeSlide.bind(e),removeAllSlides:V.removeAllSlides.bind(e),renderSlide:V.renderSlide.bind(e),slides:e.params.virtual.slides,cache:{}}})},on:{beforeInit:function(){var e,t=this;t.params.virtual.enabled&amp;&amp;(t.classNames.push(t.params.containerModifierClass+"virtual"),e={watchSlidesProgress:!0},te.extend(t.params,e),te.extend(t.originalParams,e),t.params.initialSlide||t.virtual.update())},setTranslate:function(){this.params.virtual.enabled&amp;&amp;this.virtual.update()}}},F={handle:function(e){var t=this,a=t.rtlTranslate,i=e;i.originalEvent&amp;&amp;(i=i.originalEvent);var s=i.keyCode||i.charCode;if(!t.allowSlideNext&amp;&amp;(t.isHorizontal()&amp;&amp;39===s||t.isVertical()&amp;&amp;40===s||34===s))return!1;if(!t.allowSlidePrev&amp;&amp;(t.isHorizontal()&amp;&amp;37===s||t.isVertical()&amp;&amp;38===s||33===s))return!1;if(!(i.shiftKey||i.altKey||i.ctrlKey||i.metaKey||f.activeElement&amp;&amp;f.activeElement.nodeName&amp;&amp;("input"===f.activeElement.nodeName.toLowerCase()||"textarea"===f.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&amp;&amp;(33===s||34===s||37===s||39===s||38===s||40===s)){var r=!1;if(0&lt;t.$el.parents("."+t.params.slideClass).length&amp;&amp;0===t.$el.parents("."+t.params.slideActiveClass).length)return;var n=ee.innerWidth,o=ee.innerHeight,l=t.$el.offset();a&amp;&amp;(l.left-=t.$el[0].scrollLeft);for(var d=[[l.left,l.top],[l.left+t.width,l.top],[l.left,l.top+t.height],[l.left+t.width,l.top+t.height]],p=0;p&lt;d.length;p+=1){var c=d[p];0&lt;=c[0]&amp;&amp;c[0]&lt;=n&amp;&amp;0&lt;=c[1]&amp;&amp;c[1]&lt;=o&amp;&amp;(r=!0)}if(!r)return}t.isHorizontal()?(33!==s&amp;&amp;34!==s&amp;&amp;37!==s&amp;&amp;39!==s||(i.preventDefault?i.preventDefault():i.returnValue=!1),(34!==s&amp;&amp;39!==s||a)&amp;&amp;(33!==s&amp;&amp;37!==s||!a)||t.slideNext(),(33!==s&amp;&amp;37!==s||a)&amp;&amp;(34!==s&amp;&amp;39!==s||!a)||t.slidePrev()):(33!==s&amp;&amp;34!==s&amp;&amp;38!==s&amp;&amp;40!==s||(i.preventDefault?i.preventDefault():i.returnValue=!1),34!==s&amp;&amp;40!==s||t.slideNext(),33!==s&amp;&amp;38!==s||t.slidePrev()),t.emit("keyPress",s)}},enable:function(){this.keyboard.enabled||(I(f).on("keydown",this.keyboard.handle),this.keyboard.enabled=!0)},disable:function(){this.keyboard.enabled&amp;&amp;(I(f).off("keydown",this.keyboard.handle),this.keyboard.enabled=!1)}},R={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0}},create:function(){te.extend(this,{keyboard:{enabled:!1,enable:F.enable.bind(this),disable:F.disable.bind(this),handle:F.handle.bind(this)}})},on:{init:function(){this.params.keyboard.enabled&amp;&amp;this.keyboard.enable()},destroy:function(){this.keyboard.enabled&amp;&amp;this.keyboard.disable()}}},q={lastScrollTime:te.now(),event:-1&lt;ee.navigator.userAgent.indexOf("firefox")?"DOMMouseScroll":((z=(k="onwheel")in f)||((P=f.createElement("div")).setAttribute(k,"return;"),z="function"==typeof P[k]),!z&amp;&amp;f.implementation&amp;&amp;f.implementation.hasFeature&amp;&amp;!0!==f.implementation.hasFeature("","")&amp;&amp;(z=f.implementation.hasFeature("Events.wheel","3.0")),z?"wheel":"mousewheel"),normalize:function(e){var t=0,a=0,i=0,s=0;return"detail"in e&amp;&amp;(a=e.detail),"wheelDelta"in e&amp;&amp;(a=-e.wheelDelta/120),"wheelDeltaY"in e&amp;&amp;(a=-e.wheelDeltaY/120),"wheelDeltaX"in e&amp;&amp;(t=-e.wheelDeltaX/120),"axis"in e&amp;&amp;e.axis===e.HORIZONTAL_AXIS&amp;&amp;(t=a,a=0),i=10*t,s=10*a,"deltaY"in e&amp;&amp;(s=e.deltaY),"deltaX"in e&amp;&amp;(i=e.deltaX),(i||s)&amp;&amp;e.deltaMode&amp;&amp;(1===e.deltaMode?(i*=40,s*=40):(i*=800,s*=800)),i&amp;&amp;!t&amp;&amp;(t=i&lt;1?-1:1),s&amp;&amp;!a&amp;&amp;(a=s&lt;1?-1:1),{spinX:t,spinY:a,pixelX:i,pixelY:s}},handleMouseEnter:function(){this.mouseEntered=!0},handleMouseLeave:function(){this.mouseEntered=!1},handle:function(e){var t=e,a=this,i=a.params.mousewheel;if(!a.mouseEntered&amp;&amp;!i.releaseOnEdges)return!0;t.originalEvent&amp;&amp;(t=t.originalEvent);var s=0,r=a.rtlTranslate?-1:1,n=q.normalize(t);if(i.forceToAxis)if(a.isHorizontal()){if(!(Math.abs(n.pixelX)&gt;Math.abs(n.pixelY)))return!0;s=n.pixelX*r}else{if(!(Math.abs(n.pixelY)&gt;Math.abs(n.pixelX)))return!0;s=n.pixelY}else s=Math.abs(n.pixelX)&gt;Math.abs(n.pixelY)?-n.pixelX*r:-n.pixelY;if(0===s)return!0;if(i.invert&amp;&amp;(s=-s),a.params.freeMode){a.params.loop&amp;&amp;a.loopFix();var o=a.getTranslate()+s*i.sensitivity,l=a.isBeginning,d=a.isEnd;if(o&gt;=a.minTranslate()&amp;&amp;(o=a.minTranslate()),o&lt;=a.maxTranslate()&amp;&amp;(o=a.maxTranslate()),a.setTransition(0),a.setTranslate(o),a.updateProgress(),a.updateActiveIndex(),a.updateSlidesClasses(),(!l&amp;&amp;a.isBeginning||!d&amp;&amp;a.isEnd)&amp;&amp;a.updateSlidesClasses(),a.params.freeModeSticky&amp;&amp;(clearTimeout(a.mousewheel.timeout),a.mousewheel.timeout=te.nextTick(function(){a.slideToClosest()},300)),a.emit("scroll",t),a.params.autoplay&amp;&amp;a.params.autoplayDisableOnInteraction&amp;&amp;a.autoplay.stop(),o===a.minTranslate()||o===a.maxTranslate())return!0}else{if(60&lt;te.now()-a.mousewheel.lastScrollTime)if(s&lt;0)if(a.isEnd&amp;&amp;!a.params.loop||a.animating){if(i.releaseOnEdges)return!0}else a.slideNext(),a.emit("scroll",t);else if(a.isBeginning&amp;&amp;!a.params.loop||a.animating){if(i.releaseOnEdges)return!0}else a.slidePrev(),a.emit("scroll",t);a.mousewheel.lastScrollTime=(new ee.Date).getTime()}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1},enable:function(){var e=this;if(!q.event)return!1;if(e.mousewheel.enabled)return!1;var t=e.$el;return"container"!==e.params.mousewheel.eventsTarged&amp;&amp;(t=I(e.params.mousewheel.eventsTarged)),t.on("mouseenter",e.mousewheel.handleMouseEnter),t.on("mouseleave",e.mousewheel.handleMouseLeave),t.on(q.event,e.mousewheel.handle),e.mousewheel.enabled=!0},disable:function(){var e=this;if(!q.event)return!1;if(!e.mousewheel.enabled)return!1;var t=e.$el;return"container"!==e.params.mousewheel.eventsTarged&amp;&amp;(t=I(e.params.mousewheel.eventsTarged)),t.off(q.event,e.mousewheel.handle),!(e.mousewheel.enabled=!1)}},W={update:function(){var e,t,a,i=this,s=i.params.navigation;i.params.loop||(t=(e=i.navigation).$nextEl,(a=e.$prevEl)&amp;&amp;0&lt;a.length&amp;&amp;(i.isBeginning?a.addClass(s.disabledClass):a.removeClass(s.disabledClass),a[i.params.watchOverflow&amp;&amp;i.isLocked?"addClass":"removeClass"](s.lockClass)),t&amp;&amp;0&lt;t.length&amp;&amp;(i.isEnd?t.addClass(s.disabledClass):t.removeClass(s.disabledClass),t[i.params.watchOverflow&amp;&amp;i.isLocked?"addClass":"removeClass"](s.lockClass)))},onPrevClick:function(e){e.preventDefault(),this.isBeginning&amp;&amp;!this.params.loop||this.slidePrev()},onNextClick:function(e){e.preventDefault(),this.isEnd&amp;&amp;!this.params.loop||this.slideNext()},init:function(){var e,t,a=this,i=a.params.navigation;(i.nextEl||i.prevEl)&amp;&amp;(i.nextEl&amp;&amp;(e=I(i.nextEl),a.params.uniqueNavElements&amp;&amp;"string"==typeof i.nextEl&amp;&amp;1&lt;e.length&amp;&amp;1===a.$el.find(i.nextEl).length&amp;&amp;(e=a.$el.find(i.nextEl))),i.prevEl&amp;&amp;(t=I(i.prevEl),a.params.uniqueNavElements&amp;&amp;"string"==typeof i.prevEl&amp;&amp;1&lt;t.length&amp;&amp;1===a.$el.find(i.prevEl).length&amp;&amp;(t=a.$el.find(i.prevEl))),e&amp;&amp;0&lt;e.length&amp;&amp;e.on("click",a.navigation.onNextClick),t&amp;&amp;0&lt;t.length&amp;&amp;t.on("click",a.navigation.onPrevClick),te.extend(a.navigation,{$nextEl:e,nextEl:e&amp;&amp;e[0],$prevEl:t,prevEl:t&amp;&amp;t[0]}))},destroy:function(){var e=this,t=e.navigation,a=t.$nextEl,i=t.$prevEl;a&amp;&amp;a.length&amp;&amp;(a.off("click",e.navigation.onNextClick),a.removeClass(e.params.navigation.disabledClass)),i&amp;&amp;i.length&amp;&amp;(i.off("click",e.navigation.onPrevClick),i.removeClass(e.params.navigation.disabledClass))}},j={update:function(){var e=this,t=e.rtl,s=e.params.pagination;if(s.el&amp;&amp;e.pagination.el&amp;&amp;e.pagination.$el&amp;&amp;0!==e.pagination.$el.length){var r,a,i,n,o,l=e.virtual&amp;&amp;e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,d=e.pagination.$el,p=e.params.loop?Math.ceil((l-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?((r=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup))&gt;l-1-2*e.loopedSlides&amp;&amp;(r-=l-2*e.loopedSlides),p-1&lt;r&amp;&amp;(r-=p),r&lt;0&amp;&amp;"bullets"!==e.params.paginationType&amp;&amp;(r=p+r)):r=void 0!==e.snapIndex?e.snapIndex:e.activeIndex||0,"bullets"===s.type&amp;&amp;e.pagination.bullets&amp;&amp;0&lt;e.pagination.bullets.length){var c,u,h,v,f,m,g=e.pagination.bullets;if(s.dynamicBullets&amp;&amp;(e.pagination.bulletSize=g.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),d.css(e.isHorizontal()?"width":"height",e.pagination.bulletSize*(s.dynamicMainBullets+4)+"px"),1&lt;s.dynamicMainBullets&amp;&amp;void 0!==e.previousIndex&amp;&amp;(e.pagination.dynamicBulletIndex+=r-e.previousIndex,e.pagination.dynamicBulletIndex&gt;s.dynamicMainBullets-1?e.pagination.dynamicBulletIndex=s.dynamicMainBullets-1:e.pagination.dynamicBulletIndex&lt;0&amp;&amp;(e.pagination.dynamicBulletIndex=0)),c=r-e.pagination.dynamicBulletIndex,h=((u=c+(Math.min(g.length,s.dynamicMainBullets)-1))+c)/2),g.removeClass(s.bulletActiveClass+" "+s.bulletActiveClass+"-next "+s.bulletActiveClass+"-next-next "+s.bulletActiveClass+"-prev "+s.bulletActiveClass+"-prev-prev "+s.bulletActiveClass+"-main"),1&lt;d.length)g.each(function(e,t){var a=I(t),i=a.index();i===r&amp;&amp;a.addClass(s.bulletActiveClass),s.dynamicBullets&amp;&amp;(c&lt;=i&amp;&amp;i&lt;=u&amp;&amp;a.addClass(s.bulletActiveClass+"-main"),i===c&amp;&amp;a.prev().addClass(s.bulletActiveClass+"-prev").prev().addClass(s.bulletActiveClass+"-prev-prev"),i===u&amp;&amp;a.next().addClass(s.bulletActiveClass+"-next").next().addClass(s.bulletActiveClass+"-next-next"))});else if(g.eq(r).addClass(s.bulletActiveClass),s.dynamicBullets){for(var b=g.eq(c),w=g.eq(u),y=c;y&lt;=u;y+=1)g.eq(y).addClass(s.bulletActiveClass+"-main");b.prev().addClass(s.bulletActiveClass+"-prev").prev().addClass(s.bulletActiveClass+"-prev-prev"),w.next().addClass(s.bulletActiveClass+"-next").next().addClass(s.bulletActiveClass+"-next-next")}s.dynamicBullets&amp;&amp;(v=Math.min(g.length,s.dynamicMainBullets+4),f=(e.pagination.bulletSize*v-e.pagination.bulletSize)/2-h*e.pagination.bulletSize,m=t?"right":"left",g.css(e.isHorizontal()?m:"top",f+"px"))}"fraction"===s.type&amp;&amp;(d.find("."+s.currentClass).text(s.formatFractionCurrent(r+1)),d.find("."+s.totalClass).text(s.formatFractionTotal(p))),"progressbar"===s.type&amp;&amp;(a=s.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical",i=(r+1)/p,o=n=1,"horizontal"==a?n=i:o=i,d.find("."+s.progressbarFillClass).transform("translate3d(0,0,0) scaleX("+n+") scaleY("+o+")").transition(e.params.speed)),"custom"===s.type&amp;&amp;s.renderCustom?(d.html(s.renderCustom(e,r+1,p)),e.emit("paginationRender",e,d[0])):e.emit("paginationUpdate",e,d[0]),d[e.params.watchOverflow&amp;&amp;e.isLocked?"addClass":"removeClass"](s.lockClass)}},render:function(){var e=this,t=e.params.pagination;if(t.el&amp;&amp;e.pagination.el&amp;&amp;e.pagination.$el&amp;&amp;0!==e.pagination.$el.length){var a=e.virtual&amp;&amp;e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,i=e.pagination.$el,s="";if("bullets"===t.type){for(var r=e.params.loop?Math.ceil((a-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length,n=0;n&lt;r;n+=1)t.renderBullet?s+=t.renderBullet.call(e,n,t.bulletClass):s+="&lt;"+t.bulletElement+' class="'+t.bulletClass+'"&gt;&lt;/'+t.bulletElement+"&gt;";i.html(s),e.pagination.bullets=i.find("."+t.bulletClass)}"fraction"===t.type&amp;&amp;(s=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):'&lt;span class="'+t.currentClass+'"&gt;&lt;/span&gt; / &lt;span class="'+t.totalClass+'"&gt;&lt;/span&gt;',i.html(s)),"progressbar"===t.type&amp;&amp;(s=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):'&lt;span class="'+t.progressbarFillClass+'"&gt;&lt;/span&gt;',i.html(s)),"custom"!==t.type&amp;&amp;e.emit("paginationRender",e.pagination.$el[0])}},init:function(){var e,a=this,t=a.params.pagination;!t.el||0!==(e=I(t.el)).length&amp;&amp;(a.params.uniqueNavElements&amp;&amp;"string"==typeof t.el&amp;&amp;1&lt;e.length&amp;&amp;1===a.$el.find(t.el).length&amp;&amp;(e=a.$el.find(t.el)),"bullets"===t.type&amp;&amp;t.clickable&amp;&amp;e.addClass(t.clickableClass),e.addClass(t.modifierClass+t.type),"bullets"===t.type&amp;&amp;t.dynamicBullets&amp;&amp;(e.addClass(""+t.modifierClass+t.type+"-dynamic"),a.pagination.dynamicBulletIndex=0,t.dynamicMainBullets&lt;1&amp;&amp;(t.dynamicMainBullets=1)),"progressbar"===t.type&amp;&amp;t.progressbarOpposite&amp;&amp;e.addClass(t.progressbarOppositeClass),t.clickable&amp;&amp;e.on("click","."+t.bulletClass,function(e){e.preventDefault();var t=I(this).index()*a.params.slidesPerGroup;a.params.loop&amp;&amp;(t+=a.loopedSlides),a.slideTo(t)}),te.extend(a.pagination,{$el:e,el:e[0]}))},destroy:function(){var e,t=this,a=t.params.pagination;a.el&amp;&amp;t.pagination.el&amp;&amp;t.pagination.$el&amp;&amp;0!==t.pagination.$el.length&amp;&amp;((e=t.pagination.$el).removeClass(a.hiddenClass),e.removeClass(a.modifierClass+a.type),t.pagination.bullets&amp;&amp;t.pagination.bullets.removeClass(a.bulletActiveClass),a.clickable&amp;&amp;e.off("click","."+a.bulletClass))}},U={setTranslate:function(){var e,t,a,i,s,r,n,o,l,d,p=this;p.params.scrollbar.el&amp;&amp;p.scrollbar.el&amp;&amp;(e=p.scrollbar,t=p.rtlTranslate,a=p.progress,i=e.dragSize,s=e.trackSize,r=e.$dragEl,n=e.$el,o=p.params.scrollbar,d=(s-(l=i))*a,t?0&lt;(d=-d)?(l=i-d,d=0):s&lt;-d+i&amp;&amp;(l=s+d):d&lt;0?(l=i+d,d=0):s&lt;d+i&amp;&amp;(l=s-d),p.isHorizontal()?(ae.transforms3d?r.transform("translate3d("+d+"px, 0, 0)"):r.transform("translateX("+d+"px)"),r[0].style.width=l+"px"):(ae.transforms3d?r.transform("translate3d(0px, "+d+"px, 0)"):r.transform("translateY("+d+"px)"),r[0].style.height=l+"px"),o.hide&amp;&amp;(clearTimeout(p.scrollbar.timeout),n[0].style.opacity=1,p.scrollbar.timeout=setTimeout(function(){n[0].style.opacity=0,n.transition(400)},1e3)))},setTransition:function(e){this.params.scrollbar.el&amp;&amp;this.scrollbar.el&amp;&amp;this.scrollbar.$dragEl.transition(e)},updateSize:function(){var e,t,a,i,s,r,n,o=this;o.params.scrollbar.el&amp;&amp;o.scrollbar.el&amp;&amp;(t=(e=o.scrollbar).$dragEl,a=e.$el,t[0].style.width="",t[0].style.height="",i=o.isHorizontal()?a[0].offsetWidth:a[0].offsetHeight,r=(s=o.size/o.virtualSize)*(i/o.size),n="auto"===o.params.scrollbar.dragSize?i*s:parseInt(o.params.scrollbar.dragSize,10),o.isHorizontal()?t[0].style.width=n+"px":t[0].style.height=n+"px",a[0].style.display=1&lt;=s?"none":"",o.params.scrollbar.hide&amp;&amp;(a[0].style.opacity=0),te.extend(e,{trackSize:i,divider:s,moveDivider:r,dragSize:n}),e.$el[o.params.watchOverflow&amp;&amp;o.isLocked?"addClass":"removeClass"](o.params.scrollbar.lockClass))},getPointerPosition:function(e){return this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY},setDragPosition:function(e){var t=this,a=t.scrollbar,i=t.rtlTranslate,s=a.$el,r=a.dragSize,n=a.trackSize,o=a.dragStartPos,l=(a.getPointerPosition(e)-s.offset()[t.isHorizontal()?"left":"top"]-(null!==o?o:r/2))/(n-r);l=Math.max(Math.min(l,1),0),i&amp;&amp;(l=1-l);var d=t.minTranslate()+(t.maxTranslate()-t.minTranslate())*l;t.updateProgress(d),t.setTranslate(d),t.updateActiveIndex(),t.updateSlidesClasses()},onDragStart:function(e){var t=this,a=t.params.scrollbar,i=t.scrollbar,s=t.$wrapperEl,r=i.$el,n=i.$dragEl;t.scrollbar.isTouched=!0,t.scrollbar.dragStartPos=e.target===n[0]||e.target===n?i.getPointerPosition(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),s.transition(100),n.transition(100),i.setDragPosition(e),clearTimeout(t.scrollbar.dragTimeout),r.transition(0),a.hide&amp;&amp;r.css("opacity",1),t.emit("scrollbarDragStart",e)},onDragMove:function(e){var t=this.scrollbar,a=this.$wrapperEl,i=t.$el,s=t.$dragEl;this.scrollbar.isTouched&amp;&amp;(e.preventDefault?e.preventDefault():e.returnValue=!1,t.setDragPosition(e),a.transition(0),i.transition(0),s.transition(0),this.emit("scrollbarDragMove",e))},onDragEnd:function(e){var t=this,a=t.params.scrollbar,i=t.scrollbar.$el;t.scrollbar.isTouched&amp;&amp;(t.scrollbar.isTouched=!1,a.hide&amp;&amp;(clearTimeout(t.scrollbar.dragTimeout),t.scrollbar.dragTimeout=te.nextTick(function(){i.css("opacity",0),i.transition(400)},1e3)),t.emit("scrollbarDragEnd",e),a.snapOnRelease&amp;&amp;t.slideToClosest())},enableDraggable:function(){var e,t,a,i,s,r,n,o=this;o.params.scrollbar.el&amp;&amp;(e=o.scrollbar,t=o.touchEventsTouch,a=o.touchEventsDesktop,i=o.params,s=e.$el[0],r=!(!ae.passiveListener||!i.passiveListeners)&amp;&amp;{passive:!1,capture:!1},n=!(!ae.passiveListener||!i.passiveListeners)&amp;&amp;{passive:!0,capture:!1},ae.touch?(s.addEventListener(t.start,o.scrollbar.onDragStart,r),s.addEventListener(t.move,o.scrollbar.onDragMove,r),s.addEventListener(t.end,o.scrollbar.onDragEnd,n)):(s.addEventListener(a.start,o.scrollbar.onDragStart,r),f.addEventListener(a.move,o.scrollbar.onDragMove,r),f.addEventListener(a.end,o.scrollbar.onDragEnd,n)))},disableDraggable:function(){var e,t,a,i,s,r,n,o=this;o.params.scrollbar.el&amp;&amp;(e=o.scrollbar,t=o.touchEventsTouch,a=o.touchEventsDesktop,i=o.params,s=e.$el[0],r=!(!ae.passiveListener||!i.passiveListeners)&amp;&amp;{passive:!1,capture:!1},n=!(!ae.passiveListener||!i.passiveListeners)&amp;&amp;{passive:!0,capture:!1},ae.touch?(s.removeEventListener(t.start,o.scrollbar.onDragStart,r),s.removeEventListener(t.move,o.scrollbar.onDragMove,r),s.removeEventListener(t.end,o.scrollbar.onDragEnd,n)):(s.removeEventListener(a.start,o.scrollbar.onDragStart,r),f.removeEventListener(a.move,o.scrollbar.onDragMove,r),f.removeEventListener(a.end,o.scrollbar.onDragEnd,n)))},init:function(){var e,t,a,i,s,r=this;r.params.scrollbar.el&amp;&amp;(e=r.scrollbar,t=r.$el,i=I((a=r.params.scrollbar).el),r.params.uniqueNavElements&amp;&amp;"string"==typeof a.el&amp;&amp;1&lt;i.length&amp;&amp;1===t.find(a.el).length&amp;&amp;(i=t.find(a.el)),0===(s=i.find("."+r.params.scrollbar.dragClass)).length&amp;&amp;(s=I('&lt;div class="'+r.params.scrollbar.dragClass+'"&gt;&lt;/div&gt;'),i.append(s)),te.extend(e,{$el:i,el:i[0],$dragEl:s,dragEl:s[0]}),a.draggable&amp;&amp;e.enableDraggable())},destroy:function(){this.scrollbar.disableDraggable()}},K={setTransform:function(e,t){var a,i,s=this.rtl,r=I(e),n=s?-1:1,o=r.attr("data-swiper-parallax")||"0",l=r.attr("data-swiper-parallax-x"),d=r.attr("data-swiper-parallax-y"),p=r.attr("data-swiper-parallax-scale"),c=r.attr("data-swiper-parallax-opacity");l||d?(l=l||"0",d=d||"0"):this.isHorizontal()?(l=o,d="0"):(d=o,l="0"),l=0&lt;=l.indexOf("%")?parseInt(l,10)*t*n+"%":l*t*n+"px",d=0&lt;=d.indexOf("%")?parseInt(d,10)*t+"%":d*t+"px",null!=c&amp;&amp;(a=c-(c-1)*(1-Math.abs(t)),r[0].style.opacity=a),null==p?r.transform("translate3d("+l+", "+d+", 0px)"):(i=p-(p-1)*(1-Math.abs(t)),r.transform("translate3d("+l+", "+d+", 0px) scale("+i+")"))},setTranslate:function(){var i=this,e=i.$el,t=i.slides,s=i.progress,r=i.snapGrid;e.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(function(e,t){i.parallax.setTransform(t,s)}),t.each(function(e,t){var a=t.progress;1&lt;i.params.slidesPerGroup&amp;&amp;"auto"!==i.params.slidesPerView&amp;&amp;(a+=Math.ceil(e/2)-s*(r.length-1)),a=Math.min(Math.max(a,-1),1),I(t).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(function(e,t){i.parallax.setTransform(t,a)})})},setTransition:function(s){void 0===s&amp;&amp;(s=this.params.speed),this.$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(function(e,t){var a=I(t),i=parseInt(a.attr("data-swiper-parallax-duration"),10)||s;0===s&amp;&amp;(i=0),a.transition(i)})}},_={getDistanceBetweenTouches:function(e){if(e.targetTouches.length&lt;2)return 1;var t=e.targetTouches[0].pageX,a=e.targetTouches[0].pageY,i=e.targetTouches[1].pageX,s=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(i-t,2)+Math.pow(s-a,2))},onGestureStart:function(e){var t=this,a=t.params.zoom,i=t.zoom,s=i.gesture;if(i.fakeGestureTouched=!1,i.fakeGestureMoved=!1,!ae.gestures){if("touchstart"!==e.type||"touchstart"===e.type&amp;&amp;e.targetTouches.length&lt;2)return;i.fakeGestureTouched=!0,s.scaleStart=_.getDistanceBetweenTouches(e)}s.$slideEl&amp;&amp;s.$slideEl.length||(s.$slideEl=I(e.target).closest(".swiper-slide"),0===s.$slideEl.length&amp;&amp;(s.$slideEl=t.slides.eq(t.activeIndex)),s.$imageEl=s.$slideEl.find("img, svg, canvas"),s.$imageWrapEl=s.$imageEl.parent("."+a.containerClass),s.maxRatio=s.$imageWrapEl.attr("data-swiper-zoom")||a.maxRatio,0!==s.$imageWrapEl.length)?(s.$imageEl.transition(0),t.zoom.isScaling=!0):s.$imageEl=void 0},onGestureChange:function(e){var t=this.params.zoom,a=this.zoom,i=a.gesture;if(!ae.gestures){if("touchmove"!==e.type||"touchmove"===e.type&amp;&amp;e.targetTouches.length&lt;2)return;a.fakeGestureMoved=!0,i.scaleMove=_.getDistanceBetweenTouches(e)}i.$imageEl&amp;&amp;0!==i.$imageEl.length&amp;&amp;(a.scale=ae.gestures?e.scale*a.currentScale:i.scaleMove/i.scaleStart*a.currentScale,a.scale&gt;i.maxRatio&amp;&amp;(a.scale=i.maxRatio-1+Math.pow(a.scale-i.maxRatio+1,.5)),a.scale&lt;t.minRatio&amp;&amp;(a.scale=t.minRatio+1-Math.pow(t.minRatio-a.scale+1,.5)),i.$imageEl.transform("translate3d(0,0,0) scale("+a.scale+")"))},onGestureEnd:function(e){var t=this.params.zoom,a=this.zoom,i=a.gesture;if(!ae.gestures){if(!a.fakeGestureTouched||!a.fakeGestureMoved)return;if("touchend"!==e.type||"touchend"===e.type&amp;&amp;e.changedTouches.length&lt;2&amp;&amp;!C.android)return;a.fakeGestureTouched=!1,a.fakeGestureMoved=!1}i.$imageEl&amp;&amp;0!==i.$imageEl.length&amp;&amp;(a.scale=Math.max(Math.min(a.scale,i.maxRatio),t.minRatio),i.$imageEl.transition(this.params.speed).transform("translate3d(0,0,0) scale("+a.scale+")"),a.currentScale=a.scale,a.isScaling=!1,1===a.scale&amp;&amp;(i.$slideEl=void 0))},onTouchStart:function(e){var t=this.zoom,a=t.gesture,i=t.image;a.$imageEl&amp;&amp;0!==a.$imageEl.length&amp;&amp;(i.isTouched||(C.android&amp;&amp;e.preventDefault(),i.isTouched=!0,i.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,i.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))},onTouchMove:function(e){var t=this,a=t.zoom,i=a.gesture,s=a.image,r=a.velocity;if(i.$imageEl&amp;&amp;0!==i.$imageEl.length&amp;&amp;(t.allowClick=!1,s.isTouched&amp;&amp;i.$slideEl)){s.isMoved||(s.width=i.$imageEl[0].offsetWidth,s.height=i.$imageEl[0].offsetHeight,s.startX=te.getTranslate(i.$imageWrapEl[0],"x")||0,s.startY=te.getTranslate(i.$imageWrapEl[0],"y")||0,i.slideWidth=i.$slideEl[0].offsetWidth,i.slideHeight=i.$slideEl[0].offsetHeight,i.$imageWrapEl.transition(0),t.rtl&amp;&amp;(s.startX=-s.startX,s.startY=-s.startY));var n=s.width*a.scale,o=s.height*a.scale;if(!(n&lt;i.slideWidth&amp;&amp;o&lt;i.slideHeight)){if(s.minX=Math.min(i.slideWidth/2-n/2,0),s.maxX=-s.minX,s.minY=Math.min(i.slideHeight/2-o/2,0),s.maxY=-s.minY,s.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,s.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!s.isMoved&amp;&amp;!a.isScaling){if(t.isHorizontal()&amp;&amp;(Math.floor(s.minX)===Math.floor(s.startX)&amp;&amp;s.touchesCurrent.x&lt;s.touchesStart.x||Math.floor(s.maxX)===Math.floor(s.startX)&amp;&amp;s.touchesCurrent.x&gt;s.touchesStart.x))return void(s.isTouched=!1);if(!t.isHorizontal()&amp;&amp;(Math.floor(s.minY)===Math.floor(s.startY)&amp;&amp;s.touchesCurrent.y&lt;s.touchesStart.y||Math.floor(s.maxY)===Math.floor(s.startY)&amp;&amp;s.touchesCurrent.y&gt;s.touchesStart.y))return void(s.isTouched=!1)}e.preventDefault(),e.stopPropagation(),s.isMoved=!0,s.currentX=s.touchesCurrent.x-s.touchesStart.x+s.startX,s.currentY=s.touchesCurrent.y-s.touchesStart.y+s.startY,s.currentX&lt;s.minX&amp;&amp;(s.currentX=s.minX+1-Math.pow(s.minX-s.currentX+1,.8)),s.currentX&gt;s.maxX&amp;&amp;(s.currentX=s.maxX-1+Math.pow(s.currentX-s.maxX+1,.8)),s.currentY&lt;s.minY&amp;&amp;(s.currentY=s.minY+1-Math.pow(s.minY-s.currentY+1,.8)),s.currentY&gt;s.maxY&amp;&amp;(s.currentY=s.maxY-1+Math.pow(s.currentY-s.maxY+1,.8)),r.prevPositionX||(r.prevPositionX=s.touchesCurrent.x),r.prevPositionY||(r.prevPositionY=s.touchesCurrent.y),r.prevTime||(r.prevTime=Date.now()),r.x=(s.touchesCurrent.x-r.prevPositionX)/(Date.now()-r.prevTime)/2,r.y=(s.touchesCurrent.y-r.prevPositionY)/(Date.now()-r.prevTime)/2,Math.abs(s.touchesCurrent.x-r.prevPositionX)&lt;2&amp;&amp;(r.x=0),Math.abs(s.touchesCurrent.y-r.prevPositionY)&lt;2&amp;&amp;(r.y=0),r.prevPositionX=s.touchesCurrent.x,r.prevPositionY=s.touchesCurrent.y,r.prevTime=Date.now(),i.$imageWrapEl.transform("translate3d("+s.currentX+"px, "+s.currentY+"px,0)")}}},onTouchEnd:function(){var e=this.zoom,t=e.gesture,a=e.image,i=e.velocity;if(t.$imageEl&amp;&amp;0!==t.$imageEl.length){if(!a.isTouched||!a.isMoved)return a.isTouched=!1,void(a.isMoved=!1);a.isTouched=!1,a.isMoved=!1;var s=300,r=300,n=i.x*s,o=a.currentX+n,l=i.y*r,d=a.currentY+l;0!==i.x&amp;&amp;(s=Math.abs((o-a.currentX)/i.x)),0!==i.y&amp;&amp;(r=Math.abs((d-a.currentY)/i.y));var p=Math.max(s,r);a.currentX=o,a.currentY=d;var c=a.width*e.scale,u=a.height*e.scale;a.minX=Math.min(t.slideWidth/2-c/2,0),a.maxX=-a.minX,a.minY=Math.min(t.slideHeight/2-u/2,0),a.maxY=-a.minY,a.currentX=Math.max(Math.min(a.currentX,a.maxX),a.minX),a.currentY=Math.max(Math.min(a.currentY,a.maxY),a.minY),t.$imageWrapEl.transition(p).transform("translate3d("+a.currentX+"px, "+a.currentY+"px,0)")}},onTransitionEnd:function(){var e=this.zoom,t=e.gesture;t.$slideEl&amp;&amp;this.previousIndex!==this.activeIndex&amp;&amp;(t.$imageEl.transform("translate3d(0,0,0) scale(1)"),t.$imageWrapEl.transform("translate3d(0,0,0)"),e.scale=1,e.currentScale=1,t.$slideEl=void 0,t.$imageEl=void 0,t.$imageWrapEl=void 0)},toggle:function(e){var t=this.zoom;t.scale&amp;&amp;1!==t.scale?t.out():t.in(e)},in:function(e){var t,a,i,s,r,n,o,l,d,p,c,u,h,v,f,m,g=this,b=g.zoom,w=g.params.zoom,y=b.gesture,x=b.image;y.$slideEl||(y.$slideEl=g.clickedSlide?I(g.clickedSlide):g.slides.eq(g.activeIndex),y.$imageEl=y.$slideEl.find("img, svg, canvas"),y.$imageWrapEl=y.$imageEl.parent("."+w.containerClass)),y.$imageEl&amp;&amp;0!==y.$imageEl.length&amp;&amp;(y.$slideEl.addClass(""+w.zoomedSlideClass),a=void 0===x.touchesStart.x&amp;&amp;e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,"touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=x.touchesStart.x,x.touchesStart.y),b.scale=y.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,b.currentScale=y.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,e?(f=y.$slideEl[0].offsetWidth,m=y.$slideEl[0].offsetHeight,i=y.$slideEl.offset().left+f/2-t,s=y.$slideEl.offset().top+m/2-a,o=y.$imageEl[0].offsetWidth,l=y.$imageEl[0].offsetHeight,d=o*b.scale,p=l*b.scale,h=-(c=Math.min(f/2-d/2,0)),v=-(u=Math.min(m/2-p/2,0)),(r=i*b.scale)&lt;c&amp;&amp;(r=c),h&lt;r&amp;&amp;(r=h),(n=s*b.scale)&lt;u&amp;&amp;(n=u),v&lt;n&amp;&amp;(n=v)):n=r=0,y.$imageWrapEl.transition(300).transform("translate3d("+r+"px, "+n+"px,0)"),y.$imageEl.transition(300).transform("translate3d(0,0,0) scale("+b.scale+")"))},out:function(){var e=this,t=e.zoom,a=e.params.zoom,i=t.gesture;i.$slideEl||(i.$slideEl=e.clickedSlide?I(e.clickedSlide):e.slides.eq(e.activeIndex),i.$imageEl=i.$slideEl.find("img, svg, canvas"),i.$imageWrapEl=i.$imageEl.parent("."+a.containerClass)),i.$imageEl&amp;&amp;0!==i.$imageEl.length&amp;&amp;(t.scale=1,t.currentScale=1,i.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),i.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),i.$slideEl.removeClass(""+a.zoomedSlideClass),i.$slideEl=void 0)},enable:function(){var e,t=this,a=t.zoom;a.enabled||(a.enabled=!0,e=!("touchstart"!==t.touchEvents.start||!ae.passiveListener||!t.params.passiveListeners)&amp;&amp;{passive:!0,capture:!1},ae.gestures?(t.$wrapperEl.on("gesturestart",".swiper-slide",a.onGestureStart,e),t.$wrapperEl.on("gesturechange",".swiper-slide",a.onGestureChange,e),t.$wrapperEl.on("gestureend",".swiper-slide",a.onGestureEnd,e)):"touchstart"===t.touchEvents.start&amp;&amp;(t.$wrapperEl.on(t.touchEvents.start,".swiper-slide",a.onGestureStart,e),t.$wrapperEl.on(t.touchEvents.move,".swiper-slide",a.onGestureChange,e),t.$wrapperEl.on(t.touchEvents.end,".swiper-slide",a.onGestureEnd,e)),t.$wrapperEl.on(t.touchEvents.move,"."+t.params.zoom.containerClass,a.onTouchMove))},disable:function(){var e,t=this,a=t.zoom;a.enabled&amp;&amp;(t.zoom.enabled=!1,e=!("touchstart"!==t.touchEvents.start||!ae.passiveListener||!t.params.passiveListeners)&amp;&amp;{passive:!0,capture:!1},ae.gestures?(t.$wrapperEl.off("gesturestart",".swiper-slide",a.onGestureStart,e),t.$wrapperEl.off("gesturechange",".swiper-slide",a.onGestureChange,e),t.$wrapperEl.off("gestureend",".swiper-slide",a.onGestureEnd,e)):"touchstart"===t.touchEvents.start&amp;&amp;(t.$wrapperEl.off(t.touchEvents.start,".swiper-slide",a.onGestureStart,e),t.$wrapperEl.off(t.touchEvents.move,".swiper-slide",a.onGestureChange,e),t.$wrapperEl.off(t.touchEvents.end,".swiper-slide",a.onGestureEnd,e)),t.$wrapperEl.off(t.touchEvents.move,"."+t.params.zoom.containerClass,a.onTouchMove))}},Z={loadInSlide:function(e,l){void 0===l&amp;&amp;(l=!0);var d,t,p=this,c=p.params.lazy;void 0!==e&amp;&amp;0!==p.slides.length&amp;&amp;(t=(d=p.virtual&amp;&amp;p.params.virtual.enabled?p.$wrapperEl.children("."+p.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):p.slides.eq(e)).find("."+c.elementClass+":not(."+c.loadedClass+"):not(."+c.loadingClass+")"),!d.hasClass(c.elementClass)||d.hasClass(c.loadedClass)||d.hasClass(c.loadingClass)||(t=t.add(d[0])),0!==t.length&amp;&amp;t.each(function(e,t){var i=I(t);i.addClass(c.loadingClass);var s=i.attr("data-background"),r=i.attr("data-src"),n=i.attr("data-srcset"),o=i.attr("data-sizes");p.loadImage(i[0],r||s,n,o,!1,function(){var e,t,a;null==p||!p||p&amp;&amp;!p.params||p.destroyed||(s?(i.css("background-image",'url("'+s+'")'),i.removeAttr("data-background")):(n&amp;&amp;(i.attr("srcset",n),i.removeAttr("data-srcset")),o&amp;&amp;(i.attr("sizes",o),i.removeAttr("data-sizes")),r&amp;&amp;(i.attr("src",r),i.removeAttr("data-src"))),i.addClass(c.loadedClass).removeClass(c.loadingClass),d.find("."+c.preloaderClass).remove(),p.params.loop&amp;&amp;l&amp;&amp;(e=d.attr("data-swiper-slide-index"),d.hasClass(p.params.slideDuplicateClass)?(t=p.$wrapperEl.children('[data-swiper-slide-index="'+e+'"]:not(.'+p.params.slideDuplicateClass+")"),p.lazy.loadInSlide(t.index(),!1)):(a=p.$wrapperEl.children("."+p.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]'),p.lazy.loadInSlide(a.index(),!1))),p.emit("lazyImageReady",d[0],i[0]))}),p.emit("lazyImageLoad",d[0],i[0])}))},load:function(){var i=this,t=i.$wrapperEl,a=i.params,s=i.slides,e=i.activeIndex,r=i.virtual&amp;&amp;a.virtual.enabled,n=a.lazy,o=a.slidesPerView;function l(e){if(r){if(t.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return 1}else if(s[e])return 1}function d(e){return r?I(e).attr("data-swiper-slide-index"):I(e).index()}if("auto"===o&amp;&amp;(o=0),i.lazy.initialImageLoaded||(i.lazy.initialImageLoaded=!0),i.params.watchSlidesVisibility)t.children("."+a.slideVisibleClass).each(function(e,t){var a=r?I(t).attr("data-swiper-slide-index"):I(t).index();i.lazy.loadInSlide(a)});else if(1&lt;o)for(var p=e;p&lt;e+o;p+=1)l(p)&amp;&amp;i.lazy.loadInSlide(p);else i.lazy.loadInSlide(e);if(n.loadPrevNext)if(1&lt;o||n.loadPrevNextAmount&amp;&amp;1&lt;n.loadPrevNextAmount){for(var c=n.loadPrevNextAmount,u=o,h=Math.min(e+u+Math.max(c,u),s.length),v=Math.max(e-Math.max(u,c),0),f=e+o;f&lt;h;f+=1)l(f)&amp;&amp;i.lazy.loadInSlide(f);for(var m=v;m&lt;e;m+=1)l(m)&amp;&amp;i.lazy.loadInSlide(m)}else{var g=t.children("."+a.slideNextClass);0&lt;g.length&amp;&amp;i.lazy.loadInSlide(d(g));var b=t.children("."+a.slidePrevClass);0&lt;b.length&amp;&amp;i.lazy.loadInSlide(d(b))}}},Q={LinearSpline:function(e,t){var a,i,s,r,n;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(n=function(e,t){for(i=-1,a=e.length;1&lt;a-i;)e[s=a+i&gt;&gt;1]&lt;=t?i=s:a=s;return a}(this.x,e),r=n-1,(e-this.x[r])*(this.y[n]-this.y[r])/(this.x[n]-this.x[r])+this.y[r]):0},this},getInterpolateFunction:function(e){var t=this;t.controller.spline||(t.controller.spline=t.params.loop?new Q.LinearSpline(t.slidesGrid,e.slidesGrid):new Q.LinearSpline(t.snapGrid,e.snapGrid))},setTranslate:function(e,t){var a,i,s=this,r=s.controller.control;function n(e){var t=s.rtlTranslate?-s.translate:s.translate;"slide"===s.params.controller.by&amp;&amp;(s.controller.getInterpolateFunction(e),i=-s.controller.spline.interpolate(-t)),i&amp;&amp;"container"!==s.params.controller.by||(a=(e.maxTranslate()-e.minTranslate())/(s.maxTranslate()-s.minTranslate()),i=(t-s.minTranslate())*a+e.minTranslate()),s.params.controller.inverse&amp;&amp;(i=e.maxTranslate()-i),e.updateProgress(i),e.setTranslate(i,s),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(r))for(var o=0;o&lt;r.length;o+=1)r[o]!==t&amp;&amp;r[o]instanceof O&amp;&amp;n(r[o]);else r instanceof O&amp;&amp;t!==r&amp;&amp;n(r)},setTransition:function(t,e){var a,i=this,s=i.controller.control;function r(e){e.setTransition(t,i),0!==t&amp;&amp;(e.transitionStart(),e.params.autoHeight&amp;&amp;te.nextTick(function(){e.updateAutoHeight()}),e.$wrapperEl.transitionEnd(function(){s&amp;&amp;(e.params.loop&amp;&amp;"slide"===i.params.controller.by&amp;&amp;e.loopFix(),e.transitionEnd())}))}if(Array.isArray(s))for(a=0;a&lt;s.length;a+=1)s[a]!==e&amp;&amp;s[a]instanceof O&amp;&amp;r(s[a]);else s instanceof O&amp;&amp;e!==s&amp;&amp;r(s)}},J={makeElFocusable:function(e){return e.attr("tabIndex","0"),e},addElRole:function(e,t){return e.attr("role",t),e},addElLabel:function(e,t){return e.attr("aria-label",t),e},disableEl:function(e){return e.attr("aria-disabled",!0),e},enableEl:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(e){var t,a=this,i=a.params.a11y;13===e.keyCode&amp;&amp;(t=I(e.target),a.navigation&amp;&amp;a.navigation.$nextEl&amp;&amp;t.is(a.navigation.$nextEl)&amp;&amp;(a.isEnd&amp;&amp;!a.params.loop||a.slideNext(),a.isEnd?a.a11y.notify(i.lastSlideMessage):a.a11y.notify(i.nextSlideMessage)),a.navigation&amp;&amp;a.navigation.$prevEl&amp;&amp;t.is(a.navigation.$prevEl)&amp;&amp;(a.isBeginning&amp;&amp;!a.params.loop||a.slidePrev(),a.isBeginning?a.a11y.notify(i.firstSlideMessage):a.a11y.notify(i.prevSlideMessage)),a.pagination&amp;&amp;t.is("."+a.params.pagination.bulletClass)&amp;&amp;t[0].click())},notify:function(e){var t=this.a11y.liveRegion;0!==t.length&amp;&amp;(t.html(""),t.html(e))},updateNavigation:function(){var e,t,a,i=this;i.params.loop||(t=(e=i.navigation).$nextEl,(a=e.$prevEl)&amp;&amp;0&lt;a.length&amp;&amp;(i.isBeginning?i.a11y.disableEl(a):i.a11y.enableEl(a)),t&amp;&amp;0&lt;t.length&amp;&amp;(i.isEnd?i.a11y.disableEl(t):i.a11y.enableEl(t)))},updatePagination:function(){var i=this,s=i.params.a11y;i.pagination&amp;&amp;i.params.pagination.clickable&amp;&amp;i.pagination.bullets&amp;&amp;i.pagination.bullets.length&amp;&amp;i.pagination.bullets.each(function(e,t){var a=I(t);i.a11y.makeElFocusable(a),i.a11y.addElRole(a,"button"),i.a11y.addElLabel(a,s.paginationBulletMessage.replace(/{{index}}/,a.index()+1))})},init:function(){var e=this;e.$el.append(e.a11y.liveRegion);var t,a,i=e.params.a11y;e.navigation&amp;&amp;e.navigation.$nextEl&amp;&amp;(t=e.navigation.$nextEl),e.navigation&amp;&amp;e.navigation.$prevEl&amp;&amp;(a=e.navigation.$prevEl),t&amp;&amp;(e.a11y.makeElFocusable(t),e.a11y.addElRole(t,"button"),e.a11y.addElLabel(t,i.nextSlideMessage),t.on("keydown",e.a11y.onEnterKey)),a&amp;&amp;(e.a11y.makeElFocusable(a),e.a11y.addElRole(a,"button"),e.a11y.addElLabel(a,i.prevSlideMessage),a.on("keydown",e.a11y.onEnterKey)),e.pagination&amp;&amp;e.params.pagination.clickable&amp;&amp;e.pagination.bullets&amp;&amp;e.pagination.bullets.length&amp;&amp;e.pagination.$el.on("keydown","."+e.params.pagination.bulletClass,e.a11y.onEnterKey)},destroy:function(){var e,t,a=this;a.a11y.liveRegion&amp;&amp;0&lt;a.a11y.liveRegion.length&amp;&amp;a.a11y.liveRegion.remove(),a.navigation&amp;&amp;a.navigation.$nextEl&amp;&amp;(e=a.navigation.$nextEl),a.navigation&amp;&amp;a.navigation.$prevEl&amp;&amp;(t=a.navigation.$prevEl),e&amp;&amp;e.off("keydown",a.a11y.onEnterKey),t&amp;&amp;t.off("keydown",a.a11y.onEnterKey),a.pagination&amp;&amp;a.params.pagination.clickable&amp;&amp;a.pagination.bullets&amp;&amp;a.pagination.bullets.length&amp;&amp;a.pagination.$el.off("keydown","."+a.params.pagination.bulletClass,a.a11y.onEnterKey)}},se={init:function(){var e=this;if(e.params.history){if(!ee.history||!ee.history.pushState)return e.params.history.enabled=!1,void(e.params.hashNavigation.enabled=!0);var t=e.history;t.initialized=!0,t.paths=se.getPathValues(),(t.paths.key||t.paths.value)&amp;&amp;(t.scrollToSlide(0,t.paths.value,e.params.runCallbacksOnInit),e.params.history.replaceState||ee.addEventListener("popstate",e.history.setHistoryPopState))}},destroy:function(){this.params.history.replaceState||ee.removeEventListener("popstate",this.history.setHistoryPopState)},setHistoryPopState:function(){this.history.paths=se.getPathValues(),this.history.scrollToSlide(this.params.speed,this.history.paths.value,!1)},getPathValues:function(){var e=ee.location.pathname.slice(1).split("/").filter(function(e){return""!==e}),t=e.length;return{key:e[t-2],value:e[t-1]}},setHistory:function(e,t){var a,i,s;this.history.initialized&amp;&amp;this.params.history.enabled&amp;&amp;(a=this.slides.eq(t),i=se.slugify(a.attr("data-history")),ee.location.pathname.includes(e)||(i=e+"/"+i),(s=ee.history.state)&amp;&amp;s.value===i||(this.params.history.replaceState?ee.history.replaceState({value:i},null,i):ee.history.pushState({value:i},null,i)))},slugify:function(e){return e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,t,a){var i=this;if(t)for(var s=0,r=i.slides.length;s&lt;r;s+=1){var n,o=i.slides.eq(s);se.slugify(o.attr("data-history"))!==t||o.hasClass(i.params.slideDuplicateClass)||(n=o.index(),i.slideTo(n,e,a))}else i.slideTo(0,e,a)}},re={onHashCange:function(){var e=this,t=f.location.hash.replace("#","");if(t!==e.slides.eq(e.activeIndex).attr("data-hash")){var a=e.$wrapperEl.children("."+e.params.slideClass+'[data-hash="'+t+'"]').index();if(void 0===a)return;e.slideTo(a)}},setHash:function(){var e,t,a=this;a.hashNavigation.initialized&amp;&amp;a.params.hashNavigation.enabled&amp;&amp;(a.params.hashNavigation.replaceState&amp;&amp;ee.history&amp;&amp;ee.history.replaceState?ee.history.replaceState(null,null,"#"+a.slides.eq(a.activeIndex).attr("data-hash")||""):(t=(e=a.slides.eq(a.activeIndex)).attr("data-hash")||e.attr("data-history"),f.location.hash=t||""))},init:function(){var e=this;if(!(!e.params.hashNavigation.enabled||e.params.history&amp;&amp;e.params.history.enabled)){e.hashNavigation.initialized=!0;var t=f.location.hash.replace("#","");if(t)for(var a=0,i=e.slides.length;a&lt;i;a+=1){var s,r=e.slides.eq(a);(r.attr("data-hash")||r.attr("data-history"))!==t||r.hasClass(e.params.slideDuplicateClass)||(s=r.index(),e.slideTo(s,0,e.params.runCallbacksOnInit,!0))}e.params.hashNavigation.watchState&amp;&amp;I(ee).on("hashchange",e.hashNavigation.onHashCange)}},destroy:function(){this.params.hashNavigation.watchState&amp;&amp;I(ee).off("hashchange",this.hashNavigation.onHashCange)}},ne={run:function(){var e=this,t=e.slides.eq(e.activeIndex),a=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&amp;&amp;(a=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),clearTimeout(e.autoplay.timeout),e.autoplay.timeout=te.nextTick(function(){e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(e.slides.length-1,e.params.speed,!0,!0),e.emit("autoplay")):(e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.params.loop?(e.loopFix(),e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(0,e.params.speed,!0,!0),e.emit("autoplay")):(e.slideNext(e.params.speed,!0,!0),e.emit("autoplay"))},a)},start:function(){var e=this;return void 0===e.autoplay.timeout&amp;&amp;!e.autoplay.running&amp;&amp;(e.autoplay.running=!0,e.emit("autoplayStart"),e.autoplay.run(),!0)},stop:function(){var e=this;return!!e.autoplay.running&amp;&amp;void 0!==e.autoplay.timeout&amp;&amp;(e.autoplay.timeout&amp;&amp;(clearTimeout(e.autoplay.timeout),e.autoplay.timeout=void 0),e.autoplay.running=!1,e.emit("autoplayStop"),!0)},pause:function(e){var t=this;t.autoplay.running&amp;&amp;(t.autoplay.paused||(t.autoplay.timeout&amp;&amp;clearTimeout(t.autoplay.timeout),t.autoplay.paused=!0,0!==e&amp;&amp;t.params.autoplay.waitForTransition?(t.$wrapperEl[0].addEventListener("transitionend",t.autoplay.onTransitionEnd),t.$wrapperEl[0].addEventListener("webkitTransitionEnd",t.autoplay.onTransitionEnd)):(t.autoplay.paused=!1,t.autoplay.run())))}},oe={setTranslate:function(){for(var e=this,t=e.slides,a=0;a&lt;t.length;a+=1){var i=e.slides.eq(a),s=-i[0].swiperSlideOffset;e.params.virtualTranslate||(s-=e.translate);var r=0;e.isHorizontal()||(r=s,s=0);var n=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(i[0].progress),0):1+Math.min(Math.max(i[0].progress,-1),0);i.css({opacity:n}).transform("translate3d("+s+"px, "+r+"px, 0px)")}},setTransition:function(e){var a,i=this,t=i.slides,s=i.$wrapperEl;t.transition(e),i.params.virtualTranslate&amp;&amp;0!==e&amp;&amp;(a=!1,t.transitionEnd(function(){if(!a&amp;&amp;i&amp;&amp;!i.destroyed){a=!0,i.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],t=0;t&lt;e.length;t+=1)s.trigger(e[t])}}))}},le={setTranslate:function(){var e,t=this,a=t.$el,i=t.$wrapperEl,s=t.slides,r=t.width,n=t.height,o=t.rtlTranslate,l=t.size,d=t.params.cubeEffect,p=t.isHorizontal(),c=t.virtual&amp;&amp;t.params.virtual.enabled,u=0;d.shadow&amp;&amp;(p?(0===(e=i.find(".swiper-cube-shadow")).length&amp;&amp;(e=I('&lt;div class="swiper-cube-shadow"&gt;&lt;/div&gt;'),i.append(e)),e.css({height:r+"px"})):0===(e=a.find(".swiper-cube-shadow")).length&amp;&amp;(e=I('&lt;div class="swiper-cube-shadow"&gt;&lt;/div&gt;'),a.append(e)));for(var h,v,f,m,g,b=0;b&lt;s.length;b+=1){var w=s.eq(b),y=b;c&amp;&amp;(y=parseInt(w.attr("data-swiper-slide-index"),10));var x=90*y,T=Math.floor(x/360);o&amp;&amp;(x=-x,T=Math.floor(-x/360));var E=Math.max(Math.min(w[0].progress,1),-1),S=0,C=0,M=0;y%4==0?(S=4*-T*l,M=0):(y-1)%4==0?(S=0,M=4*-T*l):(y-2)%4==0?(S=l+4*T*l,M=l):(y-3)%4==0&amp;&amp;(S=-l,M=3*l+4*l*T),o&amp;&amp;(S=-S),p||(C=S,S=0);var P,k,z="rotateX("+(p?0:-x)+"deg) rotateY("+(p?x:0)+"deg) translate3d("+S+"px, "+C+"px, "+M+"px)";E&lt;=1&amp;&amp;-1&lt;E&amp;&amp;(u=o?90*-y-90*E:90*y+90*E),w.transform(z),d.slideShadows&amp;&amp;(P=p?w.find(".swiper-slide-shadow-left"):w.find(".swiper-slide-shadow-top"),k=p?w.find(".swiper-slide-shadow-right"):w.find(".swiper-slide-shadow-bottom"),0===P.length&amp;&amp;(P=I('&lt;div class="swiper-slide-shadow-'+(p?"left":"top")+'"&gt;&lt;/div&gt;'),w.append(P)),0===k.length&amp;&amp;(k=I('&lt;div class="swiper-slide-shadow-'+(p?"right":"bottom")+'"&gt;&lt;/div&gt;'),w.append(k)),P.length&amp;&amp;(P[0].style.opacity=Math.max(-E,0)),k.length&amp;&amp;(k[0].style.opacity=Math.max(E,0)))}i.css({"-webkit-transform-origin":"50% 50% -"+l/2+"px","-moz-transform-origin":"50% 50% -"+l/2+"px","-ms-transform-origin":"50% 50% -"+l/2+"px","transform-origin":"50% 50% -"+l/2+"px"}),d.shadow&amp;&amp;(p?e.transform("translate3d(0px, "+(r/2+d.shadowOffset)+"px, "+-r/2+"px) rotateX(90deg) rotateZ(0deg) scale("+d.shadowScale+")"):(h=Math.abs(u)-90*Math.floor(Math.abs(u)/90),v=1.5-(Math.sin(2*h*Math.PI/360)/2+Math.cos(2*h*Math.PI/360)/2),f=d.shadowScale,m=d.shadowScale/v,g=d.shadowOffset,e.transform("scale3d("+f+", 1, "+m+") translate3d(0px, "+(n/2+g)+"px, "+-n/2/m+"px) rotateX(-90deg)")));var $=ie.isSafari||ie.isUiWebView?-l/2:0;i.transform("translate3d(0px,0,"+$+"px) rotateX("+(t.isHorizontal()?0:u)+"deg) rotateY("+(t.isHorizontal()?-u:0)+"deg)")},setTransition:function(e){var t=this.$el;this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),this.params.cubeEffect.shadow&amp;&amp;!this.isHorizontal()&amp;&amp;t.find(".swiper-cube-shadow").transition(e)}},de={setTranslate:function(){for(var e=this,t=e.slides,a=e.rtlTranslate,i=0;i&lt;t.length;i+=1){var s=t.eq(i),r=s[0].progress;e.params.flipEffect.limitRotation&amp;&amp;(r=Math.max(Math.min(s[0].progress,1),-1));var n,o,l=-180*r,d=0,p=-s[0].swiperSlideOffset,c=0;e.isHorizontal()?a&amp;&amp;(l=-l):(c=p,d=-l,l=p=0),s[0].style.zIndex=-Math.abs(Math.round(r))+t.length,e.params.flipEffect.slideShadows&amp;&amp;(n=e.isHorizontal()?s.find(".swiper-slide-shadow-left"):s.find(".swiper-slide-shadow-top"),o=e.isHorizontal()?s.find(".swiper-slide-shadow-right"):s.find(".swiper-slide-shadow-bottom"),0===n.length&amp;&amp;(n=I('&lt;div class="swiper-slide-shadow-'+(e.isHorizontal()?"left":"top")+'"&gt;&lt;/div&gt;'),s.append(n)),0===o.length&amp;&amp;(o=I('&lt;div class="swiper-slide-shadow-'+(e.isHorizontal()?"right":"bottom")+'"&gt;&lt;/div&gt;'),s.append(o)),n.length&amp;&amp;(n[0].style.opacity=Math.max(-r,0)),o.length&amp;&amp;(o[0].style.opacity=Math.max(r,0))),s.transform("translate3d("+p+"px, "+c+"px, 0px) rotateX("+d+"deg) rotateY("+l+"deg)")}},setTransition:function(e){var a,i=this,t=i.slides,s=i.activeIndex,r=i.$wrapperEl;t.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),i.params.virtualTranslate&amp;&amp;0!==e&amp;&amp;(a=!1,t.eq(s).transitionEnd(function(){if(!a&amp;&amp;i&amp;&amp;!i.destroyed){a=!0,i.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],t=0;t&lt;e.length;t+=1)r.trigger(e[t])}}))}},pe={setTranslate:function(){for(var e=this,t=e.width,a=e.height,i=e.slides,s=e.$wrapperEl,r=e.slidesSizesGrid,n=e.params.coverflowEffect,o=e.isHorizontal(),l=e.translate,d=o?t/2-l:a/2-l,p=o?n.rotate:-n.rotate,c=n.depth,u=0,h=i.length;u&lt;h;u+=1){var v=i.eq(u),f=r[u],m=(d-v[0].swiperSlideOffset-f/2)/f*n.modifier,g=o?p*m:0,b=o?0:p*m,w=-c*Math.abs(m),y=o?0:n.stretch*m,x=o?n.stretch*m:0;Math.abs(x)&lt;.001&amp;&amp;(x=0),Math.abs(y)&lt;.001&amp;&amp;(y=0),Math.abs(w)&lt;.001&amp;&amp;(w=0),Math.abs(g)&lt;.001&amp;&amp;(g=0),Math.abs(b)&lt;.001&amp;&amp;(b=0);var T,E,S="translate3d("+x+"px,"+y+"px,"+w+"px)  rotateX("+b+"deg) rotateY("+g+"deg)";v.transform(S),v[0].style.zIndex=1-Math.abs(Math.round(m)),n.slideShadows&amp;&amp;(T=o?v.find(".swiper-slide-shadow-left"):v.find(".swiper-slide-shadow-top"),E=o?v.find(".swiper-slide-shadow-right"):v.find(".swiper-slide-shadow-bottom"),0===T.length&amp;&amp;(T=I('&lt;div class="swiper-slide-shadow-'+(o?"left":"top")+'"&gt;&lt;/div&gt;'),v.append(T)),0===E.length&amp;&amp;(E=I('&lt;div class="swiper-slide-shadow-'+(o?"right":"bottom")+'"&gt;&lt;/div&gt;'),v.append(E)),T.length&amp;&amp;(T[0].style.opacity=0&lt;m?m:0),E.length&amp;&amp;(E[0].style.opacity=0&lt;-m?-m:0))}(ae.pointerEvents||ae.prefixedPointerEvents)&amp;&amp;(s[0].style.perspectiveOrigin=d+"px 50%")},setTransition:function(e){this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}},ce={init:function(){var e=this,t=e.params.thumbs,a=e.constructor;t.swiper instanceof a?(e.thumbs.swiper=t.swiper,te.extend(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),te.extend(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):te.isObject(t.swiper)&amp;&amp;(e.thumbs.swiper=new a(te.extend({},t.swiper,{watchSlidesVisibility:!0,watchSlidesProgress:!0,slideToClickedSlide:!1})),e.thumbs.swiperCreated=!0),e.thumbs.swiper.$el.addClass(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",e.thumbs.onThumbClick)},onThumbClick:function(){var e,t,a,i,s,r,n=this,o=n.thumbs.swiper;o&amp;&amp;(e=o.clickedIndex,(t=o.clickedSlide)&amp;&amp;I(t).hasClass(n.params.thumbs.slideThumbActiveClass)||null==e||(r=o.params.loop?parseInt(I(o.clickedSlide).attr("data-swiper-slide-index"),10):e,n.params.loop&amp;&amp;(a=n.activeIndex,n.slides.eq(a).hasClass(n.params.slideDuplicateClass)&amp;&amp;(n.loopFix(),n._clientLeft=n.$wrapperEl[0].clientLeft,a=n.activeIndex),i=n.slides.eq(a).prevAll('[data-swiper-slide-index="'+r+'"]').eq(0).index(),s=n.slides.eq(a).nextAll('[data-swiper-slide-index="'+r+'"]').eq(0).index(),r=void 0===i||void 0!==s&amp;&amp;s-a&lt;a-i?s:i),n.slideTo(r)))},update:function(e){var t=this,a=t.thumbs.swiper;if(a){var i,s,r,n,o="auto"===a.params.slidesPerView?a.slidesPerViewDynamic():a.params.slidesPerView;t.realIndex!==a.realIndex&amp;&amp;(i=a.activeIndex,n=a.params.loop?(a.slides.eq(i).hasClass(a.params.slideDuplicateClass)&amp;&amp;(a.loopFix(),a._clientLeft=a.$wrapperEl[0].clientLeft,i=a.activeIndex),s=a.slides.eq(i).prevAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index(),r=a.slides.eq(i).nextAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index(),void 0===s?r:void 0===r?s:r-i==i-s?i:r-i&lt;i-s?r:s):t.realIndex,a.visibleSlidesIndexes&amp;&amp;a.visibleSlidesIndexes.indexOf(n)&lt;0&amp;&amp;(a.params.centeredSlides?n=i&lt;n?n-Math.floor(o/2)+1:n+Math.floor(o/2)-1:i&lt;n&amp;&amp;(n=n-o+1),a.slideTo(n,e?0:void 0)));var l=1,d=t.params.thumbs.slideThumbActiveClass;if(1&lt;t.params.slidesPerView&amp;&amp;!t.params.centeredSlides&amp;&amp;(l=t.params.slidesPerView),a.slides.removeClass(d),a.params.loop||a.params.virtual)for(var p=0;p&lt;l;p+=1)a.$wrapperEl.children('[data-swiper-slide-index="'+(t.realIndex+p)+'"]').addClass(d);else for(var c=0;c&lt;l;c+=1)a.slides.eq(t.realIndex+c).addClass(d)}}},ue=[A,H,G,N,X,Y,R,{name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarged:"container"}},create:function(){var e=this;te.extend(e,{mousewheel:{enabled:!1,enable:q.enable.bind(e),disable:q.disable.bind(e),handle:q.handle.bind(e),handleMouseEnter:q.handleMouseEnter.bind(e),handleMouseLeave:q.handleMouseLeave.bind(e),lastScrollTime:te.now()}})},on:{init:function(){this.params.mousewheel.enabled&amp;&amp;this.mousewheel.enable()},destroy:function(){this.mousewheel.enabled&amp;&amp;this.mousewheel.disable()}}},{name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create:function(){var e=this;te.extend(e,{navigation:{init:W.init.bind(e),update:W.update.bind(e),destroy:W.destroy.bind(e),onNextClick:W.onNextClick.bind(e),onPrevClick:W.onPrevClick.bind(e)}})},on:{init:function(){this.navigation.init(),this.navigation.update()},toEdge:function(){this.navigation.update()},fromEdge:function(){this.navigation.update()},destroy:function(){this.navigation.destroy()},click:function(e){var t,a=this,i=a.navigation,s=i.$nextEl,r=i.$prevEl;!a.params.navigation.hideOnClick||I(e.target).is(r)||I(e.target).is(s)||(s?t=s.hasClass(a.params.navigation.hiddenClass):r&amp;&amp;(t=r.hasClass(a.params.navigation.hiddenClass)),!0===t?a.emit("navigationShow",a):a.emit("navigationHide",a),s&amp;&amp;s.toggleClass(a.params.navigation.hiddenClass),r&amp;&amp;r.toggleClass(a.params.navigation.hiddenClass))}}},{name:"pagination",params:{pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:function(e){return e},formatFractionTotal:function(e){return e},bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",modifierClass:"swiper-pagination-",currentClass:"swiper-pagination-current",totalClass:"swiper-pagination-total",hiddenClass:"swiper-pagination-hidden",progressbarFillClass:"swiper-pagination-progressbar-fill",progressbarOppositeClass:"swiper-pagination-progressbar-opposite",clickableClass:"swiper-pagination-clickable",lockClass:"swiper-pagination-lock"}},create:function(){var e=this;te.extend(e,{pagination:{init:j.init.bind(e),render:j.render.bind(e),update:j.update.bind(e),destroy:j.destroy.bind(e),dynamicBulletIndex:0}})},on:{init:function(){this.pagination.init(),this.pagination.render(),this.pagination.update()},activeIndexChange:function(){!this.params.loop&amp;&amp;void 0!==this.snapIndex||this.pagination.update()},snapIndexChange:function(){this.params.loop||this.pagination.update()},slidesLengthChange:function(){this.params.loop&amp;&amp;(this.pagination.render(),this.pagination.update())},snapGridLengthChange:function(){this.params.loop||(this.pagination.render(),this.pagination.update())},destroy:function(){this.pagination.destroy()},click:function(e){var t=this;t.params.pagination.el&amp;&amp;t.params.pagination.hideOnClick&amp;&amp;0&lt;t.pagination.$el.length&amp;&amp;!I(e.target).hasClass(t.params.pagination.bulletClass)&amp;&amp;(!0===t.pagination.$el.hasClass(t.params.pagination.hiddenClass)?t.emit("paginationShow",t):t.emit("paginationHide",t),t.pagination.$el.toggleClass(t.params.pagination.hiddenClass))}}},{name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create:function(){var e=this;te.extend(e,{scrollbar:{init:U.init.bind(e),destroy:U.destroy.bind(e),updateSize:U.updateSize.bind(e),setTranslate:U.setTranslate.bind(e),setTransition:U.setTransition.bind(e),enableDraggable:U.enableDraggable.bind(e),disableDraggable:U.disableDraggable.bind(e),setDragPosition:U.setDragPosition.bind(e),getPointerPosition:U.getPointerPosition.bind(e),onDragStart:U.onDragStart.bind(e),onDragMove:U.onDragMove.bind(e),onDragEnd:U.onDragEnd.bind(e),isTouched:!1,timeout:null,dragTimeout:null}})},on:{init:function(){this.scrollbar.init(),this.scrollbar.updateSize(),this.scrollbar.setTranslate()},update:function(){this.scrollbar.updateSize()},resize:function(){this.scrollbar.updateSize()},observerUpdate:function(){this.scrollbar.updateSize()},setTranslate:function(){this.scrollbar.setTranslate()},setTransition:function(e){this.scrollbar.setTransition(e)},destroy:function(){this.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create:function(){te.extend(this,{parallax:{setTransform:K.setTransform.bind(this),setTranslate:K.setTranslate.bind(this),setTransition:K.setTransition.bind(this)}})},on:{beforeInit:function(){this.params.parallax.enabled&amp;&amp;(this.params.watchSlidesProgress=!0,this.originalParams.watchSlidesProgress=!0)},init:function(){this.params.parallax.enabled&amp;&amp;this.parallax.setTranslate()},setTranslate:function(){this.params.parallax.enabled&amp;&amp;this.parallax.setTranslate()},setTransition:function(e){this.params.parallax.enabled&amp;&amp;this.parallax.setTransition(e)}}},{name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var i=this,t={enabled:!1,scale:1,currentScale:1,isScaling:!1,gesture:{$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0}};"onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out".split(" ").forEach(function(e){t[e]=_[e].bind(i)}),te.extend(i,{zoom:t});var s=1;Object.defineProperty(i.zoom,"scale",{get:function(){return s},set:function(e){var t,a;s!==e&amp;&amp;(t=i.zoom.gesture.$imageEl?i.zoom.gesture.$imageEl[0]:void 0,a=i.zoom.gesture.$slideEl?i.zoom.gesture.$slideEl[0]:void 0,i.emit("zoomChange",e,t,a)),s=e}})},on:{init:function(){this.params.zoom.enabled&amp;&amp;this.zoom.enable()},destroy:function(){this.zoom.disable()},touchStart:function(e){this.zoom.enabled&amp;&amp;this.zoom.onTouchStart(e)},touchEnd:function(e){this.zoom.enabled&amp;&amp;this.zoom.onTouchEnd(e)},doubleTap:function(e){this.params.zoom.enabled&amp;&amp;this.zoom.enabled&amp;&amp;this.params.zoom.toggle&amp;&amp;this.zoom.toggle(e)},transitionEnd:function(){this.zoom.enabled&amp;&amp;this.params.zoom.enabled&amp;&amp;this.zoom.onTransitionEnd()}}},{name:"lazy",params:{lazy:{enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create:function(){te.extend(this,{lazy:{initialImageLoaded:!1,load:Z.load.bind(this),loadInSlide:Z.loadInSlide.bind(this)}})},on:{beforeInit:function(){this.params.lazy.enabled&amp;&amp;this.params.preloadImages&amp;&amp;(this.params.preloadImages=!1)},init:function(){this.params.lazy.enabled&amp;&amp;!this.params.loop&amp;&amp;0===this.params.initialSlide&amp;&amp;this.lazy.load()},scroll:function(){this.params.freeMode&amp;&amp;!this.params.freeModeSticky&amp;&amp;this.lazy.load()},resize:function(){this.params.lazy.enabled&amp;&amp;this.lazy.load()},scrollbarDragMove:function(){this.params.lazy.enabled&amp;&amp;this.lazy.load()},transitionStart:function(){var e=this;e.params.lazy.enabled&amp;&amp;(!e.params.lazy.loadOnTransitionStart&amp;&amp;(e.params.lazy.loadOnTransitionStart||e.lazy.initialImageLoaded)||e.lazy.load())},transitionEnd:function(){this.params.lazy.enabled&amp;&amp;!this.params.lazy.loadOnTransitionStart&amp;&amp;this.lazy.load()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){var e=this;te.extend(e,{controller:{control:e.params.controller.control,getInterpolateFunction:Q.getInterpolateFunction.bind(e),setTranslate:Q.setTranslate.bind(e),setTransition:Q.setTransition.bind(e)}})},on:{update:function(){this.controller.control&amp;&amp;this.controller.spline&amp;&amp;(this.controller.spline=void 0,delete this.controller.spline)},resize:function(){this.controller.control&amp;&amp;this.controller.spline&amp;&amp;(this.controller.spline=void 0,delete this.controller.spline)},observerUpdate:function(){this.controller.control&amp;&amp;this.controller.spline&amp;&amp;(this.controller.spline=void 0,delete this.controller.spline)},setTranslate:function(e,t){this.controller.control&amp;&amp;this.controller.setTranslate(e,t)},setTransition:function(e,t){this.controller.control&amp;&amp;this.controller.setTransition(e,t)}}},{name:"a11y",params:{a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}"}},create:function(){var t=this;te.extend(t,{a11y:{liveRegion:I('&lt;span class="'+t.params.a11y.notificationClass+'" aria-live="assertive" aria-atomic="true"&gt;&lt;/span&gt;')}}),Object.keys(J).forEach(function(e){t.a11y[e]=J[e].bind(t)})},on:{init:function(){this.params.a11y.enabled&amp;&amp;(this.a11y.init(),this.a11y.updateNavigation())},toEdge:function(){this.params.a11y.enabled&amp;&amp;this.a11y.updateNavigation()},fromEdge:function(){this.params.a11y.enabled&amp;&amp;this.a11y.updateNavigation()},paginationUpdate:function(){this.params.a11y.enabled&amp;&amp;this.a11y.updatePagination()},destroy:function(){this.params.a11y.enabled&amp;&amp;this.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,replaceState:!1,key:"slides"}},create:function(){var e=this;te.extend(e,{history:{init:se.init.bind(e),setHistory:se.setHistory.bind(e),setHistoryPopState:se.setHistoryPopState.bind(e),scrollToSlide:se.scrollToSlide.bind(e),destroy:se.destroy.bind(e)}})},on:{init:function(){this.params.history.enabled&amp;&amp;this.history.init()},destroy:function(){this.params.history.enabled&amp;&amp;this.history.destroy()},transitionEnd:function(){this.history.initialized&amp;&amp;this.history.setHistory(this.params.history.key,this.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){var e=this;te.extend(e,{hashNavigation:{initialized:!1,init:re.init.bind(e),destroy:re.destroy.bind(e),setHash:re.setHash.bind(e),onHashCange:re.onHashCange.bind(e)}})},on:{init:function(){this.params.hashNavigation.enabled&amp;&amp;this.hashNavigation.init()},destroy:function(){this.params.hashNavigation.enabled&amp;&amp;this.hashNavigation.destroy()},transitionEnd:function(){this.hashNavigation.initialized&amp;&amp;this.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){var t=this;te.extend(t,{autoplay:{running:!1,paused:!1,run:ne.run.bind(t),start:ne.start.bind(t),stop:ne.stop.bind(t),pause:ne.pause.bind(t),onTransitionEnd:function(e){t&amp;&amp;!t.destroyed&amp;&amp;t.$wrapperEl&amp;&amp;e.target===this&amp;&amp;(t.$wrapperEl[0].removeEventListener("transitionend",t.autoplay.onTransitionEnd),t.$wrapperEl[0].removeEventListener("webkitTransitionEnd",t.autoplay.onTransitionEnd),t.autoplay.paused=!1,t.autoplay.running?t.autoplay.run():t.autoplay.stop())}}})},on:{init:function(){this.params.autoplay.enabled&amp;&amp;this.autoplay.start()},beforeTransitionStart:function(e,t){this.autoplay.running&amp;&amp;(t||!this.params.autoplay.disableOnInteraction?this.autoplay.pause(e):this.autoplay.stop())},sliderFirstMove:function(){this.autoplay.running&amp;&amp;(this.params.autoplay.disableOnInteraction?this.autoplay.stop():this.autoplay.pause())},destroy:function(){this.autoplay.running&amp;&amp;this.autoplay.stop()}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){te.extend(this,{fadeEffect:{setTranslate:oe.setTranslate.bind(this),setTransition:oe.setTransition.bind(this)}})},on:{beforeInit:function(){var e,t=this;"fade"===t.params.effect&amp;&amp;(t.classNames.push(t.params.containerModifierClass+"fade"),e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0},te.extend(t.params,e),te.extend(t.originalParams,e))},setTranslate:function(){"fade"===this.params.effect&amp;&amp;this.fadeEffect.setTranslate()},setTransition:function(e){"fade"===this.params.effect&amp;&amp;this.fadeEffect.setTransition(e)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){te.extend(this,{cubeEffect:{setTranslate:le.setTranslate.bind(this),setTransition:le.setTransition.bind(this)}})},on:{beforeInit:function(){var e,t=this;"cube"===t.params.effect&amp;&amp;(t.classNames.push(t.params.containerModifierClass+"cube"),t.classNames.push(t.params.containerModifierClass+"3d"),e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0},te.extend(t.params,e),te.extend(t.originalParams,e))},setTranslate:function(){"cube"===this.params.effect&amp;&amp;this.cubeEffect.setTranslate()},setTransition:function(e){"cube"===this.params.effect&amp;&amp;this.cubeEffect.setTransition(e)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){te.extend(this,{flipEffect:{setTranslate:de.setTranslate.bind(this),setTransition:de.setTransition.bind(this)}})},on:{beforeInit:function(){var e,t=this;"flip"===t.params.effect&amp;&amp;(t.classNames.push(t.params.containerModifierClass+"flip"),t.classNames.push(t.params.containerModifierClass+"3d"),e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0},te.extend(t.params,e),te.extend(t.originalParams,e))},setTranslate:function(){"flip"===this.params.effect&amp;&amp;this.flipEffect.setTranslate()},setTransition:function(e){"flip"===this.params.effect&amp;&amp;this.flipEffect.setTransition(e)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0}},create:function(){te.extend(this,{coverflowEffect:{setTranslate:pe.setTranslate.bind(this),setTransition:pe.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;"coverflow"===e.params.effect&amp;&amp;(e.classNames.push(e.params.containerModifierClass+"coverflow"),e.classNames.push(e.params.containerModifierClass+"3d"),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},setTranslate:function(){"coverflow"===this.params.effect&amp;&amp;this.coverflowEffect.setTranslate()},setTransition:function(e){"coverflow"===this.params.effect&amp;&amp;this.coverflowEffect.setTransition(e)}}},{name:"thumbs",params:{thumbs:{swiper:null,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){te.extend(this,{thumbs:{swiper:null,init:ce.init.bind(this),update:ce.update.bind(this),onThumbClick:ce.onThumbClick.bind(this)}})},on:{beforeInit:function(){var e=this.params.thumbs;e&amp;&amp;e.swiper&amp;&amp;(this.thumbs.init(),this.thumbs.update(!0))},slideChange:function(){this.thumbs.swiper&amp;&amp;this.thumbs.update()},update:function(){this.thumbs.swiper&amp;&amp;this.thumbs.update()},resize:function(){this.thumbs.swiper&amp;&amp;this.thumbs.update()},observerUpdate:function(){this.thumbs.swiper&amp;&amp;this.thumbs.update()},setTransition:function(e){var t=this.thumbs.swiper;t&amp;&amp;t.setTransition(e)},beforeDestroy:function(){var e=this.thumbs.swiper;e&amp;&amp;this.thumbs.swiperCreated&amp;&amp;e&amp;&amp;e.destroy()}}}];return void 0===O.use&amp;&amp;(O.use=O.Class.use,O.installModule=O.Class.installModule),O.use(ue),O});
!function(t,e){"object"==typeof exports&amp;&amp;"undefined"!=typeof module?module.exports=e():"function"==typeof define&amp;&amp;define.amd?define(e):(t=t||self).SwiperAnimation=e()}(this,function(){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n&lt;e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&amp;&amp;(a.writable=!0),Object.defineProperty(t,a.key,a)}}function i(t,e,n){return e&amp;&amp;a(t.prototype,e),n&amp;&amp;a(t,n),t}function r(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&amp;&amp;Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&amp;&amp;t.constructor&amp;&amp;(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e&gt;t.length)&amp;&amp;(e=t.length);for(var n=0,a=new Array(e);n&lt;e;n++)a[n]=t[n];return a}var e=!1,s=function(){return!!window.Promise},u=function(){var t;e||s()||((t=document.createElement("script")).type="text/javascript",t.src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js",document.querySelector("head").appendChild(t),e=!0)};function t(t){return t&amp;&amp;t.__esModule&amp;&amp;Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function c(t,e){return t(e={exports:{}},e.exports),e.exports}var l=c(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){return"[object NodeList]"===Object.prototype.toString.call(t)}});t(l);var f=c(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){return"Array"===Object.prototype.toString.call(t).slice(8,-1)}});t(f);var d=t(c(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(l),a=i(f);function i(t){return t&amp;&amp;t.__esModule?t:{default:t}}e.default=function(t){return(0,a.default)(t)?t:(0,n.default)(t)?Array.from?Array.from(t):Array.prototype.slice.call(t):new Array(t)}})),m="visibility: hidden;",y=function(t){t.forEach(function(t){t.animationData={styleCache:t.attributes.style?m+t.style.cssText:m,effect:t.dataset.swiperAnimation||t.dataset.swiperAnimationOnce||"",duration:t.dataset.duration||".5s",delay:t.dataset.delay||".5s",outEffect:t.dataset.swiperOutAnimation||"",outDuration:t.dataset.outDuration||".5s",isRecovery:!0,runOnce:!!t.dataset.swiperAnimationOnce},t.style.cssText=t.animationData.styleCache})},p=c(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){return"Promise"===Object.prototype.toString.call(t).slice(8,-1)}});t(p);var v=t(c(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,a=(n=p)&amp;&amp;n.__esModule?n:{default:n};e.default=function(e,t){var n=1&lt;arguments.length&amp;&amp;void 0!==t?t:0;return(0,a.default)(e)?e:new Promise(function(t){e(),setTimeout(t,n)})}})),h=["animated","animate__animated"],b=function(t){if(t.el)return t.el;if(t.container)return t.container[0];throw new Error("Illegal swiper instance")},w=function(){function e(t){n(this,e),this.swiper=t,this.container=b(this.swiper),this.animationElements=[].concat(r(d(this.container.querySelectorAll("[data-swiper-animation]"))),r(d(this.container.querySelectorAll("[data-swiper-animation-once]")))),this.activeElements=[],y(this.animationElements)}return i(e,[{key:"animate",value:function(){var n=this;return Promise.resolve().then(function(){return t=n.activeElements,e=t.map(function(t){return!t.animationData.isRecovery&amp;&amp;t.animationData.outEffect?v(function(){t.style.cssText=t.styleCache,t.style.visibility="visible",t.style.cssText+=" animation-duration:".concat(t.animationData.outDuration,"; -webkit-animation-duration:").concat(t.animationData.outDuration,";"),t.classList.add(t.animationData.outEffect,"animated")},500):Promise.resolve()}),Promise.all(e);var t,e}).then(function(){return t=n.activeElements,e=t.map(function(e){return e.animationData.isRecovery||e.animationData.runOnce?Promise.resolve():v(function(){var t;e.style.cssText=e.animationData.styleCache,(t=e.classList).remove.apply(t,r([e.animationData.effect,e.animationData.outEffect].concat(r(h)).filter(function(t){return!!t}))),e.animationData.isRecovery=!0})}),Promise.all(e);var t,e}).then(function(){return t=n._updateActiveElements(),e=t.map(function(e){return e.animationData?v(function(){var t;e.style.visibility="visible",e.style.cssText+=" animation-duration:".concat(e.animationData.duration,"; -webkit-animation-duration:").concat(e.animationData.duration,"; animation-delay:").concat(e.animationData.delay,"; -webkit-animation-delay:").concat(e.animationData.delay,";"),(t=e.classList).add.apply(t,[e.animationData.effect].concat(r(h))),e.animationData.isRecovery=!1}):Promise.resolve()}),Promise.all(e);var t,e})}},{key:"_updateActiveElements",value:function(){return this.activeElements=[].concat(r(d(this.swiper.slides[this.swiper.activeIndex].querySelectorAll("[data-swiper-animation]"))),r(d(this.swiper.slides[this.swiper.activeIndex].querySelectorAll("[data-swiper-animation-once]")))),this.activeElements}}]),e}();return function(){function t(){n(this,t),this.animations=null,s()||u()}return i(t,[{key:"init",value:function(t){return this.animations||(this.animations=new w(t)),this}},{key:"animate",value:function(){var t=this;return s()?this.animations.animate():setTimeout(function(){return t.animate()},500)}}]),t}()}); 
var comments = (function(){
	return {
		init: function(){
			//СЃРѕС…СЂР°РЅРµРЅРёРµ РЅР°СЃС‚СЂРѕРµРє
			$('.admin-center').on('click', '.section-comments .base-setting-save', function() {

				admin.ajaxRequest({
		          pluginHandler: 'comments', // РёРјСЏ РїР°РїРєРё РІ РєРѕС‚РѕСЂРѕР№ Р»РµР¶РёС‚ РґР°РЅРЅС‹Р№ РїР»Р°РіРёРЅ
		          actionerClass: "Comments", // РєР»Р°СЃСЃ Comments РІ comments.php - РІ РїР°РїРєРµ РїР»Р°РіРёРЅР°
		          action: "saveSettings", // РЅР°Р·РІР°РЅРёРµ РґРµР№СЃС‚РІРёСЏ РІ РїРѕР»СЊР·РѕРІР°С‚РµР»СЊСЃРєРѕРј  РєР»Р°СЃСЃРµ Comments
		          maxHeight: $('input[name=maxHeight]').val(),
		          maxWidth: $('input[name=maxWidth]').val(),
		          maxHeightThumb: $('input[name=maxHeightThumb]').val(),
		          maxWidthThumb: $('input[name=maxWidthThumb]').val(),
		          useFiles: $('#useFiles').prop('checked'),

		        },
		        function(response) {
		          admin.indication(response.status, "РЎРѕС…СЂР°РЅРµРЅРѕ");
		        });
			});

			// $(".comments .fancybox").fancybox();
			// $.fancybox($('.fancybox'));

			if(typeof $.fancybox != 'function') {
				$(".comments .fancybox").fancybox({
				    'overlayShow': false,
				});
				$(".admin-center .fancybox").fancybox({
				    'overlayShow': false,
				});
			}

			// РџРѕРєР°Р·С‹РІР°РµС‚ РїР°РЅРµР»СЊ СЃ РЅР°СЃС‚СЂРѕР№РєР°РјРё.
			$('.admin-center').on('click', '.section-comments .base-setting-open', function() {
				$('.base-settings').slideToggle();
			});


			// РїРѕРєР°Р· РґСЂРѕРїР·РѕРЅС‹
			$('.comments .showImgComments').on('click', function(){
				$(this).hide();
				$(this).parents('.comments').find('.comments-dropZone').show();
			})

			// РћС‚РїСЂР°РІРєР° РєРѕРјРјРµРЅС‚Р°СЂРёСЏ РЅР° СЃРµСЂРІРµСЂ РґР»СЏ РѕР±СЂР°Р±РѕС‚РєРё
			$('.comments .sendComment').on('click', function(e){
				comments.sendComment(e);   
				return false;
			})	

			//РїСЂРµРІСЊСЋ РёР·РѕР±СЂР°Р¶РµРЅРёР№
			$('.comments .comments_file_input').on('change', function(e){
				comments.previewImages(this);
			})

			// РћС‚РєСЂС‹С‚РёРµ РѕРєРЅР° РёР·РјРµРЅРµРЅРёРµ РєРѕРјРјРµРЅС‚Р°СЂРёСЏ
			$('.admin-center').on('click', '.section-comments .edit-row', function(e){				
				comments.openModalWindow($(this).attr('id'));
				return false;
			})

			// РћР±СЂР°Р±РѕС‚РєР° РЅР°Р¶Р°С‚РёСЏ РєРЅРѕРїРєРё СѓРґР°Р»РµРЅРёСЏ РєРѕРјРјРµРЅС‚Р°СЂРёСЏ
			$('.admin-center').on('click', '.section-comments .delete-order', function(e){
				e.preventDefault();
				var res = confirm("РЈРґР°Р»РёС‚СЊ РєРѕРјРјРµРЅС‚Р°СЂРёР№?");
				if(res){
					comments.deleteComment($(this).attr('id'));
				}
			})

			// РћР±СЂР°Р±РѕС‚РєР° РЅР°Р¶Р°С‚РёСЏ РєРЅРѕРїРєРё СЃРѕС…СЂР°РЅРµРЅРёСЏ РєРѕРјРјРµРЅС‚Р°СЂРёСЏ
			$('.admin-center').on('click', '.section-comments .save-button', function(e){
		//		$('#overlay').remove();
				comments.editComment();
			})

			// РћС‡РёС‰Р°РµРј РїРѕР»СЏ РїСЂРё Р·Р°РєСЂС‹С‚РёРё РјРѕРґР°Р»СЊРЅРѕРіРѕ РѕРєРЅР°
			$('.admin-center').on('click', 'section-comments #comment-modal_close', function(){
				comments.clearFields();
			})

			// РЈСЃС‚Р°РЅР°РІР»РёРІР°РµС‚ РєРѕР»РёС‡РёСЃС‚РІРѕ РІС‹РІРѕРґРёРјС‹С… Р·Р°РїРёСЃРµР№ РІ СЌС‚РѕРј СЂР°Р·РґРµР»Рµ.
			$('.admin-center').on('change', '.section-comments .countPrintRowsPage', function(){

	        var count = $(this).val();
	        admin.ajaxRequest({
	          pluginHandler: 'comments', // РёРјСЏ РїР°РїРєРё РІ РєРѕС‚РѕСЂРѕР№ Р»РµР¶РёС‚ РґР°РЅРЅС‹Р№ РїР»Р°РіРёРЅ
	          actionerClass: "Comments", // РєР»Р°СЃСЃ Comments РІ comments.php - РІ РїР°РїРєРµ РїР»Р°РіРёРЅР°
	          action: "setCountPrintRowsComments", // РЅР°Р·РІР°РЅРёРµ РґРµР№СЃС‚РІРёСЏ РІ РїРѕР»СЊР·РѕРІР°С‚РµР»СЊСЃРєРѕРј  РєР»Р°СЃСЃРµ Comments
	          count: count
	        },
	        function(response) {
	          admin.refreshPanel();
	        }
	        );

	      });

		},

		// РћС‚РєСЂС‹С‚РёРµ РјРѕРґР°Р»СЊРЅРѕРіРѕ РѕРєРЅР° Рё Р·Р°РїРѕР»РЅРµРЅРёРµ РїРѕР»РµР№ РёР· Р‘Р”
		openModalWindow: function(id){
			comments.clearFields();
			admin.openModal($('#comment-modal'));      
			comments.fillFields(id);
		},

		previewImages: function(input){
			var $preview = $('.comments_preview').empty();
			if (input.files &amp;&amp; input.files[0]) {
				var filesAmount = input.files.length;
				$('.comments_preview').show();
				for (i = 0; i &lt; filesAmount; i++) {

					if (!/\.(jpe?g|png|gif)$/i.test(input.files[i].name)){
						$('.comments_preview').hide();
						var txt = "Р¤РѕСЂРјР°С‚ С„Р°Р№Р»Р° "+input.files[i].name +" РЅРµ РїРѕРґРґРµСЂР¶РёРІР°РµС‚СЃСЏ (РїРѕРґРґРµСЂР¶РёРІР°СЋС‚СЃСЏ С‚РѕР»СЊРєРѕ jpeg, jpg, png, gif)";
						$('.comments .comments_file_input').val('');
						$('.comments_preview').empty();
						return alert(txt);
					}
	                var reader = new FileReader();

	                reader.onload = function(event) {
	                    $($.parseHTML('&lt;img class="comments_img"&gt;')).attr('src', event.target.result).appendTo($preview);
	                }

	                reader.readAsDataURL(input.files[i]);
	            }
			}
		},

		// Р¤СѓРЅРєС†РёСЏ Р·Р°РїРѕР»РЅРµРЅРёСЏ РїРѕР»РµР№ РёР· Р‘Р”
		fillFields: function(id){
			admin.ajaxRequest({
			pluginHandler: 'comments', // РёРјСЏ РїР°РїРєРё РІ РєРѕС‚РѕСЂРѕР№ Р»РµР¶РёС‚ РґР°РЅРЅС‹Р№ РїР»Р°РіРёРЅ
          	actionerClass: "Comments", // РєР»Р°СЃСЃ Comments РІ comments.php - РІ РїР°РїРєРµ РїР»Р°РіРёРЅР°
          	action: "getCommentById", // РЅР°Р·РІР°РЅРёРµ РґРµР№СЃС‚РІРёСЏ РІ РїРѕР»СЊР·РѕРІР°С‚РµР»СЊСЃРєРѕРј  РєР»Р°СЃСЃРµ Comments
          	id: id
        },
        function(response) {
        	console.log(response);
        	$('#comment-modal input[name=name]').val(response.data.name);
        	$('#comment-modal input[name=email]').val(response.data.email);
        	$('#comment-modal select option[value=' + response.data.approved + ']').prop('selected', 'selected');
        	$('#comment-modal textarea').val(response.data.comment);
          
			var commentUrl=$('#comment-modal .commentUrl');
			var link = commentUrl.data('site')+response.data.uri;
			commentUrl.attr('href', link);
			commentUrl.text(link);
         
        	$('#comment-modal button.save-button').attr('id', id);

        	if (response.data.img.length &gt; 1) {
        		$('#comment-modal .img-label').show();
        		var imgArr = response.data.img.split('|');
        		for (var i = 0; i &lt; imgArr.length; i++) {
					$('&lt;a class="fancybox" href="'+mgBaseDir+'/uploads/comments/'+imgArr[i]+'"&gt;&lt;img src="'+mgBaseDir+'/uploads/comments/thumbs/'+imgArr[i]+'"/&gt;&lt;/a&gt;').appendTo('#comment-modal .img-container');
        		}
        	}
        },
        
        $('.add-product-form-wrapper')
        );
		},

		// Р¤СѓРЅРєС†РёСЏ РѕС‚РїСЂР°РІР»СЏРµС‚ Р·Р°РїСЂРѕСЃ РґР»СЏ РёР·РјРµРЅРµРЅРёСЏ РєРѕРјРјРµРЅС‚Р°СЂРёСЏ
		editComment: function(){
      
      var id = $('#comment-modal button.save-button').attr('id');
      var name = $('#comment-modal input[name=name]').val();
      var email = $('#comment-modal input[name=email]').val();
      var comment = $('#comment-modal textarea').val();
      var approved = $('#comment-modal select').val();

			var data = {
				pluginHandler: 'comments', // РёРјСЏ РїР°РїРєРё РІ РєРѕС‚РѕСЂРѕР№ Р»РµР¶РёС‚ РґР°РЅРЅС‹Р№ РїР»Р°РіРёРЅ
        		actionerClass: "Comments", // РєР»Р°СЃСЃ Comments РІ comments.php - РІ РїР°РїРєРµ РїР»Р°РіРёРЅР°
        		action: "saveComment", // РЅР°Р·РІР°РЅРёРµ РґРµР№СЃС‚РІРёСЏ РІ РїРѕР»СЊР·РѕРІР°С‚РµР»СЊСЃРєРѕРј  РєР»Р°СЃСЃРµ Comments
				id: id,
				name: name,
				email: email,
				comment: comment,
				approved: approved
			}

			admin.ajaxRequest(
				data,
			function(response){  
		
		// TODO: РЅРµС‚ РґРѕСЃС‚СѓРїР° Рє Р»РѕРєР°Р»Рё РґР»СЏ РїРµСЂРµРІРѕРґР° "РћРґРѕР±СЂРµРЅ"/"РќРµ РѕРґРѕР±СЂРµРЅ"
        comments.indicatorCount(response.data.count);
        $('.comments-tbody tr[id='+id+']').replaceWith(        
            '&lt;tr id="'+id+'"&gt;\
	          	&lt;td class="c-name"&gt;'+name+'&lt;/td&gt;\
	          	&lt;td class="c-email"&gt;'+email+'&lt;/td&gt;\
	          	&lt;td class="c-approved"&gt;&lt;span class="'+((approved==1)?'approved-comment':'n-approved-comment')+'"&gt;'+((approved==1)?'РћРґРѕР±СЂРµРЅ':'РќРµ РѕРґРѕР±СЂРµРЅ')+'&lt;/span&gt;&lt;/td&gt;\
	          	&lt;td class="actions"&gt;\
	          		&lt;ul class="action-list"&gt;\
	          			&lt;li class="edit-row" id="'+id+'"&gt;&lt;a class="tool-tip-bottom fa fa-pencil" href="#" title=""&gt;&lt;/a&gt;&lt;/li&gt;\
                  &lt;li class="delete-order" id="'+id+'"&gt;&lt;a class="tool-tip-bottom fa fa-trash" href="#" title=""&gt;&lt;/a&gt;&lt;/li&gt;\
	          		&lt;/ul&gt;\
	          	&lt;/td&gt;\
          	&lt;/tr&gt;');
    
        admin.indication(response.status, response.msg);
        admin.closeModal($('#comment-modal'));
				//comments.clearFields();
			});
		},

    // РјРµРЅСЏРµС‚ РёРЅРґРёРєР°С‚РѕСЂ РєРѕР»РёС‡РµСЃС‚РІР° РЅРѕРІС‹С… РєРѕРјРјРµРЅС‚Р°СЂРёРµРІ
    indicatorCount: function(count) {       
        if(count==0){
          $('.button-list a[rel=comments]').parents('li').find('.comment-wrap').hide();
        } else {
          $('.button-list a[rel=comments]').parents('li').find('.comment-wrap').show();
           $('.button-list a[rel=comments]').parents('li').find('.comment-wrap').text(count);
        }
    },
            
		// Р¤СѓРЅРєС†РёСЏ РѕС‚РїСЂР°РІР»СЏРµС‚ Р·Р°РїСЂРѕСЃ РЅР° СѓРґР°Р»РµРЅРёСЏ РєРѕРјРјРµРЅС‚Р°СЂРёСЏ
		deleteComment: function(id){
			admin.ajaxRequest({
				pluginHandler: 'comments', // РёРјСЏ РїР°РїРєРё РІ РєРѕС‚РѕСЂРѕР№ Р»РµР¶РёС‚ РґР°РЅРЅС‹Р№ РїР»Р°РіРёРЅ
        actionerClass: "Comments", // РєР»Р°СЃСЃ Comments РІ comments.php - РІ РїР°РїРєРµ РїР»Р°РіРёРЅР°
        action: "deleteComment", // РЅР°Р·РІР°РЅРёРµ РґРµР№СЃС‚РІРёСЏ РІ РїРѕР»СЊР·РѕРІР°С‚РµР»СЊСЃРєРѕРј  РєР»Р°СЃСЃРµ Comments
				id: id
			},
			function(response){
        admin.indication(response.status, response.msg);
        comments.indicatorCount(response.data.count);
			//	$('li.edit-row#'+id).parent().parent().parent().remove();
        $('.comments-tbody tr[id='+id+']').remove();          
    
			})
		},

		// Р¤СѓРЅРєС†РёСЏ РѕС‡РёС‰Р°РµС‚ РїРѕР»СЏ С„РѕСЂРјС‹ РїСЂР°РІРєРё РєРѕРјРјРµРЅС‚Р°СЂРёСЏ
		clearFields: function(){
			$('#comment-modal .input[type=text]').val('');
			$('#comment-modal textarea').val('');
			$('#comment-modal select option[value=0]').removeAttr('selected');
			$('#comment-modal select option[value=1]').removeAttr('selected');
      		$('#comment-modal .commentUrl').text('');
      		$('#comment-modal .img-label').hide();
      		$('#comment-modal .img-container').html('');
		},

		// Р¤СѓРЅРєС†РёСЏ РѕС‚РїСЂР°РІР»СЏРµС‚ РєРѕРјРјРµРЅС‚Р°СЂРёР№ РёР· С„РѕСЂРјС‹ РѕС‚РїСЂР°РІРєРё РЅР° СЃС‚СЂР°РЅРёС†Рµ СЃР°Р№С‚Р°
		sendComment: function(e){
			e.stopPropagation();
			e.preventDefault();
			$('.comments .comments-msg').html('РџРѕРґРѕР¶РґРёС‚Рµ, РёРґРµС‚ РѕС‚РїСЂР°РІРєР° РєРѕРјРјРµРЅС‚Р°СЂРёСЏ...');

			$('.comments form').ajaxSubmit({
				type: "POST",
				url: mgBaseDir+"/ajaxrequest",
				data: {
					pluginHandler: 'comments', // РёРјСЏ РїР°РїРєРё РІ РєРѕС‚РѕСЂРѕР№ Р»РµР¶РёС‚ РґР°РЅРЅС‹Р№ РїР»Р°РіРёРЅ
					actionerClass: 'Comments', // РєР»Р°СЃСЃ Comments РІ Comments.php - РІ РїР°РїРєРµ РїР»Р°РіРёРЅР°
					// action: "addComment", // РЅР°Р·РІР°РЅРёРµ РґРµР№СЃС‚РІРёСЏ РІ РїРѕР»СЊР·РѕРІР°С‚РµР»СЊСЃРєРѕРј  РєР»Р°СЃСЃРµ        
				},
				dataType: "json",
				cache: false,
				success: function(response){     
					if(response.status!="error"){
						$('.comments input[type=text]').val('');
						$('.comments textarea').val('');
						$('.comments .comments_file_input').val('');
						$('.comments_preview').empty();
					}
					$('.comments .comments-msg').html(response.msg);
				}
			});
		}		
	}
})();


$(document).ready(function(){
	comments.init();
}); 
// ==================================================
// fancyBox v3.5.2
//
// Licensed GPLv3 for open source use
// or fancyBox Commercial License for commercial use
//
// http://fancyapps.com/fancybox/
// Copyright 2018 fancyApps
//
// ==================================================
!function(t,e,n,o){"use strict";function a(t,e){var o,a,i,s=[],r=0;t&amp;&amp;t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&amp;&amp;t.data&amp;&amp;(e=h(t.data.options,e)),o=e.$target||n(t.currentTarget).trigger("blur"),i=n.fancybox.getInstance(),i&amp;&amp;i.$trigger&amp;&amp;i.$trigger.is(o)||(e.selector?s=n(e.selector):(a=o.attr("data-fancybox")||"",a?(s=t.data?t.data.items:[],s=s.length?s.filter('[data-fancybox="'+a+'"]'):n('[data-fancybox="'+a+'"]')):s=[o]),r=n(s).index(o),r&lt;0&amp;&amp;(r=0),i=n.fancybox.open(s,e,r),i.$trigger=o))}if(t.console=t.console||{info:function(t){}},n){if(n.fn.fancybox)return void console.info("fancyBox already initialized");var i={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'&lt;iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" allowfullscreen allow="autoplay; fullscreen" src=""&gt;&lt;/iframe&gt;',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'&lt;video class="fancybox-video" controls controlsList="nodownload" poster="{{poster}}"&gt;&lt;source src="{{src}}" type="{{format}}" /&gt;Sorry, your browser doesn\'t support embedded videos, &lt;a href="{{src}}"&gt;download&lt;/a&gt; and watch with your favorite video player!&lt;/video&gt;',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'&lt;div class="fancybox-container" role="dialog" tabindex="-1"&gt;&lt;div class="fancybox-bg"&gt;&lt;/div&gt;&lt;div class="fancybox-inner"&gt;&lt;div class="fancybox-infobar"&gt;&lt;span data-fancybox-index&gt;&lt;/span&gt;&amp;nbsp;/&amp;nbsp;&lt;span data-fancybox-count&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="fancybox-toolbar"&gt;{{buttons}}&lt;/div&gt;&lt;div class="fancybox-navigation"&gt;{{arrows}}&lt;/div&gt;&lt;div class="fancybox-stage"&gt;&lt;/div&gt;&lt;div class="fancybox-caption"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;',spinnerTpl:'&lt;div class="fancybox-loading"&gt;&lt;/div&gt;',errorTpl:'&lt;div class="fancybox-error"&gt;&lt;p&gt;{{ERROR}}&lt;/p&gt;&lt;/div&gt;',btnTpl:{download:'&lt;a download data-fancybox-download class="fancybox-button fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/&gt;&lt;/svg&gt;&lt;/a&gt;',zoom:'&lt;button data-fancybox-zoom class="fancybox-button fancybox-button--zoom" title="{{ZOOM}}"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/&gt;&lt;/svg&gt;&lt;/button&gt;',close:'&lt;button data-fancybox-close class="fancybox-button fancybox-button--close" title="{{CLOSE}}"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/&gt;&lt;/svg&gt;&lt;/button&gt;',arrowLeft:'&lt;button data-fancybox-prev class="fancybox-button fancybox-button--arrow_left" title="{{PREV}}"&gt;&lt;div&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;/button&gt;',arrowRight:'&lt;button data-fancybox-next class="fancybox-button fancybox-button--arrow_right" title="{{NEXT}}"&gt;&lt;div&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;/button&gt;',smallBtn:'&lt;button type="button" data-fancybox-close class="fancybox-button fancybox-close-small" title="{{CLOSE}}"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"&gt;&lt;path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/&gt;&lt;/svg&gt;&lt;/button&gt;'},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"},wheel:"auto",onInit:n.noop,beforeLoad:n.noop,afterLoad:n.noop,beforeShow:n.noop,afterShow:n.noop,beforeClose:n.noop,afterClose:n.noop,onActivate:n.noop,onDeactivate:n.noop,clickContent:function(t,e){return"image"===t.type&amp;&amp;"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&amp;&amp;"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&amp;&amp;"zoom"},dblclickSlide:function(t,e){return"image"===t.type&amp;&amp;"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. &lt;br/&gt; Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schliessen",NEXT:"Weiter",PREV:"ZurГјck",ERROR:"Die angeforderten Daten konnten nicht geladen werden. &lt;br/&gt; Bitte versuchen Sie es spГ¤ter nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"MaГџstab"}}},s=n(t),r=n(e),c=0,l=function(t){return t&amp;&amp;t.hasOwnProperty&amp;&amp;t instanceof n},d=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),u=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),f=function(){var t,n=e.createElement("fakeelement"),a={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in a)if(n.style[t]!==o)return a[t];return"transitionend"}(),p=function(t){return t&amp;&amp;t.length&amp;&amp;t[0].offsetHeight},h=function(t,e){var o=n.extend(!0,{},t,e);return n.each(e,function(t,e){n.isArray(e)&amp;&amp;(o[t]=e)}),o},g=function(t){var o,a;return!(!t||t.ownerDocument!==e)&amp;&amp;(n(".fancybox-container").css("pointer-events","none"),o={x:t.getBoundingClientRect().left+t.offsetWidth/2,y:t.getBoundingClientRect().top+t.offsetHeight/2},a=e.elementFromPoint(o.x,o.y)===t,n(".fancybox-container").css("pointer-events",""),a)},b=function(t,e,o){var a=this;a.opts=h({index:o},n.fancybox.defaults),n.isPlainObject(e)&amp;&amp;(a.opts=h(a.opts,e)),n.fancybox.isMobile&amp;&amp;(a.opts=h(a.opts,a.opts.mobile)),a.id=a.opts.id||++c,a.currIndex=parseInt(a.opts.index,10)||0,a.prevIndex=null,a.prevPos=null,a.currPos=0,a.firstRun=!0,a.group=[],a.slides={},a.addContent(t),a.group.length&amp;&amp;a.init()};n.extend(b.prototype,{init:function(){var o,a,i=this,s=i.group[i.currIndex],r=s.opts;r.closeExisting&amp;&amp;n.fancybox.close(!0),n("body").addClass("fancybox-active"),!n.fancybox.getInstance()&amp;&amp;r.hideScrollbar!==!1&amp;&amp;!n.fancybox.isMobile&amp;&amp;e.body.scrollHeight&gt;t.innerHeight&amp;&amp;(n("head").append('&lt;style id="fancybox-style-noscroll" type="text/css"&gt;.compensate-for-scrollbar{margin-right:'+(t.innerWidth-e.documentElement.clientWidth)+"px;}&lt;/style&gt;"),n("body").addClass("compensate-for-scrollbar")),a="",n.each(r.buttons,function(t,e){a+=r.btnTpl[e]||""}),o=n(i.translate(i,r.baseTpl.replace("{{buttons}}",a).replace("{{arrows}}",r.btnTpl.arrowLeft+r.btnTpl.arrowRight))).attr("id","fancybox-container-"+i.id).addClass(r.baseClass).data("FancyBox",i).appendTo(r.parentEl),i.$refs={container:o},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){i.$refs[t]=o.find(".fancybox-"+t)}),i.trigger("onInit"),i.activate(),i.jumpTo(i.currIndex)},translate:function(t,e){var n=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,function(t,e){var a=n[e];return a===o?t:a})},addContent:function(t){var e,a=this,i=n.makeArray(t);n.each(i,function(t,e){var i,s,r,c,l,d={},u={};n.isPlainObject(e)?(d=e,u=e.opts||e):"object"===n.type(e)&amp;&amp;n(e).length?(i=n(e),u=i.data()||{},u=n.extend(!0,{},u,u.options),u.$orig=i,d.src=a.opts.src||u.src||i.attr("href"),d.type||d.src||(d.type="inline",d.src=e)):d={type:"html",src:e+""},d.opts=n.extend(!0,{},a.opts,u),n.isArray(u.buttons)&amp;&amp;(d.opts.buttons=u.buttons),n.fancybox.isMobile&amp;&amp;d.opts.mobile&amp;&amp;(d.opts=h(d.opts,d.opts.mobile)),s=d.type||d.opts.type,c=d.src||"",!s&amp;&amp;c&amp;&amp;((r=c.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(s="video",d.opts.video.format||(d.opts.video.format="video/"+("ogv"===r[1]?"ogg":r[1]))):c.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?s="image":c.match(/\.(pdf)((\?|#).*)?$/i)?(s="iframe",d=n.extend(!0,d,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===c.charAt(0)&amp;&amp;(s="inline")),s?d.type=s:a.trigger("objectNeedsType",d),d.contentType||(d.contentType=n.inArray(d.type,["html","inline","ajax"])&gt;-1?"html":d.type),d.index=a.group.length,"auto"==d.opts.smallBtn&amp;&amp;(d.opts.smallBtn=n.inArray(d.type,["html","inline","ajax"])&gt;-1),"auto"===d.opts.toolbar&amp;&amp;(d.opts.toolbar=!d.opts.smallBtn),d.$thumb=d.opts.$thumb||null,d.opts.$trigger&amp;&amp;d.index===a.opts.index&amp;&amp;(d.$thumb=d.opts.$trigger.find("img:first"),d.$thumb.length&amp;&amp;(d.opts.$orig=d.opts.$trigger)),d.$thumb&amp;&amp;d.$thumb.length||!d.opts.$orig||(d.$thumb=d.opts.$orig.find("img:first")),d.$thumb&amp;&amp;!d.$thumb.length&amp;&amp;(d.$thumb=null),d.thumb=d.opts.thumb||(d.$thumb?d.$thumb[0].src:null),"function"===n.type(d.opts.caption)&amp;&amp;(d.opts.caption=d.opts.caption.apply(e,[a,d])),"function"===n.type(a.opts.caption)&amp;&amp;(d.opts.caption=a.opts.caption.apply(e,[a,d])),d.opts.caption instanceof n||(d.opts.caption=d.opts.caption===o?"":d.opts.caption+""),"ajax"===d.type&amp;&amp;(l=c.split(/\s+/,2),l.length&gt;1&amp;&amp;(d.src=l.shift(),d.opts.filter=l.shift())),d.opts.modal&amp;&amp;(d.opts=n.extend(!0,d.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),a.group.push(d)}),Object.keys(a.slides).length&amp;&amp;(a.updateControls(),e=a.Thumbs,e&amp;&amp;e.isActive&amp;&amp;(e.create(),e.focus()))},addEvents:function(){var e=this;e.removeEvents(),e.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),e.close(t)}).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),e.previous()}).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),e.next()}).on("click.fb","[data-fancybox-zoom]",function(t){e[e.isScaledDown()?"scaleToActual":"scaleToFit"]()}),s.on("orientationchange.fb resize.fb",function(t){t&amp;&amp;t.originalEvent&amp;&amp;"resize"===t.originalEvent.type?(e.requestId&amp;&amp;u(e.requestId),e.requestId=d(function(){e.update(t)})):(e.current&amp;&amp;"iframe"===e.current.type&amp;&amp;e.$refs.stage.hide(),setTimeout(function(){e.$refs.stage.show(),e.update(t)},n.fancybox.isMobile?600:250))}),r.on("keydown.fb",function(t){var o=n.fancybox?n.fancybox.getInstance():null,a=o.current,i=t.keyCode||t.which;if(9==i)return void(a.opts.trapFocus&amp;&amp;e.focus(t));if(!(!a.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||n(t.target).is("input")||n(t.target).is("textarea")))return 8===i||27===i?(t.preventDefault(),void e.close(t)):37===i||38===i?(t.preventDefault(),void e.previous()):39===i||40===i?(t.preventDefault(),void e.next()):void e.trigger("afterKeydown",t,i)}),e.group[e.currIndex].opts.idleTime&amp;&amp;(e.idleSecondsCounter=0,r.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){e.idleSecondsCounter=0,e.isIdle&amp;&amp;e.showControls(),e.isIdle=!1}),e.idleInterval=t.setInterval(function(){e.idleSecondsCounter++,e.idleSecondsCounter&gt;=e.group[e.currIndex].opts.idleTime&amp;&amp;!e.isDragging&amp;&amp;(e.isIdle=!0,e.idleSecondsCounter=0,e.hideControls())},1e3))},removeEvents:function(){var e=this;s.off("orientationchange.fb resize.fb"),r.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),e.idleInterval&amp;&amp;(t.clearInterval(e.idleInterval),e.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,e){var a,i,s,r,c,l,d,u,f,h=this,g=h.group.length;if(!(h.isDragging||h.isClosing||h.isAnimating&amp;&amp;h.firstRun)){if(t=parseInt(t,10),s=h.current?h.current.opts.loop:h.opts.loop,!s&amp;&amp;(t&lt;0||t&gt;=g))return!1;if(a=h.firstRun=!Object.keys(h.slides).length,c=h.current,h.prevIndex=h.currIndex,h.prevPos=h.currPos,r=h.createSlide(t),g&gt;1&amp;&amp;((s||r.index&lt;g-1)&amp;&amp;h.createSlide(t+1),(s||r.index&gt;0)&amp;&amp;h.createSlide(t-1)),h.current=r,h.currIndex=r.index,h.currPos=r.pos,h.trigger("beforeShow",a),h.updateControls(),r.forcedDuration=o,n.isNumeric(e)?r.forcedDuration=e:e=r.opts[a?"animationDuration":"transitionDuration"],e=parseInt(e,10),i=h.isMoved(r),r.$slide.addClass("fancybox-slide--current"),a)return r.opts.animationEffect&amp;&amp;e&amp;&amp;h.$refs.container.css("transition-duration",e+"ms"),h.$refs.container.addClass("fancybox-is-open").trigger("focus"),h.loadSlide(r),void h.preload("image");l=n.fancybox.getTranslate(c.$slide),d=n.fancybox.getTranslate(h.$refs.stage),n.each(h.slides,function(t,e){n.fancybox.stop(e.$slide,!0)}),c.pos!==r.pos&amp;&amp;(c.isComplete=!1),c.$slide.removeClass("fancybox-slide--complete fancybox-slide--current"),i?(f=l.left-(c.pos*l.width+c.pos*c.opts.gutter),n.each(h.slides,function(t,o){o.$slide.removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")});var a=o.pos*l.width+o.pos*o.opts.gutter;n.fancybox.setTranslate(o.$slide,{top:0,left:a-d.left+f}),o.pos!==r.pos&amp;&amp;o.$slide.addClass("fancybox-slide--"+(o.pos&gt;r.pos?"next":"previous")),p(o.$slide),n.fancybox.animate(o.$slide,{top:0,left:(o.pos-r.pos)*l.width+(o.pos-r.pos)*o.opts.gutter},e,function(){o.$slide.css({transform:"",opacity:""}).removeClass("fancybox-slide--next fancybox-slide--previous"),o.pos===h.currPos&amp;&amp;h.complete()})})):e&amp;&amp;r.opts.transitionEffect&amp;&amp;(u="fancybox-animated fancybox-fx-"+r.opts.transitionEffect,c.$slide.addClass("fancybox-slide--"+(c.pos&gt;r.pos?"next":"previous")),n.fancybox.animate(c.$slide,u,e,function(){c.$slide.removeClass(u).removeClass("fancybox-slide--next fancybox-slide--previous")},!1)),r.isLoaded?h.revealContent(r):h.loadSlide(r),h.preload("image")}},createSlide:function(t){var e,o,a=this;return o=t%a.group.length,o=o&lt;0?a.group.length+o:o,!a.slides[t]&amp;&amp;a.group[o]&amp;&amp;(e=n('&lt;div class="fancybox-slide"&gt;&lt;/div&gt;').appendTo(a.$refs.stage),a.slides[t]=n.extend(!0,{},a.group[o],{pos:t,$slide:e,isLoaded:!1}),a.updateSlide(a.slides[t])),a.slides[t]},scaleToActual:function(t,e,a){var i,s,r,c,l,d=this,u=d.current,f=u.$content,p=n.fancybox.getTranslate(u.$slide).width,h=n.fancybox.getTranslate(u.$slide).height,g=u.width,b=u.height;d.isAnimating||d.isMoved()||!f||"image"!=u.type||!u.isLoaded||u.hasError||(d.isAnimating=!0,n.fancybox.stop(f),t=t===o?.5*p:t,e=e===o?.5*h:e,i=n.fancybox.getTranslate(f),i.top-=n.fancybox.getTranslate(u.$slide).top,i.left-=n.fancybox.getTranslate(u.$slide).left,c=g/i.width,l=b/i.height,s=.5*p-.5*g,r=.5*h-.5*b,g&gt;p&amp;&amp;(s=i.left*c-(t*c-t),s&gt;0&amp;&amp;(s=0),s&lt;p-g&amp;&amp;(s=p-g)),b&gt;h&amp;&amp;(r=i.top*l-(e*l-e),r&gt;0&amp;&amp;(r=0),r&lt;h-b&amp;&amp;(r=h-b)),d.updateCursor(g,b),n.fancybox.animate(f,{top:r,left:s,scaleX:c,scaleY:l},a||330,function(){d.isAnimating=!1}),d.SlideShow&amp;&amp;d.SlideShow.isActive&amp;&amp;d.SlideShow.stop())},scaleToFit:function(t){var e,o=this,a=o.current,i=a.$content;o.isAnimating||o.isMoved()||!i||"image"!=a.type||!a.isLoaded||a.hasError||(o.isAnimating=!0,n.fancybox.stop(i),e=o.getFitPos(a),o.updateCursor(e.width,e.height),n.fancybox.animate(i,{top:e.top,left:e.left,scaleX:e.width/i.width(),scaleY:e.height/i.height()},t||330,function(){o.isAnimating=!1}))},getFitPos:function(t){var e,o,a,i,s=this,r=t.$content,c=t.$slide,l=t.width||t.opts.width,d=t.height||t.opts.height,u={};return!!(t.isLoaded&amp;&amp;r&amp;&amp;r.length)&amp;&amp;(e=n.fancybox.getTranslate(s.$refs.stage).width,o=n.fancybox.getTranslate(s.$refs.stage).height,e-=parseFloat(c.css("paddingLeft"))+parseFloat(c.css("paddingRight"))+parseFloat(r.css("marginLeft"))+parseFloat(r.css("marginRight")),o-=parseFloat(c.css("paddingTop"))+parseFloat(c.css("paddingBottom"))+parseFloat(r.css("marginTop"))+parseFloat(r.css("marginBottom")),l&amp;&amp;d||(l=e,d=o),a=Math.min(1,e/l,o/d),l=a*l,d=a*d,l&gt;e-.5&amp;&amp;(l=e),d&gt;o-.5&amp;&amp;(d=o),"image"===t.type?(u.top=Math.floor(.5*(o-d))+parseFloat(c.css("paddingTop")),u.left=Math.floor(.5*(e-l))+parseFloat(c.css("paddingLeft"))):"video"===t.contentType&amp;&amp;(i=t.opts.width&amp;&amp;t.opts.height?l/d:t.opts.ratio||16/9,d&gt;l/i?d=l/i:l&gt;d*i&amp;&amp;(l=d*i)),u.width=l,u.height=d,u)},update:function(t){var e=this;n.each(e.slides,function(n,o){e.updateSlide(o,t)})},updateSlide:function(t,e){var o=this,a=t&amp;&amp;t.$content,i=t.width||t.opts.width,s=t.height||t.opts.height,r=t.$slide;o.adjustCaption(t),a&amp;&amp;(i||s||"video"===t.contentType)&amp;&amp;!t.hasError&amp;&amp;(n.fancybox.stop(a),n.fancybox.setTranslate(a,o.getFitPos(t)),t.pos===o.currPos&amp;&amp;(o.isAnimating=!1,o.updateCursor())),o.adjustLayout(t),r.length&amp;&amp;(r.trigger("refresh"),t.pos===o.currPos&amp;&amp;o.$refs.toolbar.add(o.$refs.navigation.find(".fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",r.get(0).scrollHeight&gt;r.get(0).clientHeight)),o.trigger("onUpdate",t,e)},centerSlide:function(t){var e=this,a=e.current,i=a.$slide;!e.isClosing&amp;&amp;a&amp;&amp;(i.siblings().css({transform:"",opacity:""}),i.parent().children().removeClass("fancybox-slide--previous fancybox-slide--next"),n.fancybox.animate(i,{top:0,left:0,opacity:1},t===o?0:t,function(){i.css({transform:"",opacity:""}),a.isComplete||e.complete()},!1))},isMoved:function(t){var e,o,a=t||this.current;return!!a&amp;&amp;(o=n.fancybox.getTranslate(this.$refs.stage),e=n.fancybox.getTranslate(a.$slide),!a.$slide.hasClass("fancybox-animated")&amp;&amp;(Math.abs(e.top-o.top)&gt;.5||Math.abs(e.left-o.left)&gt;.5))},updateCursor:function(t,e){var o,a,i=this,s=i.current,r=i.$refs.container;s&amp;&amp;!i.isClosing&amp;&amp;i.Guestures&amp;&amp;(r.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan"),o=i.canPan(t,e),a=!!o||i.isZoomable(),r.toggleClass("fancybox-is-zoomable",a),n("[data-fancybox-zoom]").prop("disabled",!a),o?r.addClass("fancybox-can-pan"):a&amp;&amp;("zoom"===s.opts.clickContent||n.isFunction(s.opts.clickContent)&amp;&amp;"zoom"==s.opts.clickContent(s))?r.addClass("fancybox-can-zoomIn"):s.opts.touch&amp;&amp;(s.opts.touch.vertical||i.group.length&gt;1)&amp;&amp;"video"!==s.contentType&amp;&amp;r.addClass("fancybox-can-swipe"))},isZoomable:function(){var t,e=this,n=e.current;if(n&amp;&amp;!e.isClosing&amp;&amp;"image"===n.type&amp;&amp;!n.hasError){if(!n.isLoaded)return!0;if(t=e.getFitPos(n),t&amp;&amp;(n.width&gt;t.width||n.height&gt;t.height))return!0}return!1},isScaledDown:function(t,e){var a=this,i=!1,s=a.current,r=s.$content;return t!==o&amp;&amp;e!==o?i=t&lt;s.width&amp;&amp;e&lt;s.height:r&amp;&amp;(i=n.fancybox.getTranslate(r),i=i.width&lt;s.width&amp;&amp;i.height&lt;s.height),i},canPan:function(t,e){var a=this,i=a.current,s=null,r=!1;return"image"===i.type&amp;&amp;(i.isComplete||t&amp;&amp;e)&amp;&amp;!i.hasError&amp;&amp;(r=a.getFitPos(i),t!==o&amp;&amp;e!==o?s={width:t,height:e}:i.isComplete&amp;&amp;(s=n.fancybox.getTranslate(i.$content)),s&amp;&amp;r&amp;&amp;(r=Math.abs(s.width-r.width)&gt;1.5||Math.abs(s.height-r.height)&gt;1.5)),r},loadSlide:function(t){var e,o,a,i=this;if(!t.isLoading&amp;&amp;!t.isLoaded){if(t.isLoading=!0,i.trigger("beforeLoad",t)===!1)return t.isLoading=!1,!1;switch(e=t.type,o=t.$slide,o.off("refresh").trigger("onReset").addClass(t.opts.slideClass),e){case"image":i.setImage(t);break;case"iframe":i.setIframe(t);break;case"html":i.setContent(t,t.src||t.content);break;case"video":i.setContent(t,t.opts.video.tpl.replace(/\{\{src\}\}/gi,t.src).replace("{{format}}",t.opts.videoFormat||t.opts.video.format||"").replace("{{poster}}",t.thumb||""));break;case"inline":n(t.src).length?i.setContent(t,n(t.src)):i.setError(t);break;case"ajax":i.showLoading(t),a=n.ajax(n.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,n){"success"===n&amp;&amp;i.setContent(t,e)},error:function(e,n){e&amp;&amp;"abort"!==n&amp;&amp;i.setError(t)}})),o.one("onReset",function(){a.abort()});break;default:i.setError(t)}return!0}},setImage:function(t){var o,a=this;setTimeout(function(){var e=t.$image;a.isClosing||!t.isLoading||e&amp;&amp;e.length&amp;&amp;e[0].complete||t.hasError||a.showLoading(t)},50),a.checkSrcset(t),t.$content=n('&lt;div class="fancybox-content"&gt;&lt;/div&gt;').addClass("fancybox-is-hidden").appendTo(t.$slide.addClass("fancybox-slide--image")),t.opts.preload!==!1&amp;&amp;t.opts.width&amp;&amp;t.opts.height&amp;&amp;t.thumb&amp;&amp;(t.width=t.opts.width,t.height=t.opts.height,o=e.createElement("img"),o.onerror=function(){n(this).remove(),t.$ghost=null},o.onload=function(){a.afterLoad(t)},t.$ghost=n(o).addClass("fancybox-image").appendTo(t.$content).attr("src",t.thumb)),a.setBigImage(t)},checkSrcset:function(e){var n,o,a,i,s=e.opts.srcset||e.opts.image.srcset;if(s){a=t.devicePixelRatio||1,i=t.innerWidth*a,o=s.split(",").map(function(t){var e={};return t.trim().split(/\s+/).forEach(function(t,n){var o=parseInt(t.substring(0,t.length-1),10);return 0===n?e.url=t:void(o&amp;&amp;(e.value=o,e.postfix=t[t.length-1]))}),e}),o.sort(function(t,e){return t.value-e.value});for(var r=0;r&lt;o.length;r++){var c=o[r];if("w"===c.postfix&amp;&amp;c.value&gt;=i||"x"===c.postfix&amp;&amp;c.value&gt;=a){n=c;break}}!n&amp;&amp;o.length&amp;&amp;(n=o[o.length-1]),n&amp;&amp;(e.src=n.url,e.width&amp;&amp;e.height&amp;&amp;"w"==n.postfix&amp;&amp;(e.height=e.width/e.height*n.value,e.width=n.value),e.opts.srcset=s)}},setBigImage:function(t){var o=this,a=e.createElement("img"),i=n(a);t.$image=i.one("error",function(){o.setError(t)}).one("load",function(){var e;t.$ghost||(o.resolveImageSlideSize(t,this.naturalWidth,this.naturalHeight),o.afterLoad(t)),o.isClosing||(t.opts.srcset&amp;&amp;(e=t.opts.sizes,e&amp;&amp;"auto"!==e||(e=(t.width/t.height&gt;1&amp;&amp;s.width()/s.height()&gt;1?"100":Math.round(t.width/t.height*100))+"vw"),i.attr("sizes",e).attr("srcset",t.opts.srcset)),t.$ghost&amp;&amp;setTimeout(function(){t.$ghost&amp;&amp;!o.isClosing&amp;&amp;t.$ghost.hide()},Math.min(300,Math.max(1e3,t.height/1600))),o.hideLoading(t))}).addClass("fancybox-image").attr("src",t.src).appendTo(t.$content),(a.complete||"complete"==a.readyState)&amp;&amp;i.naturalWidth&amp;&amp;i.naturalHeight?i.trigger("load"):a.error&amp;&amp;i.trigger("error")},resolveImageSlideSize:function(t,e,n){var o=parseInt(t.opts.width,10),a=parseInt(t.opts.height,10);t.width=e,t.height=n,o&gt;0&amp;&amp;(t.width=o,t.height=Math.floor(o*n/e)),a&gt;0&amp;&amp;(t.width=Math.floor(a*e/n),t.height=a)},setIframe:function(t){var e,a=this,i=t.opts.iframe,s=t.$slide;n.fancybox.isMobile&amp;&amp;(i.css.overflow="scroll"),t.$content=n('&lt;div class="fancybox-content'+(i.preload?" fancybox-is-hidden":"")+'"&gt;&lt;/div&gt;').css(i.css).appendTo(s),s.addClass("fancybox-slide--"+t.contentType),t.$iframe=e=n(i.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(i.attr).appendTo(t.$content),i.preload?(a.showLoading(t),e.on("load.fb error.fb",function(e){this.isReady=1,t.$slide.trigger("refresh"),a.afterLoad(t)}),s.on("refresh.fb",function(){var n,a,r=t.$content,c=i.css.width,l=i.css.height;if(1===e[0].isReady){try{n=e.contents(),a=n.find("body")}catch(t){}a&amp;&amp;a.length&amp;&amp;a.children().length&amp;&amp;(s.css("overflow","visible"),r.css({width:"100%","max-width":"100%",height:"9999px"}),c===o&amp;&amp;(c=Math.ceil(Math.max(a[0].clientWidth,a.outerWidth(!0)))),r.css("width",c?c:"").css("max-width",""),l===o&amp;&amp;(l=Math.ceil(Math.max(a[0].clientHeight,a.outerHeight(!0)))),r.css("height",l?l:""),s.css("overflow","auto")),r.removeClass("fancybox-is-hidden")}})):a.afterLoad(t),e.attr("src",t.src),s.one("onReset",function(){try{n(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}n(this).off("refresh.fb").empty(),t.isLoaded=!1,t.isRevealed=!1})},setContent:function(t,e){var o=this;o.isClosing||(o.hideLoading(t),t.$content&amp;&amp;n.fancybox.stop(t.$content),t.$slide.empty(),l(e)&amp;&amp;e.parent().length?((e.hasClass("fancybox-content")||e.parent().hasClass("fancybox-content"))&amp;&amp;e.parents(".fancybox-slide").trigger("onReset"),t.$placeholder=n("&lt;div&gt;").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===n.type(e)&amp;&amp;(e=n("&lt;div&gt;").append(n.trim(e)).contents()),t.opts.filter&amp;&amp;(e=n("&lt;div&gt;").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){n(this).find("video,audio").trigger("pause"),t.$placeholder&amp;&amp;(t.$placeholder.after(e.removeClass("fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&amp;&amp;(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(n(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),n(e).appendTo(t.$slide),n(e).is("video,audio")&amp;&amp;(n(e).addClass("fancybox-video"),n(e).wrap("&lt;div&gt;&lt;/div&gt;"),t.contentType="video",t.opts.width=t.opts.width||n(e).attr("width"),t.opts.height=t.opts.height||n(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("&lt;div&gt;&lt;/div&gt;").children().first()),t.$content.addClass("fancybox-content"),t.$slide.addClass("fancybox-slide--"+t.contentType),o.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("fancybox-slide--"+t.contentType).addClass("fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&amp;&amp;(this.isAnimating=!1)},showLoading:function(t){var e=this;t=t||e.current,t&amp;&amp;!t.$spinner&amp;&amp;(t.$spinner=n(e.translate(e,e.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){var e=this;t=t||e.current,t&amp;&amp;t.$spinner&amp;&amp;(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&amp;&amp;t.$smallBtn.length||(t.$smallBtn=n(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&amp;&amp;t.$content&amp;&amp;!t.hasError&amp;&amp;(t.$content.on("contextmenu.fb",function(t){return 2==t.button&amp;&amp;t.preventDefault(),!0}),"image"===t.type&amp;&amp;n('&lt;div class="fancybox-spaceball"&gt;&lt;/div&gt;').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&amp;&amp;e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e=this,n=t||e.current,o=n.opts.caption,a=e.$refs.caption,i=!1;n.opts.preventCaptionOverlap&amp;&amp;o&amp;&amp;o.length&amp;&amp;(n.pos!==e.currPos?(a=a.clone().empty().appendTo(a.parent()),a.html(o),i=a.outerHeight(!0),a.empty().remove()):e.$caption&amp;&amp;(i=e.$caption.outerHeight(!0)),n.$slide.css("padding-bottom",i||""))},adjustLayout:function(t){var e,n,o,a,i=this,s=t||i.current;s.isLoaded&amp;&amp;s.opts.disableLayoutFix!==!0&amp;&amp;(s.$content.css("margin-bottom",""),s.$content.outerHeight()&gt;s.$slide.height()+.5&amp;&amp;(o=s.$slide[0].style["padding-bottom"],a=s.$slide.css("padding-bottom"),parseFloat(a)&gt;0&amp;&amp;(e=s.$slide[0].scrollHeight,s.$slide.css("padding-bottom",0),Math.abs(e-s.$slide[0].scrollHeight)&lt;1&amp;&amp;(n=a),s.$slide.css("padding-bottom",o))),s.$content.css("margin-bottom",n))},revealContent:function(t){var e,a,i,s,r=this,c=t.$slide,l=!1,d=!1,u=r.isMoved(t),f=t.isRevealed;return t.isRevealed=!0,e=t.opts[r.firstRun?"animationEffect":"transitionEffect"],i=t.opts[r.firstRun?"animationDuration":"transitionDuration"],i=parseInt(t.forcedDuration===o?i:t.forcedDuration,10),!u&amp;&amp;t.pos===r.currPos&amp;&amp;i||(e=!1),"zoom"===e&amp;&amp;(t.pos===r.currPos&amp;&amp;i&amp;&amp;"image"===t.type&amp;&amp;!t.hasError&amp;&amp;(d=r.getThumbPos(t))?l=r.getFitPos(t):e="fade"),"zoom"===e?(r.isAnimating=!0,l.scaleX=l.width/d.width,l.scaleY=l.height/d.height,s=t.opts.zoomOpacity,"auto"==s&amp;&amp;(s=Math.abs(t.width/t.height-d.width/d.height)&gt;.1),s&amp;&amp;(d.opacity=.1,l.opacity=1),n.fancybox.setTranslate(t.$content.removeClass("fancybox-is-hidden"),d),p(t.$content),void n.fancybox.animate(t.$content,l,i,function(){r.isAnimating=!1,r.complete()})):(r.updateSlide(t),e?(n.fancybox.stop(c),a="fancybox-slide--"+(t.pos&gt;=r.prevPos?"next":"previous")+" fancybox-animated fancybox-fx-"+e,c.addClass(a).removeClass("fancybox-slide--current"),t.$content.removeClass("fancybox-is-hidden"),p(c),"image"!==t.type&amp;&amp;t.$content.hide().show(0),void n.fancybox.animate(c,"fancybox-slide--current",i,function(){c.removeClass(a).css({transform:"",opacity:""}),t.pos===r.currPos&amp;&amp;r.complete()},!0)):(t.$content.removeClass("fancybox-is-hidden"),f||!u||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===r.currPos&amp;&amp;r.complete())))},getThumbPos:function(t){var e,o,a,i,s,r=!1,c=t.$thumb;return!(!c||!g(c[0]))&amp;&amp;(e=n.fancybox.getTranslate(c),o=parseFloat(c.css("border-top-width")||0),a=parseFloat(c.css("border-right-width")||0),i=parseFloat(c.css("border-bottom-width")||0),s=parseFloat(c.css("border-left-width")||0),r={top:e.top+o,left:e.left+s,width:e.width-a-s,height:e.height-o-i,scaleX:1,scaleY:1},e.width&gt;0&amp;&amp;e.height&gt;0&amp;&amp;r)},complete:function(){var t,e=this,o=e.current,a={};!e.isMoved()&amp;&amp;o.isLoaded&amp;&amp;(o.isComplete||(o.isComplete=!0,o.$slide.siblings().trigger("onReset"),e.preload("inline"),p(o.$slide),o.$slide.addClass("fancybox-slide--complete"),n.each(e.slides,function(t,o){o.pos&gt;=e.currPos-1&amp;&amp;o.pos&lt;=e.currPos+1?a[o.pos]=o:o&amp;&amp;(n.fancybox.stop(o.$slide),o.$slide.off().remove())}),e.slides=a),e.isAnimating=!1,e.updateCursor(),e.trigger("afterShow"),o.opts.video.autoStart&amp;&amp;o.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){this.webkitExitFullscreen&amp;&amp;this.webkitExitFullscreen(),e.next()}),o.opts.autoFocus&amp;&amp;"html"===o.contentType&amp;&amp;(t=o.$content.find("input[autofocus]:enabled:visible:first"),t.length?t.trigger("focus"):e.focus(null,!0)),o.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,n,o=this;o.group.length&lt;2||(n=o.slides[o.currPos+1],e=o.slides[o.currPos-1],e&amp;&amp;e.type===t&amp;&amp;o.loadSlide(e),n&amp;&amp;n.type===t&amp;&amp;o.loadSlide(n))},focus:function(t,o){var a,i,s=this,r=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");s.isClosing||(a=!t&amp;&amp;s.current&amp;&amp;s.current.isComplete?s.current.$slide.find("*:visible"+(o?":not(.fancybox-close-small)":"")):s.$refs.container.find("*:visible"),a=a.filter(r).filter(function(){return"hidden"!==n(this).css("visibility")&amp;&amp;!n(this).hasClass("disabled")}),a.length?(i=a.index(e.activeElement),t&amp;&amp;t.shiftKey?(i&lt;0||0==i)&amp;&amp;(t.preventDefault(),a.eq(a.length-1).trigger("focus")):(i&lt;0||i==a.length-1)&amp;&amp;(t&amp;&amp;t.preventDefault(),a.eq(0).trigger("focus"))):s.$refs.container.trigger("focus"))},activate:function(){var t=this;n(".fancybox-container").each(function(){var e=n(this).data("FancyBox");e&amp;&amp;e.id!==t.id&amp;&amp;!e.isClosing&amp;&amp;(e.trigger("onDeactivate"),e.removeEvents(),e.isVisible=!1)}),t.isVisible=!0,(t.current||t.isIdle)&amp;&amp;(t.update(),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t,e){var o,a,i,s,r,c,l,u=this,f=u.current,h=function(){u.cleanUp(t)};return!u.isClosing&amp;&amp;(u.isClosing=!0,u.trigger("beforeClose",t)===!1?(u.isClosing=!1,d(function(){u.update()}),!1):(u.removeEvents(),i=f.$content,o=f.opts.animationEffect,a=n.isNumeric(e)?e:o?f.opts.animationDuration:0,f.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"),t!==!0?n.fancybox.stop(f.$slide):o=!1,f.$slide.siblings().trigger("onReset").remove(),a&amp;&amp;u.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing").css("transition-duration",a+"ms"),u.hideLoading(f),u.hideControls(!0),u.updateCursor(),"zoom"!==o||i&amp;&amp;a&amp;&amp;"image"===f.type&amp;&amp;!u.isMoved()&amp;&amp;!f.hasError&amp;&amp;(l=u.getThumbPos(f))||(o="fade"),"zoom"===o?(n.fancybox.stop(i),s=n.fancybox.getTranslate(i),c={top:s.top,left:s.left,scaleX:s.width/l.width,scaleY:s.height/l.height,width:l.width,height:l.height},r=f.opts.zoomOpacity,"auto"==r&amp;&amp;(r=Math.abs(f.width/f.height-l.width/l.height)&gt;.1),r&amp;&amp;(l.opacity=0),n.fancybox.setTranslate(i,c),p(i),n.fancybox.animate(i,l,a,h),!0):(o&amp;&amp;a?n.fancybox.animate(f.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"),"fancybox-animated fancybox-fx-"+o,a,h):t===!0?setTimeout(h,a):h(),
!0)))},cleanUp:function(e){var o,a,i,s=this,r=s.current.opts.$orig;s.current.$slide.trigger("onReset"),s.$refs.container.empty().remove(),s.trigger("afterClose",e),s.current.opts.backFocus&amp;&amp;(r&amp;&amp;r.length&amp;&amp;r.is(":visible")||(r=s.$trigger),r&amp;&amp;r.length&amp;&amp;(a=t.scrollX,i=t.scrollY,r.trigger("focus"),n("html, body").scrollTop(i).scrollLeft(a))),s.current=null,o=n.fancybox.getInstance(),o?o.activate():(n("body").removeClass("fancybox-active compensate-for-scrollbar"),n("#fancybox-style-noscroll").remove())},trigger:function(t,e){var o,a=Array.prototype.slice.call(arguments,1),i=this,s=e&amp;&amp;e.opts?e:i.current;return s?a.unshift(s):s=i,a.unshift(i),n.isFunction(s.opts[t])&amp;&amp;(o=s.opts[t].apply(s,a)),o===!1?o:void("afterClose"!==t&amp;&amp;i.$refs?i.$refs.container.trigger(t+".fb",a):r.trigger(t+".fb",a))},updateControls:function(){var t=this,o=t.current,a=o.index,i=t.$refs.container,s=t.$refs.caption,r=o.opts.caption;o.$slide.trigger("refresh"),t.$caption=r&amp;&amp;r.length?s.html(r):null,t.hasHiddenControls||t.isIdle||t.showControls(),i.find("[data-fancybox-count]").html(t.group.length),i.find("[data-fancybox-index]").html(a+1),i.find("[data-fancybox-prev]").prop("disabled",!o.opts.loop&amp;&amp;a&lt;=0),i.find("[data-fancybox-next]").prop("disabled",!o.opts.loop&amp;&amp;a&gt;=t.group.length-1),"image"===o.type?i.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",o.opts.image.src||o.src).show():o.opts.toolbar&amp;&amp;i.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),n(e.activeElement).is(":hidden,[disabled]")&amp;&amp;t.$refs.container.trigger("focus")},hideControls:function(t){var e=this,n=["infobar","toolbar","nav"];!t&amp;&amp;e.current.opts.preventCaptionOverlap||n.push("caption"),this.$refs.container.removeClass(n.map(function(t){return"fancybox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,n=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,n.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&amp;&amp;t.group.length&gt;1)).toggleClass("fancybox-show-caption",!!t.$caption).toggleClass("fancybox-show-nav",!!(e.arrows&amp;&amp;t.group.length&gt;1)).toggleClass("fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),n.fancybox={version:"3.5.2",defaults:i,getInstance:function(t){var e=n('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof b&amp;&amp;("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&amp;&amp;t.apply(e,o),e)},open:function(t,e,n){return new b(t,e,n)},close:function(t){var e=this.getInstance();e&amp;&amp;(e.close(),t===!0&amp;&amp;this.close(t))},destroy:function(){this.close(!0),r.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&amp;&amp;t.getComputedStyle(n)&amp;&amp;t.getComputedStyle(n).getPropertyValue("transform")&amp;&amp;!(e.documentMode&amp;&amp;e.documentMode&lt;11)}(),getTranslate:function(t){var e;return!(!t||!t.length)&amp;&amp;(e=t[0].getBoundingClientRect(),{top:e.top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))})},setTranslate:function(t,e){var n="",a={};if(t&amp;&amp;e)return e.left===o&amp;&amp;e.top===o||(n=(e.left===o?t.position().left:e.left)+"px, "+(e.top===o?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),e.scaleX!==o&amp;&amp;e.scaleY!==o?n+=" scale("+e.scaleX+", "+e.scaleY+")":e.scaleX!==o&amp;&amp;(n+=" scaleX("+e.scaleX+")"),n.length&amp;&amp;(a.transform=n),e.opacity!==o&amp;&amp;(a.opacity=e.opacity),e.width!==o&amp;&amp;(a.width=e.width),e.height!==o&amp;&amp;(a.height=e.height),t.css(a)},animate:function(t,e,a,i,s){var r,c=this;n.isFunction(a)&amp;&amp;(i=a,a=null),c.stop(t),r=c.getTranslate(t),t.on(f,function(l){(!l||!l.originalEvent||t.is(l.originalEvent.target)&amp;&amp;"z-index"!=l.originalEvent.propertyName)&amp;&amp;(c.stop(t),n.isNumeric(a)&amp;&amp;t.css("transition-duration",""),n.isPlainObject(e)?e.scaleX!==o&amp;&amp;e.scaleY!==o&amp;&amp;c.setTranslate(t,{top:e.top,left:e.left,width:r.width*e.scaleX,height:r.height*e.scaleY,scaleX:1,scaleY:1}):s!==!0&amp;&amp;t.removeClass(e),n.isFunction(i)&amp;&amp;i(l))}),n.isNumeric(a)&amp;&amp;t.css("transition-duration",a+"ms"),n.isPlainObject(e)?(e.scaleX!==o&amp;&amp;e.scaleY!==o&amp;&amp;(delete e.width,delete e.height,t.parent().hasClass("fancybox-slide--image")&amp;&amp;t.parent().addClass("fancybox-is-scaling")),n.fancybox.setTranslate(t,e)):t.addClass(e),t.data("timer",setTimeout(function(){t.trigger(f)},a+33))},stop:function(t,e){t&amp;&amp;t.length&amp;&amp;(clearTimeout(t.data("timer")),e&amp;&amp;t.trigger(f),t.off(f).css("transition-duration",""),t.parent().removeClass("fancybox-is-scaling"))}},n.fn.fancybox=function(t){var e;return t=t||{},e=t.selector||!1,e?n("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},a):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},a),this},r.on("click.fb-start","[data-fancybox]",a),r.on("click.fb-start","[data-fancybox-trigger]",function(t){n('[data-fancybox="'+n(this).attr("data-fancybox-trigger")+'"]').eq(n(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:n(this)})}),function(){var t=".fancybox-button",e="fancybox-focus",o=null;r.on("mousedown mouseup focus blur",t,function(a){switch(a.type){case"mousedown":o=n(this);break;case"mouseup":o=null;break;case"focusin":n(t).removeClass(e),n(this).is(o)||n(this).is("[disabled]")||n(this).addClass(e);break;case"focusout":n(t).removeClass(e)}})}()}}(window,document,jQuery),function(t){"use strict";var e={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&amp;)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&amp;list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"//www.youtube-nocookie.com/embed/$4",thumb:"//img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&amp;z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&amp;"):""):t[12]+"").replace(/\?/,"&amp;")+"&amp;output="+(t[12]&amp;&amp;t[12].indexOf("layer=c")&gt;0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&amp;output=embed"}}},n=function(e,n,o){if(e)return o=o||"","object"===t.type(o)&amp;&amp;(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace("$"+t,n||"")}),o.length&amp;&amp;(e+=(e.indexOf("?")&gt;0?"&amp;":"?")+o),e};t(document).on("objectNeedsType.fb",function(o,a,i){var s,r,c,l,d,u,f,p=i.src||"",h=!1;s=t.extend(!0,{},e,i.opts.media),t.each(s,function(e,o){if(c=p.match(o.matcher)){if(h=o.type,f=e,u={},o.paramPlace&amp;&amp;c[o.paramPlace]){d=c[o.paramPlace],"?"==d[0]&amp;&amp;(d=d.substring(1)),d=d.split("&amp;");for(var a=0;a&lt;d.length;++a){var s=d[a].split("=",2);2==s.length&amp;&amp;(u[s[0]]=decodeURIComponent(s[1].replace(/\+/g," ")))}}return l=t.extend(!0,{},o.params,i.opts[e],u),p="function"===t.type(o.url)?o.url.call(this,c,l,i):n(o.url,c,l),r="function"===t.type(o.thumb)?o.thumb.call(this,c,l,i):n(o.thumb,c),"youtube"===e?p=p.replace(/&amp;t=((\d+)m)?(\d+)s/,function(t,e,n,o){return"&amp;start="+((n?60*parseInt(n,10):0)+parseInt(o,10))}):"vimeo"===e&amp;&amp;(p=p.replace("&amp;%23","#")),!1}}),h?(i.opts.thumb||i.opts.$thumb&amp;&amp;i.opts.$thumb.length||(i.opts.thumb=r),"iframe"===h&amp;&amp;(i.opts=t.extend(!0,i.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),t.extend(i,{type:h,src:p,origSrc:i.src,contentSource:f,contentType:"image"===h?"image":"gmap_place"==f||"gmap_search"==f?"map":"video"})):p&amp;&amp;(i.type=i.opts.defaultType)});var o={youtube:{src:"https://www.youtube.com/iframe_api",class:"YT",loading:!1,loaded:!1},vimeo:{src:"https://player.vimeo.com/api/player.js",class:"Vimeo",loading:!1,loaded:!1},load:function(t){var e,n=this;return this[t].loaded?void setTimeout(function(){n.done(t)}):void(this[t].loading||(this[t].loading=!0,e=document.createElement("script"),e.type="text/javascript",e.src=this[t].src,"youtube"===t?window.onYouTubeIframeAPIReady=function(){n[t].loaded=!0,n.done(t)}:e.onload=function(){n[t].loaded=!0,n.done(t)},document.body.appendChild(e)))},done:function(e){var n,o,a;"youtube"===e&amp;&amp;delete window.onYouTubeIframeAPIReady,n=t.fancybox.getInstance(),n&amp;&amp;(o=n.current.$content.find("iframe"),"youtube"===e&amp;&amp;void 0!==YT&amp;&amp;YT?a=new YT.Player(o.attr("id"),{events:{onStateChange:function(t){0==t.data&amp;&amp;n.next()}}}):"vimeo"===e&amp;&amp;void 0!==Vimeo&amp;&amp;Vimeo&amp;&amp;(a=new Vimeo.Player(o),a.on("ended",function(){n.next()})))}};t(document).on({"afterShow.fb":function(t,e,n){e.group.length&gt;1&amp;&amp;("youtube"===n.contentSource||"vimeo"===n.contentSource)&amp;&amp;o.load(n.contentSource)}})}(jQuery),function(t,e,n){"use strict";var o=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),a=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),i=function(e){var n=[];e=e.originalEvent||e||t.e,e=e.touches&amp;&amp;e.touches.length?e.touches:e.changedTouches&amp;&amp;e.changedTouches.length?e.changedTouches:[e];for(var o in e)e[o].pageX?n.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&amp;&amp;n.push({x:e[o].clientX,y:e[o].clientY});return n},s=function(t,e,n){return e&amp;&amp;t?"x"===n?t.x-e.x:"y"===n?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},r=function(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||n.isFunction(t.get(0).onclick)||t.data("selectable"))return!0;for(var e=0,o=t[0].attributes,a=o.length;e&lt;a;e++)if("data-fancybox-"===o[e].nodeName.substr(0,14))return!0;return!1},c=function(e){var n=t.getComputedStyle(e)["overflow-y"],o=t.getComputedStyle(e)["overflow-x"],a=("scroll"===n||"auto"===n)&amp;&amp;e.scrollHeight&gt;e.clientHeight,i=("scroll"===o||"auto"===o)&amp;&amp;e.scrollWidth&gt;e.clientWidth;return a||i},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass("fancybox-stage")||t.is("body"))break}return e},d=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",n.proxy(e,"ontouchstart"))};d.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),n(e).off(".fb.touch"),t.requestId&amp;&amp;(a(t.requestId),t.requestId=null),t.tapped&amp;&amp;(clearTimeout(t.tapped),t.tapped=null)},d.prototype.ontouchstart=function(o){var a=this,c=n(o.target),d=a.instance,u=d.current,f=u.$slide,p=u.$content,h="touchstart"==o.type;if(h&amp;&amp;a.$container.off("mousedown.fb.touch"),(!o.originalEvent||2!=o.originalEvent.button)&amp;&amp;f.length&amp;&amp;c.length&amp;&amp;!r(c)&amp;&amp;!r(c.parent())&amp;&amp;(c.is("img")||!(o.originalEvent.clientX&gt;c[0].clientWidth+c.offset().left))){if(!u||d.isAnimating||u.$slide.hasClass("fancybox-animated"))return o.stopPropagation(),void o.preventDefault();a.realPoints=a.startPoints=i(o),a.startPoints.length&amp;&amp;(u.touch&amp;&amp;o.stopPropagation(),a.startEvent=o,a.canTap=!0,a.$target=c,a.$content=p,a.opts=u.opts.touch,a.isPanning=!1,a.isSwiping=!1,a.isZooming=!1,a.isScrolling=!1,a.canPan=d.canPan(),a.startTime=(new Date).getTime(),a.distanceX=a.distanceY=a.distance=0,a.canvasWidth=Math.round(f[0].clientWidth),a.canvasHeight=Math.round(f[0].clientHeight),a.contentLastPos=null,a.contentStartPos=n.fancybox.getTranslate(a.$content)||{top:0,left:0},a.sliderStartPos=n.fancybox.getTranslate(f),a.stagePos=n.fancybox.getTranslate(d.$refs.stage),a.sliderStartPos.top-=a.stagePos.top,a.sliderStartPos.left-=a.stagePos.left,a.contentStartPos.top-=a.stagePos.top,a.contentStartPos.left-=a.stagePos.left,n(e).off(".fb.touch").on(h?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",n.proxy(a,"ontouchend")).on(h?"touchmove.fb.touch":"mousemove.fb.touch",n.proxy(a,"ontouchmove")),n.fancybox.isMobile&amp;&amp;e.addEventListener("scroll",a.onscroll,!0),((a.opts||a.canPan)&amp;&amp;(c.is(a.$stage)||a.$stage.find(c).length)||(c.is(".fancybox-image")&amp;&amp;o.preventDefault(),n.fancybox.isMobile&amp;&amp;c.hasClass("fancybox-caption")))&amp;&amp;(a.isScrollable=l(c)||l(c.parent()),n.fancybox.isMobile&amp;&amp;a.isScrollable||o.preventDefault(),(1===a.startPoints.length||u.hasError)&amp;&amp;(a.canPan?(n.fancybox.stop(a.$content),a.isPanning=!0):a.isSwiping=!0,a.$container.addClass("fancybox-is-grabbing")),2===a.startPoints.length&amp;&amp;"image"===u.type&amp;&amp;(u.isLoaded||u.$ghost)&amp;&amp;(a.canTap=!1,a.isSwiping=!1,a.isPanning=!1,a.isZooming=!0,n.fancybox.stop(a.$content),a.centerPointStartX=.5*(a.startPoints[0].x+a.startPoints[1].x)-n(t).scrollLeft(),a.centerPointStartY=.5*(a.startPoints[0].y+a.startPoints[1].y)-n(t).scrollTop(),a.percentageOfImageAtPinchPointX=(a.centerPointStartX-a.contentStartPos.left)/a.contentStartPos.width,a.percentageOfImageAtPinchPointY=(a.centerPointStartY-a.contentStartPos.top)/a.contentStartPos.height,a.startDistanceBetweenFingers=s(a.startPoints[0],a.startPoints[1]))))}},d.prototype.onscroll=function(t){var n=this;n.isScrolling=!0,e.removeEventListener("scroll",n.onscroll,!0)},d.prototype.ontouchmove=function(t){var e=this;return void 0!==t.originalEvent.buttons&amp;&amp;0===t.originalEvent.buttons?void e.ontouchend(t):e.isScrolling?void(e.canTap=!1):(e.newPoints=i(t),void((e.opts||e.canPan)&amp;&amp;e.newPoints.length&amp;&amp;e.newPoints.length&amp;&amp;(e.isSwiping&amp;&amp;e.isSwiping===!0||t.preventDefault(),e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance&gt;0&amp;&amp;(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&amp;&amp;e.onZoom()))))},d.prototype.onSwipe=function(e){var i,s=this,r=s.instance,c=s.isSwiping,l=s.sliderStartPos.left||0;if(c!==!0)"x"==c&amp;&amp;(s.distanceX&gt;0&amp;&amp;(s.instance.group.length&lt;2||0===s.instance.current.index&amp;&amp;!s.instance.current.opts.loop)?l+=Math.pow(s.distanceX,.8):s.distanceX&lt;0&amp;&amp;(s.instance.group.length&lt;2||s.instance.current.index===s.instance.group.length-1&amp;&amp;!s.instance.current.opts.loop)?l-=Math.pow(-s.distanceX,.8):l+=s.distanceX),s.sliderLastPos={top:"x"==c?0:s.sliderStartPos.top+s.distanceY,left:l},s.requestId&amp;&amp;(a(s.requestId),s.requestId=null),s.requestId=o(function(){s.sliderLastPos&amp;&amp;(n.each(s.instance.slides,function(t,e){var o=e.pos-s.instance.currPos;n.fancybox.setTranslate(e.$slide,{top:s.sliderLastPos.top,left:s.sliderLastPos.left+o*s.canvasWidth+o*e.opts.gutter})}),s.$container.addClass("fancybox-is-sliding"))});else if(Math.abs(s.distance)&gt;10){if(s.canTap=!1,r.group.length&lt;2&amp;&amp;s.opts.vertical?s.isSwiping="y":r.isDragging||s.opts.vertical===!1||"auto"===s.opts.vertical&amp;&amp;n(t).width()&gt;800?s.isSwiping="x":(i=Math.abs(180*Math.atan2(s.distanceY,s.distanceX)/Math.PI),s.isSwiping=i&gt;45&amp;&amp;i&lt;135?"y":"x"),"y"===s.isSwiping&amp;&amp;n.fancybox.isMobile&amp;&amp;s.isScrollable)return void(s.isScrolling=!0);r.isDragging=s.isSwiping,s.startPoints=s.newPoints,n.each(r.slides,function(t,e){var o,a;n.fancybox.stop(e.$slide),o=n.fancybox.getTranslate(e.$slide),a=n.fancybox.getTranslate(r.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")}),e.pos===r.current.pos&amp;&amp;(s.sliderStartPos.top=o.top-a.top,s.sliderStartPos.left=o.left-a.left),n.fancybox.setTranslate(e.$slide,{top:o.top-a.top,left:o.left-a.left})}),r.SlideShow&amp;&amp;r.SlideShow.isActive&amp;&amp;r.SlideShow.stop()}},d.prototype.onPan=function(){var t=this;return s(t.newPoints[0],t.realPoints[0])&lt;(n.fancybox.isMobile?10:5)?void(t.startPoints=t.newPoints):(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&amp;&amp;a(t.requestId),void(t.requestId=o(function(){n.fancybox.setTranslate(t.$content,t.contentLastPos)})))},d.prototype.limitMovement=function(){var t,e,n,o,a,i,s=this,r=s.canvasWidth,c=s.canvasHeight,l=s.distanceX,d=s.distanceY,u=s.contentStartPos,f=u.left,p=u.top,h=u.width,g=u.height;return a=h&gt;r?f+l:f,i=p+d,t=Math.max(0,.5*r-.5*h),e=Math.max(0,.5*c-.5*g),n=Math.min(r-h,.5*r-.5*h),o=Math.min(c-g,.5*c-.5*g),l&gt;0&amp;&amp;a&gt;t&amp;&amp;(a=t-1+Math.pow(-t+f+l,.8)||0),l&lt;0&amp;&amp;a&lt;n&amp;&amp;(a=n+1-Math.pow(n-f-l,.8)||0),d&gt;0&amp;&amp;i&gt;e&amp;&amp;(i=e-1+Math.pow(-e+p+d,.8)||0),d&lt;0&amp;&amp;i&lt;o&amp;&amp;(i=o+1-Math.pow(o-p-d,.8)||0),{top:i,left:a}},d.prototype.limitPosition=function(t,e,n,o){var a=this,i=a.canvasWidth,s=a.canvasHeight;return n&gt;i?(t=t&gt;0?0:t,t=t&lt;i-n?i-n:t):t=Math.max(0,i/2-n/2),o&gt;s?(e=e&gt;0?0:e,e=e&lt;s-o?s-o:e):e=Math.max(0,s/2-o/2),{top:e,left:t}},d.prototype.onZoom=function(){var e=this,i=e.contentStartPos,r=i.width,c=i.height,l=i.left,d=i.top,u=s(e.newPoints[0],e.newPoints[1]),f=u/e.startDistanceBetweenFingers,p=Math.floor(r*f),h=Math.floor(c*f),g=(r-p)*e.percentageOfImageAtPinchPointX,b=(c-h)*e.percentageOfImageAtPinchPointY,m=(e.newPoints[0].x+e.newPoints[1].x)/2-n(t).scrollLeft(),v=(e.newPoints[0].y+e.newPoints[1].y)/2-n(t).scrollTop(),y=m-e.centerPointStartX,x=v-e.centerPointStartY,w=l+(g+y),$=d+(b+x),S={top:$,left:w,scaleX:f,scaleY:f};e.canTap=!1,e.newWidth=p,e.newHeight=h,e.contentLastPos=S,e.requestId&amp;&amp;a(e.requestId),e.requestId=o(function(){n.fancybox.setTranslate(e.$content,e.contentLastPos)})},d.prototype.ontouchend=function(t){var o=this,s=o.isSwiping,r=o.isPanning,c=o.isZooming,l=o.isScrolling;return o.endPoints=i(t),o.dMs=Math.max((new Date).getTime()-o.startTime,1),o.$container.removeClass("fancybox-is-grabbing"),n(e).off(".fb.touch"),e.removeEventListener("scroll",o.onscroll,!0),o.requestId&amp;&amp;(a(o.requestId),o.requestId=null),o.isSwiping=!1,o.isPanning=!1,o.isZooming=!1,o.isScrolling=!1,o.instance.isDragging=!1,o.canTap?o.onTap(t):(o.speed=100,o.velocityX=o.distanceX/o.dMs*.5,o.velocityY=o.distanceY/o.dMs*.5,void(r?o.endPanning():c?o.endZooming():o.endSwiping(s,l)))},d.prototype.endSwiping=function(t,e){var o=this,a=!1,i=o.instance.group.length,s=Math.abs(o.distanceX),r="x"==t&amp;&amp;i&gt;1&amp;&amp;(o.dMs&gt;130&amp;&amp;s&gt;10||s&gt;50),c=300;o.sliderLastPos=null,"y"==t&amp;&amp;!e&amp;&amp;Math.abs(o.distanceY)&gt;50?(n.fancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),a=o.instance.close(!0,250)):r&amp;&amp;o.distanceX&gt;0?a=o.instance.previous(c):r&amp;&amp;o.distanceX&lt;0&amp;&amp;(a=o.instance.next(c)),a!==!1||"x"!=t&amp;&amp;"y"!=t||o.instance.centerSlide(200),o.$container.removeClass("fancybox-is-sliding")},d.prototype.endPanning=function(){var t,e,o,a=this;a.contentLastPos&amp;&amp;(a.opts.momentum===!1||a.dMs&gt;350?(t=a.contentLastPos.left,e=a.contentLastPos.top):(t=a.contentLastPos.left+500*a.velocityX,e=a.contentLastPos.top+500*a.velocityY),o=a.limitPosition(t,e,a.contentStartPos.width,a.contentStartPos.height),o.width=a.contentStartPos.width,o.height=a.contentStartPos.height,n.fancybox.animate(a.$content,o,330))},d.prototype.endZooming=function(){var t,e,o,a,i=this,s=i.instance.current,r=i.newWidth,c=i.newHeight;i.contentLastPos&amp;&amp;(t=i.contentLastPos.left,e=i.contentLastPos.top,a={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},n.fancybox.setTranslate(i.$content,a),r&lt;i.canvasWidth&amp;&amp;c&lt;i.canvasHeight?i.instance.scaleToFit(150):r&gt;s.width||c&gt;s.height?i.instance.scaleToActual(i.centerPointStartX,i.centerPointStartY,150):(o=i.limitPosition(t,e,r,c),n.fancybox.animate(i.$content,o,150)))},d.prototype.onTap=function(e){var o,a=this,s=n(e.target),r=a.instance,c=r.current,l=e&amp;&amp;i(e)||a.startPoints,d=l[0]?l[0].x-n(t).scrollLeft()-a.stagePos.left:0,u=l[0]?l[0].y-n(t).scrollTop()-a.stagePos.top:0,f=function(t){var o=c.opts[t];if(n.isFunction(o)&amp;&amp;(o=o.apply(r,[c,e])),o)switch(o){case"close":r.close(a.startEvent);break;case"toggleControls":r.toggleControls();break;case"next":r.next();break;case"nextOrClose":r.group.length&gt;1?r.next():r.close(a.startEvent);break;case"zoom":"image"==c.type&amp;&amp;(c.isLoaded||c.$ghost)&amp;&amp;(r.canPan()?r.scaleToFit():r.isScaledDown()?r.scaleToActual(d,u):r.group.length&lt;2&amp;&amp;r.close(a.startEvent))}};if((!e.originalEvent||2!=e.originalEvent.button)&amp;&amp;(s.is("img")||!(d&gt;s[0].clientWidth+s.offset().left))){if(s.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))o="Outside";else if(s.is(".fancybox-slide"))o="Slide";else{if(!r.current.$content||!r.current.$content.find(s).addBack().filter(s).length)return;o="Content"}if(a.tapped){if(clearTimeout(a.tapped),a.tapped=null,Math.abs(d-a.tapX)&gt;50||Math.abs(u-a.tapY)&gt;50)return this;f("dblclick"+o)}else a.tapX=d,a.tapY=u,c.opts["dblclick"+o]&amp;&amp;c.opts["dblclick"+o]!==c.opts["click"+o]?a.tapped=setTimeout(function(){a.tapped=null,r.isAnimating||f("click"+o)},500):f("click"+o);return this}},n(e).on("onActivate.fb",function(t,e){e&amp;&amp;!e.Guestures&amp;&amp;(e.Guestures=new d(e))}).on("beforeClose.fb",function(t,e){e&amp;&amp;e.Guestures&amp;&amp;e.Guestures.destroy()})}(window,document,jQuery),function(t,e){"use strict";e.extend(!0,e.fancybox.defaults,{btnTpl:{slideShow:'&lt;button data-fancybox-play class="fancybox-button fancybox-button--play" title="{{PLAY_START}}"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M6.5 5.4v13.2l11-6.6z"/&gt;&lt;/svg&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/&gt;&lt;/svg&gt;&lt;/button&gt;'},slideShow:{autoStart:!1,speed:3e3,progress:!0}});var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,n=t.instance,o=n.group[n.currIndex].opts.slideShow;t.$button=n.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),n.group.length&lt;2||!o?t.$button.hide():o.progress&amp;&amp;(t.$progress=e('&lt;div class="fancybox-progress"&gt;&lt;/div&gt;').appendTo(n.$refs.inner))},set:function(t){var n=this,o=n.instance,a=o.current;a&amp;&amp;(t===!0||a.opts.loop||o.currIndex&lt;o.group.length-1)?n.isActive&amp;&amp;"video"!==a.contentType&amp;&amp;(n.$progress&amp;&amp;e.fancybox.animate(n.$progress.show(),{scaleX:1},a.opts.slideShow.speed),n.timer=setTimeout(function(){o.current.opts.loop||o.current.index!=o.group.length-1?o.next():o.jumpTo(0)},a.opts.slideShow.speed)):(n.stop(),o.idleSecondsCounter=0,o.showControls())},clear:function(){var t=this;clearTimeout(t.timer),t.timer=null,t.$progress&amp;&amp;t.$progress.removeAttr("style").hide()},start:function(){var t=this,e=t.instance.current;e&amp;&amp;(t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_STOP).removeClass("fancybox-button--play").addClass("fancybox-button--pause"),t.isActive=!0,e.isComplete&amp;&amp;t.set(!0),t.instance.trigger("onSlideShowChange",!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_START).removeClass("fancybox-button--pause").addClass("fancybox-button--play"),t.isActive=!1,t.instance.trigger("onSlideShowChange",!1),t.$progress&amp;&amp;t.$progress.removeAttr("style").hide()},toggle:function(){var t=this;t.isActive?t.stop():t.start()}}),e(t).on({"onInit.fb":function(t,e){e&amp;&amp;!e.SlideShow&amp;&amp;(e.SlideShow=new n(e))},"beforeShow.fb":function(t,e,n,o){var a=e&amp;&amp;e.SlideShow;o?a&amp;&amp;n.opts.slideShow.autoStart&amp;&amp;a.start():a&amp;&amp;a.isActive&amp;&amp;a.clear()},"afterShow.fb":function(t,e,n){var o=e&amp;&amp;e.SlideShow;o&amp;&amp;o.isActive&amp;&amp;o.set()},"afterKeydown.fb":function(n,o,a,i,s){var r=o&amp;&amp;o.SlideShow;!r||!a.opts.slideShow||80!==s&amp;&amp;32!==s||e(t.activeElement).is("button,a,input")||(i.preventDefault(),r.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){var n=e&amp;&amp;e.SlideShow;n&amp;&amp;n.stop()}}),e(t).on("visibilitychange",function(){var n=e.fancybox.getInstance(),o=n&amp;&amp;n.SlideShow;o&amp;&amp;o.isActive&amp;&amp;(t.hidden?o.clear():o.set())})}(document,jQuery),function(t,e){"use strict";var n=function(){for(var e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n={},o=0;o&lt;e.length;o++){var a=e[o];if(a&amp;&amp;a[1]in t){for(var i=0;i&lt;a.length;i++)n[e[0][i]]=a[i];return n}}return!1}();if(n){var o={request:function(e){e=e||t.documentElement,e[n.requestFullscreen](e.ALLOW_KEYBOARD_INPUT)},exit:function(){t[n.exitFullscreen]()},toggle:function(e){e=e||t.documentElement,this.isFullscreen()?this.exit():this.request(e)},isFullscreen:function(){return Boolean(t[n.fullscreenElement])},enabled:function(){return Boolean(t[n.fullscreenEnabled])}};e.extend(!0,e.fancybox.defaults,{btnTpl:{fullScreen:'&lt;button data-fancybox-fullscreen class="fancybox-button fancybox-button--fsenter" title="{{FULL_SCREEN}}"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/&gt;&lt;/svg&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/&gt;&lt;/svg&gt;&lt;/button&gt;'},fullScreen:{autoStart:!1}}),e(t).on(n.fullscreenchange,function(){var t=o.isFullscreen(),n=e.fancybox.getInstance();n&amp;&amp;(n.current&amp;&amp;"image"===n.current.type&amp;&amp;n.isAnimating&amp;&amp;(n.current.$content.css("transition","none"),n.isAnimating=!1,n.update(!0,!0,0)),n.trigger("onFullscreenChange",t),n.$refs.container.toggleClass("fancybox-is-fullscreen",t),n.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("fancybox-button--fsenter",!t).toggleClass("fancybox-button--fsexit",t))})}e(t).on({"onInit.fb":function(t,e){var a;return n?void(e&amp;&amp;e.group[e.currIndex].opts.fullScreen?(a=e.$refs.container,a.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle()}),e.opts.fullScreen&amp;&amp;e.opts.fullScreen.autoStart===!0&amp;&amp;o.request(),e.FullScreen=o):e&amp;&amp;e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide()):void e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove()},"afterKeydown.fb":function(t,e,n,o,a){e&amp;&amp;e.FullScreen&amp;&amp;70===a&amp;&amp;(o.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&amp;&amp;e.FullScreen&amp;&amp;e.$refs.container.hasClass("fancybox-is-fullscreen")&amp;&amp;o.exit()}})}(document,jQuery),function(t,e){"use strict";var n="fancybox-thumbs",o=n+"-active";e.fancybox.defaults=e.extend(!0,{btnTpl:{thumbs:'&lt;button data-fancybox-thumbs class="fancybox-button fancybox-button--thumbs" title="{{THUMBS}}"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/&gt;&lt;/svg&gt;&lt;/button&gt;'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"}},e.fancybox.defaults);var a=function(t){this.init(t)};e.extend(a.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,n=t.group,o=0;e.instance=t,e.opts=n[t.currIndex].opts.thumbs,t.Thumbs=e,e.$button=t.$refs.toolbar.find("[data-fancybox-thumbs]");for(var a=0,i=n.length;a&lt;i&amp;&amp;(n[a].thumb&amp;&amp;o++,!(o&gt;1));a++);o&gt;1&amp;&amp;e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var t,o=this,a=o.instance,i=o.opts.parentEl,s=[];o.$grid||(o.$grid=e('&lt;div class="'+n+" "+n+"-"+o.opts.axis+'"&gt;&lt;/div&gt;').appendTo(a.$refs.container.find(i).addBack().filter(i)),o.$grid.on("click","a",function(){a.jumpTo(e(this).attr("data-index"))})),o.$list||(o.$list=e('&lt;div class="'+n+'__list"&gt;').appendTo(o.$grid)),e.each(a.group,function(e,n){t=n.thumb,t||"image"!==n.type||(t=n.src),s.push('&lt;a role="button" href="javascript:;" tabindex="0" data-index="'+e+'"'+(t&amp;&amp;t.length?' style="background-image:url('+t+')"':'class="fancybox-thumbs-missing"')+"&gt;&lt;/a&gt;")}),o.$list[0].innerHTML=s.join(""),"x"===o.opts.axis&amp;&amp;o.$list.width(parseInt(o.$grid.css("padding-right"),10)+a.group.length*o.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,n,a=this,i=a.$list,s=a.$grid;a.instance.current&amp;&amp;(e=i.children().removeClass(o).filter('[data-index="'+a.instance.current.index+'"]').addClass(o),n=e.position(),"y"===a.opts.axis&amp;&amp;(n.top&lt;0||n.top&gt;i.height()-e.outerHeight())?i.stop().animate({scrollTop:i.scrollTop()+n.top},t):"x"===a.opts.axis&amp;&amp;(n.left&lt;s.scrollLeft()||n.left&gt;s.scrollLeft()+(s.width()-e.outerWidth()))&amp;&amp;i.parent().stop().animate({scrollLeft:n.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&amp;&amp;t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.fb":function(t,e){var n;e&amp;&amp;!e.Thumbs&amp;&amp;(n=new a(e),n.isActive&amp;&amp;n.opts.autoStart===!0&amp;&amp;n.show())},"beforeShow.fb":function(t,e,n,o){var a=e&amp;&amp;e.Thumbs;a&amp;&amp;a.isVisible&amp;&amp;a.focus(o?0:250)},"afterKeydown.fb":function(t,e,n,o,a){var i=e&amp;&amp;e.Thumbs;i&amp;&amp;i.isActive&amp;&amp;71===a&amp;&amp;(o.preventDefault(),i.toggle())},"beforeClose.fb":function(t,e){var n=e&amp;&amp;e.Thumbs;n&amp;&amp;n.isVisible&amp;&amp;n.opts.hideOnClose!==!1&amp;&amp;n.$grid.hide()}})}(document,jQuery),function(t,e){"use strict";function n(t){var e={"&amp;":"&amp;amp;","&lt;":"&amp;lt;","&gt;":"&amp;gt;",'"':"&amp;quot;","'":"&amp;#39;","/":"&amp;#x2F;","`":"&amp;#x60;","=":"&amp;#x3D;"};return String(t).replace(/[&amp;&lt;&gt;"'`=\/]/g,function(t){return e[t]})}e.extend(!0,e.fancybox.defaults,{btnTpl:{share:'&lt;button data-fancybox-share class="fancybox-button fancybox-button--share" title="{{SHARE}}"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/&gt;&lt;/svg&gt;&lt;/button&gt;'},share:{url:function(t,e){return!t.currentHash&amp;&amp;"inline"!==e.type&amp;&amp;"html"!==e.type&amp;&amp;(e.origSrc||e.src)||window.location},tpl:'&lt;div class="fancybox-share"&gt;&lt;h1&gt;{{SHARE}}&lt;/h1&gt;&lt;p&gt;&lt;a class="fancybox-share__button fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{url}}"&gt;&lt;svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"&gt;&lt;path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /&gt;&lt;/svg&gt;&lt;span&gt;Facebook&lt;/span&gt;&lt;/a&gt;&lt;a class="fancybox-share__button fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{url}}&amp;text={{descr}}"&gt;&lt;svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"&gt;&lt;path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /&gt;&lt;/svg&gt;&lt;span&gt;Twitter&lt;/span&gt;&lt;/a&gt;&lt;a class="fancybox-share__button fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{url}}&amp;description={{descr}}&amp;media={{media}}"&gt;&lt;svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"&gt;&lt;path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/&gt;&lt;/svg&gt;&lt;span&gt;Pinterest&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;input class="fancybox-share__input" type="text" value="{{url_raw}}" onclick="select()" /&gt;&lt;/p&gt;&lt;/div&gt;'
}}),e(t).on("click","[data-fancybox-share]",function(){var t,o,a=e.fancybox.getInstance(),i=a.current||null;i&amp;&amp;("function"===e.type(i.opts.share.url)&amp;&amp;(t=i.opts.share.url.apply(i,[a,i])),o=i.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===i.type?encodeURIComponent(i.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,n(t)).replace(/\{\{descr\}\}/g,a.$caption?encodeURIComponent(a.$caption.text()):""),e.fancybox.open({src:a.translate(a,o),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){a.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(t,e,n){"use strict";function o(){var e=t.location.hash.substr(1),n=e.split("-"),o=n.length&gt;1&amp;&amp;/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,a=n.join("-");return{hash:e,index:o&lt;1?1:o,gallery:a}}function a(t){""!==t.gallery&amp;&amp;n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function i(t){var e,n;return!!t&amp;&amp;(e=t.current?t.current.opts:t.opts,n=e.hash||(e.$orig?e.$orig.data("fancybox")||e.$orig.data("fancybox-trigger"):""),""!==n&amp;&amp;n)}n.escapeSelector||(n.escapeSelector=function(t){var e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,n=function(t,e){return e?"\0"===t?"пїЅ":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t};return(t+"").replace(e,n)}),n(function(){n.fancybox.defaults.hash!==!1&amp;&amp;(n(e).on({"onInit.fb":function(t,e){var n,a;e.group[e.currIndex].opts.hash!==!1&amp;&amp;(n=o(),a=i(e),a&amp;&amp;n.gallery&amp;&amp;a==n.gallery&amp;&amp;(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,a,s){var r;a&amp;&amp;a.opts.hash!==!1&amp;&amp;(r=i(o),r&amp;&amp;(o.currentHash=r+(o.group.length&gt;1?"-"+(a.index+1):""),t.location.hash!=="#"+o.currentHash&amp;&amp;(s&amp;&amp;!o.origHash&amp;&amp;(o.origHash=t.location.hash),o.hashTimer&amp;&amp;clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){"replaceState"in t.history?(t.history[s?"pushState":"replaceState"]({},e.title,t.location.pathname+t.location.search+"#"+o.currentHash),s&amp;&amp;(o.hasCreatedHistory=!0)):t.location.hash=o.currentHash,o.hashTimer=null},300))))},"beforeClose.fb":function(n,o,a){a.opts.hash!==!1&amp;&amp;(clearTimeout(o.hashTimer),o.currentHash&amp;&amp;o.hasCreatedHistory?t.history.back():o.currentHash&amp;&amp;("replaceState"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(o.origHash||"")):t.location.hash=o.origHash),o.currentHash=null)}}),n(t).on("hashchange.fb",function(){var t=o(),e=null;n.each(n(".fancybox-container").get().reverse(),function(t,o){var a=n(o).data("FancyBox");if(a&amp;&amp;a.currentHash)return e=a,!1}),e?e.currentHash===t.gallery+"-"+t.index||1===t.index&amp;&amp;e.currentHash==t.gallery||(e.currentHash=null,e.close()):""!==t.gallery&amp;&amp;a(t)}),setTimeout(function(){n.fancybox.getInstance()||a(o())},50))})}(window,document,jQuery),function(t,e){"use strict";var n=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var o=e.current,a=(new Date).getTime();e.group.length&lt;2||o.opts.wheel===!1||"auto"===o.opts.wheel&amp;&amp;"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("fancybox-animated")||(t=t.originalEvent||t,a-n&lt;250||(n=a,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)&lt;0?"next":"previous"]())))})}})}(document,jQuery); 
/** Р¤СѓРЅРєС†РёСЏ РґР»СЏ РѕС‚РїСЂР°РІРєРё РЅР° СЃРµСЂРІРµСЂ РѕС†РµРЅРєРё Рё РїРѕР»СѓС‡РµРЅРёРµ РЅРѕРІРѕРіРѕ Р·РЅР°С‡РµРЅРёСЏ СЂРµР№С‚РёРЅРіР° Рё 
 * РєРѕР»РёС‡РµСЃС‚РІР° РіРѕР»РѕСЃРѕРІ, РѕРґРЅРѕРІР»РµРЅРёРµ Р·РІРµР·Рґ СЂРµР№С‚РёРЅРіР°.
 * Р“РѕР»РѕСЃРѕРІР°С‚СЊ РІС‚РѕСЂРѕР№ СЂР°Р· РІРѕР·РјРѕР¶РЅРѕ Р»РёС€СЊ РїСЂРё СѓРґР°Р»РµРЅРёРё РєСѓРєРё
 */

var mgrate = (function() {
  return {
    init: function() {
      mgrate.reloadCount();
      mgrate.initStar();
    },
    initStar: function() {
      $('div.rateit, span.rateit').rateit();
    },
    /**
     * Р¤СѓРЅРєС†РёСЏ РґР»СЏ РЅР°РІРµС€РёРІР°РЅРёСЏ Р·РІРµР·РґРѕС‡РµРє
     */
    reloadCount: function() {
      $('.rating-action .rateit').bind('rated', function(e) {
        var ri = $(this);
        var product = ri.data('productid'); //id С‚РѕРІР°СЂР°
        var value = ri.rateit('value'); // РѕС†РµРЅРєР° РѕС‚ 1 РґРѕ 5

        $.ajax({
          type: "POST",
          url: mgBaseDir + "/ajaxrequest",
          dataType: 'json',
          data: {
            mguniqueurl: "action/getEntity", // РґРµР№СЃС‚РІРёСЏ РґР»СЏ РІС‹РїРѕР»РЅРµРЅРёСЏ РЅР° СЃРµСЂРІРµСЂРµ
            pluginHandler: 'rating',
            rating: value,
            id_product: product,
            count: 1,
          },
          success: function(response) {
            if (response.status != 'error') {
              var newValue = mgrate.showResult(response.data.row);
              ri.rateit('readonly', true);
              ri.rateit('value', newValue);
            } else {
              $('.info').text("РћС€РёР±РєР°!");
            }
          }
        });

      });

      var tooltipvalues = ['РїР»РѕС…Рѕ', 'РЅРѕСЂРјР°Р»СЊРЅРѕ', 'С…РѕСЂРѕС€Рѕ', 'РѕС‡РµРЅСЊ С…РѕСЂРѕС€Рѕ', 'РѕС‚Р»РёС‡РЅРѕ'];
      $('.rating-action .rateit[data-plugin=stars]').bind('over', function(event, value) {
        $(this).attr('title', tooltipvalues[value - 1]);
      });
    },
    showResult: function(data) {
      var id = data.id_product;
      var grade = data.rating;
      var count = data.count;
      var rating = (grade / count).toFixed(1);
      $('.info [data-rating=' + id + ']').html(rating);
      $('.info [data-count=' + id + ']').html('('+count+')');
      return rating;
    }
  }
})();

$(document).ready(function() {
  mgrate.init();
  if (typeof (AJAX_CALLBACK_FILTER) != 'undefined') {
  AJAX_CALLBACK_FILTER.push({callback: 'mgrate.reloadCount', param: null});
  AJAX_CALLBACK_FILTER.push({callback: 'mgrate.initStar', param: null});
}
});

 
п»ї/*! RateIt | v1.0.22 / 05/27/2014 | https://rateit.codeplex.com/license
    http://rateit.codeplex.com | Twitter: @gjunge
*/
(function(n){function t(n){var u=n.originalEvent.changedTouches,t=u[0],i="",r;switch(n.type){case"touchmove":i="mousemove";break;case"touchend":i="mouseup";break;default:return}r=document.createEvent("MouseEvent");r.initMouseEvent(i,!0,!0,window,1,t.screenX,t.screenY,t.clientX,t.clientY,!1,!1,!1,!1,0,null);t.target.dispatchEvent(r);n.preventDefault()}n.rateit={aria:{resetLabel:"reset rating",ratingLabel:"rating"}};n.fn.rateit=function(i,r){var e=1,u={},o="init",s=function(n){return n.charAt(0).toUpperCase()+n.substr(1)},f;if(this.length===0)return this;if(f=n.type(i),f=="object"||i===undefined||i===null)u=n.extend({},n.fn.rateit.defaults,i);else{if(f=="string"&amp;&amp;i!=="reset"&amp;&amp;r===undefined)return this.data("rateit"+s(i));f=="string"&amp;&amp;(o="setvalue")}return this.each(function(){var c=n(this),f=function(n,t){if(t!=null){var i="aria-value"+(n=="value"?"now":n),r=c.find(".rateit-range");r.attr(i)!=undefined&amp;&amp;r.attr(i,t)}return arguments[0]="rateit"+s(n),c.data.apply(c,arguments)},p,w,v,h,b,g,nt,l,y,k,a;if(i=="reset"){p=f("init");for(w in p)c.data(w,p[w]);f("backingfld")&amp;&amp;(h=n(f("backingfld")),h.val(f("value")),h.trigger("change"),h[0].min&amp;&amp;(h[0].min=f("min")),h[0].max&amp;&amp;(h[0].max=f("max")),h[0].step&amp;&amp;(h[0].step=f("step")));c.trigger("reset")}if(c.hasClass("rateit")||c.addClass("rateit"),v=c.css("direction")!="rtl",o=="setvalue"){if(!f("init"))throw"Can't set value before init";i!="readonly"||r!=!0||f("readonly")||(c.find(".rateit-range").unbind(),f("wired",!1));i=="value"&amp;&amp;(r=r==null?f("min"):Math.max(f("min"),Math.min(f("max"),r)));f("backingfld")&amp;&amp;(h=n(f("backingfld")),i=="value"&amp;&amp;h.val(r),i=="min"&amp;&amp;h[0].min&amp;&amp;(h[0].min=r),i=="max"&amp;&amp;h[0].max&amp;&amp;(h[0].max=r),i=="step"&amp;&amp;h[0].step&amp;&amp;(h[0].step=r));f(i,r)}f("init")||(f("min",isNaN(f("min"))?u.min:f("min")),f("max",isNaN(f("max"))?u.max:f("max")),f("step",f("step")||u.step),f("readonly",f("readonly")!==undefined?f("readonly"):u.readonly),f("resetable",f("resetable")!==undefined?f("resetable"):u.resetable),f("backingfld",f("backingfld")||u.backingfld),f("starwidth",f("starwidth")||u.starwidth),f("starheight",f("starheight")||u.starheight),f("value",Math.max(f("min"),Math.min(f("max"),isNaN(f("value"))?isNaN(u.value)?u.min:u.value:f("value")))),f("ispreset",f("ispreset")!==undefined?f("ispreset"):u.ispreset),f("backingfld")&amp;&amp;(h=n(f("backingfld")).hide(),(h.attr("disabled")||h.attr("readonly"))&amp;&amp;f("readonly",!0),h[0].nodeName=="INPUT"&amp;&amp;(h[0].type=="range"||h[0].type=="text")&amp;&amp;(f("min",parseInt(h.attr("min"))||f("min")),f("max",parseInt(h.attr("max"))||f("max")),f("step",parseInt(h.attr("step"))||f("step"))),h[0].nodeName=="SELECT"&amp;&amp;h[0].options.length&gt;1?(f("min",isNaN(f("min"))?Number(h[0].options[0].value):f("min")),f("max",Number(h[0].options[h[0].length-1].value)),f("step",Number(h[0].options[1].value)-Number(h[0].options[0].value)),b=h.find("option[selected]"),b.length==1&amp;&amp;f("value",b.val())):f("value",h.val())),g=c[0].nodeName=="DIV"?"div":"span",e++,nt='&lt;button id="rateit-reset-{{index}}" type="button" data-role="none" class="rateit-reset" aria-label="'+n.rateit.aria.resetLabel+'" aria-controls="rateit-range-{{index}}"&gt;&lt;\/button&gt;&lt;{{element}} id="rateit-range-{{index}}" class="rateit-range" tabindex="0" role="slider" aria-label="'+n.rateit.aria.ratingLabel+'" aria-owns="rateit-reset-{{index}}" aria-valuemin="'+f("min")+'" aria-valuemax="'+f("max")+'" aria-valuenow="'+f("value")+'"&gt;&lt;{{element}} class="rateit-selected" style="height:'+f("starheight")+'px"&gt;&lt;\/{{element}}&gt;&lt;{{element}} class="rateit-hover" style="height:'+f("starheight")+'px"&gt;&lt;\/{{element}}&gt;&lt;\/{{element}}&gt;',c.append(nt.replace(/{{index}}/gi,e).replace(/{{element}}/gi,g)),v||(c.find(".rateit-reset").css("float","right"),c.find(".rateit-selected").addClass("rateit-selected-rtl"),c.find(".rateit-hover").addClass("rateit-hover-rtl")),f("init",JSON.parse(JSON.stringify(c.data()))));c.find(".rateit-selected, .rateit-hover").height(f("starheight"));l=c.find(".rateit-range");l.width(f("starwidth")*(f("max")-f("min"))).height(f("starheight"));y="rateit-preset"+(v?"":"-rtl");f("ispreset")?c.find(".rateit-selected").addClass(y):c.find(".rateit-selected").removeClass(y);f("value")!=null&amp;&amp;(k=(f("value")-f("min"))*f("starwidth"),c.find(".rateit-selected").width(k));a=c.find(".rateit-reset");a.data("wired")!==!0&amp;&amp;a.bind("click",function(t){t.preventDefault();a.blur();var i=n.Event("beforereset");if(c.trigger(i),i.isDefaultPrevented())return!1;c.rateit("value",null);c.trigger("reset")}).data("wired",!0);var tt=function(t,i){var u=i.changedTouches?i.changedTouches[0].pageX:i.pageX,r=u-n(t).offset().left;return v||(r=l.width()-r),r&gt;l.width()&amp;&amp;(r=l.width()),r&lt;0&amp;&amp;(r=0),k=Math.ceil(r/f("starwidth")*(1/f("step")))},it=function(n){var t=n*f("starwidth")*f("step"),r=l.find(".rateit-hover"),i;r.data("width")!=t&amp;&amp;(l.find(".rateit-selected").hide(),r.width(t).show().data("width",t),i=[n*f("step")+f("min")],c.trigger("hover",i).trigger("over",i))},d=function(t){var i=n.Event("beforerated");return(c.trigger(i,[t]),i.isDefaultPrevented())?!1:(f("value",t),f("backingfld")&amp;&amp;n(f("backingfld")).val(t).trigger("change"),f("ispreset")&amp;&amp;(l.find(".rateit-selected").removeClass(y),f("ispreset",!1)),l.find(".rateit-hover").hide(),l.find(".rateit-selected").width(t*f("starwidth")-f("min")*f("starwidth")).show(),c.trigger("hover",[null]).trigger("over",[null]).trigger("rated",[t]),!0)};f("readonly")?a.hide():(f("resetable")||a.hide(),f("wired")||(l.bind("touchmove touchend",t),l.mousemove(function(n){var t=tt(this,n);it(t)}),l.mouseleave(function(){l.find(".rateit-hover").hide().width(0).data("width","");c.trigger("hover",[null]).trigger("over",[null]);l.find(".rateit-selected").show()}),l.mouseup(function(n){var t=tt(this,n),i=t*f("step")+f("min");d(i);l.blur()}),l.keyup(function(n){(n.which==38||n.which==(v?39:37))&amp;&amp;d(Math.min(f("value")+f("step"),f("max")));(n.which==40||n.which==(v?37:39))&amp;&amp;d(Math.max(f("value")-f("step"),f("min")))}),f("wired",!0)),f("resetable")&amp;&amp;a.show());l.attr("aria-readonly",f("readonly"))})};n.fn.rateit.defaults={min:0,max:5,step:.5,starwidth:16,starheight:16,readonly:!1,resetable:!1,ispreset:!1};})(jQuery);
/*
//# sourceMappingURL=jquery.rateit.min.js.map
*/ 
window.onload = function($) {
          
      $('body').on('click', '.accept-cookie', function() {
          $.ajax({
              type: 'POST',
              url: mgBaseDir + '/ajaxrequest',
              data: {
                  mguniqueurl: 'action/acceptCookie',
                  pluginHandler: 'mg-cookie-panel'
              },
              success : function() {
                  $('.section-mg-cookie-panel').remove()
              }
          })
      })
    }(jQuery); 
$(document).ready(function() {
    // c-filter
// ------------------------------------------------------------
    $('body').on('click', 'a[href^="#c-filter"]', function (a) {
        a.preventDefault();
        var b = $(this).attr('href');
        $(b).addClass('c-filter--active');
        $('body').addClass('fixed__body');

    }), $('body').on('click', '.c-filter', function () {
        $('.c-filter').removeClass('c-filter--active');
        $('body').removeClass('fixed__body');

    }), $('body').on('click', '.c-filter__content', function (a) {
        a.stopPropagation()
    });
}); 
$(document).ready(function () {
    // c-switcher
    // ------------------------------------------------------------
    function rememberView() {
        var className = localStorage['class'];
        var productWrap = $('.js-products-container');
        var switchBtn = $('.js-switch-view');

        //localStorage.clear();
        $('.js-switch-view[data-type="' + className + '"]')
            .addClass('c-switcher__item--active')
            .siblings().removeClass('c-switcher__item--active');

        productWrap.addClass(className);

        switchBtn.on('click', function () {
            var currentView = $(this).data('type');

            productWrap.removeClass('c-goods--grid c-goods--list').addClass(currentView);

            switchBtn.removeClass('c-switcher__item--active');
            $(this).addClass('c-switcher__item--active');

            localStorage.setItem('class', $(this).data('type'));
            return false;
        });
    }

    rememberView();
}); 
$(document).ready(function() {
    // РґРѕР±Р°РІР»РµРЅРёРµ РІ РёР·Р±СЂР°РЅРЅРѕРµ
    var counter = $('.js-favourite-count'),
        informer = $('.js-favorites-informer'),
        informerOpenedClass = 'favourite--open',
        btnAddClass = '.js-add-to-favorites',
        btnRemoveClass = '.js-remove-to-favorites';


    $('body').on('click', btnAddClass, function () {
        obj = $(this);
        $.ajax({
            type: "POST",
            url: mgBaseDir + "/favorites/",
            data: {'addFav': '1', 'id': $(this).data('item-id')},
            dataType: "json",
            cache: false,
            success: function (response) {
                obj.hide();
                obj.parent().find(btnRemoveClass).show();
                counter.html('(' + response + ')');

                informer.removeClass(informerOpenedClass);

                setTimeout(function () {
                    informer.addClass(informerOpenedClass);
                }, 0);
            }
        });
    });

// СѓРґР°Р»РµРЅРёРµ РёР· РёР·Р±СЂР°РЅРЅРѕРіРѕ
    $('body').on('click', btnRemoveClass, function () {
        obj = $(this);
        $.ajax({
            type: "POST",
            url: mgBaseDir + "/favorites/",
            data: {'delFav': '1', 'id': $(this).data('item-id')},
            dataType: "json",
            cache: false,
            success: function (response) {
                obj.hide();
                obj.parent().find(btnAddClass).show();
                counter.html('(' + response + ')');
            }
        });
    });
});


 
$(document).ready(function() {

    // С„СѓРЅРєС†РёСЏ РєР»РёРєРѕРІ РїРѕ СЂР°Р·РјРµСЂРЅРѕР№ СЃРµС‚РєРµ (СЃС‚СЂР°РЅРёС†Р° С‚РѕРІР°СЂР° Рё РјРёРЅРёРєР°СЂС‚РѕС‡РєР°)
    function sizeMapShow(id, search) {
        if (sizeMapObject == undefined) return false;

        var show = 'color';
        if (search == 'color') {
            show = 'size';
        }

        sizeMapObject.find('.' + show).hide();
        var toCheck = '';
        sizeMapObject.find('.variants-table .variant-tr').each(function() {
            if ($(this).data(search) == id) {
                if (sizeMapObject.find(this).data('size') != '') {
                    sizeMapObject.find('.' + show + '[data-id=' + sizeMapObject.find(this).data(show) + ']').show();
                    if ($(this).data('count') == 0) {
                        sizeMapObject.find('.' + show + '[data-id=' + sizeMapObject.find(this).data(show) + ']').addClass('inactive');
                    } else {
                        sizeMapObject.find('.' + show + '[data-id=' + sizeMapObject.find(this).data(show) + ']').removeClass('inactive');
                    }
                    if (toCheck == '') {
                        toCheck = sizeMapObject.find('.' + show + '[data-id=' + sizeMapObject.find(this).data(show) + ']');
                    }
                }
            }
        });
        if (toCheck != '') {
            toCheck.click();
        }
    }

    // С„СѓРЅРєС†РёСЏ РІС‹Р±РѕСЂР° РІР°СЂРёР°РЅС‚Р° РїРѕСЃР»Рµ РєР»РёРєР° РїРѕ СЂР°Р·РјРµСЂРЅРѕР№ СЃРµС‚РєРµ (СЃС‚СЂР°РЅРёС†Р° С‚РѕРІР°СЂР° Рё РјРёРЅРёРєР°СЂС‚РѕС‡РєР°)
    function choseVariant() {
        if (sizeMapObject == undefined) return false;
        var color = '';
        var size = '';
        if (sizeMapObject.find('.color').length != 0) {
            color = '[data-color=' + sizeMapObject.find('.color.active').data('id') + ']';
        }
        if (sizeMapObject.find('.size').length != 0) {
            size = '[data-size=' + sizeMapObject.find('.size.active').data('id') + ']';
        }
        sizeMapObject.find('.variants-table .variant-tr' + color + size + ' input[type=radio]').click();
    }

    var sizeMapObject = undefined;


    $(document.body).on('change', '.block-variants input[type=radio]', function(e) {
        //РїРѕРґСЃС‚Р°РЅРѕРІРєР° РєР°СЂС‚РёРЅРєРё РІР°СЂРёР°РЅС‚Р° РІРјРµСЃС‚Рѕ РєР°СЂС‚РёРЅРєРё С‚РѕРІР°СЂР° (СЃС‚СЂР°РЅРёС†Р° С‚РѕРІР°СЂР° Рё РјРёРЅРёРєР°СЂС‚РѕС‡РєР°)
        //changeMainImgToVariant($(this));

        $(this).parents('tbody').find('tr label').removeClass('active');
        $(this).parents('tr').find('label').addClass('active');

        if (!$('.mg-product-slides').length) {
            var obj = $(this).parents('.js-catalog-item');
            var count = $(this).data('count');
            if (!obj.length) {
                obj = $(this).parents('.mg-compare-product');
            }

            var form = $(this).parents('form');

            if (form.hasClass('actionView')) {
                return false;
            }

            var buttonbuy = $(obj).find('.js-product-controls a:visible').hasClass('js-add-to-cart');

            if (count != '0' &amp;&amp; !buttonbuy) {
                if ('false' == window.actionInCatalog) {
                    $(obj).find('.js-product-more').show();
                    $(obj).find('.js-add-to-cart').hide();
                } else {
                    $(obj).find('.js-product-more').hide();
                    $(obj).find('.js-add-to-cart').show();
                }
            } else if (count == '0' &amp;&amp; buttonbuy == true) {
                $(obj).find('.js-product-more').show();
                $(obj).find('.js-add-to-cart').hide();
            }
        }
    });


    // РґРµР»Р°РµС‚ Р°РєС‚РёРІРЅС‹РјРё РЅСѓР¶РЅС‹Рµ СЌР»РµРјРµРЅС‚С‹ СЂР°Р·РјРµСЂРЅРѕР№ СЃРµС‚РєРё РїСЂРё РёР·РјРµРЅРµРЅРёРё РІР°СЂРёР°РЅС‚Р° С‚РѕРІР°СЂР° (СЃС‚СЂР°РЅРёС†Р° С‚РѕРІР°СЂР° Рё РјРёРЅРёРєР°СЂС‚РѕС‡РєР°)
    $(document.body).on('click', '.variants-table tr input[type=radio]', function() {
        sizeMapObject = $(this).closest('form');
        sizeMapObject.find('.color').removeClass('active');
        sizeMapObject.find('.size').removeClass('active');

        var tmp = $(this).closest('tr').data('color');
        if (tmp != undefined &amp;&amp; tmp != '') {
            sizeMapObject.find('.color[data-id=' + $(this).closest('tr').data('color') + ']').addClass('active');
        }
        tmp = $(this).closest('tr').data('size');
        if (tmp != undefined &amp;&amp; tmp != '') {
            sizeMapObject.find('.size[data-id=' + $(this).closest('tr').data('size') + ']').addClass('active');
        }
    });

    // РѕР±СЂР°Р±РѕС‚С‡РёРє РєР»РёРєРѕРІ РїРѕ СЂР°Р·РјРµСЂРЅРѕР№ СЃРµС‚РєРµ (СЃС‚СЂР°РЅРёС†Р° С‚РѕРІР°СЂР° Рё РјРёРЅРёРєР°СЂС‚РѕС‡РєР°)
    $(document.body).on('click', '.color', function() {
        sizeMapObject = $(this).parents('form');
        if (sizeMapMod !== 'size') {
            sizeMapShow($(this).data('id'), 'color');
        }
        sizeMapObject.find('.color').removeClass('active');
        $(this).addClass('active');
        choseVariant();
    });

    $(document.body).on('click', '.size', function() {
        sizeMapObject = $(this).parents('form');
        if (sizeMapMod === 'size') {
            sizeMapShow($(this).data('id'), 'size');
        }
        sizeMapObject.find('.size').removeClass('active');
        $(this).addClass('active');
        choseVariant();
    });

    // РґРµР»Р°РµС‚ Р°РєС‚РёРІРЅС‹РјРё РЅСѓР¶РЅС‹Рµ СЌР»РµРјРµРЅС‚С‹ СЂР°Р·РјРµСЂРЅРѕР№ СЃРµС‚РєРё (СЃС‚СЂР°РЅРёС†Р° С‚РѕРІР°СЂР° Рё РјРёРЅРёРєР°СЂС‚РѕС‡РєР°)
    $('.variants-table').each(function() {
        var tmp = $(this).find('tr:eq(0)').data('color');
        if (tmp != undefined &amp;&amp; tmp != '') {
            $(this).parents('form').find('.color[data-id=' + tmp + ']').addClass('active');
        }
        tmp = $(this).find('tr:eq(0)').data('size');
        if (tmp != undefined &amp;&amp; tmp != '') {
            $(this).parents('form').find('.size[data-id=' + tmp + ']').addClass('active');
        }
    });

    // РІС‹Р±РѕСЂ РїРµСЂРІРѕРіРѕ С†РІРµС‚Р° РїСЂРё Р·Р°РіСЂСѓР·РєРµ СЃС‚СЂР°РЅРёС†С‹ (СЃС‚СЂР°РЅРёС†Р° С‚РѕРІР°СЂР° Рё РјРёРЅРёРєР°СЂС‚РѕС‡РєР°)
    $('.color-block .color.active').click();

    // РєРѕСЃС‚С‹Р»СЊ РґР»СЏ РІРµСЂСЃС‚РєРё С‡РµРєР±РѕРєСЃР° РІС‹Р±СЂР°РЅРЅРѕРіРѕ РІР°СЂРёР°РЅС‚Р° РІ С‚Р°Р±Р»РёС†Рµ РІР°СЂРёР°РЅС‚РѕРІ С‚РѕРІР°СЂР° Р±РµР· СЂР°Р·РјРµСЂРЅРѕР№ СЃРµС‚РєРё (СЃС‚СЂР°РЅРёС†Р° С‚РѕРІР°СЂР° Рё РјРёРЅРёРєР°СЂС‚РѕС‡РєР°)
    $('.c-variant__column input[name=variant][checked=checked]').each(function() {
        $(this).parents('.c-form').addClass('active');
    });

    // РґР»СЏ РІС‹Р±РѕСЂР° РІР°СЂРёР°РЅС‚Р° РїРѕ СЏРєРѕСЂСЋ
    if (varHashProduct === 'true' || varHashProduct === true) {
        if (location.hash != '') {
            code = location.hash.replace('#', '');
            code = decodeURI(code);
            if (sizeMapMod == 'size' &amp;&amp; $('[data-code="' + code + '"]:eq(0)').closest('tr[data-size!=\'\']').length) {
                size = $('[data-code="' + code + '"]:eq(0)').closest('tr').data('size');
                $('.size[data-id=' + size + ']').trigger('click');
            } else if ($('[data-code="' + code + '"]:eq(0)').closest('tr[data-color!=\'\']').length) {
                color = $('[data-code="' + code + '"]:eq(0)').closest('tr').data('color');
                $('.color[data-id=' + color + ']').trigger('click');
            }
            $('[data-code="' + code + '"]:eq(0)').click();
        }

        // РїРѕРґСЃС‚Р°РЅРѕРІРєР° СЏРєРѕСЂСЏ РІ url
        $(document.body).on('click', '.variants-table tr input[type=radio]', function() {
            data = $(this).data('code');
            if (data != undefined) location.hash = data;
        });
    }

});


// Р¤СѓРЅРєС†РёСЏ РїРѕР»СѓС‡Р°РµС‚ РёР·РѕР±СЂР°Р¶РµРЅРёРµ РІР°СЂРёР°РЅС‚Р° Рё РїРѕРґРјРµРЅСЏРµС‚ РµРіРѕ РІ РєР°СЂСѓСЃРµР»Рё
function changeMainImgToVariant(response, page) {
  var secondarySlider = $('.js-secondary-img-slider');
  var activeLink = $('.js-main-img-slider .active .js-images-link');
  var firstSlide = secondarySlider.find('[data-slide-index=0]');
  // Р•СЃР»Рё РїСЂРёС€Р»Р° РЅРµ Р·Р°РіР»СѓС€РєР°, С‚Рѕ РїСЂРѕРґРѕР»Р¶Р°РµРј
  if (response.data.image_orig !== '' &amp;&amp; !response.data.image_orig.includes('no-img.jpg')) {
      // Р•СЃР»Рё СЌС‚Рѕ РјРёРЅРёРєР°СЂС‚РѕС‡РєР°
      if (page.hasClass('js-catalog-item')) {
          // РќР°С…РѕРґРёРј РёР·РѕР±СЂР°Р¶РµРЅРёРµ С‚РѕРІР°СЂР° РІ РјРёРЅРёРєР°СЂС‚РѕС‡РєРµ
          var itemImg = page.find('.js-catalog-item-image');
          // Р—Р°РјРµРЅСЏРµРј РµРіРѕ
          changeImgSrc(
              itemImg,
              '30',
              response.data.image_thumbs,
          );
      }

      // Р•СЃР»Рё СЌС‚Рѕ СЃС‚СЂР°РЅРёС†Р° С‚РѕРІР°СЂР°
      else {
          // РњРµРЅСЏРµРј РёР·РѕР±СЂР°Р¶РµРЅРёРµ РІ СЃСЃС‹Р»РєРµ РЅР° fancybox
          activeLink.attr('href', response.data.image_orig);

          // РњРµРЅСЏРµРј РёР·РѕР±СЂР°Р¶РµРЅРёРµ РїРѕРєР°Р·С‹РІР°С‰РµРµСЃСЏ РїСЂРё РЅР°РІРµРґРµРЅРёРё РЅР° РѕСЃРЅРѕРІРЅРѕРµ (Р»СѓРїР°)
          activeLink.find('.js-zoom-img')
              .attr('style', 'background-image: url(' + response.data.image_orig + ')');

          // Р•СЃР»Рё Сѓ С‚РѕРІР°СЂР° РЅРµ РѕРґРЅРѕ РёР·РѕР±СЂР°Р¶РµРЅРёРµ
          if (secondarySlider.length) {
              // РћС‚РєСЂС‹РІР°РµРј РїРµСЂРІС‹Р№ СЃР»Р°Р№Рґ
              firstSlide.click();

              // РјРµРЅСЏРµРј РїРµСЂРІРѕРµ РёР·РѕР±СЂР°Р¶РµРЅРёРµ С‚РѕРІР°СЂР° РІ РєР°СЂСѓСЃРµР»Рё РјРёРЅРёР°С‚СЋСЂ
              changeImgSrc(
                  firstSlide.find('.js-img-preview'),
                  '30',
                  response.data.image_thumbs,
              );

              // РњРµРЅСЏРµРј РїРµСЂРІРѕРµ РёР·РѕР±СЂР°Р¶РµРЅРёРµ С‚РѕРІР°СЂР° РІ РѕСЃРЅРѕРІРЅРѕРј СЃР»Р°Р№РґРµСЂРµ
              changeImgSrc(
                  activeLink.find('.js-product-img'),
                  '70',
                  response.data.image_thumbs,
              );

          } else {
              // РњРµРЅСЏРµРј РµРґРёРЅСЃС‚РІРµРЅРЅРѕРµ РёР·РѕР±СЂР°Р¶РµРЅРёРµ С‚РѕРІР°СЂР°
              changeImgSrc(
                  $('.js-product-img'),
                  '70',
                  response.data.image_thumbs,
              );
          }
      }
  }
} 

// РњРёРЅРёС„СѓРЅРєС†РёСЏ РјРµРЅСЏСЋС‰Р°СЏ src Рё srcset Сѓ С‚РµРіР° img
function changeImgSrc(imgElem, size, thumbsArr) {
    imgElem.attr('src', thumbsArr[size])
        .attr('srcset', thumbsArr['2x' + size] + ' 2x');
}
 
//РїРµСЂРµСЃС‡РµС‚ С†РµРЅС‹ С‚РѕРІР°СЂР° Р°СЏРєСЃРѕРј (СЃС‚СЂР°РЅРёС†Р° С‚РѕРІР°СЂР°, РјРёРЅРёРєР°СЂС‚РѕС‡РєР°)
$(document.body).on("change", ".js-onchange-price-recalc", function () {
  var form = ".js-product-form";
  var request = $(form).formSerialize();
  var productId = $(form).data("product-id");

  var priceBlock = ".js-change-product-price";
  var productList = $(".js-product-page");
  var miniProduct = ".js-catalog-item";

  if ($(this).parents(miniProduct).length) {
    // РґР»СЏ РІС‹Р·РѕРІР° РёР· РєР°С‚Р°Р»РѕРіР°
    productList = $(this).parents(miniProduct);
    form = productList.find(form);
    productId = form.data("product-id");
    request = productList.find(form).formSerialize();
    priceBlock = productList.find(priceBlock);
  }

  if ($(this).parents(".mg-compare-product").length) {
    // РґР»СЏ РІС‹Р·РѕРІР° РёР· СЃСЂР°РІРЅРµРЅРёР№
    priceBlock = $(this).parents(".mg-compare-product").find(priceBlock);
    request = $(this)
      .parents(".mg-compare-product")
      .find(".property-form")
      .formSerialize();
    request += "&amp;remInfo=false";
    productList = $(this).parents(".mg-compare-product");
  }

  var tempThis = $(this);

  // РџРµСЂРµСЃС‡РµС‚ С†РµРЅС‹
  $.ajax({
    type: "POST",
    url: mgBaseDir + "/product/",
    data: "calcPrice=1&amp;inCartProductId=" + productId + "&amp;" + request,
    dataType: "json",
    cache: false,
    success: function (response) {
      // С„СѓРЅРєС†РёСЏ РїРѕРґСЃС‚Р°РЅРѕРІРєРё РєР°СЂС‚РёРЅРєРё РІР°СЂРёР°РЅС‚Р° РІРјРµСЃС‚Рѕ РєР°СЂС‚РёРЅРєРё С‚РѕРІР°СЂР° (РЅР° СЃС‚СЂР°РЅРёС†Рµ С‚РѕРІР°СЂР° РёР»Рё РјРёРЅРёРєР°СЂС‚РѕС‡РєРµ)
      if(tempThis.parents('.block-variants').length) {
        changeMainImgToVariant(response, productList);
      }

      if (response.data.wholesalesTable != undefined) {
        $(".wholesales-data").html(response.data.wholesalesTable);
      }

      if (response.data.productOpFields != undefined) {
        tempThis
          .parents(".property-form")
          .parents(".product-details-block,.product-wrapper")
          .find(".product-opfields-data")
          .html(response.data.productOpFields);
      }

      window.actionInCatalog = response.data.actionInCatalog;

      productList.find(".rem-info").hide();

      productList.find(".buy-container.product .hidder-element").hide();
      if ($(".buy-block .count").length &gt; 0 || response.data.count == 0) {
        $(".js-product-controls").hide();
        $(".c-product__message").show();
      }

      if (response.status === "success") {
        $('.c-button[rel="nofollow"]').attr(
          "href",
          response.data.buttonMessage
        );
        if ($(priceBlock).find(".product-default-price").length) {
          $(priceBlock)
            .find(".product-default-price")
            .html(response.data.price);
        } else {
          $(priceBlock).html(response.data.price);
        }

        $(priceBlock).find(".product-default-price").html(response.data.price);
        productList.find(".code").text(response.data.code);
        var message = "";

        if (response.data.title) {
          message =
            locale.countMsg1 +
            response.data.title.replace("'", '"') +
            locale.countMsg2 +
            response.data.code +
            locale.countMsg3;
        }

        productList
          .find(".rem-info a")
          .attr("href", mgBaseDir + "/feedback?message=" + message);
        productList.find(".code-msg").text(response.data.code);

        var val = response.data.count;

        if (val != 0) {
          $(".depletedLanding").hide();
          $(".addToOrderLanding").show();

          productList.find(".rem-info").hide();
          productList.find(".js-product-controls").show();
          if ($(".buy-block .count").length &gt; 0) {
            $(".js-product-controls").show();
            $(".c-product__message").hide();
          }
          productList.find(".buy-container.product").show();
          if (
            !productList
              .find(".js-product-controls a:visible")
              .hasClass("js-add-to-cart")
          ) {
            if ("false" == window.actionInCatalog) {
              productList.find(".js-product-more").show();
              productList.find(".js-add-to-cart").hide();
            } else {
              productList.find(".js-product-more").hide();
              productList.find(".js-add-to-cart").show();
            }

            productList.find(".js-product-controls").show();
          }
        } else {
          $(".depletedLanding").show();
          $(".addToOrderLanding").hide();
          $(".js-product-controls").show();
          productList.find(".rem-info").show();
          if ($(".buy-block .count").length &gt; 0) {
            //$('.js-product-controls').hide();
          }
          productList.find(".buy-container.product").hide();
          if (
            productList
              .find(".js-product-controls a:visible")
              .hasClass("js-add-to-cart")
          ) {
            productList.find(".js-product-more").show();
            productList.find(".js-add-to-cart").hide();
            // productList.find('.js-product-controls:first').hide();
          }
        }
        if (response.data.count_layout) {
          if (productList.find(".count").length &gt; 0) {
            productList
              .find(".count")
              .parent()
              .html(response.data.count_layout);
          } else {
            productList
              .find(".in-stock")
              .parent()
              .html(response.data.count_layout);
          }
        } else {
          if (val == "\u221E" || val == "" || parseFloat(val) &lt; 0) {
            val =
              '&lt;span itemprop="availability" class="count"&gt;&lt;span class="sign"&gt;&amp;#10004;&lt;/span&gt;' +
              locale.countInStock +
              "&lt;/span&gt;";
            productList.find(".rem-info").hide();
          } else {
            val =
              locale.remaining +
              ': &lt;span itemprop="availability" class="label-black count"&gt;' +
              val +
              "&lt;/span&gt; " +
              locale.pcs;
          }
          productList.find(".count").parent().html(val);
        }

        val = response.data.old_price;
        if (val != "0 " + currency &amp;&amp; val != " " + currency) {
          productList.find(".old-price").parents("li").show();
          productList.find(".old-price").parents(".old").show();
        } else {
          productList.find(".old-price").parents("li").hide();
        }

        if (val != "0 " + currency &amp;&amp; val != " " + currency) {
          productList.find(".old-price").text(response.data.old_price);
        }

        productList
          .find(".amount_input")
          .data("max-count", response.data.count);

        productList.find(".weight").text(response.data.weightCalc);

        if (
          parseFloat(productList.find(".amount_input").val()) &gt;
          parseFloat(response.data.count)
        ) {
          val = response.data.count;
          if (val == "\u221E" || val == "" || parseFloat(val) &lt; 0) {
            val = productList.find(".amount_input").val();
          }
          if (val == 0) {
            val = 1;
          }

          productList.find(".amount_input").val(val);
        }
      }

      if (
        response.data.storage != undefined &amp;&amp;
        response.data.storage.length &gt; 0
      ) {
        maxStorageCount = 0;
        for (var i in response.data.storage) {
          $(".count-on-storage[data-id=" + i + "]").html(
            response.data.storage[i]
          );
          if (response.data.storage[i] &gt; maxStorageCount)
            maxStorageCount = response.data.storage[i];
        }
        $(".actionBuy .amount_input").data("max-count", maxStorageCount);
      }
    },
  });

  return false;
});

 
var smallCartTemplate = document
  .querySelector(".smallCartRowTemplate")
  .content.querySelector("tr");
var popUpTemplate = document
  .querySelector(".popupCartRowTemplate")
  .content.querySelector("tr");

// Р—Р°РїРѕР»РЅРµРЅРёРµ РєРѕСЂР·РёРЅС‹ Р°СЏРєСЃРѕРј
$("body").on("click", ".js-add-to-cart", function (e) {
  var productId = $(this).data("item-id");
  transferEffect(productId, $(this), ".js-catalog-item");

  var request =
    "inCartProductId=" + $(this).data("item-id") + "&amp;amount_input=1";
  if ($(this).parents(".js-product-form").length) {
    request = $(this).parents(".js-product-form").formSerialize();
    if (!$(".js-amount-wrap").length) {
      request += "&amp;amount_input=1";
    }
  }

  $.ajax({
    type: "POST",
    url: mgBaseDir + "/cart",
    data: "updateCart=1&amp;inCartProductId=" + productId + "&amp;" + request,
    dataType: "json",
    cache: false,
    success: function (response) {
      $("#js-modal__cart").addClass("c-modal--open");
      $("html").addClass("c-modal--scroll");

      if ($("#c-modal__cart").length &gt; 0) {
        $("#c-modal__cart").addClass("c-modal--open");
        if ($(document).height() &gt; $(window).height()) {
          $("html").addClass("c-modal--scroll");
        }
      }

      if ("success" == response.status) {
        dataSmalCart = "";
        dataPopupCart = "";
        response.data.dataCart.forEach(printSmalCartData);

        $(".mg-desktop-cart .small-cart-table").html(dataSmalCart);

        if ($(".js-popup-cart-table").length) {
          $(".js-popup-cart-table").html(dataPopupCart);
        }

        $(".total .total-sum span").text(response.data.cart_price_wc);
        $(".pricesht").text(response.data.cart_price);
        $(".countsht").text(response.data.cart_count);
        $(".small-cart").show();
      }
    },
  });

  return false;
});

// СЃС‚СЂРѕРёС‚ СЃРѕРґРµСЂР¶РёРјРѕРµ РјР°Р»РµРЅСЊРєРѕР№ Рё РІСЃРїР»С‹РІР°СЋС‰РµР№ РєРѕСЂР·РёРЅС‹ РІ РІС‹РїР°РґР°С‰РµРј Р±Р»РѕРєРµ
function printSmalCartData(element, index, array) {
  var html = $($.parseHTML("&lt;table&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;/table&gt;"));
  html.find("tbody").html(smallCartTemplate.cloneNode(true));
  html
    .find(".js-smallCartImg")
    .attr("src", element.image_thumbs[30])
    .attr("alt", element.title)
    .attr("srcset", element.image_thumbs["2x30"] + " 2x");

  var prodUrl =
    mgBaseDir +
    "/" +
    (element.category_url || element.category_url == ""
      ? element.category_url
      : "catalog/") +
    element.product_url;
  html.find(".js-smallCartImgAnchor").attr("href", prodUrl);
  html
    .find(".js-smallCartProdAnchor")
    .attr("href", prodUrl)
    .text(element.title);

  html.find(".js-smallCartProperty").html(element.property_html);
  html.find(".js-smallCartAmount").text(element.countInCart);
  html.find(".js-cartPrice").text(element.priceInCart);

  html
    .find(".js-delete-from-cart")
    .attr("data-delete-item-id", element.id)
    .attr("data-property", element.property)
    .attr("data-variant", element.variantId);

  window.dataSmalCart += html.find("tr:first").parent().html();

  if ($(".popup-body .small-cart-table").length) {
    html = $(
      $.parseHTML(
        "&lt;table&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;/table&gt;"
      )
    );

    html.find("tbody").html(smallCartTemplate.cloneNode(true));

    html.find(".js-smallCartImgAnchor").attr("href", prodUrl);
    html
      .find(".js-smallCartProdAnchor")
      .attr("href", prodUrl)
      .text(element.title);

    html
      .find(".js-smallCartImg")
      .attr("src", element.image_thumbs[30])
      .attr("alt", element.title)
      .attr("srcset", element.image_thumbs["2x30"] + " 2x");

    html.find(".js-smallCartProperty").html(element.property_html);
    html.find(".js-smallCartAmount").text(element.countInCart);
    html.find(".js-cartPrice").text(element.priceInCart);

    html
      .find(".js-delete-from-cart")
      .attr("data-delete-item-id", element.id)
      .attr("data-property", element.property)
      .attr("data-variant", element.variantId);

    dataPopupCart += html.find("tr:first").parent().html();
  }
}

// Р­С„С„РµРєС‚ РїРѕР»С‘С‚Р° С‚РѕРІР°СЂР° РІ РєРѕСЂР·РёРЅСѓ
function transferEffect(productId, buttonClick, wrapperClass) {
  var $css = {
    height: "100%",
    opacity: 0.5,
    position: "relative",
    "z-index": 100,
  };

  var $transfer = {
    to: $(".small-cart-icon"),
    className: "transfer_class",
  };

  //РµСЃР»Рё РєРЅРѕРїРєР° РЅР° РєРѕС‚РѕСЂСѓСЋ РЅР°Р¶Р°Р»Рё РЅР°С…РѕРґРёС‚СЃСЏ РІРЅСѓС‚СЂРё РЅСѓР¶РЅРѕРіРѕ РєРѕРЅС‚РµР№РЅРµСЂР°.
  if (
    buttonClick
      .parents(wrapperClass)
      .find("img[data-transfer=true][data-product-id=" + productId + "]").length
  ) {
    // РґР°РµРј СЃРїРѕСЃРѕР±РЅРѕСЃС‚СЊ Р»РµС‚Р°С‚СЊ РґР»СЏ РєР°СЂС‚РёРЅРѕРє РёР· СЃР»Р°Р№РґРµСЂР° РЅРѕРІРёРЅРѕРє Рё РїСЂРѕС‡РёС….
    var tempObj = buttonClick
      .parents(wrapperClass)
      .find("img[data-transfer=true][data-product-id=" + productId + "]");
    tempObj.effect("transfer", $transfer, 600);
    $(".transfer_class").html(tempObj.clone().css($css));
  } else {
    //Р•СЃР»Рё РєРЅРѕРїРєР° РЅР°С…РѕРґРёС‚СЃСЏ РЅРµ РІ РєРѕРЅС‚РµР№РЅРµСЂРµ, РїСЂРѕРІРµСЂСЏРµРј РЅР°С…РѕРґРёС‚СЃСЏ Р»Рё РѕРЅР° РЅР° СЃС‚СЂР°РЅРёС†Рµ РєР°СЂС‚РѕС‡РєРё С‚РѕРІР°СЂР°.
    if ($(".product-details-image").length) {
      // РґР°РµРј СЃРїРѕСЃРѕР±РЅРѕСЃС‚СЊ Р»РµС‚Р°С‚СЊ РґР»СЏ РєР°СЂС‚РёРЅРѕРє РёР· РіР°Р»РµСЂРµРё РІ РєР°СЂС‚РѕС‡РєРµ С‚РѕРІР°СЂР°.
      $(".product-details-image").each(function () {
        if ($(this).css("display") != "none") {
          $(this).find(".mg-product-image").effect("transfer", $transfer, 600);
          $(".transfer_class").html($(this).find("img").clone().css($css));
        }
      });
    } else {
      // РґР°РµРј СЃРїРѕСЃРѕР±РЅРѕСЃС‚СЊ Р»РµС‚Р°С‚СЊ РґР»СЏ РІСЃРµС… РєР°СЂС‚РёРЅРѕРє.
      var tempObj = $(
        "img[data-transfer=true][data-product-id=" + productId + "]"
      );
      tempObj.effect("transfer", $transfer, 600);
    }
  }

  if (tempObj) {
    $(".transfer_class").html(tempObj.clone().css($css));
  }
}
 
/*!
 * css-vars-ponyfill
 * v2.1.2
 * https://jhildenbiddle.github.io/css-vars-ponyfill/
 * (c) 2018-2019 John Hildenbiddle &lt;http://hildenbiddle.com&gt;
 * MIT license
 */
!function(e,t){"object"==typeof exports&amp;&amp;"undefined"!=typeof module?module.exports=t():"function"==typeof define&amp;&amp;define.amd?define(t):(e=e||self).cssVars=t()}(this,function(){"use strict";function e(){return(e=Object.assign||function(e){for(var t=1;t&lt;arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&amp;&amp;(e[n]=r[n])}return e}).apply(this,arguments)}function t(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t&lt;e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function r(e){var t=arguments.length&gt;1&amp;&amp;void 0!==arguments[1]?arguments[1]:{},r={mimeType:t.mimeType||null,onBeforeSend:t.onBeforeSend||Function.prototype,onSuccess:t.onSuccess||Function.prototype,onError:t.onError||Function.prototype,onComplete:t.onComplete||Function.prototype},n=Array.isArray(e)?e:[e],o=Array.apply(null,Array(n.length)).map(function(e){return null});function s(){return!("&lt;"===(arguments.length&gt;0&amp;&amp;void 0!==arguments[0]?arguments[0]:"").trim().charAt(0))}function a(e,t){r.onError(e,n[t],t)}function c(e,t){var s=r.onSuccess(e,n[t],t);e=!1===s?"":s||e,o[t]=e,-1===o.indexOf(null)&amp;&amp;r.onComplete(o)}var i=document.createElement("a");n.forEach(function(e,t){if(i.setAttribute("href",e),i.href=String(i.href),Boolean(document.all&amp;&amp;!window.atob)&amp;&amp;i.host.split(":")[0]!==location.host.split(":")[0]){if(i.protocol===location.protocol){var n=new XDomainRequest;n.open("GET",e),n.timeout=0,n.onprogress=Function.prototype,n.ontimeout=Function.prototype,n.onload=function(){s(n.responseText)?c(n.responseText,t):a(n,t)},n.onerror=function(e){a(n,t)},setTimeout(function(){n.send()},0)}else console.warn("Internet Explorer 9 Cross-Origin (CORS) requests must use the same protocol (".concat(e,")")),a(null,t)}else{var o=new XMLHttpRequest;o.open("GET",e),r.mimeType&amp;&amp;o.overrideMimeType&amp;&amp;o.overrideMimeType(r.mimeType),r.onBeforeSend(o,e,t),o.onreadystatechange=function(){4===o.readyState&amp;&amp;(200===o.status&amp;&amp;s(o.responseText)?c(o.responseText,t):a(o,t))},o.send()}})}function n(e){var t={cssComments:/\/\*[\s\S]+?\*\//g,cssImports:/(?:@import\s*)(?:url\(\s*)?(?:['"])([^'"]*)(?:['"])(?:\s*\))?(?:[^;]*;)/g},n={rootElement:e.rootElement||document,include:e.include||'style,link[rel="stylesheet"]',exclude:e.exclude||null,filter:e.filter||null,useCSSOM:e.useCSSOM||!1,onBeforeSend:e.onBeforeSend||Function.prototype,onSuccess:e.onSuccess||Function.prototype,onError:e.onError||Function.prototype,onComplete:e.onComplete||Function.prototype},s=Array.apply(null,n.rootElement.querySelectorAll(n.include)).filter(function(e){return t=e,r=n.exclude,!(t.matches||t.matchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector).call(t,r);var t,r}),a=Array.apply(null,Array(s.length)).map(function(e){return null});function c(){if(-1===a.indexOf(null)){var e=a.join("");n.onComplete(e,a,s)}}function i(e,t,o,s){var i=n.onSuccess(e,o,s);(function e(t,o,s,a){var c=arguments.length&gt;4&amp;&amp;void 0!==arguments[4]?arguments[4]:[];var i=arguments.length&gt;5&amp;&amp;void 0!==arguments[5]?arguments[5]:[];var l=u(t,s,i);l.rules.length?r(l.absoluteUrls,{onBeforeSend:function(e,t,r){n.onBeforeSend(e,o,t)},onSuccess:function(e,t,r){var s=n.onSuccess(e,o,t),a=u(e=!1===s?"":s||e,t,i);return a.rules.forEach(function(t,r){e=e.replace(t,a.absoluteRules[r])}),e},onError:function(r,n,u){c.push({xhr:r,url:n}),i.push(l.rules[u]),e(t,o,s,a,c,i)},onComplete:function(r){r.forEach(function(e,r){t=t.replace(l.rules[r],e)}),e(t,o,s,a,c,i)}}):a(t,c)})(e=void 0!==i&amp;&amp;!1===Boolean(i)?"":i||e,o,s,function(e,r){null===a[t]&amp;&amp;(r.forEach(function(e){return n.onError(e.xhr,o,e.url)}),!n.filter||n.filter.test(e)?a[t]=e:a[t]="",c())})}function u(e,r){var n=arguments.length&gt;2&amp;&amp;void 0!==arguments[2]?arguments[2]:[],s={};return s.rules=(e.replace(t.cssComments,"").match(t.cssImports)||[]).filter(function(e){return-1===n.indexOf(e)}),s.urls=s.rules.map(function(e){return e.replace(t.cssImports,"$1")}),s.absoluteUrls=s.urls.map(function(e){return o(e,r)}),s.absoluteRules=s.rules.map(function(e,t){var n=s.urls[t],a=o(s.absoluteUrls[t],r);return e.replace(n,a)}),s}s.length?s.forEach(function(e,t){var s=e.getAttribute("href"),u=e.getAttribute("rel"),l="LINK"===e.nodeName&amp;&amp;s&amp;&amp;u&amp;&amp;"stylesheet"===u.toLowerCase(),f="STYLE"===e.nodeName;if(l)r(s,{mimeType:"text/css",onBeforeSend:function(t,r,o){n.onBeforeSend(t,e,r)},onSuccess:function(r,n,a){var c=o(s,location.href);i(r,t,e,c)},onError:function(r,o,s){a[t]="",n.onError(r,e,o),c()}});else if(f){var d=e.textContent;n.useCSSOM&amp;&amp;(d=Array.apply(null,e.sheet.cssRules).map(function(e){return e.cssText}).join("")),i(d,t,e,location.href)}else a[t]="",c()}):n.onComplete("",[])}function o(e){var t=arguments.length&gt;1&amp;&amp;void 0!==arguments[1]?arguments[1]:location.href,r=document.implementation.createHTMLDocument(""),n=r.createElement("base"),o=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(o),n.href=t,o.href=e,o.href}var s=a;function a(e,t,r){e instanceof RegExp&amp;&amp;(e=c(e,r)),t instanceof RegExp&amp;&amp;(t=c(t,r));var n=i(e,t,r);return n&amp;&amp;{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function c(e,t){var r=t.match(e);return r?r[0]:null}function i(e,t,r){var n,o,s,a,c,i=r.indexOf(e),u=r.indexOf(t,i+1),l=i;if(i&gt;=0&amp;&amp;u&gt;0){for(n=[],s=r.length;l&gt;=0&amp;&amp;!c;)l==i?(n.push(l),i=r.indexOf(e,l+1)):1==n.length?c=[n.pop(),u]:((o=n.pop())&lt;s&amp;&amp;(s=o,a=u),u=r.indexOf(t,l+1)),l=i&lt;u&amp;&amp;i&gt;=0?i:u;n.length&amp;&amp;(c=[s,a])}return c}function u(t){var r=e({},{preserveStatic:!0,removeComments:!1},arguments.length&gt;1&amp;&amp;void 0!==arguments[1]?arguments[1]:{});function n(e){throw new Error("CSS parse error: ".concat(e))}function o(e){var r=e.exec(t);if(r)return t=t.slice(r[0].length),r}function a(){return o(/^{\s*/)}function c(){return o(/^}/)}function i(){o(/^\s*/)}function u(){if(i(),"/"===t[0]&amp;&amp;"*"===t[1]){for(var e=2;t[e]&amp;&amp;("*"!==t[e]||"/"!==t[e+1]);)e++;if(!t[e])return n("end of comment is missing");var r=t.slice(2,e);return t=t.slice(e+2),{type:"comment",comment:r}}}function l(){for(var e,t=[];e=u();)t.push(e);return r.removeComments?[]:t}function f(){for(i();"}"===t[0];)n("extra closing bracket");var e=o(/^(("(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^{])+)/);if(e)return e[0].trim().replace(/\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"вЂЊ")}).split(/\s*(?![^(]*\)),\s*/).map(function(e){return e.replace(/\u200C/g,",")})}function d(){o(/^([;\s]*)+/);var e=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g,t=o(/^(\*?[-#\/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=t[0].trim(),!o(/^:\s*/))return n("property missing ':'");var r=o(/^((?:\/\*.*?\*\/|'(?:\\'|.)*?'|"(?:\\"|.)*?"|\((\s*'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^)]*?)\s*\)|[^};])+)/),s={type:"declaration",property:t.replace(e,""),value:r?r[0].replace(e,"").trim():""};return o(/^[;\s]*/),s}}function p(){if(!a())return n("missing '{'");for(var e,t=l();e=d();)t.push(e),t=t.concat(l());return c()?t:n("missing '}'")}function m(){i();for(var e,t=[];e=o(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),o(/^,\s*/);if(t.length)return{type:"keyframe",values:t,declarations:p()}}function v(){if(i(),"@"===t[0]){var e=function(){var e=o(/^@([-\w]+)?keyframes\s*/);if(e){var t=e[1];if(!(e=o(/^([-\w]+)\s*/)))return n("@keyframes missing name");var r,s=e[1];if(!a())return n("@keyframes missing '{'");for(var i=l();r=m();)i.push(r),i=i.concat(l());return c()?{type:"keyframes",name:s,vendor:t,keyframes:i}:n("@keyframes missing '}'")}}()||function(){var e=o(/^@supports *([^{]+)/);if(e)return{type:"supports",supports:e[1].trim(),rules:y()}}()||function(){if(o(/^@host\s*/))return{type:"host",rules:y()}}()||function(){var e=o(/^@media([^{]+)*/);if(e)return{type:"media",media:(e[1]||"").trim(),rules:y()}}()||function(){var e=o(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(e)return{type:"custom-media",name:e[1].trim(),media:e[2].trim()}}()||function(){if(o(/^@page */))return{type:"page",selectors:f()||[],declarations:p()}}()||function(){var e=o(/^@([-\w]+)?document *([^{]+)/);if(e)return{type:"document",document:e[2].trim(),vendor:e[1]?e[1].trim():null,rules:y()}}()||function(){if(o(/^@font-face\s*/))return{type:"font-face",declarations:p()}}()||function(){var e=o(/^@(import|charset|namespace)\s*([^;]+);/);if(e)return{type:e[1],name:e[2].trim()}}();if(e&amp;&amp;!r.preserveStatic){var s=!1;if(e.declarations)s=e.declarations.some(function(e){return/var\(/.test(e.value)});else s=(e.keyframes||e.rules||[]).some(function(e){return(e.declarations||[]).some(function(e){return/var\(/.test(e.value)})});return s?e:{}}return e}}function h(){if(!r.preserveStatic){var e=s("{","}",t);if(e){var o=/:(?:root|host)(?![.:#(])/.test(e.pre)&amp;&amp;/--\S*\s*:/.test(e.body),a=/var\(/.test(e.body);if(!o&amp;&amp;!a)return t=t.slice(e.end+1),{}}}var c=f()||[],i=r.preserveStatic?p():p().filter(function(e){var t=c.some(function(e){return/:(?:root|host)(?![.:#(])/.test(e)})&amp;&amp;/^--\S/.test(e.property),r=/var\(/.test(e.value);return t||r});return c.length||n("selector missing"),{type:"rule",selectors:c,declarations:i}}function y(e){if(!e&amp;&amp;!a())return n("missing '{'");for(var r,o=l();t.length&amp;&amp;(e||"}"!==t[0])&amp;&amp;(r=v()||h());)r.type&amp;&amp;o.push(r),o=o.concat(l());return e||c()?o:n("missing '}'")}return{type:"stylesheet",stylesheet:{rules:y(!0),errors:[]}}}function l(t){var r=e({},{parseHost:!1,store:{},onWarning:function(){}},arguments.length&gt;1&amp;&amp;void 0!==arguments[1]?arguments[1]:{}),n=new RegExp(":".concat(r.parseHost?"host":"root","(?![.:#(])"));return"string"==typeof t&amp;&amp;(t=u(t,r)),t.stylesheet.rules.forEach(function(e){"rule"===e.type&amp;&amp;e.selectors.some(function(e){return n.test(e)})&amp;&amp;e.declarations.forEach(function(e,t){var n=e.property,o=e.value;n&amp;&amp;0===n.indexOf("--")&amp;&amp;(r.store[n]=o)})}),r.store}function f(e){var t=arguments.length&gt;1&amp;&amp;void 0!==arguments[1]?arguments[1]:"",r=arguments.length&gt;2?arguments[2]:void 0,n={charset:function(e){return"@charset "+e.name+";"},comment:function(e){return 0===e.comment.indexOf("__CSSVARSPONYFILL")?"/*"+e.comment+"*/":""},"custom-media":function(e){return"@custom-media "+e.name+" "+e.media+";"},declaration:function(e){return e.property+":"+e.value+";"},document:function(e){return"@"+(e.vendor||"")+"document "+e.document+"{"+o(e.rules)+"}"},"font-face":function(e){return"@font-face{"+o(e.declarations)+"}"},host:function(e){return"@host{"+o(e.rules)+"}"},import:function(e){return"@import "+e.name+";"},keyframe:function(e){return e.values.join(",")+"{"+o(e.declarations)+"}"},keyframes:function(e){return"@"+(e.vendor||"")+"keyframes "+e.name+"{"+o(e.keyframes)+"}"},media:function(e){return"@media "+e.media+"{"+o(e.rules)+"}"},namespace:function(e){return"@namespace "+e.name+";"},page:function(e){return"@page "+(e.selectors.length?e.selectors.join(", "):"")+"{"+o(e.declarations)+"}"},rule:function(e){var t=e.declarations;if(t.length)return e.selectors.join(",")+"{"+o(t)+"}"},supports:function(e){return"@supports "+e.supports+"{"+o(e.rules)+"}"}};function o(e){for(var o="",s=0;s&lt;e.length;s++){var a=e[s];r&amp;&amp;r(a);var c=n[a.type](a);c&amp;&amp;(o+=c,c.length&amp;&amp;a.selectors&amp;&amp;(o+=t))}return o}return o(e.stylesheet.rules)}a.range=i;var d="--",p="var";function m(t){var r=e({},{preserveStatic:!0,preserveVars:!1,variables:{},onWarning:function(){}},arguments.length&gt;1&amp;&amp;void 0!==arguments[1]?arguments[1]:{});return"string"==typeof t&amp;&amp;(t=u(t,r)),function e(t,r){t.rules.forEach(function(n){n.rules?e(n,r):n.keyframes?n.keyframes.forEach(function(e){"keyframe"===e.type&amp;&amp;r(e.declarations,n)}):n.declarations&amp;&amp;r(n.declarations,t)})}(t.stylesheet,function(e,t){for(var n=0;n&lt;e.length;n++){var o=e[n],s=o.type,a=o.property,c=o.value;if("declaration"===s)if(r.preserveVars||!a||0!==a.indexOf(d)){if(-1!==c.indexOf(p+"(")){var i=h(c,r);i!==o.value&amp;&amp;(i=v(i),r.preserveVars?(e.splice(n,0,{type:s,property:a,value:i}),n++):o.value=i)}}else e.splice(n,1),n--}}),f(t)}function v(e){return(e.match(/calc\(([^)]+)\)/g)||[]).forEach(function(t){var r="calc".concat(t.split("calc").join(""));e=e.replace(t,r)}),e}function h(e){var t=arguments.length&gt;1&amp;&amp;void 0!==arguments[1]?arguments[1]:{},r=arguments.length&gt;2?arguments[2]:void 0;if(-1===e.indexOf("var("))return e;var n=s("(",")",e);return n?"var"===n.pre.slice(-3)?0===n.body.trim().length?(t.onWarning("var() must contain a non-whitespace string"),e):n.pre.slice(0,-3)+function(e){var n=e.split(",")[0].replace(/[\s\n\t]/g,""),o=(e.match(/(?:\s*,\s*){1}(.*)?/)||[])[1],s=Object.prototype.hasOwnProperty.call(t.variables,n)?String(t.variables[n]):void 0,a=s||(o?String(o):void 0),c=r||e;return s||t.onWarning('variable "'.concat(n,'" is undefined')),a&amp;&amp;"undefined"!==a&amp;&amp;a.length&gt;0?h(a,t,c):"var(".concat(c,")")}(n.body)+h(n.post,t):n.pre+"(".concat(h(n.body,t),")")+h(n.post,t):(-1!==e.indexOf("var(")&amp;&amp;t.onWarning('missing closing ")" in the value "'.concat(e,'"')),e)}var y="undefined"!=typeof window,g=y&amp;&amp;window.CSS&amp;&amp;window.CSS.supports&amp;&amp;window.CSS.supports("(--a: 0)"),S={group:0,job:0},b={rootElement:y?document:null,shadowDOM:!1,include:"style,link[rel=stylesheet]",exclude:"",variables:{},onlyLegacy:!0,preserveStatic:!0,preserveVars:!1,silent:!1,updateDOM:!0,updateURLs:!0,watch:null,onBeforeSend:function(){},onWarning:function(){},onError:function(){},onSuccess:function(){},onComplete:function(){}},E={cssComments:/\/\*[\s\S]+?\*\//g,cssKeyframes:/@(?:-\w*-)?keyframes/,cssMediaQueries:/@media[^{]+\{([\s\S]+?})\s*}/g,cssUrls:/url\((?!['"]?(?:data|http|\/\/):)['"]?([^'")]*)['"]?\)/g,cssVarDeclRules:/(?::(?:root|host)(?![.:#(])[\s,]*[^{]*{\s*[^}]*})/g,cssVarDecls:/(?:[\s;]*)(-{2}\w[\w-]*)(?:\s*:\s*)([^;]*);/g,cssVarFunc:/var\(\s*--[\w-]/,cssVars:/(?:(?::(?:root|host)(?![.:#(])[\s,]*[^{]*{\s*[^;]*;*\s*)|(?:var\(\s*))(--[^:)]+)(?:\s*[:)])/},w={dom:{},job:{},user:{}},C=!1,O=null,A=0,x=null,j=!1;function k(){var r=arguments.length&gt;0&amp;&amp;void 0!==arguments[0]?arguments[0]:{},o="cssVars(): ",s=e({},b,r);function a(e,t,r,n){!s.silent&amp;&amp;window.console&amp;&amp;console.error("".concat(o).concat(e,"\n"),t),s.onError(e,t,r,n)}function c(e){!s.silent&amp;&amp;window.console&amp;&amp;console.warn("".concat(o).concat(e)),s.onWarning(e)}if(y){if(s.watch)return s.watch=b.watch,function(e){function t(e){return"LINK"===e.tagName&amp;&amp;-1!==(e.getAttribute("rel")||"").indexOf("stylesheet")&amp;&amp;!e.disabled}if(!window.MutationObserver)return;O&amp;&amp;(O.disconnect(),O=null);(O=new MutationObserver(function(r){r.some(function(r){var n,o=!1;return"attributes"===r.type?o=t(r.target):"childList"===r.type&amp;&amp;(n=r.addedNodes,o=Array.apply(null,n).some(function(e){var r=1===e.nodeType&amp;&amp;e.hasAttribute("data-cssvars"),n=function(e){return"STYLE"===e.tagName&amp;&amp;!e.disabled}(e)&amp;&amp;E.cssVars.test(e.textContent);return!r&amp;&amp;(t(e)||n)})||function(t){return Array.apply(null,t).some(function(t){var r=1===t.nodeType,n=r&amp;&amp;"out"===t.getAttribute("data-cssvars"),o=r&amp;&amp;"src"===t.getAttribute("data-cssvars"),s=o;if(o||n){var a=t.getAttribute("data-cssvars-group"),c=e.rootElement.querySelector('[data-cssvars-group="'.concat(a,'"]'));o&amp;&amp;(L(e.rootElement),w.dom={}),c&amp;&amp;c.parentNode.removeChild(c)}return s})}(r.removedNodes)),o})&amp;&amp;k(e)})).observe(document.documentElement,{attributes:!0,attributeFilter:["disabled","href"],childList:!0,subtree:!0})}(s),void k(s);if(!1===s.watch&amp;&amp;O&amp;&amp;(O.disconnect(),O=null),!s.__benchmark){if(C===s.rootElement)return void function(e){var t=arguments.length&gt;1&amp;&amp;void 0!==arguments[1]?arguments[1]:100;clearTimeout(x),x=setTimeout(function(){e.__benchmark=null,k(e)},t)}(r);if(s.__benchmark=T(),s.exclude=[O?'[data-cssvars]:not([data-cssvars=""])':'[data-cssvars="out"]',s.exclude].filter(function(e){return e}).join(","),s.variables=function(){var e=arguments.length&gt;0&amp;&amp;void 0!==arguments[0]?arguments[0]:{},t=/^-{2}/;return Object.keys(e).reduce(function(r,n){return r[t.test(n)?n:"--".concat(n.replace(/^-+/,""))]=e[n],r},{})}(s.variables),!O)if(Array.apply(null,s.rootElement.querySelectorAll('[data-cssvars="out"]')).forEach(function(e){var t=e.getAttribute("data-cssvars-group");(t?s.rootElement.querySelector('[data-cssvars="src"][data-cssvars-group="'.concat(t,'"]')):null)||e.parentNode.removeChild(e)}),A){var i=s.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])');i.length&lt;A&amp;&amp;(A=i.length,w.dom={})}}if("loading"!==document.readyState)if(g&amp;&amp;s.onlyLegacy){if(s.updateDOM){var d=s.rootElement.host||(s.rootElement===document?document.documentElement:s.rootElement);Object.keys(s.variables).forEach(function(e){d.style.setProperty(e,s.variables[e])})}}else!j&amp;&amp;(s.shadowDOM||s.rootElement.shadowRoot||s.rootElement.host)?n({rootElement:b.rootElement,include:b.include,exclude:s.exclude,onSuccess:function(e,t,r){return(e=((e=e.replace(E.cssComments,"").replace(E.cssMediaQueries,"")).match(E.cssVarDeclRules)||[]).join(""))||!1},onComplete:function(e,t,r){l(e,{store:w.dom,onWarning:c}),j=!0,k(s)}}):(C=s.rootElement,n({rootElement:s.rootElement,include:s.include,exclude:s.exclude,onBeforeSend:s.onBeforeSend,onError:function(e,t,r){var n=e.responseURL||_(r,location.href),o=e.statusText?"(".concat(e.statusText,")"):"Unspecified Error"+(0===e.status?" (possibly CORS related)":"");a("CSS XHR Error: ".concat(n," ").concat(e.status," ").concat(o),t,e,n)},onSuccess:function(e,t,r){var n=s.onSuccess(e,t,r);return e=void 0!==n&amp;&amp;!1===Boolean(n)?"":n||e,s.updateURLs&amp;&amp;(e=function(e,t){return(e.replace(E.cssComments,"").match(E.cssUrls)||[]).forEach(function(r){var n=r.replace(E.cssUrls,"$1"),o=_(n,t);e=e.replace(r,r.replace(n,o))}),e}(e,r)),e},onComplete:function(r,n){var o=arguments.length&gt;2&amp;&amp;void 0!==arguments[2]?arguments[2]:[],i={},d=s.updateDOM?w.dom:Object.keys(w.job).length?w.job:w.job=JSON.parse(JSON.stringify(w.dom)),p=!1;if(o.forEach(function(e,t){if(E.cssVars.test(n[t]))try{var r=u(n[t],{preserveStatic:s.preserveStatic,removeComments:!0});l(r,{parseHost:Boolean(s.rootElement.host),store:i,onWarning:c}),e.__cssVars={tree:r}}catch(t){a(t.message,e)}}),s.updateDOM&amp;&amp;e(w.user,s.variables),e(i,s.variables),p=Boolean((document.querySelector("[data-cssvars]")||Object.keys(w.dom).length)&amp;&amp;Object.keys(i).some(function(e){return i[e]!==d[e]})),e(d,w.user,i),p)L(s.rootElement),k(s);else{var v=[],h=[],y=!1;if(w.job={},s.updateDOM&amp;&amp;S.job++,o.forEach(function(t){var r=!t.__cssVars;if(t.__cssVars)try{m(t.__cssVars.tree,e({},s,{variables:d,onWarning:c}));var n=f(t.__cssVars.tree);if(s.updateDOM){if(t.getAttribute("data-cssvars")||t.setAttribute("data-cssvars","src"),n.length){var o=t.getAttribute("data-cssvars-group")||++S.group,i=n.replace(/\s/g,""),u=s.rootElement.querySelector('[data-cssvars="out"][data-cssvars-group="'.concat(o,'"]'))||document.createElement("style");y=y||E.cssKeyframes.test(n),u.hasAttribute("data-cssvars")||u.setAttribute("data-cssvars","out"),i===t.textContent.replace(/\s/g,"")?(r=!0,u&amp;&amp;u.parentNode&amp;&amp;(t.removeAttribute("data-cssvars-group"),u.parentNode.removeChild(u))):i!==u.textContent.replace(/\s/g,"")&amp;&amp;([t,u].forEach(function(e){e.setAttribute("data-cssvars-job",S.job),e.setAttribute("data-cssvars-group",o)}),u.textContent=n,v.push(n),h.push(u),u.parentNode||t.parentNode.insertBefore(u,t.nextSibling))}}else t.textContent.replace(/\s/g,"")!==n&amp;&amp;v.push(n)}catch(e){a(e.message,t)}r&amp;&amp;t.setAttribute("data-cssvars","skip"),t.hasAttribute("data-cssvars-job")||t.setAttribute("data-cssvars-job",S.job)}),A=s.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])').length,s.shadowDOM)for(var g,b=[s.rootElement].concat(t(s.rootElement.querySelectorAll("*"))),O=0;g=b[O];++O)if(g.shadowRoot&amp;&amp;g.shadowRoot.querySelector("style")){var x=e({},s,{rootElement:g.shadowRoot});k(x)}s.updateDOM&amp;&amp;y&amp;&amp;M(s.rootElement),C=!1,s.onComplete(v.join(""),h,JSON.parse(JSON.stringify(d)),T()-s.__benchmark)}}}));else document.addEventListener("DOMContentLoaded",function e(t){k(r),document.removeEventListener("DOMContentLoaded",e)})}}function M(e){var t=["animation-name","-moz-animation-name","-webkit-animation-name"].filter(function(e){return getComputedStyle(document.body)[e]})[0];if(t){for(var r=e.getElementsByTagName("*"),n=[],o=0,s=r.length;o&lt;s;o++){var a=r[o];"none"!==getComputedStyle(a)[t]&amp;&amp;(a.style[t]+="__CSSVARSPONYFILL-KEYFRAMES__",n.push(a))}document.body.offsetHeight;for(var c=0,i=n.length;c&lt;i;c++){var u=n[c].style;u[t]=u[t].replace("__CSSVARSPONYFILL-KEYFRAMES__","")}}}function _(e){var t=arguments.length&gt;1&amp;&amp;void 0!==arguments[1]?arguments[1]:location.href,r=document.implementation.createHTMLDocument(""),n=r.createElement("base"),o=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(o),n.href=t,o.href=e,o.href}function T(){return y&amp;&amp;(window.performance||{}).now?window.performance.now():(new Date).getTime()}function L(e){Array.apply(null,e.querySelectorAll('[data-cssvars="skip"],[data-cssvars="src"]')).forEach(function(e){return e.setAttribute("data-cssvars","")})}return k.reset=function(){for(var e in C=!1,O&amp;&amp;(O.disconnect(),O=null),A=0,x=null,j=!1,w)w[e]={}},k});
//# sourceMappingURL=css-vars-ponyfill.min.js.map 
$(document).ready(function () {
// c-nav (mobile menu)
// ------------------------------------------------------------

    $("#c-nav__catalog .c-nav__menu").mouseover(function () {
        MenuOpenCloseTimer(
            function () {
                $('.c-catalog .c-button, .l-main, .c-catalog__dropdown--1').addClass('active');
                $('#c-nav__catalog').addClass('c-nav--open');
            }
        );
    });

    $(".l-header__block .c-catalog").mouseover(function (e) {
        if (e.target === this) {
            MenuOpenCloseTimer(
                function () {
                    $('.c-catalog .c-button, .l-main, .c-catalog__dropdown--1').addClass('active');
                    $('#c-nav__catalog').addClass('c-nav--open');
                }
            );
        }
    });

    $("#c-nav__catalog .c-nav__menu&gt;.c-nav__dropdown").mouseout(function () {
        MenuOpenCloseTimer(
            function () {
                $('.c-catalog .c-button, .l-main, .c-catalog__dropdown--1').removeClass('active');
                $('#c-nav__catalog').removeClass('c-nav--open');
            }
        );
    });

    $(".l-header__block .c-catalog, #c-nav__catalog .c-nav__menu&gt;.c-nav__dropdown li").hover(function () {
        MenuOpenCloseTimer(
            function () {
                $('.c-catalog .c-button, .l-main, .c-catalog__dropdown--1').addClass('active');
                $('#c-nav__catalog').addClass('c-nav--open');
            }
        );
    }, function () {
        MenuOpenCloseTimer(
            function () {
                $('.c-catalog .c-button, .l-main, .c-catalog__dropdown--1').removeClass('active');
                $('#c-nav__catalog').removeClass('c-nav--open');
            }
        );
    });

    $(".l-header__top .l-header__block .c-button, .l-header__top .l-header__block #c-nav__menu .c-nav__menu").hover(function () {
        MenuOpenCloseTimer(
            function () {
                $('.l-header__top .l-header__block #c-nav__menu').addClass('c-nav--open');
            }
        );
    }, function () {
        MenuOpenCloseTimer(
            function () {
                $('.l-header__top .l-header__block #c-nav__menu').removeClass('c-nav--open');
            }
        );
    });

    function MenuOpenCloseTimer(funct) {
        if (typeof this.delayTimer == "number") {
            clearTimeout(this.delayTimer);
            this.delayTimer = '';
        }
        this.delayTimer = setTimeout(function () {
            funct();
        }, 200);
    }

    $('body').on('click', 'a[href^="#c-nav"]', function (a) {
        a.preventDefault();
        var b = $(this).attr('href');
        $(b).addClass('c-nav--open');

    }), $('body').on('click', '.c-nav', function () {
        $('.c-nav').removeClass('c-nav--open');

    }), $('body').on('click', '.c-nav__menu', function (a) {
        a.stopPropagation()
    });


    $('body').on('click', 'a[href^="#c-nav__menu"]', function (a) {
        a.preventDefault();
        var b = $(this).attr('href');
        $(b).addClass('c-nav--open');
        $('body').addClass('fixed__body')

    }), $('body').on('click', '.c-nav', function () {
        $('.c-nav').removeClass('c-nav--open');
        $('body').removeClass('fixed__body')

    }), $('body').on('click', '.c-nav__menu', function (a) {
        a.stopPropagation()
    });


    $(".c-menu").click(function () {
        $('.c-nav--open').toggle().removeAttr('style');
    });

    // $(document).on('click', function (e) {
    //     if (!$(e.target).closest(".c-nav--open").length) {
    //         $('.c-nav.c-nav--open').hide();
    //     }
    //
    //     e.stopPropagation();
    // });


    $('body').on('click', '.c-nav__level--1', function () {
        var a = $(this).siblings();

        if ($(window).width() &lt; 1025) {
            a.find('.c-nav__dropdown--2').slideUp('fast');
            $(this).find('.c-nav__dropdown--2').slideToggle('fast');
        }
        a.find('.c-nav__icon').removeClass('rotate');
        $(this).find('.c-nav__icon').toggleClass('rotate');
    });
});
 
document.addEventListener("DOMContentLoaded", function() {
    var langSelect = document.getElementById('js-lang-select');

    var changeLang = function(event) {
        var select = event.target;

        window.location.href = select.options[select.selectedIndex].value;
    };
    if (langSelect) {
    	langSelect.addEventListener('change', changeLang);
    }
}); 
$(document).ready(function () {
    var addToCompareBtn = '.js-add-to-compare', // РљР»Р°СЃСЃ РєРЅРѕРїРєРё РґРѕР±Р°РІР»РµРЅРёСЏ С‚РѕРІР°СЂР° Рє СЃСЂР°РІРЅРµРЅРёСЋ, РєРЅРѕРїРєР° РґРѕР»Р¶РЅР° СЃРѕРґРµСЂР¶Р°С‚СЊ ID С‚РѕРІР°СЂР° РІ Р°С‚СЂРёР±СѓС‚Рµ В«data-item-idВ»
        compareInformer = $('.js-compare-informer'), // РЈРІРµРґРѕРјР»РµРЅРёРµ Рѕ РґРѕР±Р°РІР»РµРЅРёРё С‚РѕРІР°СЂР° Рє СЃСЂР°РІРЅРµРЅРёСЋ
        inCompareCounter = $('.js-compare-count'), // РЎС‡С‘С‚С‡РёРє РєРѕР»РёС‡РµСЃС‚РІР° С‚РѕРІР°СЂРѕРІ РІ СЃСЂР°РІРЅРµРЅРёРё
        toCompareLink = $('.js-to-compare-link'); // РЎСЃС‹Р»РєР° РЅР° СЃС‚СЂР°РЅРёС†Сѓ СЃСЂР°РІРЅРµРЅРёСЏ

    // РћР±СЂР°Р±РѕС‚С‡РёРє РєР»РёРєР° РїРѕ РєРЅРѕРїРєРµ РґРѕР±Р°РІР»РµРЅРёСЏ Рє СЃСЂР°РІРЅРµРЅРёСЋ В«.js-add-to-compareВ»
    $('body').on('click', addToCompareBtn, addToCompare);

    // Р¤СѓРЅРєС†РёСЏ РґРѕР±Р°РІР»РµРЅРёСЏ С‚РѕРІР°СЂР° Рє СЃСЂР°РІРЅРµРЅРёСЋ
    function addToCompare() {
        // РџРѕРєР°Р·С‹РІР°РµРј СѓРІРµРґРѕРјР»РµРЅРёРµ
        compareInformer.slideDown('fast');

        // РЈР±РёСЂР°РµРј СѓРІРµРґРѕРјР»РµРЅРёРµ
        setTimeout(function () {
            compareInformer.slideUp('fast')
        }, 1000);

        // РћС‚РїСЂР°РІР»РµРј Р·Р°РїСЂРѕСЃ РЅР° РґРѕР±Р°РІР»РµРЅРёРµ С‚РѕРІР°СЂР° Рє СЃСЂР°РІРЅРµРЅРёСЋ
        var request = 'inCompareProductId=' + $(this).data('item-id');

        $.ajax({
            type: "GET",
            url: mgBaseDir + "/compare",
            data: "updateCompare=1&amp;" + request,
            dataType: "json",
            cache: false,
            success: function (response) {

                // РњРµРЅСЏРµРј РєРѕР»РёС‡РµСЃС‚РІРѕ С‚РѕРІР°СЂРѕРІ РІ СЃС‡С‘С‚С‡РёРєРµ
                inCompareCounter.html(response.count).fadeIn('normal');

                // В«РњРёРіР°РµРјВ» РєРЅРѕРїРєРѕР№ РїРµСЂРµС…РѕРґР° Рє СЃСЂР°РІРЅРµРЅРёСЋ
                toCompareLink.fadeOut('normal').fadeIn('normal');
            }
        });

        return false;
    }
}); 
$(document).ready(function() {
    // РЈРґР°Р»РµРЅРёРµ С‚РѕРІР°СЂР° РёР· РєРѕСЂР·РёРЅС‹ Р°СЏРєСЃРѕРј
    $('body').on('click', '.js-delete-from-cart', function () {

        var $this = $(this);
        var itemId = $this.data('delete-item-id');
        var property = $this.data('property');
        var $vari = $this.data('variant');
        $.ajax({
            type: "POST",
            url: mgBaseDir + "/cart",
            data: {
                action: "cart", // РЅР°Р·РІР°РЅРёРµ РґРµР№СЃС‚РІРёСЏ РІ РїРѕР»СЊР·РѕРІР°С‚РµР»СЊСЃРєРѕРј РєР»Р°СЃСЃР° Ajaxuser
                delFromCart: 1,
                itemId: itemId,
                property: property,
                variantId: $vari
            },
            dataType: "json",
            cache: false,
            success: function (response) {
                if ('success' == response.status) {
                    if (response.deliv &amp;&amp; response.curr) {
                        var i = 0;
                        response.deliv.forEach(function (element, index, arr) {
                            $('.delivery-details-list li:eq(' + i + ') .deliveryPrice').html('&amp;nbsp;' + element);
                            if ($('.delivery-details-list input[type=radio]:eq(' + i + ')').is(':checked')) {
                                if (element == 0) {
                                    $('.summ-info .delivery-summ').html('');
                                } else {
                                    $('.summ-info .delivery-summ').html(locale.delivery + ' &lt;span class="order-delivery-summ"&gt;' + element + ' ' + response.curr + '&lt;/span&gt;');
                                }
                            }
                            i++;
                        });
                    }
                    if(!$vari) $vari = 0;
                    var table = $('.deleteItemFromCart[data-property="' + property + '"][data-delete-item-id="' + itemId + '"][data-variant="' + $vari + '"]').parents('table');
                    if ($vari) {
                        $('.deleteItemFromCart[data-property="' + property + '"][data-delete-item-id="' + itemId + '"][data-variant="' + $vari + '"]').parents('tr').remove();
                    } else {
                        $('.deleteItemFromCart[data-property="' + property + '"][data-delete-item-id="' + itemId + '"]').parents('tr').remove();
                    }

                    var i = 1;
                    table.find('.index').each(function () {
                        $(this).text(i++);
                    });
                    $('.total-sum strong,.total .total-sum span,.mg-desktop-cart .total-sum span,.mg-fake-cart .total-sum span').text(response.data.cart_price_wc);
                    response.data.cart_price = response.data.cart_price ? response.data.cart_price : 0;
                    response.data.cart_count = response.data.cart_count ? response.data.cart_count : 0;
                    $('.pricesht').text(response.data.cart_price);
                    $('.countsht').text(response.data.cart_count);
                    $('.cart-table .total-sum-cell strong').text(response.data.cart_price_wc);

                    if ($('.small-cart-table tr').length == 0) {

                        $('html').removeClass('c-modal--scroll');
                        $('#js-modal__cart').removeClass('c-modal--open');
                        $('.product-cart, .checkout-form-wrapper, .small-cart').hide();
                        $('.empty-cart-block').show();

                    }
                }
            }
        });
        return false;
    });

    if ($('.small-cart-table tr').length == 0) {
        $('.product-cart, .checkout-form-wrapper, .small-cart').hide();
        $('.empty-cart-block').show();
    }
});
 
// c-modal
// ------------------------------------------------------------
$('body').on('click', 'a[href^="#js-modal"]', function (a) {
    a.preventDefault();
    var b = $(this).attr('href');
    $(b).addClass('c-modal--open');
    if ($(document).height() &gt; $(window).height()) {
        $('html').addClass('c-modal--scroll');
    }

}), $('body').on('click', '.c-modal, .c-modal__close, .c-modal__cart', function () {
    $('.c-modal').removeClass('c-modal--open');
    $('html').removeClass('c-modal--scroll');

}), $('body').on('click', '.c-modal__content', function (a) {
    a.stopPropagation()
}); 
/*!
 * hoverIntent v1.8.1 // 2014.08.11 // jQuery v1.9.1+
 * http://briancherne.github.io/jquery-hoverIntent/
 *
 * You may use hoverIntent under the terms of the MIT license. Basically that
 * means you are free to use hoverIntent as long as this header is left intact.
 * Copyright 2007, 2014 Brian Cherne
 */

/* hoverIntent is similar to jQuery's built-in "hover" method except that
 * instead of firing the handlerIn function immediately, hoverIntent checks
 * to see if the user's mouse has slowed down (beneath the sensitivity
 * threshold) before firing the event. The handlerOut function is only
 * called after a matching handlerIn.
 *
 * // basic usage ... just like .hover()
 * .hoverIntent( handlerIn, handlerOut )
 * .hoverIntent( handlerInOut )
 *
 * // basic usage ... with event delegation!
 * .hoverIntent( handlerIn, handlerOut, selector )
 * .hoverIntent( handlerInOut, selector )
 *
 * // using a basic configuration object
 * .hoverIntent( config )
 *
 * @param  handlerIn   function OR configuration object
 * @param  handlerOut  function OR selector for delegation OR undefined
 * @param  selector    selector OR undefined
 * @author Brian Cherne &lt;brian(at)cherne(dot)net&gt;
 */

;(function(factory) {
    'use strict';
    if (typeof define === 'function' &amp;&amp; define.amd) {
        define(['jquery'], factory);
    } else if (jQuery &amp;&amp; !jQuery.fn.hoverIntent) {
        factory(jQuery);
    }
})(function($) {
    'use strict';

    // default configuration values
    var _cfg = {
        interval: 100,
        sensitivity: 6,
        timeout: 0
    };

    // counter used to generate an ID for each instance
    var INSTANCE_COUNT = 0;

    // current X and Y position of mouse, updated during mousemove tracking (shared across instances)
    var cX, cY;

    // saves the current pointer position coordinates based on the given mousemove event
    var track = function(ev) {
        cX = ev.pageX;
        cY = ev.pageY;
    };

    // compares current and previous mouse positions
    var compare = function(ev,$el,s,cfg) {
        // compare mouse positions to see if pointer has slowed enough to trigger `over` function
        if ( Math.sqrt( (s.pX-cX)*(s.pX-cX) + (s.pY-cY)*(s.pY-cY) ) &lt; cfg.sensitivity ) {
            $el.off(s.event,track);
            delete s.timeoutId;
            // set hoverIntent state as active for this element (permits `out` handler to trigger)
            s.isActive = true;
            // overwrite old mouseenter event coordinates with most recent pointer position
            ev.pageX = cX; ev.pageY = cY;
            // clear coordinate data from state object
            delete s.pX; delete s.pY;
            return cfg.over.apply($el[0],[ev]);
        } else {
            // set previous coordinates for next comparison
            s.pX = cX; s.pY = cY;
            // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
            s.timeoutId = setTimeout( function(){compare(ev, $el, s, cfg);} , cfg.interval );
        }
    };

    // triggers given `out` function at configured `timeout` after a mouseleave and clears state
    var delay = function(ev,$el,s,out) {
        delete $el.data('hoverIntent')[s.id];
        return out.apply($el[0],[ev]);
    };

    $.fn.hoverIntent = function(handlerIn,handlerOut,selector) {
        // instance ID, used as a key to store and retrieve state information on an element
        var instanceId = INSTANCE_COUNT++;

        // extend the default configuration and parse parameters
        var cfg = $.extend({}, _cfg);
        if ( $.isPlainObject(handlerIn) ) {
            cfg = $.extend(cfg, handlerIn);
            if ( !$.isFunction(cfg.out) ) {
                cfg.out = cfg.over;
            }
        } else if ( $.isFunction(handlerOut) ) {
            cfg = $.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector } );
        } else {
            cfg = $.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut } );
        }

        // A private function for handling mouse 'hovering'
        var handleHover = function(e) {
            // cloned event to pass to handlers (copy required for event object to be passed in IE)
            var ev = $.extend({},e);

            // the current target of the mouse event, wrapped in a jQuery object
            var $el = $(this);

            // read hoverIntent data from element (or initialize if not present)
            var hoverIntentData = $el.data('hoverIntent');
            if (!hoverIntentData) { $el.data('hoverIntent', (hoverIntentData = {})); }

            // read per-instance state from element (or initialize if not present)
            var state = hoverIntentData[instanceId];
            if (!state) { hoverIntentData[instanceId] = state = { id: instanceId }; }

            // state properties:
            // id = instance ID, used to clean up data
            // timeoutId = timeout ID, reused for tracking mouse position and delaying "out" handler
            // isActive = plugin state, true after `over` is called just until `out` is called
            // pX, pY = previously-measured pointer coordinates, updated at each polling interval
            // event = string representing the namespaced event used for mouse tracking

            // clear any existing timeout
            if (state.timeoutId) { state.timeoutId = clearTimeout(state.timeoutId); }

            // namespaced event used to register and unregister mousemove tracking
            var mousemove = state.event = 'mousemove.hoverIntent.hoverIntent'+instanceId;

            // handle the event, based on its type
            if (e.type === 'mouseenter') {
                // do nothing if already active
                if (state.isActive) { return; }
                // set "previous" X and Y position based on initial entry point
                state.pX = ev.pageX; state.pY = ev.pageY;
                // update "current" X and Y position based on mousemove
                $el.off(mousemove,track).on(mousemove,track);
                // start polling interval (self-calling timeout) to compare mouse coordinates over time
                state.timeoutId = setTimeout( function(){compare(ev,$el,state,cfg);} , cfg.interval );
            } else { // "mouseleave"
                // do nothing if not already active
                if (!state.isActive) { return; }
                // unbind expensive mousemove event
                $el.off(mousemove,track);
                // if hoverIntent state is true, then call the mouseOut function after the specified delay
                state.timeoutId = setTimeout( function(){delay(ev,$el,state,cfg.out);} , cfg.timeout );
            }
        };

        // listen for mouseenter and mouseleave
        return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover}, cfg.selector);
    };
});
 
// c-catalog
// ------------------------------------------------------------
$('.c-catalog .c-button').on('click', function () {
    if ($(window).width() &lt; 1025) {
        $('.c-catalog .c-button, .l-main, .c-catalog__dropdown--1').toggleClass('active');
    }

}), $('body').on('click', function () {
    if ($(window).width() &lt; 1025) {
        $('.c-catalog .c-button, .l-main, .c-catalog__dropdown--1').removeClass('active');
    }

}), $('body').on('click', '.c-catalog', function (a) {
    a.stopPropagation()
});

$('.c-catalog__level').hoverIntent({
    sensitivity: 3,
    interval: 100,
    timeout: 200,
    over: function () {
        $(this).find('&gt; .c-catalog__dropdown').addClass('active');
    },
    out: function () {
        $(this).find('.c-catalog__dropdown').removeClass('active');
    }
}); 
$(document).ready(function () {
    // РћР±СЂР°Р±РѕС‚РєР° РІРІРѕРґР° РїРѕРёСЃРєРѕРІРѕР№ С„СЂР°Р·С‹ РІ РїРѕР»Рµ РїРѕРёСЃРєР°
    $('body').on('keyup', 'input[name=search]', function () {

        var text = $(this).val();
        if (text.length &gt;= 2) {
            $.ajax({
                type: "POST",
                url: mgBaseDir + "/catalog",
                data: {
                    fastsearch: "true",
                    text: text
                },
                dataType: "json",
                cache: false,
                success: function (data) {
                    if ('success' == data.status &amp;&amp; data.item.items.catalogItems.length &gt; 0) {
                        $('.fastResult').html(data.html);
                        $('.fastResult').show();
                        $('.wraper-fast-result').show();
                    } else {
                        $('.fastResult').hide();
                    }
                }
            });
        } else {
            $('.fastResult').hide();
        }
    });

    // РєР»РёРє РІРЅРµ РїРѕРёСЃРєР°
    $(document).mousedown(function (e) {
        var container = $(".wraper-fast-result");
        if (container.has(e.target).length === 0 &amp;&amp; $(".search-block").has(e.target).length === 0) {
            container.hide();
        }
    });

}); 
// СЃРїРёСЃРѕРє РѕС‚Р»РѕР¶РµРЅРЅС‹С… С„СѓРЅРєС†РёР№, РІС‹РїРѕР»РЅСЏРµРјС‹С… РїРѕСЃР»Рµ С„РёР»СЊС‚СЂР°С†РёРё Р°СЏРєСЃРѕРј.
// РџСЂРёРјРµСЂ РёСЃРїРѕР»СЊР·РѕРІР°РЅРёСЏ РІ СЃС‚РѕСЂРѕРЅРЅРёС… JS:
// AJAX_CALLBACK_FILTER = [
//        {callback: 'settings.closeAllTab', param: null},
//        {callback: 'settings.openTab', param: ['tab-system']},
// ];
var AJAX_CALLBACK_FILTER = [];
var VIEW_ALL_FILTER = -1;

$(document).ready(function () {

    function mgInitFilter() {
        var step = 10;
        if (typeof productFilterPriceSliderStep != 'undefined') {
            step = productFilterPriceSliderStep;
        }
        $("#price-slider").slider({
            min: $("input#minCost").data("fact-min"),
            max: $("input#maxCost").data("fact-max"),
            values: [$("input#minCost").val(), $("input#maxCost").val()],
            step: step,
            range: true,
            stop: function (event, ui) {
                $("input#minCost").val($("#price-slider").slider("values", 0));
                $("input#maxCost").val($("#price-slider").slider("values", 1));
                getFilteredItems($('.filter-form #maxCost'));
            },
            slide: function (event, ui) {
                $("input#minCost").val($("#price-slider").slider("values", 0));
                $("input#maxCost").val($("#price-slider").slider("values", 1));
            }
        });

        $("input#minCost").change(function () {
            var value1 = $("input#minCost").val();
            var value2 = $("input#maxCost").val();

            if (parseInt(value1) &gt; parseInt(value2)) {
                value1 = value2;
                $("input#minCost").val(value1);
            }
            $("#price-slider").slider("values", 0, value1);
        });

        $("input#maxCost").change(function () {
            var value1 = $("input#minCost").val();
            var value2 = $("input#maxCost").val();

            if (parseInt(value1) &gt; parseInt(value2)) {
                value2 = value1;
                $("input#maxCost").val(value2);
            }

            $("#price-slider").slider("values", 1, value2);
        });

        $("input#maxCost").change(function () {
            var value = $("input#maxCost").val();

            if (value == '') {
                $("input#maxCost").val($("input#maxCost").data("fact-max"));
            }
        });


        // РЎРѕР±РёСЂР°РµРј СЃР»Р°Р№РґРµСЂ СЃ РїРѕР»Р·СѓРЅРєР°РјРё РґР»СЏ РІСЃРµС… С…Р°СЂР°РєС‚РµСЂРёСЃС‚РёРє
        $(".mg-filter-item .mg-filter-prop-slider").each(function (i) {

            var min = parseFloat($(this).data("min"));
            var max = parseFloat($(this).data("max"));

            var fMin = (parseFloat($(this).data("factmin"))) ? parseFloat($(this).data("factmin")) : min;
            var fMax = (parseFloat($(this).data("factmax"))) ? parseFloat($(this).data("factmax")) : max;

            var minMaxArr = [min, max, fMin, fMax];
            //РС‰РµРј РјР°РєСЃРёРјР°Р»СЊРЅРѕРµ РєРѕР»РёС‡РµСЃС‚РІРѕ Р·РЅР°РєРѕРІ(СЂР°Р·СЂСЏРґРѕРІ) РїРѕСЃР»Рµ С‚РѕС‡РєРё
            var ranks = 0;
            for(var i=0; i&lt;4; i++){
              if(minMaxArr[i].toString().indexOf('.') !== -1){
                 var thisRank = minMaxArr[i].toString().split('.').pop().length;
                 if(thisRank &gt; ranks){ranks = thisRank}
              }
            }

            var step = 1;
            //РћРїСЂРµРґРµР»СЏРµРј С€Р°Рі РІ РїРѕР»Р·СѓРЅРєРµ ( С‡РµРј Р±РѕР»СЊС€Рµ РєРѕР»РёС‡РµСЃС‚РІРѕ Р·РЅР°РєРѕРІ РїРѕСЃР»Рµ С‚РѕС‡РєРё(СЂР°Р·СЂСЏРґРѕРІ), С‚РµРј РјРµРЅСЊС€Рµ С€Р°Рі РїРѕР»Р·СѓРЅРєР°)
            if(ranks &gt; 0) {
                step = '0.'
                for (var i = 0; i &lt; ranks; i++) {
                    if (i == ranks - 1) {
                        step += '1';
                    } else {
                        step += '0';
                    }
                }
                step = parseFloat(step);
            }

            var sliderEl = $(this);
            var minInput = $("input#Prop" + $(this).data("id") + "-min");
            var maxInput = $("input#Prop" + $(this).data("id") + "-max");

            // РЎРѕР·РґР°РµРј РїРѕР»Р·СѓРЅРѕРє
            $(this).slider({
                min: min,
                max: max,
                values: [fMin, fMax],
                step: step,
                range: true,
                stop: function (event, ui) {
                    minInput.val(sliderEl.slider("values", 0));
                    maxInput.val(sliderEl.slider("values", 1));
                    getFilteredItems(maxInput);
                },
                slide: function (event, ui) {
                    minInput.val(sliderEl.slider("values", 0));
                    maxInput.val(sliderEl.slider("values", 1));
                }
            });

            // РЎРѕР·РґР°РµРј РєСЂСЋС‡РѕРє РґР»СЏ РІРІРѕРґР° РёР· РїРѕР»РµР№
            minInput.change(function () {
                var value1 = minInput.val();
                var value2 = maxInput.val();

                // Р•СЃР»Рё Р·РЅР°С‡РµРЅРёРµ СѓСЃРєР°РєР°Р»Рѕ Р·Р° РїСЂРµРґРµР»С‹
                if (parseFloat(value1) &gt; parseFloat(value2)) {
                    value1 = value2;
                    minInput.val(value1);
                }
                sliderEl.slider("values", 0, value1);
                getFilteredItems(maxInput);
            });

            maxInput.change(function () {
                var value1 = minInput.val();
                var value2 = maxInput.val();

                if (parseFloat(value1) &gt; parseFloat(value2)) {
                    value2 = value1;
                    maxInput.val(value2);
                }
                sliderEl.slider("values", 1, value2);
                getFilteredItems(maxInput);
            });
        });

    }

    mgInitFilter();

    $('body').on('click', '.mg-filter-item .mg-viewfilter', function () {
        $(this).parent().find('li').fadeIn();
        $(this).hide();
    });

    $('body').on('click', '.mg-viewfilter-all', function () {
        $(this).hide();
        $('.js-filter-item-toggle, .mg-filter-item').fadeIn();
        VIEW_ALL_FILTER = -1 * VIEW_ALL_FILTER;
    });

    $('body').on('click', '.mg-filter-item input[type=checkbox]', function () {
        getFilteredItems($(this));
    });

    $('body').on('change', '.mg-filter-item select', function () {
        getFilteredItems($(this));
    });

    $('body').on('change', '.filter-form #maxCost', function () {
        getFilteredItems($(this));
    });

    $('body').on('change', '.filter-form #minCost', function () {
        getFilteredItems($(this));
    });

    $('body').on('change', '.filter-form select[name=sorter]', function () {
        $('.filter-form').submit();
    });

    /**
     *
     * @param {type} object - РѕР±СЉРµРєС‚ РєРѕС‚РѕСЂС‹Р№ РёРЅРёС†РёРёСЂРѕРІР°Р» РЅРѕРІС‹Р№ РїРѕРёСЃРє, РЅСѓР¶РµРЅ РґР»СЏ СЂР°СЃС‡РµС‚Р° РѕС„СЃРµС‚Р°
     * @param {type} page - СЃС‚СЂР°РЅРёС†Р°
     * @returns {undefined}
     */
    function getFilteredItems(object, page, sort) {
        var uri = $('form.filter-form').attr('action');

        var printToLeft = true; // СѓСЃС‚Р°РЅРѕРІРёС‚СЊ РІ false РµСЃР»Рё РЅСѓР¶РЅРѕ РІС‹РІРѕРґРёС‚СЊ РІРЅСѓС‚СЂРё Р±Р»РѕРєР°

        var offset = object.offset();

        var leftMargin = $('.mg-filter-head').css('width').slice(0, -2);
        var blockLeft = $('.mg-filter-head').offset().left;
        leftMargin = blockLeft + leftMargin * 1;

        if (!printToLeft)
            leftMargin = leftMargin - $('.mg-filter-head').css('width').slice(0, -2);

        $('.mg-filter-head .filter-preview').css('left', leftMargin + 'px');
        //
        $('.mg-filter-head .filter-preview span').hide();
        $('.mg-filter-head .filter-preview .loader-search').fadeIn();
        $('.mg-filter-head .filter-preview').show();
        $('.mg-filter-head .filter-preview').css('top', offset.top + 'px');
        $('.mg-filter-head .filter-preview .loader-search').fadeOut();
        $('.mg-filter-head .filter-preview span').html(locale.productSearch).fadeIn();
        //
        var autoUpdate = $('.filter-form').data('print-res');

        if (!autoUpdate &amp;&amp;
            (parseFloat($('.filter-form .start-price').val()) - 1) &lt;= $('.filter-form .start-price').data('fact-min') &amp;&amp;
            (parseFloat($('.filter-form .end-price').val()) + 1) &gt;= $('.filter-form .end-price').data('fact-max')
        ) {
            $('.filter-form .start-price').prop('disabled', true);
            $('.filter-form .end-price').prop('disabled', true);
        }

        var packedData = $('.filter-form').serialize();
        if (!autoUpdate) {
            history.replaceState(packedData, "", uri + '?' + packedData);
            $.ajax({
                type: "GET",
                url: uri,
                data: packedData + '&amp;filter=1',
                dataType: 'html',
                success: function (response) {
                    // $('.mg-filter-head .filter-preview span').hide();
                    // $('.mg-filter-head .filter-preview .loader-search').fadeIn();
                    // $('.mg-filter-head .filter-preview').show();
                    // $('.mg-filter-head .filter-preview').css('top', offset.top + 'px');

                    // $('.mg-filter-head .filter-preview').fadeOut();
                    var productContainer = $(response).find('.products-wrapper').html();
                    $('.products-wrapper').fadeOut();
                    if ($(response).find('.product-wrapper').length == 0) {
                        $('.products-wrapper').html('&lt;div class="mg-filter-empty"&gt;&lt;span&gt;' + locale.filterNone + '&lt;/span&gt;&lt;/div&gt;').fadeIn();
                    } else {
                        $('.products-wrapper').html(productContainer).fadeIn();
                    }

                    var filterForm = $(response).find('.filter-form').html();
                    $('.filter-form').fadeOut();
                    $('.filter-form').html(filterForm).fadeIn();
                    $('.apply-filter-form').html($(response).find('.apply-filter-form').html());
                    if ($('.apply-filter-form .apply-filter-item').length &gt; 0) {
                        $('.apply-filter-form').fadeIn();
                        $('.apply-filter-title').fadeIn();
                    } else {
                        $('.apply-filter-form').fadeOut();
                        $('.apply-filter-title').fadeOut();
                    }
                    mgInitFilter();
                    if (VIEW_ALL_FILTER == 1) {
                        $('.mg-viewfilter-all').hide();
                        $('.js-filter-item-toggle, .mg-filter-item').fadeIn();
                    }

                },
                complete: function () {
                    // РІС‹РїРѕР»РЅРµРЅРёРµ СЃС‚РµРєР° РѕС‚Р»РѕР¶РµРЅРЅС‹С… С„СѓРЅРєС†РёР№ РїРѕСЃР»Рµ AJAX РІС‹Р·РѕРІР°
                    if (AJAX_CALLBACK_FILTER) {
                        //debugger;
                        AJAX_CALLBACK_FILTER.forEach(function (element, index, arr) {
                            eval(element.callback).apply(this, element.param);
                        });

                    }

                    $('.variants-table').each(function () {
                        $(this).find('[type=radio]:eq(0)').click().trigger('change');
                    });

                    $('.color-block .color.active').click();
                }
            });
        } else {
            $.ajax({
                type: "GET",
                url: uri,
                data: packedData + '&amp;filter=1&amp;getcount=1',
                dataType: 'json',
                success: function (response) {
                    state = $('.mg-viewfilter-all').is(':visible');
                    if (response.htmlProp != 'false') {
                        if ($('.filterTmpDiv').html() == undefined) {
                            $('body').append('&lt;div class="filterTmpDiv" style="display:none;"&gt;&lt;/div&gt;');
                        }
                        $('.filterTmpDiv').html(response.htmlProp);
                        $('form[name=filter] .mg-filter:last').html($('.filterTmpDiv .mg-filter').html());
                        mgInitFilter();
                    }

                    if (!state) $('.mg-viewfilter-all').click();

                    // $('.mg-filter-head .filter-preview span').hide();
                    // $('.mg-filter-head .filter-preview .loader-search').fadeIn();
                    // $('.mg-filter-head .filter-preview').show();
                    // $('.mg-filter-head .filter-preview').css('top', offset.top + 'px');
                    var html = response.lang.product + ': ' + response.count + ' ' + response.lang.unit;
                    if (response.count &gt; 0) {
                        html += ' &lt;a href="' + uri + '?' + packedData + '&amp;filter=1"&gt;' + response.lang.show + '&lt;/a&gt;';
                    }

                    // $('.mg-filter-head .filter-preview .loader-search').fadeOut();
                    $('.mg-filter-head .filter-preview span').html(html).fadeIn();
                }
            });
        }
    }

    // РєР»РёРє РІРЅРµ Р±Р»РѕРєР° СЃ РєРѕР»РёС‡РµСЃС‚РІРѕРј РЅР°Р№РґРµРЅРЅС‹С… С‚РѕРІР°СЂРѕРІ
    $(document).mousedown(function (e) {
        var container = $('.mg-filter-head .filter-preview');
        if (container.has(e.target).length === 0) {
            container.hide();
        }
    });

    $(".price-slider-list input[type=text]").change(function () {
        if (isNaN(parseFloat($(this).val()))) {
            $(this).val('1');
        }
    });


    // СЃР±СЂРѕСЃ С„РёР»СЊС‚СЂРѕРІ (РёСЃРїРѕР»СЊР·СѓРµС‚СЃСЏ РІ РєР°С‚Р°Р»РѕРіРµ РІ С„РѕСЂРјРµ С„РёР»СЊС‚СЂРѕРІ)
    $('body').on('click', '.refreshFilter', function() {
        location.href = $(this).data('url');
    });


    //  РџСЂРёРјРµРЅС‘РЅРЅС‹Рµ С„РёР»СЊС‚СЂС‹
    var ajaxUpdate = !$('.apply-filter-form').data('print-res');

    if (!ajaxUpdate &amp;&amp; location.search.indexOf("applyFilter") &gt; 0) {
        var destination = $('form.apply-filter-form').offset().top;
        $('html, body').animate({scrollTop: destination}, 500);
    }

    $("body").on('click', 'a.removeFilter', function () {
        onRemoveAppliedFilterItem($(this));
    });

    function onRemoveAppliedFilterItem(object) {
        var parent = object.parents("li.apply-filter-item-value");
        if (!parent.html() || !parent.siblings().length) {
            parent = object.parents("li.apply-filter-item");
        }

        parent.remove();

        var packedData = $('form.apply-filter-form').serialize();

        if (ajaxUpdate) {
            // var pathName = $('form.apply-filter-form').attr('action');

            // if (location.origin) {
            //   var uri = location.origin + pathName;
            // } else {
            //   var uri = location.protocol + '//' + location.hostname + pathName;
            // }

            var uri = $('form.apply-filter-form').prop('action');
            history.replaceState(packedData, "", uri + '?' + packedData);
            $.ajax({
                type: "GET",
                url: uri,
                data: packedData + '&amp;filter=1',
                dataType: 'html',
                success: function (response) {
                    $('.mg-filter-head .filter-preview').fadeOut();
                    var productContainer = $(response).find('.products-wrapper').html();
                    $('.products-wrapper').fadeOut();
                    if ($(response).find('.product-wrapper').length == 0) {
                        $('.products-wrapper').html('&lt;div class="mg-filter-empty"&gt;&lt;span&gt;' + locale.filterNone + '&lt;/span&gt;&lt;/div&gt;').fadeIn();
                    } else {
                        $('.products-wrapper').html(productContainer).fadeIn();
                    }

                    var filterForm = $(response).find('.filter-form').html();
                    $('.filter-form').fadeOut();
                    $('.filter-form').html(filterForm).fadeIn();
                    mgInitFilter();
                },
                complete: function () {
                    // РІС‹РїРѕР»РЅРµРЅРёРµ СЃС‚РµРєР° РѕС‚Р»РѕР¶РµРЅРЅС‹С… С„СѓРЅРєС†РёР№ РїРѕСЃР»Рµ AJAX РІС‹Р·РѕРІР°
                    if (AJAX_CALLBACK_FILTER) {
                        //debugger;
                        AJAX_CALLBACK_FILTER.forEach(function (element, index, arr) {
                            eval(element.callback).apply(this, element.param);
                        });

                    }
                }
            });
        } else {
            $('form.apply-filter-form').submit();
        }
    }



});

 
// Polyfill for css vars
cssVars();

$(document).ready(function () {
    // add active link
    // ------------------------------------------------------------
    $('nav a').each(function () {
        var location = window.location.href;
        var link = this.href;
        if (location == link) {
            $(this).addClass('active');
        }
    });

    // plugin "slider-action"
    // ------------------------------------------------------------
    $(document).ready(function () {
        $('.m-p-slider-wrapper').addClass('show');
    });


    // plugin "product-slider"
    // ------------------------------------------------------------
    $(document).ready(function () {
        $('.mg-advise').addClass('mg-advise--active');
    });


    // agreement
    // ------------------------------------------------------------
    $('.l-body').on('change', '[type="checkbox"]', function () {
        if ($(this).prop('checked')) {
            $(this).closest('label').removeClass('nonactive').addClass('active');
        }
        else {
            $(this).closest('label').removeClass('active').addClass('nonactive');
        }
    });

    // op-field-check
    // ------------------------------------------------------------
    $('.l-body').on('change', '.op-field-check [type="radio"]', function () {
        $('.op-field-check [name='+$(this).attr('name')+']').closest('label').removeClass('active').addClass('nonactive');
        if ($(this).prop('checked')) {
           $(this).closest('label').removeClass('nonactive').addClass('active');
        }
        else{
            $(this).closest('label').removeClass('active').addClass('nonactive');
        }
    });

    // order
    // ------------------------------------------------------------
    $('.c-order__checkbox label').on('click', function () {
        if ($(this).children('[type="checkbox"]').is(':checked')) {
            $(this).removeClass('nonactive').addClass('active');
        } else {
            $(this).removeClass('active').addClass('nonactive');
        }
    });
    $('.c-order__radiobutton label, .order-storage label').on('click', function () {
        if ($(this).children('[type="radio"]').is(':checked')) {
            $(this).removeClass('nonactive').addClass('active');
            $(this).siblings('label').removeClass('active');
        }
    });

    //СЌРјСѓР»СЏС†РёСЏ СЂР°РґРёРѕРєРЅРѕРїРѕРє РІ С„РѕСЂРјРµ С…Р°СЂР°РєС‚РµСЂРёСЃС‚РёРє РїСЂРѕРґСѓРєС‚Р° (СЃС‚СЂР°РЅРёС†Р° С‚РѕРІР°СЂР°, РјРёРЅРёРєР°СЂС‚РѕС‡РєР°, РєРѕСЂР·РёРЅР°, СЃС‚СЂР°РЅРёС†Р° Р·Р°РєР°Р·Р°)
    var form = $('.js-product-form');
    $(form).on('change', '[type=radio]', function () {
        $(this).parents('p').find('input[type=radio]').prop('checked', false);
        $(this).prop('checked', true);
        $(this).parents('p').find('label').removeClass('active');
        if ($(this).parents('p').length) {
            $(this).parent().addClass('active');
        }
    });

    //СЌРјСѓР»СЏС†РёСЏ С‡РµРєР±РѕРєСЃРѕРІ РІ С„РѕСЂРјРµ С…Р°СЂР°РєС‚РµСЂРёСЃС‚РёРє РїСЂРѕРґСѓРєС‚Р° (СЃС‚СЂР°РЅРёС†Р° С‚РѕРІР°СЂР°, РјРёРЅРёРєР°СЂС‚РѕС‡РєР°, РєРѕСЂР·РёРЅР°, СЃС‚СЂР°РЅРёС†Р° Р·Р°РєР°Р·Р°)
    $(form).on('change', '[type=checkbox]', function () {
        $(this).parent().toggleClass('active');
    });

}); // end ready

$('input, textarea').each(function () {
    var $elem = $(this);
    if ($elem.attr('placeholder') &amp;&amp; !$elem[0].placeholder) {
        var $label = $('&lt;label class="placeholder"&gt;&lt;/label&gt;').text($elem.attr('placeholder'));
        $elem.before($label);
        $elem.blur();
        if ($elem.val() === '') {
            $label.addClass('visible');
        }
        $label.click(function () {
            $label.removeClass('visible');
            $elem.focus();
        });
        $elem.focus(function () {
            if ($elem.val() === '') {
                $label.removeClass('visible');
            }
        });
        $elem.blur(function () {
            if ($elem.val() === '') {
                $label.addClass('visible');
            }
        });
    }
});
</pre></body></html>