{"version":3,"file":"owl.min.js","sources":["vendor/owl.min.js"],"sourcesContent":["\"use strict\";\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/**\n * Owl Carousel v2.3.2\n * Copyright 2013-2018 David Deutsch\n * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE\n */\n/**\n * Owl carousel\n * @version 2.3.2\n * @author Bartosz Wojciechowski\n * @author David Deutsch\n * @license The MIT License (MIT)\n * @todo Lazy Load Icon\n * @todo prevent animationend bubling\n * @todo itemsScaleUp\n * @todo Test Zepto\n * @todo stagePadding calculate wrong active classes\n */\n;\n(function (jQuery, window, document, undefined) {\n /**\n * Creates a carousel.\n * @class The Owl Carousel.\n * @public\n * @param {HTMLElement|jQuery} element - The element to create the carousel for.\n * @param {Object} [options] - The options\n */\n function Owl(element, options) {\n /**\n * Current settings for the carousel.\n * @public\n */\n this.settings = null;\n\n /**\n * Current options set by the caller including defaults.\n * @public\n */\n this.options = jQuery.extend({}, Owl.Defaults, options);\n\n /**\n * Plugin element.\n * @public\n */\n this.jQueryelement = jQuery(element);\n\n /**\n * Proxied event handlers.\n * @protected\n */\n this._handlers = {};\n\n /**\n * References to the running plugins of this carousel.\n * @protected\n */\n this._plugins = {};\n\n /**\n * Currently suppressed events to prevent them from being retriggered.\n * @protected\n */\n this._supress = {};\n\n /**\n * Absolute current position.\n * @protected\n */\n this._current = null;\n\n /**\n * Animation speed in milliseconds.\n * @protected\n */\n this._speed = null;\n\n /**\n * Coordinates of all items in pixel.\n * @todo The name of this member is missleading.\n * @protected\n */\n this._coordinates = [];\n\n /**\n * Current breakpoint.\n * @todo Real media queries would be nice.\n * @protected\n */\n this._breakpoint = null;\n\n /**\n * Current width of the plugin element.\n */\n this._width = null;\n\n /**\n * All real items.\n * @protected\n */\n this._items = [];\n\n /**\n * All cloned items.\n * @protected\n */\n this._clones = [];\n\n /**\n * Merge values of all items.\n * @todo Maybe this could be part of a plugin.\n * @protected\n */\n this._mergers = [];\n\n /**\n * Widths of all items.\n */\n this._widths = [];\n\n /**\n * Invalidated parts within the update process.\n * @protected\n */\n this._invalidated = {};\n\n /**\n * Ordered list of workers for the update process.\n * @protected\n */\n this._pipe = [];\n\n /**\n * Current state information for the drag operation.\n * @todo #261\n * @protected\n */\n this._drag = {\n time: null,\n target: null,\n pointer: null,\n stage: {\n start: null,\n current: null\n },\n direction: null\n };\n\n /**\n * Current state information and their tags.\n * @type {Object}\n * @protected\n */\n this._states = {\n current: {},\n tags: {\n 'initializing': ['busy'],\n 'animating': ['busy'],\n 'dragging': ['interacting']\n }\n };\n jQuery.each(['onResize', 'onThrottledResize'], jQuery.proxy(function (i, handler) {\n this._handlers[handler] = jQuery.proxy(this[handler], this);\n }, this));\n jQuery.each(Owl.Plugins, jQuery.proxy(function (key, plugin) {\n this._plugins[key.charAt(0).toLowerCase() + key.slice(1)] = new plugin(this);\n }, this));\n jQuery.each(Owl.Workers, jQuery.proxy(function (priority, worker) {\n this._pipe.push({\n 'filter': worker.filter,\n 'run': jQuery.proxy(worker.run, this)\n });\n }, this));\n this.setup();\n this.initialize();\n }\n\n /**\n * Default options for the carousel.\n * @public\n */\n Owl.Defaults = {\n items: 3,\n loop: false,\n center: false,\n rewind: false,\n mouseDrag: true,\n touchDrag: true,\n pullDrag: true,\n freeDrag: false,\n margin: 0,\n stagePadding: 0,\n merge: false,\n mergeFit: true,\n autoWidth: false,\n startPosition: 0,\n rtl: false,\n smartSpeed: 250,\n fluidSpeed: false,\n dragEndSpeed: false,\n responsive: {},\n responsiveRefreshRate: 200,\n responsiveBaseElement: window,\n fallbackEasing: 'swing',\n info: false,\n nestedItemSelector: false,\n itemElement: 'div',\n stageElement: 'div',\n refreshClass: 'owl-refresh',\n loadedClass: 'owl-loaded',\n loadingClass: 'owl-loading',\n rtlClass: 'owl-rtl',\n responsiveClass: 'owl-responsive',\n dragClass: 'owl-drag',\n itemClass: 'owl-item',\n stageClass: 'owl-stage',\n stageOuterClass: 'owl-stage-outer',\n grabClass: 'owl-grab'\n };\n\n /**\n * Enumeration for width.\n * @public\n * @readonly\n * @enum {String}\n */\n Owl.Width = {\n Default: 'default',\n Inner: 'inner',\n Outer: 'outer'\n };\n\n /**\n * Enumeration for types.\n * @public\n * @readonly\n * @enum {String}\n */\n Owl.Type = {\n Event: 'event',\n State: 'state'\n };\n\n /**\n * Contains all registered plugins.\n * @public\n */\n Owl.Plugins = {};\n\n /**\n * List of workers involved in the update process.\n */\n Owl.Workers = [{\n filter: ['width', 'settings'],\n run: function run() {\n this._width = this.jQueryelement.width();\n }\n }, {\n filter: ['width', 'items', 'settings'],\n run: function run(cache) {\n cache.current = this._items && this._items[this.relative(this._current)];\n }\n }, {\n filter: ['items', 'settings'],\n run: function run() {\n this.jQuerystage.children('.cloned').remove();\n }\n }, {\n filter: ['width', 'items', 'settings'],\n run: function run(cache) {\n var margin = this.settings.margin || '',\n grid = !this.settings.autoWidth,\n rtl = this.settings.rtl,\n css = {\n 'width': 'auto',\n 'margin-left': rtl ? margin : '',\n 'margin-right': rtl ? '' : margin\n };\n !grid && this.jQuerystage.children().css(css);\n cache.css = css;\n }\n }, {\n filter: ['width', 'items', 'settings'],\n run: function run(cache) {\n var width = (this.width() / this.settings.items).toFixed(3) - this.settings.margin,\n merge = null,\n iterator = this._items.length,\n grid = !this.settings.autoWidth,\n widths = [];\n cache.items = {\n merge: false,\n width: width\n };\n while (iterator--) {\n merge = this._mergers[iterator];\n merge = this.settings.mergeFit && Math.min(merge, this.settings.items) || merge;\n cache.items.merge = merge > 1 || cache.items.merge;\n widths[iterator] = !grid ? this._items[iterator].width() : width * merge;\n }\n this._widths = widths;\n }\n }, {\n filter: ['items', 'settings'],\n run: function run() {\n var clones = [],\n items = this._items,\n settings = this.settings,\n // TODO: Should be computed from number of min width items in stage\n view = Math.max(settings.items * 2, 4),\n size = Math.ceil(items.length / 2) * 2,\n repeat = settings.loop && items.length ? settings.rewind ? view : Math.max(view, size) : 0,\n append = '',\n prepend = '';\n repeat /= 2;\n while (repeat > 0) {\n // Switch to only using appended clones\n clones.push(this.normalize(clones.length / 2, true));\n append = append + items[clones[clones.length - 1]][0].outerHTML;\n clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true));\n prepend = items[clones[clones.length - 1]][0].outerHTML + prepend;\n repeat -= 1;\n }\n this._clones = clones;\n jQuery(append).addClass('cloned').appendTo(this.jQuerystage);\n jQuery(prepend).addClass('cloned').prependTo(this.jQuerystage);\n }\n }, {\n filter: ['width', 'items', 'settings'],\n run: function run() {\n var rtl = this.settings.rtl ? 1 : -1,\n size = this._clones.length + this._items.length,\n iterator = -1,\n previous = 0,\n current = 0,\n coordinates = [];\n while (++iterator < size) {\n previous = coordinates[iterator - 1] || 0;\n current = this._widths[this.relative(iterator)] + this.settings.margin;\n coordinates.push(previous + current * rtl);\n }\n this._coordinates = coordinates;\n }\n }, {\n filter: ['width', 'items', 'settings'],\n run: function run() {\n var padding = this.settings.stagePadding,\n coordinates = this._coordinates,\n css = {\n 'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2,\n 'padding-left': padding || '',\n 'padding-right': padding || ''\n };\n this.jQuerystage.css(css);\n }\n }, {\n filter: ['width', 'items', 'settings'],\n run: function run(cache) {\n var iterator = this._coordinates.length,\n grid = !this.settings.autoWidth,\n items = this.jQuerystage.children();\n if (grid && cache.items.merge) {\n while (iterator--) {\n cache.css.width = this._widths[this.relative(iterator)];\n items.eq(iterator).css(cache.css);\n }\n } else if (grid) {\n cache.css.width = cache.items.width;\n items.css(cache.css);\n }\n }\n }, {\n filter: ['items'],\n run: function run() {\n this._coordinates.length < 1 && this.jQuerystage.removeAttr('style');\n }\n }, {\n filter: ['width', 'items', 'settings'],\n run: function run(cache) {\n cache.current = cache.current ? this.jQuerystage.children().index(cache.current) : 0;\n cache.current = Math.max(this.minimum(), Math.min(this.maximum(), cache.current));\n this.reset(cache.current);\n }\n }, {\n filter: ['position'],\n run: function run() {\n this.animate(this.coordinates(this._current));\n }\n }, {\n filter: ['width', 'position', 'items', 'settings'],\n run: function run() {\n var rtl = this.settings.rtl ? 1 : -1,\n padding = this.settings.stagePadding * 2,\n begin = this.coordinates(this.current()) + padding,\n end = begin + this.width() * rtl,\n inner,\n outer,\n matches = [],\n i,\n n;\n for (i = 0, n = this._coordinates.length; i < n; i++) {\n inner = this._coordinates[i - 1] || 0;\n outer = Math.abs(this._coordinates[i]) + padding * rtl;\n if (this.op(inner, '<=', begin) && this.op(inner, '>', end) || this.op(outer, '<', begin) && this.op(outer, '>', end)) {\n matches.push(i);\n }\n }\n this.jQuerystage.children('.active').removeClass('active');\n this.jQuerystage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active');\n this.jQuerystage.children('.center').removeClass('center');\n if (this.settings.center) {\n this.jQuerystage.children().eq(this.current()).addClass('center');\n }\n }\n }];\n\n /**\n * Create the stage DOM element\n */\n Owl.prototype.initializeStage = function () {\n this.jQuerystage = this.jQueryelement.find('.' + this.settings.stageClass);\n\n // if the stage is already in the DOM, grab it and skip stage initialization\n if (this.jQuerystage.length) {\n return;\n }\n this.jQueryelement.addClass(this.options.loadingClass);\n\n // create stage\n this.jQuerystage = jQuery('<' + this.settings.stageElement + ' class=\"' + this.settings.stageClass + '\"/>').wrap('
');\n\n // append stage\n this.jQueryelement.append(this.jQuerystage.parent());\n };\n\n /**\n * Create item DOM elements\n */\n Owl.prototype.initializeItems = function () {\n var jQueryitems = this.jQueryelement.find('.owl-item');\n\n // if the items are already in the DOM, grab them and skip item initialization\n if (jQueryitems.length) {\n this._items = jQueryitems.get().map(function (item) {\n return jQuery(item);\n });\n this._mergers = this._items.map(function () {\n return 1;\n });\n this.refresh();\n return;\n }\n\n // append content\n this.replace(this.jQueryelement.children().not(this.jQuerystage.parent()));\n\n // check visibility\n if (this.isVisible()) {\n // update view\n this.refresh();\n } else {\n // invalidate width\n this.invalidate('width');\n }\n this.jQueryelement.removeClass(this.options.loadingClass).addClass(this.options.loadedClass);\n };\n\n /**\n * Initializes the carousel.\n * @protected\n */\n Owl.prototype.initialize = function () {\n this.enter('initializing');\n this.trigger('initialize');\n this.jQueryelement.toggleClass(this.settings.rtlClass, this.settings.rtl);\n if (this.settings.autoWidth && !this.is('pre-loading')) {\n var imgs, nestedSelector, width;\n imgs = this.jQueryelement.find('img');\n nestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined;\n width = this.jQueryelement.children(nestedSelector).width();\n if (imgs.length && width <= 0) {\n this.preloadAutoWidthImages(imgs);\n }\n }\n this.initializeStage();\n this.initializeItems();\n\n // register event handlers\n this.registerEventHandlers();\n this.leave('initializing');\n this.trigger('initialized');\n };\n\n /**\n * @returns {Boolean} visibility of jQueryelement\n * if you know the carousel will always be visible you can set `checkVisibility` to `false` to\n * prevent the expensive browser layout forced reflow the jQueryelement.is(':visible') does\n */\n Owl.prototype.isVisible = function () {\n return this.settings.checkVisibility ? this.jQueryelement.is(':visible') : true;\n };\n\n /**\n * Setups the current settings.\n * @todo Remove responsive classes. Why should adaptive designs be brought into IE8?\n * @todo Support for media queries by using `matchMedia` would be nice.\n * @public\n */\n Owl.prototype.setup = function () {\n var viewport = this.viewport(),\n overwrites = this.options.responsive,\n match = -1,\n settings = null;\n if (!overwrites) {\n settings = jQuery.extend({}, this.options);\n } else {\n jQuery.each(overwrites, function (breakpoint) {\n if (breakpoint <= viewport && breakpoint > match) {\n match = Number(breakpoint);\n }\n });\n settings = jQuery.extend({}, this.options, overwrites[match]);\n if (typeof settings.stagePadding === 'function') {\n settings.stagePadding = settings.stagePadding();\n }\n delete settings.responsive;\n\n // responsive class\n if (settings.responsiveClass) {\n this.jQueryelement.attr('class', this.jQueryelement.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\\\S+\\\\s', 'g'), 'jQuery1' + match));\n }\n }\n this.trigger('change', {\n property: {\n name: 'settings',\n value: settings\n }\n });\n this._breakpoint = match;\n this.settings = settings;\n this.invalidate('settings');\n this.trigger('changed', {\n property: {\n name: 'settings',\n value: this.settings\n }\n });\n };\n\n /**\n * Updates option logic if necessery.\n * @protected\n */\n Owl.prototype.optionsLogic = function () {\n if (this.settings.autoWidth) {\n this.settings.stagePadding = false;\n this.settings.merge = false;\n }\n };\n\n /**\n * Prepares an item before add.\n * @todo Rename event parameter `content` to `item`.\n * @protected\n * @returns {jQuery|HTMLElement} - The item container.\n */\n Owl.prototype.prepare = function (item) {\n var event = this.trigger('prepare', {\n content: item\n });\n if (!event.data) {\n event.data = jQuery('<' + this.settings.itemElement + '/>').addClass(this.options.itemClass).append(item);\n }\n this.trigger('prepared', {\n content: event.data\n });\n return event.data;\n };\n\n /**\n * Updates the view.\n * @public\n */\n Owl.prototype.update = function () {\n var i = 0,\n n = this._pipe.length,\n filter = jQuery.proxy(function (p) {\n return this[p];\n }, this._invalidated),\n cache = {};\n while (i < n) {\n if (this._invalidated.all || jQuery.grep(this._pipe[i].filter, filter).length > 0) {\n this._pipe[i].run(cache);\n }\n i++;\n }\n this._invalidated = {};\n !this.is('valid') && this.enter('valid');\n };\n\n /**\n * Gets the width of the view.\n * @public\n * @param {Owl.Width} [dimension=Owl.Width.Default] - The dimension to return.\n * @returns {Number} - The width of the view in pixel.\n */\n Owl.prototype.width = function (dimension) {\n dimension = dimension || Owl.Width.Default;\n switch (dimension) {\n case Owl.Width.Inner:\n case Owl.Width.Outer:\n return this._width;\n default:\n return this._width - this.settings.stagePadding * 2 + this.settings.margin;\n }\n };\n\n /**\n * Refreshes the carousel primarily for adaptive purposes.\n * @public\n */\n Owl.prototype.refresh = function () {\n this.enter('refreshing');\n this.trigger('refresh');\n this.setup();\n this.optionsLogic();\n this.jQueryelement.addClass(this.options.refreshClass);\n this.update();\n this.jQueryelement.removeClass(this.options.refreshClass);\n this.leave('refreshing');\n this.trigger('refreshed');\n };\n\n /**\n * Checks window `resize` event.\n * @protected\n */\n Owl.prototype.onThrottledResize = function () {\n window.clearTimeout(this.resizeTimer);\n this.resizeTimer = window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate);\n };\n\n /**\n * Checks window `resize` event.\n * @protected\n */\n Owl.prototype.onResize = function () {\n if (!this._items.length) {\n return false;\n }\n if (this._width === this.jQueryelement.width()) {\n return false;\n }\n if (!this.isVisible()) {\n return false;\n }\n this.enter('resizing');\n if (this.trigger('resize').isDefaultPrevented()) {\n this.leave('resizing');\n return false;\n }\n this.invalidate('width');\n this.refresh();\n this.leave('resizing');\n this.trigger('resized');\n };\n\n /**\n * Registers event handlers.\n * @todo Check `msPointerEnabled`\n * @todo #261\n * @protected\n */\n Owl.prototype.registerEventHandlers = function () {\n if (jQuery.support.transition) {\n this.jQuerystage.on(jQuery.support.transition.end + '.owl.core', jQuery.proxy(this.onTransitionEnd, this));\n }\n if (this.settings.responsive !== false) {\n this.on(window, 'resize', this._handlers.onThrottledResize);\n }\n if (this.settings.mouseDrag) {\n this.jQueryelement.addClass(this.options.dragClass);\n this.jQuerystage.on('mousedown.owl.core', jQuery.proxy(this.onDragStart, this));\n this.jQuerystage.on('dragstart.owl.core selectstart.owl.core', function () {\n return false;\n });\n }\n if (this.settings.touchDrag) {\n this.jQuerystage.on('touchstart.owl.core', jQuery.proxy(this.onDragStart, this));\n this.jQuerystage.on('touchcancel.owl.core', jQuery.proxy(this.onDragEnd, this));\n }\n };\n\n /**\n * Handles `touchstart` and `mousedown` events.\n * @todo Horizontal swipe threshold as option\n * @todo #261\n * @protected\n * @param {Event} event - The event arguments.\n */\n Owl.prototype.onDragStart = function (event) {\n var stage = null;\n if (event.which === 3) {\n return;\n }\n if (jQuery.support.transform) {\n stage = this.jQuerystage.css('transform').replace(/.*\\(|\\)| /g, '').split(',');\n stage = {\n x: stage[stage.length === 16 ? 12 : 4],\n y: stage[stage.length === 16 ? 13 : 5]\n };\n } else {\n stage = this.jQuerystage.position();\n stage = {\n x: this.settings.rtl ? stage.left + this.jQuerystage.width() - this.width() + this.settings.margin : stage.left,\n y: stage.top\n };\n }\n if (this.is('animating')) {\n jQuery.support.transform ? this.animate(stage.x) : this.jQuerystage.stop();\n this.invalidate('position');\n }\n this.jQueryelement.toggleClass(this.options.grabClass, event.type === 'mousedown');\n this.speed(0);\n this._drag.time = new Date().getTime();\n this._drag.target = jQuery(event.target);\n this._drag.stage.start = stage;\n this._drag.stage.current = stage;\n this._drag.pointer = this.pointer(event);\n jQuery(document).on('mouseup.owl.core touchend.owl.core', jQuery.proxy(this.onDragEnd, this));\n jQuery(document).one('mousemove.owl.core touchmove.owl.core', jQuery.proxy(function (event) {\n var delta = this.difference(this._drag.pointer, this.pointer(event));\n jQuery(document).on('mousemove.owl.core touchmove.owl.core', jQuery.proxy(this.onDragMove, this));\n if (Math.abs(delta.x) < Math.abs(delta.y) && this.is('valid')) {\n return;\n }\n event.preventDefault();\n this.enter('dragging');\n this.trigger('drag');\n }, this));\n };\n\n /**\n * Handles the `touchmove` and `mousemove` events.\n * @todo #261\n * @protected\n * @param {Event} event - The event arguments.\n */\n Owl.prototype.onDragMove = function (event) {\n var minimum = null,\n maximum = null,\n pull = null,\n delta = this.difference(this._drag.pointer, this.pointer(event)),\n stage = this.difference(this._drag.stage.start, delta);\n if (!this.is('dragging')) {\n return;\n }\n event.preventDefault();\n if (this.settings.loop) {\n minimum = this.coordinates(this.minimum());\n maximum = this.coordinates(this.maximum() + 1) - minimum;\n stage.x = ((stage.x - minimum) % maximum + maximum) % maximum + minimum;\n } else {\n minimum = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum());\n maximum = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum());\n pull = this.settings.pullDrag ? -1 * delta.x / 5 : 0;\n stage.x = Math.max(Math.min(stage.x, minimum + pull), maximum + pull);\n }\n this._drag.stage.current = stage;\n this.animate(stage.x);\n };\n\n /**\n * Handles the `touchend` and `mouseup` events.\n * @todo #261\n * @todo Threshold for click event\n * @protected\n * @param {Event} event - The event arguments.\n */\n Owl.prototype.onDragEnd = function (event) {\n var delta = this.difference(this._drag.pointer, this.pointer(event)),\n stage = this._drag.stage.current,\n direction = delta.x > 0 ^ this.settings.rtl ? 'left' : 'right';\n jQuery(document).off('.owl.core');\n this.jQueryelement.removeClass(this.options.grabClass);\n if (delta.x !== 0 && this.is('dragging') || !this.is('valid')) {\n this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed);\n this.current(this.closest(stage.x, delta.x !== 0 ? direction : this._drag.direction));\n this.invalidate('position');\n this.update();\n this._drag.direction = direction;\n if (Math.abs(delta.x) > 3 || new Date().getTime() - this._drag.time > 300) {\n this._drag.target.one('click.owl.core', function () {\n return false;\n });\n }\n }\n if (!this.is('dragging')) {\n return;\n }\n this.leave('dragging');\n this.trigger('dragged');\n };\n\n /**\n * Gets absolute position of the closest item for a coordinate.\n * @todo Setting `freeDrag` makes `closest` not reusable. See #165.\n * @protected\n * @param {Number} coordinate - The coordinate in pixel.\n * @param {String} direction - The direction to check for the closest item. Ether `left` or `right`.\n * @return {Number} - The absolute position of the closest item.\n */\n Owl.prototype.closest = function (coordinate, direction) {\n var position = -1,\n pull = 30,\n width = this.width(),\n coordinates = this.coordinates();\n if (!this.settings.freeDrag) {\n // check closest item\n jQuery.each(coordinates, jQuery.proxy(function (index, value) {\n // on a left pull, check on current index\n if (direction === 'left' && coordinate > value - pull && coordinate < value + pull) {\n position = index;\n // on a right pull, check on previous index\n // to do so, subtract width from value and set position = index + 1\n } else if (direction === 'right' && coordinate > value - width - pull && coordinate < value - width + pull) {\n position = index + 1;\n } else if (this.op(coordinate, '<', value) && this.op(coordinate, '>', coordinates[index + 1] !== undefined ? coordinates[index + 1] : value - width)) {\n position = direction === 'left' ? index + 1 : index;\n }\n return position === -1;\n }, this));\n }\n if (!this.settings.loop) {\n // non loop boundries\n if (this.op(coordinate, '>', coordinates[this.minimum()])) {\n position = coordinate = this.minimum();\n } else if (this.op(coordinate, '<', coordinates[this.maximum()])) {\n position = coordinate = this.maximum();\n }\n }\n return position;\n };\n\n /**\n * Animates the stage.\n * @todo #270\n * @public\n * @param {Number} coordinate - The coordinate in pixels.\n */\n Owl.prototype.animate = function (coordinate) {\n var animate = this.speed() > 0;\n this.is('animating') && this.onTransitionEnd();\n if (animate) {\n this.enter('animating');\n this.trigger('translate');\n }\n if (jQuery.support.transform3d && jQuery.support.transition) {\n this.jQuerystage.css({\n transform: 'translate3d(' + coordinate + 'px,0px,0px)',\n transition: this.speed() / 1000 + 's'\n });\n } else if (animate) {\n this.jQuerystage.animate({\n left: coordinate + 'px'\n }, this.speed(), this.settings.fallbackEasing, jQuery.proxy(this.onTransitionEnd, this));\n } else {\n this.jQuerystage.css({\n left: coordinate + 'px'\n });\n }\n };\n\n /**\n * Checks whether the carousel is in a specific state or not.\n * @param {String} state - The state to check.\n * @returns {Boolean} - The flag which indicates if the carousel is busy.\n */\n Owl.prototype.is = function (state) {\n return this._states.current[state] && this._states.current[state] > 0;\n };\n\n /**\n * Sets the absolute position of the current item.\n * @public\n * @param {Number} [position] - The new absolute position or nothing to leave it unchanged.\n * @returns {Number} - The absolute position of the current item.\n */\n Owl.prototype.current = function (position) {\n if (position === undefined) {\n return this._current;\n }\n if (this._items.length === 0) {\n return undefined;\n }\n position = this.normalize(position);\n if (this._current !== position) {\n var event = this.trigger('change', {\n property: {\n name: 'position',\n value: position\n }\n });\n if (event.data !== undefined) {\n position = this.normalize(event.data);\n }\n this._current = position;\n this.invalidate('position');\n this.trigger('changed', {\n property: {\n name: 'position',\n value: this._current\n }\n });\n }\n return this._current;\n };\n\n /**\n * Invalidates the given part of the update routine.\n * @param {String} [part] - The part to invalidate.\n * @returns {Array.} - The invalidated parts.\n */\n Owl.prototype.invalidate = function (part) {\n if (jQuery.type(part) === 'string') {\n this._invalidated[part] = true;\n this.is('valid') && this.leave('valid');\n }\n return jQuery.map(this._invalidated, function (v, i) {\n return i;\n });\n };\n\n /**\n * Resets the absolute position of the current item.\n * @public\n * @param {Number} position - The absolute position of the new item.\n */\n Owl.prototype.reset = function (position) {\n position = this.normalize(position);\n if (position === undefined) {\n return;\n }\n this._speed = 0;\n this._current = position;\n this.suppress(['translate', 'translated']);\n this.animate(this.coordinates(position));\n this.release(['translate', 'translated']);\n };\n\n /**\n * Normalizes an absolute or a relative position of an item.\n * @public\n * @param {Number} position - The absolute or relative position to normalize.\n * @param {Boolean} [relative=false] - Whether the given position is relative or not.\n * @returns {Number} - The normalized position.\n */\n Owl.prototype.normalize = function (position, relative) {\n var n = this._items.length,\n m = relative ? 0 : this._clones.length;\n if (!this.isNumeric(position) || n < 1) {\n position = undefined;\n } else if (position < 0 || position >= n + m) {\n position = ((position - m / 2) % n + n) % n + m / 2;\n }\n return position;\n };\n\n /**\n * Converts an absolute position of an item into a relative one.\n * @public\n * @param {Number} position - The absolute position to convert.\n * @returns {Number} - The converted position.\n */\n Owl.prototype.relative = function (position) {\n position -= this._clones.length / 2;\n return this.normalize(position, true);\n };\n\n /**\n * Gets the maximum position for the current item.\n * @public\n * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.\n * @returns {Number}\n */\n Owl.prototype.maximum = function (relative) {\n var settings = this.settings,\n maximum = this._coordinates.length,\n iterator,\n reciprocalItemsWidth,\n elementWidth;\n if (settings.loop) {\n maximum = this._clones.length / 2 + this._items.length - 1;\n } else if (settings.autoWidth || settings.merge) {\n iterator = this._items.length;\n if (iterator) {\n reciprocalItemsWidth = this._items[--iterator].width();\n elementWidth = this.jQueryelement.width();\n while (iterator--) {\n reciprocalItemsWidth += this._items[iterator].width() + this.settings.margin;\n if (reciprocalItemsWidth > elementWidth) {\n break;\n }\n }\n }\n maximum = iterator + 1;\n } else if (settings.center) {\n maximum = this._items.length - 1;\n } else {\n maximum = this._items.length - settings.items;\n }\n if (relative) {\n maximum -= this._clones.length / 2;\n }\n return Math.max(maximum, 0);\n };\n\n /**\n * Gets the minimum position for the current item.\n * @public\n * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.\n * @returns {Number}\n */\n Owl.prototype.minimum = function (relative) {\n return relative ? 0 : this._clones.length / 2;\n };\n\n /**\n * Gets an item at the specified relative position.\n * @public\n * @param {Number} [position] - The relative position of the item.\n * @return {jQuery|Array.} - The item at the given position or all items if no position was given.\n */\n Owl.prototype.items = function (position) {\n if (position === undefined) {\n return this._items.slice();\n }\n position = this.normalize(position, true);\n return this._items[position];\n };\n\n /**\n * Gets an item at the specified relative position.\n * @public\n * @param {Number} [position] - The relative position of the item.\n * @return {jQuery|Array.} - The item at the given position or all items if no position was given.\n */\n Owl.prototype.mergers = function (position) {\n if (position === undefined) {\n return this._mergers.slice();\n }\n position = this.normalize(position, true);\n return this._mergers[position];\n };\n\n /**\n * Gets the absolute positions of clones for an item.\n * @public\n * @param {Number} [position] - The relative position of the item.\n * @returns {Array.} - The absolute positions of clones for the item or all if no position was given.\n */\n Owl.prototype.clones = function (position) {\n var odd = this._clones.length / 2,\n even = odd + this._items.length,\n map = function map(index) {\n return index % 2 === 0 ? even + index / 2 : odd - (index + 1) / 2;\n };\n if (position === undefined) {\n return jQuery.map(this._clones, function (v, i) {\n return map(i);\n });\n }\n return jQuery.map(this._clones, function (v, i) {\n return v === position ? map(i) : null;\n });\n };\n\n /**\n * Sets the current animation speed.\n * @public\n * @param {Number} [speed] - The animation speed in milliseconds or nothing to leave it unchanged.\n * @returns {Number} - The current animation speed in milliseconds.\n */\n Owl.prototype.speed = function (speed) {\n if (speed !== undefined) {\n this._speed = speed;\n }\n return this._speed;\n };\n\n /**\n * Gets the coordinate of an item.\n * @todo The name of this method is missleanding.\n * @public\n * @param {Number} position - The absolute position of the item within `minimum()` and `maximum()`.\n * @returns {Number|Array.} - The coordinate of the item in pixel or all coordinates.\n */\n Owl.prototype.coordinates = function (position) {\n var multiplier = 1,\n newPosition = position - 1,\n coordinate;\n if (position === undefined) {\n return jQuery.map(this._coordinates, jQuery.proxy(function (coordinate, index) {\n return this.coordinates(index);\n }, this));\n }\n if (this.settings.center) {\n if (this.settings.rtl) {\n multiplier = -1;\n newPosition = position + 1;\n }\n coordinate = this._coordinates[position];\n coordinate += (this.width() - coordinate + (this._coordinates[newPosition] || 0)) / 2 * multiplier;\n } else {\n coordinate = this._coordinates[newPosition] || 0;\n }\n coordinate = Math.ceil(coordinate);\n return coordinate;\n };\n\n /**\n * Calculates the speed for a translation.\n * @protected\n * @param {Number} from - The absolute position of the start item.\n * @param {Number} to - The absolute position of the target item.\n * @param {Number} [factor=undefined] - The time factor in milliseconds.\n * @returns {Number} - The time in milliseconds for the translation.\n */\n Owl.prototype.duration = function (from, to, factor) {\n if (factor === 0) {\n return 0;\n }\n return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs(factor || this.settings.smartSpeed);\n };\n\n /**\n * Slides to the specified item.\n * @public\n * @param {Number} position - The position of the item.\n * @param {Number} [speed] - The time in milliseconds for the transition.\n */\n Owl.prototype.to = function (position, speed) {\n var current = this.current(),\n revert = null,\n distance = position - this.relative(current),\n direction = (distance > 0) - (distance < 0),\n items = this._items.length,\n minimum = this.minimum(),\n maximum = this.maximum();\n if (this.settings.loop) {\n if (!this.settings.rewind && Math.abs(distance) > items / 2) {\n distance += direction * -1 * items;\n }\n position = current + distance;\n revert = ((position - minimum) % items + items) % items + minimum;\n if (revert !== position && revert - distance <= maximum && revert - distance > 0) {\n current = revert - distance;\n position = revert;\n this.reset(current);\n }\n } else if (this.settings.rewind) {\n maximum += 1;\n position = (position % maximum + maximum) % maximum;\n } else {\n position = Math.max(minimum, Math.min(maximum, position));\n }\n this.speed(this.duration(current, position, speed));\n this.current(position);\n if (this.isVisible()) {\n this.update();\n }\n };\n\n /**\n * Slides to the next item.\n * @public\n * @param {Number} [speed] - The time in milliseconds for the transition.\n */\n Owl.prototype.next = function (speed) {\n speed = speed || false;\n this.to(this.relative(this.current()) + 1, speed);\n };\n\n /**\n * Slides to the previous item.\n * @public\n * @param {Number} [speed] - The time in milliseconds for the transition.\n */\n Owl.prototype.prev = function (speed) {\n speed = speed || false;\n this.to(this.relative(this.current()) - 1, speed);\n };\n\n /**\n * Handles the end of an animation.\n * @protected\n * @param {Event} event - The event arguments.\n */\n Owl.prototype.onTransitionEnd = function (event) {\n // if css2 animation then event object is undefined\n if (event !== undefined) {\n event.stopPropagation();\n\n // Catch only owl-stage transitionEnd event\n if ((event.target || event.srcElement || event.originalTarget) !== this.jQuerystage.get(0)) {\n return false;\n }\n }\n this.leave('animating');\n this.trigger('translated');\n };\n\n /**\n * Gets viewport width.\n * @protected\n * @return {Number} - The width in pixel.\n */\n Owl.prototype.viewport = function () {\n var width;\n if (this.options.responsiveBaseElement !== window) {\n width = jQuery(this.options.responsiveBaseElement).width();\n } else if (window.innerWidth) {\n width = window.innerWidth;\n } else if (document.documentElement && document.documentElement.clientWidth) {\n width = document.documentElement.clientWidth;\n } else {\n console.warn('Can not detect viewport width.');\n }\n return width;\n };\n\n /**\n * Replaces the current content.\n * @public\n * @param {HTMLElement|jQuery|String} content - The new content.\n */\n Owl.prototype.replace = function (content) {\n this.jQuerystage.empty();\n this._items = [];\n if (content) {\n content = content instanceof jQuery ? content : jQuery(content);\n }\n if (this.settings.nestedItemSelector) {\n content = content.find('.' + this.settings.nestedItemSelector);\n }\n content.filter(function () {\n return this.nodeType === 1;\n }).each(jQuery.proxy(function (index, item) {\n item = this.prepare(item);\n this.jQuerystage.append(item);\n this._items.push(item);\n this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);\n }, this));\n this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0);\n this.invalidate('items');\n };\n\n /**\n * Adds an item.\n * @todo Use `item` instead of `content` for the event arguments.\n * @public\n * @param {HTMLElement|jQuery|String} content - The item content to add.\n * @param {Number} [position] - The relative position at which to insert the item otherwise the item will be added to the end.\n */\n Owl.prototype.add = function (content, position) {\n var current = this.relative(this._current);\n position = position === undefined ? this._items.length : this.normalize(position, true);\n content = content instanceof jQuery ? content : jQuery(content);\n this.trigger('add', {\n content: content,\n position: position\n });\n content = this.prepare(content);\n if (this._items.length === 0 || position === this._items.length) {\n this._items.length === 0 && this.jQuerystage.append(content);\n this._items.length !== 0 && this._items[position - 1].after(content);\n this._items.push(content);\n this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);\n } else {\n this._items[position].before(content);\n this._items.splice(position, 0, content);\n this._mergers.splice(position, 0, content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);\n }\n this._items[current] && this.reset(this._items[current].index());\n this.invalidate('items');\n this.trigger('added', {\n content: content,\n position: position\n });\n };\n\n /**\n * Removes an item by its position.\n * @todo Use `item` instead of `content` for the event arguments.\n * @public\n * @param {Number} position - The relative position of the item to remove.\n */\n Owl.prototype.remove = function (position) {\n position = this.normalize(position, true);\n if (position === undefined) {\n return;\n }\n this.trigger('remove', {\n content: this._items[position],\n position: position\n });\n this._items[position].remove();\n this._items.splice(position, 1);\n this._mergers.splice(position, 1);\n this.invalidate('items');\n this.trigger('removed', {\n content: null,\n position: position\n });\n };\n\n /**\n * Preloads images with auto width.\n * @todo Replace by a more generic approach\n * @protected\n */\n Owl.prototype.preloadAutoWidthImages = function (images) {\n images.each(jQuery.proxy(function (i, element) {\n this.enter('pre-loading');\n element = jQuery(element);\n jQuery(new Image()).one('load', jQuery.proxy(function (e) {\n element.attr('src', e.target.src);\n element.css('opacity', 1);\n this.leave('pre-loading');\n !this.is('pre-loading') && !this.is('initializing') && this.refresh();\n }, this)).attr('src', element.attr('src') || element.attr('data-src') || element.attr('data-src-retina'));\n }, this));\n };\n\n /**\n * Destroys the carousel.\n * @public\n */\n Owl.prototype.destroy = function () {\n this.jQueryelement.off('.owl.core');\n this.jQuerystage.off('.owl.core');\n jQuery(document).off('.owl.core');\n if (this.settings.responsive !== false) {\n window.clearTimeout(this.resizeTimer);\n this.off(window, 'resize', this._handlers.onThrottledResize);\n }\n for (var i in this._plugins) {\n this._plugins[i].destroy();\n }\n this.jQuerystage.children('.cloned').remove();\n this.jQuerystage.unwrap();\n this.jQuerystage.children().contents().unwrap();\n this.jQuerystage.children().unwrap();\n this.jQuerystage.remove();\n this.jQueryelement.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.jQueryelement.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\\\S+\\\\s', 'g'), '')).removeData('owl.carousel');\n };\n\n /**\n * Operators to calculate right-to-left and left-to-right.\n * @protected\n * @param {Number} [a] - The left side operand.\n * @param {String} [o] - The operator.\n * @param {Number} [b] - The right side operand.\n */\n Owl.prototype.op = function (a, o, b) {\n var rtl = this.settings.rtl;\n switch (o) {\n case '<':\n return rtl ? a > b : a < b;\n case '>':\n return rtl ? a < b : a > b;\n case '>=':\n return rtl ? a <= b : a >= b;\n case '<=':\n return rtl ? a >= b : a <= b;\n default:\n break;\n }\n };\n\n /**\n * Attaches to an internal event.\n * @protected\n * @param {HTMLElement} element - The event source.\n * @param {String} event - The event name.\n * @param {Function} listener - The event handler to attach.\n * @param {Boolean} capture - Wether the event should be handled at the capturing phase or not.\n */\n Owl.prototype.on = function (element, event, listener, capture) {\n if (element.addEventListener) {\n element.addEventListener(event, listener, capture);\n } else if (element.attachEvent) {\n element.attachEvent('on' + event, listener);\n }\n };\n\n /**\n * Detaches from an internal event.\n * @protected\n * @param {HTMLElement} element - The event source.\n * @param {String} event - The event name.\n * @param {Function} listener - The attached event handler to detach.\n * @param {Boolean} capture - Wether the attached event handler was registered as a capturing listener or not.\n */\n Owl.prototype.off = function (element, event, listener, capture) {\n if (element.removeEventListener) {\n element.removeEventListener(event, listener, capture);\n } else if (element.detachEvent) {\n element.detachEvent('on' + event, listener);\n }\n };\n\n /**\n * Triggers a public event.\n * @todo Remove `status`, `relatedTarget` should be used instead.\n * @protected\n * @param {String} name - The event name.\n * @param {*} [data=null] - The event data.\n * @param {String} [namespace=carousel] - The event namespace.\n * @param {String} [state] - The state which is associated with the event.\n * @param {Boolean} [enter=false] - Indicates if the call enters the specified state or not.\n * @returns {Event} - The event arguments.\n */\n Owl.prototype.trigger = function (name, data, namespace, state, enter) {\n var status = {\n item: {\n count: this._items.length,\n index: this.current()\n }\n },\n handler = jQuery.camelCase(jQuery.grep(['on', name, namespace], function (v) {\n return v;\n }).join('-').toLowerCase()),\n event = jQuery.Event([name, 'owl', namespace || 'carousel'].join('.').toLowerCase(), jQuery.extend({\n relatedTarget: this\n }, status, data));\n if (!this._supress[name]) {\n jQuery.each(this._plugins, function (name, plugin) {\n if (plugin.onTrigger) {\n plugin.onTrigger(event);\n }\n });\n this.register({\n type: Owl.Type.Event,\n name: name\n });\n this.jQueryelement.trigger(event);\n if (this.settings && typeof this.settings[handler] === 'function') {\n this.settings[handler].call(this, event);\n }\n }\n return event;\n };\n\n /**\n * Enters a state.\n * @param name - The state name.\n */\n Owl.prototype.enter = function (name) {\n jQuery.each([name].concat(this._states.tags[name] || []), jQuery.proxy(function (i, name) {\n if (this._states.current[name] === undefined) {\n this._states.current[name] = 0;\n }\n this._states.current[name]++;\n }, this));\n };\n\n /**\n * Leaves a state.\n * @param name - The state name.\n */\n Owl.prototype.leave = function (name) {\n jQuery.each([name].concat(this._states.tags[name] || []), jQuery.proxy(function (i, name) {\n this._states.current[name]--;\n }, this));\n };\n\n /**\n * Registers an event or state.\n * @public\n * @param {Object} object - The event or state to register.\n */\n Owl.prototype.register = function (object) {\n if (object.type === Owl.Type.Event) {\n if (!jQuery.event.special[object.name]) {\n jQuery.event.special[object.name] = {};\n }\n if (!jQuery.event.special[object.name].owl) {\n var _default = jQuery.event.special[object.name]._default;\n jQuery.event.special[object.name]._default = function (e) {\n if (_default && _default.apply && (!e.namespace || e.namespace.indexOf('owl') === -1)) {\n return _default.apply(this, arguments);\n }\n return e.namespace && e.namespace.indexOf('owl') > -1;\n };\n jQuery.event.special[object.name].owl = true;\n }\n } else if (object.type === Owl.Type.State) {\n if (!this._states.tags[object.name]) {\n this._states.tags[object.name] = object.tags;\n } else {\n this._states.tags[object.name] = this._states.tags[object.name].concat(object.tags);\n }\n this._states.tags[object.name] = jQuery.grep(this._states.tags[object.name], jQuery.proxy(function (tag, i) {\n return jQuery.inArray(tag, this._states.tags[object.name]) === i;\n }, this));\n }\n };\n\n /**\n * Suppresses events.\n * @protected\n * @param {Array.} events - The events to suppress.\n */\n Owl.prototype.suppress = function (events) {\n jQuery.each(events, jQuery.proxy(function (index, event) {\n this._supress[event] = true;\n }, this));\n };\n\n /**\n * Releases suppressed events.\n * @protected\n * @param {Array.} events - The events to release.\n */\n Owl.prototype.release = function (events) {\n jQuery.each(events, jQuery.proxy(function (index, event) {\n delete this._supress[event];\n }, this));\n };\n\n /**\n * Gets unified pointer coordinates from event.\n * @todo #261\n * @protected\n * @param {Event} - The `mousedown` or `touchstart` event.\n * @returns {Object} - Contains `x` and `y` coordinates of current pointer position.\n */\n Owl.prototype.pointer = function (event) {\n var result = {\n x: null,\n y: null\n };\n event = event.originalEvent || event || window.event;\n event = event.touches && event.touches.length ? event.touches[0] : event.changedTouches && event.changedTouches.length ? event.changedTouches[0] : event;\n if (event.pageX) {\n result.x = event.pageX;\n result.y = event.pageY;\n } else {\n result.x = event.clientX;\n result.y = event.clientY;\n }\n return result;\n };\n\n /**\n * Determines if the input is a Number or something that can be coerced to a Number\n * @protected\n * @param {Number|String|Object|Array|Boolean|RegExp|Function|Symbol} - The input to be tested\n * @returns {Boolean} - An indication if the input is a Number or can be coerced to a Number\n */\n Owl.prototype.isNumeric = function (number) {\n return !isNaN(parseFloat(number));\n };\n\n /**\n * Gets the difference of two vectors.\n * @todo #261\n * @protected\n * @param {Object} - The first vector.\n * @param {Object} - The second vector.\n * @returns {Object} - The difference.\n */\n Owl.prototype.difference = function (first, second) {\n return {\n x: first.x - second.x,\n y: first.y - second.y\n };\n };\n\n /**\n * The jQuery Plugin for the Owl Carousel\n * @todo Navigation plugin `next` and `prev`\n * @public\n */\n jQuery.fn.owlCarousel = function (option) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.each(function () {\n var jQuerythis = jQuery(this),\n data = jQuerythis.data('owl.carousel');\n if (!data) {\n data = new Owl(this, _typeof(option) == 'object' && option);\n jQuerythis.data('owl.carousel', data);\n jQuery.each(['next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove'], function (i, event) {\n data.register({\n type: Owl.Type.Event,\n name: event\n });\n data.jQueryelement.on(event + '.owl.carousel.core', jQuery.proxy(function (e) {\n if (e.namespace && e.relatedTarget !== this) {\n this.suppress([event]);\n data[event].apply(this, [].slice.call(arguments, 1));\n this.release([event]);\n }\n }, data));\n });\n }\n if (typeof option == 'string' && option.charAt(0) !== '_') {\n data[option].apply(data, args);\n }\n });\n };\n\n /**\n * The constructor for the jQuery Plugin\n * @public\n */\n jQuery.fn.owlCarousel.Constructor = Owl;\n})(window.Zepto || window.jQuery, window, document);\n\n/**\n * AutoRefresh Plugin\n * @version 2.3.2\n * @author Artus Kolanowski\n * @author David Deutsch\n * @license The MIT License (MIT)\n */\n;\n(function (jQuery, window, document, undefined) {\n /**\n * Creates the auto refresh plugin.\n * @class The Auto Refresh Plugin\n * @param {Owl} carousel - The Owl Carousel\n */\n var _AutoRefresh = function AutoRefresh(carousel) {\n /**\n * Reference to the core.\n * @protected\n * @type {Owl}\n */\n this._core = carousel;\n\n /**\n * Refresh interval.\n * @protected\n * @type {number}\n */\n this._interval = null;\n\n /**\n * Whether the element is currently visible or not.\n * @protected\n * @type {Boolean}\n */\n this._visible = null;\n\n /**\n * All event handlers.\n * @protected\n * @type {Object}\n */\n this._handlers = {\n 'initialized.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace && this._core.settings.autoRefresh) {\n this.watch();\n }\n }, this)\n };\n\n // set default options\n this._core.options = jQuery.extend({}, _AutoRefresh.Defaults, this._core.options);\n\n // register event handlers\n this._core.jQueryelement.on(this._handlers);\n };\n\n /**\n * Default options.\n * @public\n */\n _AutoRefresh.Defaults = {\n autoRefresh: true,\n autoRefreshInterval: 500\n };\n\n /**\n * Watches the element.\n */\n _AutoRefresh.prototype.watch = function () {\n if (this._interval) {\n return;\n }\n this._visible = this._core.isVisible();\n this._interval = window.setInterval(jQuery.proxy(this.refresh, this), this._core.settings.autoRefreshInterval);\n };\n\n /**\n * Refreshes the element.\n */\n _AutoRefresh.prototype.refresh = function () {\n if (this._core.isVisible() === this._visible) {\n return;\n }\n this._visible = !this._visible;\n this._core.jQueryelement.toggleClass('owl-hidden', !this._visible);\n this._visible && this._core.invalidate('width') && this._core.refresh();\n };\n\n /**\n * Destroys the plugin.\n */\n _AutoRefresh.prototype.destroy = function () {\n var handler, property;\n window.clearInterval(this._interval);\n for (handler in this._handlers) {\n this._core.jQueryelement.off(handler, this._handlers[handler]);\n }\n for (property in Object.getOwnPropertyNames(this)) {\n typeof this[property] != 'function' && (this[property] = null);\n }\n };\n jQuery.fn.owlCarousel.Constructor.Plugins.AutoRefresh = _AutoRefresh;\n})(window.Zepto || window.jQuery, window, document);\n\n/**\n * Lazy Plugin\n * @version 2.3.2\n * @author Bartosz Wojciechowski\n * @author David Deutsch\n * @license The MIT License (MIT)\n */\n;\n(function (jQuery, window, document, undefined) {\n /**\n * Creates the lazy plugin.\n * @class The Lazy Plugin\n * @param {Owl} carousel - The Owl Carousel\n */\n var _Lazy = function Lazy(carousel) {\n /**\n * Reference to the core.\n * @protected\n * @type {Owl}\n */\n this._core = carousel;\n\n /**\n * Already loaded items.\n * @protected\n * @type {Array.}\n */\n this._loaded = [];\n\n /**\n * Event handlers.\n * @protected\n * @type {Object}\n */\n this._handlers = {\n 'initialized.owl.carousel change.owl.carousel resized.owl.carousel': jQuery.proxy(function (e) {\n if (!e.namespace) {\n return;\n }\n if (!this._core.settings || !this._core.settings.lazyLoad) {\n return;\n }\n if (e.property && e.property.name == 'position' || e.type == 'initialized') {\n var settings = this._core.settings,\n n = settings.center && Math.ceil(settings.items / 2) || settings.items,\n i = settings.center && n * -1 || 0,\n position = (e.property && e.property.value !== undefined ? e.property.value : this._core.current()) + i,\n clones = this._core.clones().length,\n load = jQuery.proxy(function (i, v) {\n this.load(v);\n }, this);\n while (i++ < n) {\n this.load(clones / 2 + this._core.relative(position));\n clones && jQuery.each(this._core.clones(this._core.relative(position)), load);\n position++;\n }\n }\n }, this)\n };\n\n // set the default options\n this._core.options = jQuery.extend({}, _Lazy.Defaults, this._core.options);\n\n // register event handler\n this._core.jQueryelement.on(this._handlers);\n };\n\n /**\n * Default options.\n * @public\n */\n _Lazy.Defaults = {\n lazyLoad: false\n };\n\n /**\n * Loads all resources of an item at the specified position.\n * @param {Number} position - The absolute position of the item.\n * @protected\n */\n _Lazy.prototype.load = function (position) {\n var jQueryitem = this._core.jQuerystage.children().eq(position),\n jQueryelements = jQueryitem && jQueryitem.find('.owl-lazy');\n if (!jQueryelements || jQuery.inArray(jQueryitem.get(0), this._loaded) > -1) {\n return;\n }\n jQueryelements.each(jQuery.proxy(function (index, element) {\n var jQueryelement = jQuery(element),\n image,\n url = window.devicePixelRatio > 1 && jQueryelement.attr('data-src-retina') || jQueryelement.attr('data-src') || jQueryelement.attr('data-srcset');\n this._core.trigger('load', {\n element: jQueryelement,\n url: url\n }, 'lazy');\n if (jQueryelement.is('img')) {\n jQueryelement.one('load.owl.lazy', jQuery.proxy(function () {\n jQueryelement.css('opacity', 1);\n this._core.trigger('loaded', {\n element: jQueryelement,\n url: url\n }, 'lazy');\n }, this)).attr('src', url);\n } else if (jQueryelement.is('source')) {\n jQueryelement.one('load.owl.lazy', jQuery.proxy(function () {\n this._core.trigger('loaded', {\n element: jQueryelement,\n url: url\n }, 'lazy');\n }, this)).attr('srcset', url);\n } else {\n image = new Image();\n image.onload = jQuery.proxy(function () {\n jQueryelement.css({\n 'background-image': 'url(\"' + url + '\")',\n 'opacity': '1'\n });\n this._core.trigger('loaded', {\n element: jQueryelement,\n url: url\n }, 'lazy');\n }, this);\n image.src = url;\n }\n }, this));\n this._loaded.push(jQueryitem.get(0));\n };\n\n /**\n * Destroys the plugin.\n * @public\n */\n _Lazy.prototype.destroy = function () {\n var handler, property;\n for (handler in this.handlers) {\n this._core.jQueryelement.off(handler, this.handlers[handler]);\n }\n for (property in Object.getOwnPropertyNames(this)) {\n typeof this[property] != 'function' && (this[property] = null);\n }\n };\n jQuery.fn.owlCarousel.Constructor.Plugins.Lazy = _Lazy;\n})(window.Zepto || window.jQuery, window, document);\n\n/**\n * AutoHeight Plugin\n * @version 2.3.2\n * @author Bartosz Wojciechowski\n * @author David Deutsch\n * @license The MIT License (MIT)\n */\n;\n(function (jQuery, window, document, undefined) {\n /**\n * Creates the auto height plugin.\n * @class The Auto Height Plugin\n * @param {Owl} carousel - The Owl Carousel\n */\n var _AutoHeight = function AutoHeight(carousel) {\n /**\n * Reference to the core.\n * @protected\n * @type {Owl}\n */\n this._core = carousel;\n\n /**\n * All event handlers.\n * @protected\n * @type {Object}\n */\n this._handlers = {\n 'initialized.owl.carousel refreshed.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace && this._core.settings.autoHeight) {\n this.update();\n }\n }, this),\n 'changed.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace && this._core.settings.autoHeight && e.property.name === 'position') {\n console.log('update called');\n this.update();\n }\n }, this),\n 'loaded.owl.lazy': jQuery.proxy(function (e) {\n if (e.namespace && this._core.settings.autoHeight && e.element.closest('.' + this._core.settings.itemClass).index() === this._core.current()) {\n this.update();\n }\n }, this)\n };\n\n // set default options\n this._core.options = jQuery.extend({}, _AutoHeight.Defaults, this._core.options);\n\n // register event handlers\n this._core.jQueryelement.on(this._handlers);\n this._intervalId = null;\n var refThis = this;\n\n // These changes have been taken from a PR by gavrochelegnou proposed in #1575\n // and have been made compatible with the latest jQuery version\n jQuery(window).on('load', function () {\n if (refThis._core.settings.autoHeight) {\n refThis.update();\n }\n });\n\n // Autoresize the height of the carousel when window is resized\n // When carousel has images, the height is dependent on the width\n // and should also change on resize\n jQuery(window).resize(function () {\n if (refThis._core.settings.autoHeight) {\n if (refThis._intervalId != null) {\n clearTimeout(refThis._intervalId);\n }\n refThis._intervalId = setTimeout(function () {\n refThis.update();\n }, 250);\n }\n });\n };\n\n /**\n * Default options.\n * @public\n */\n _AutoHeight.Defaults = {\n autoHeight: false,\n autoHeightClass: 'owl-height'\n };\n\n /**\n * Updates the view.\n */\n _AutoHeight.prototype.update = function () {\n var start = this._core._current,\n end = start + this._core.settings.items,\n visible = this._core.jQuerystage.children().toArray().slice(start, end),\n heights = [],\n maxheight = 0;\n jQuery.each(visible, function (index, item) {\n heights.push(jQuery(item).height());\n });\n maxheight = Math.max.apply(null, heights);\n this._core.jQuerystage.parent().height(maxheight).addClass(this._core.settings.autoHeightClass);\n };\n _AutoHeight.prototype.destroy = function () {\n var handler, property;\n for (handler in this._handlers) {\n this._core.jQueryelement.off(handler, this._handlers[handler]);\n }\n for (property in Object.getOwnPropertyNames(this)) {\n typeof this[property] !== 'function' && (this[property] = null);\n }\n };\n jQuery.fn.owlCarousel.Constructor.Plugins.AutoHeight = _AutoHeight;\n})(window.Zepto || window.jQuery, window, document);\n\n/**\n * Video Plugin\n * @version 2.3.2\n * @author Bartosz Wojciechowski\n * @author David Deutsch\n * @license The MIT License (MIT)\n */\n;\n(function (jQuery, window, document, undefined) {\n /**\n * Creates the video plugin.\n * @class The Video Plugin\n * @param {Owl} carousel - The Owl Carousel\n */\n var _Video = function Video(carousel) {\n /**\n * Reference to the core.\n * @protected\n * @type {Owl}\n */\n this._core = carousel;\n\n /**\n * Cache all video URLs.\n * @protected\n * @type {Object}\n */\n this._videos = {};\n\n /**\n * Current playing item.\n * @protected\n * @type {jQuery}\n */\n this._playing = null;\n\n /**\n * All event handlers.\n * @todo The cloned content removale is too late\n * @protected\n * @type {Object}\n */\n this._handlers = {\n 'initialized.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace) {\n this._core.register({\n type: 'state',\n name: 'playing',\n tags: ['interacting']\n });\n }\n }, this),\n 'resize.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace && this._core.settings.video && this.isInFullScreen()) {\n e.preventDefault();\n }\n }, this),\n 'refreshed.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace && this._core.is('resizing')) {\n this._core.jQuerystage.find('.cloned .owl-video-frame').remove();\n }\n }, this),\n 'changed.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace && e.property.name === 'position' && this._playing) {\n this.stop();\n }\n }, this),\n 'prepared.owl.carousel': jQuery.proxy(function (e) {\n if (!e.namespace) {\n return;\n }\n var jQueryelement = jQuery(e.content).find('.owl-video');\n if (jQueryelement.length) {\n jQueryelement.css('display', 'none');\n this.fetch(jQueryelement, jQuery(e.content));\n }\n }, this)\n };\n\n // set default options\n this._core.options = jQuery.extend({}, _Video.Defaults, this._core.options);\n\n // register event handlers\n this._core.jQueryelement.on(this._handlers);\n this._core.jQueryelement.on('click.owl.video', '.owl-video-play-icon', jQuery.proxy(function (e) {\n this.play(e);\n }, this));\n };\n\n /**\n * Default options.\n * @public\n */\n _Video.Defaults = {\n video: false,\n videoHeight: false,\n videoWidth: false\n };\n\n /**\n * Gets the video ID and the type (YouTube/Vimeo/vzaar only).\n * @protected\n * @param {jQuery} target - The target containing the video data.\n * @param {jQuery} item - The item containing the video.\n */\n _Video.prototype.fetch = function (target, item) {\n var type = function () {\n if (target.attr('data-vimeo-id')) {\n return 'vimeo';\n } else if (target.attr('data-vzaar-id')) {\n return 'vzaar';\n } else {\n return 'youtube';\n }\n }(),\n id = target.attr('data-vimeo-id') || target.attr('data-youtube-id') || target.attr('data-vzaar-id'),\n width = target.attr('data-width') || this._core.settings.videoWidth,\n height = target.attr('data-height') || this._core.settings.videoHeight,\n url = target.attr('href');\n if (url) {\n /*\n \t\tParses the id's out of the following urls (and probably more):\n \t\thttps://www.youtube.com/watch?v=:id\n \t\thttps://youtu.be/:id\n \t\thttps://vimeo.com/:id\n \t\thttps://vimeo.com/channels/:channel/:id\n \t\thttps://vimeo.com/groups/:group/videos/:id\n \t\thttps://app.vzaar.com/videos/:id\n \t\t\tVisual 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\n */\n\n id = url.match(/(http:|https:|)\\/\\/(player.|www.|app.)?(vimeo\\.com|youtu(be\\.com|\\.be|be\\.googleapis\\.com)|vzaar\\.com)\\/(video\\/|videos\\/|embed\\/|channels\\/.+\\/|groups\\/.+\\/|watch\\?v=|v\\/)?([A-Za-z0-9._%-]*)(\\&\\S+)?/);\n if (id[3].indexOf('youtu') > -1) {\n type = 'youtube';\n } else if (id[3].indexOf('vimeo') > -1) {\n type = 'vimeo';\n } else if (id[3].indexOf('vzaar') > -1) {\n type = 'vzaar';\n } else {\n throw new Error('Video URL not supported.');\n }\n id = id[6];\n } else {\n throw new Error('Missing video URL.');\n }\n this._videos[url] = {\n type: type,\n id: id,\n width: width,\n height: height\n };\n item.attr('data-video', url);\n this.thumbnail(target, this._videos[url]);\n };\n\n /**\n * Creates video thumbnail.\n * @protected\n * @param {jQuery} target - The target containing the video data.\n * @param {Object} info - The video info object.\n * @see `fetch`\n */\n _Video.prototype.thumbnail = function (target, video) {\n var tnLink,\n icon,\n path,\n dimensions = video.width && video.height ? 'style=\"width:' + video.width + 'px;height:' + video.height + 'px;\"' : '',\n customTn = target.find('img'),\n srcType = 'src',\n lazyClass = '',\n settings = this._core.settings,\n create = function create(path) {\n icon = '
';\n if (settings.lazyLoad) {\n tnLink = '
';\n } else {\n tnLink = '
';\n }\n target.after(tnLink);\n target.after(icon);\n };\n\n // wrap video content into owl-video-wrapper div\n target.wrap('
');\n if (this._core.settings.lazyLoad) {\n srcType = 'data-src';\n lazyClass = 'owl-lazy';\n }\n\n // custom thumbnail\n if (customTn.length) {\n create(customTn.attr(srcType));\n customTn.remove();\n return false;\n }\n if (video.type === 'youtube') {\n path = \"//img.youtube.com/vi/\" + video.id + \"/hqdefault.jpg\";\n create(path);\n } else if (video.type === 'vimeo') {\n jQuery.ajax({\n type: 'GET',\n url: '//vimeo.com/api/v2/video/' + video.id + '.json',\n jsonp: 'callback',\n dataType: 'jsonp',\n success: function success(data) {\n path = data[0].thumbnail_large;\n create(path);\n }\n });\n } else if (video.type === 'vzaar') {\n jQuery.ajax({\n type: 'GET',\n url: '//vzaar.com/api/videos/' + video.id + '.json',\n jsonp: 'callback',\n dataType: 'jsonp',\n success: function success(data) {\n path = data.framegrab_url;\n create(path);\n }\n });\n }\n };\n\n /**\n * Stops the current video.\n * @public\n */\n _Video.prototype.stop = function () {\n this._core.trigger('stop', null, 'video');\n this._playing.find('.owl-video-frame').remove();\n this._playing.removeClass('owl-video-playing');\n this._playing = null;\n this._core.leave('playing');\n this._core.trigger('stopped', null, 'video');\n };\n\n /**\n * Starts the current video.\n * @public\n * @param {Event} event - The event arguments.\n */\n _Video.prototype.play = function (event) {\n var target = jQuery(event.target),\n item = target.closest('.' + this._core.settings.itemClass),\n video = this._videos[item.attr('data-video')],\n width = video.width || '100%',\n height = video.height || this._core.jQuerystage.height(),\n html;\n if (this._playing) {\n return;\n }\n this._core.enter('playing');\n this._core.trigger('play', null, 'video');\n item = this._core.items(this._core.relative(item.index()));\n this._core.reset(item.index());\n if (video.type === 'youtube') {\n html = '';\n } else if (video.type === 'vimeo') {\n html = '';\n } else if (video.type === 'vzaar') {\n html = '';\n }\n jQuery('
' + html + '
').insertAfter(item.find('.owl-video'));\n this._playing = item.addClass('owl-video-playing');\n };\n\n /**\n * Checks whether an video is currently in full screen mode or not.\n * @todo Bad style because looks like a readonly method but changes members.\n * @protected\n * @returns {Boolean}\n */\n _Video.prototype.isInFullScreen = function () {\n var element = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement;\n return element && jQuery(element).parent().hasClass('owl-video-frame');\n };\n\n /**\n * Destroys the plugin.\n */\n _Video.prototype.destroy = function () {\n var handler, property;\n this._core.jQueryelement.off('click.owl.video');\n for (handler in this._handlers) {\n this._core.jQueryelement.off(handler, this._handlers[handler]);\n }\n for (property in Object.getOwnPropertyNames(this)) {\n typeof this[property] != 'function' && (this[property] = null);\n }\n };\n jQuery.fn.owlCarousel.Constructor.Plugins.Video = _Video;\n})(window.Zepto || window.jQuery, window, document);\n\n/**\n * Animate Plugin\n * @version 2.3.2\n * @author Bartosz Wojciechowski\n * @author David Deutsch\n * @license The MIT License (MIT)\n */\n;\n(function (jQuery, window, document, undefined) {\n /**\n * Creates the animate plugin.\n * @class The Navigation Plugin\n * @param {Owl} scope - The Owl Carousel\n */\n var _Animate = function Animate(scope) {\n this.core = scope;\n this.core.options = jQuery.extend({}, _Animate.Defaults, this.core.options);\n this.swapping = true;\n this.previous = undefined;\n this.next = undefined;\n this.handlers = {\n 'change.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace && e.property.name == 'position') {\n this.previous = this.core.current();\n this.next = e.property.value;\n }\n }, this),\n 'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace) {\n this.swapping = e.type == 'translated';\n }\n }, this),\n 'translate.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn)) {\n this.swap();\n }\n }, this)\n };\n this.core.jQueryelement.on(this.handlers);\n };\n\n /**\n * Default options.\n * @public\n */\n _Animate.Defaults = {\n animateOut: false,\n animateIn: false\n };\n\n /**\n * Toggles the animation classes whenever an translations starts.\n * @protected\n * @returns {Boolean|undefined}\n */\n _Animate.prototype.swap = function () {\n if (this.core.settings.items !== 1) {\n return;\n }\n if (!jQuery.support.animation || !jQuery.support.transition) {\n return;\n }\n this.core.speed(0);\n var left,\n clear = jQuery.proxy(this.clear, this),\n previous = this.core.jQuerystage.children().eq(this.previous),\n next = this.core.jQuerystage.children().eq(this.next),\n incoming = this.core.settings.animateIn,\n outgoing = this.core.settings.animateOut;\n if (this.core.current() === this.previous) {\n return;\n }\n if (outgoing) {\n left = this.core.coordinates(this.previous) - this.core.coordinates(this.next);\n previous.one(jQuery.support.animation.end, clear).css({\n 'left': left + 'px'\n }).addClass('animated owl-animated-out').addClass(outgoing);\n }\n if (incoming) {\n next.one(jQuery.support.animation.end, clear).addClass('animated owl-animated-in').addClass(incoming);\n }\n };\n _Animate.prototype.clear = function (e) {\n jQuery(e.target).css({\n 'left': ''\n }).removeClass('animated owl-animated-out owl-animated-in').removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut);\n this.core.onTransitionEnd();\n };\n\n /**\n * Destroys the plugin.\n * @public\n */\n _Animate.prototype.destroy = function () {\n var handler, property;\n for (handler in this.handlers) {\n this.core.jQueryelement.off(handler, this.handlers[handler]);\n }\n for (property in Object.getOwnPropertyNames(this)) {\n typeof this[property] != 'function' && (this[property] = null);\n }\n };\n jQuery.fn.owlCarousel.Constructor.Plugins.Animate = _Animate;\n})(window.Zepto || window.jQuery, window, document);\n\n/**\n * Autoplay Plugin\n * @version 2.3.2\n * @author Bartosz Wojciechowski\n * @author Artus Kolanowski\n * @author David Deutsch\n * @author Tom De Caluwé\n * @license The MIT License (MIT)\n */\n;\n(function (jQuery, window, document, undefined) {\n /**\n * Creates the autoplay plugin.\n * @class The Autoplay Plugin\n * @param {Owl} scope - The Owl Carousel\n */\n var _Autoplay = function Autoplay(carousel) {\n /**\n * Reference to the core.\n * @protected\n * @type {Owl}\n */\n this._core = carousel;\n\n /**\n * The autoplay timeout id.\n * @type {Number}\n */\n this._call = null;\n\n /**\n * Depending on the state of the plugin, this variable contains either\n * the start time of the timer or the current timer value if it's\n * paused. Since we start in a paused state we initialize the timer\n * value.\n * @type {Number}\n */\n this._time = 0;\n\n /**\n * Stores the timeout currently used.\n * @type {Number}\n */\n this._timeout = 0;\n\n /**\n * Indicates whenever the autoplay is paused.\n * @type {Boolean}\n */\n this._paused = true;\n\n /**\n * All event handlers.\n * @protected\n * @type {Object}\n */\n this._handlers = {\n 'changed.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace && e.property.name === 'settings') {\n if (this._core.settings.autoplay) {\n this.play();\n } else {\n this.stop();\n }\n } else if (e.namespace && e.property.name === 'position' && this._paused) {\n // Reset the timer. This code is triggered when the position\n // of the carousel was changed through user interaction.\n this._time = 0;\n }\n }, this),\n 'initialized.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace && this._core.settings.autoplay) {\n this.play();\n }\n }, this),\n 'play.owl.autoplay': jQuery.proxy(function (e, t, s) {\n if (e.namespace) {\n this.play(t, s);\n }\n }, this),\n 'stop.owl.autoplay': jQuery.proxy(function (e) {\n if (e.namespace) {\n this.stop();\n }\n }, this),\n 'mouseover.owl.autoplay': jQuery.proxy(function () {\n if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {\n this.pause();\n }\n }, this),\n 'mouseleave.owl.autoplay': jQuery.proxy(function () {\n if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {\n this.play();\n }\n }, this),\n 'touchstart.owl.core': jQuery.proxy(function () {\n if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {\n this.pause();\n }\n }, this),\n 'touchend.owl.core': jQuery.proxy(function () {\n if (this._core.settings.autoplayHoverPause) {\n this.play();\n }\n }, this)\n };\n\n // register event handlers\n this._core.jQueryelement.on(this._handlers);\n\n // set default options\n this._core.options = jQuery.extend({}, _Autoplay.Defaults, this._core.options);\n };\n\n /**\n * Default options.\n * @public\n */\n _Autoplay.Defaults = {\n autoplay: false,\n autoplayTimeout: 5000,\n autoplayHoverPause: false,\n autoplaySpeed: false\n };\n\n /**\n * Transition to the next slide and set a timeout for the next transition.\n * @private\n * @param {Number} [speed] - The animation speed for the animations.\n */\n _Autoplay.prototype._next = function (speed) {\n this._call = window.setTimeout(jQuery.proxy(this._next, this, speed), this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read());\n if (this._core.is('busy') || this._core.is('interacting') || document.hidden) {\n return;\n }\n this._core.next(speed || this._core.settings.autoplaySpeed);\n };\n\n /**\n * Reads the current timer value when the timer is playing.\n * @public\n */\n _Autoplay.prototype.read = function () {\n return new Date().getTime() - this._time;\n };\n\n /**\n * Starts the autoplay.\n * @public\n * @param {Number} [timeout] - The interval before the next animation starts.\n * @param {Number} [speed] - The animation speed for the animations.\n */\n _Autoplay.prototype.play = function (timeout, speed) {\n var elapsed;\n if (!this._core.is('rotating')) {\n this._core.enter('rotating');\n }\n timeout = timeout || this._core.settings.autoplayTimeout;\n\n // Calculate the elapsed time since the last transition. If the carousel\n // wasn't playing this calculation will yield zero.\n elapsed = Math.min(this._time % (this._timeout || timeout), timeout);\n if (this._paused) {\n // Start the clock.\n this._time = this.read();\n this._paused = false;\n } else {\n // Clear the active timeout to allow replacement.\n window.clearTimeout(this._call);\n }\n\n // Adjust the origin of the timer to match the new timeout value.\n this._time += this.read() % timeout - elapsed;\n this._timeout = timeout;\n this._call = window.setTimeout(jQuery.proxy(this._next, this, speed), timeout - elapsed);\n };\n\n /**\n * Stops the autoplay.\n * @public\n */\n _Autoplay.prototype.stop = function () {\n if (this._core.is('rotating')) {\n // Reset the clock.\n this._time = 0;\n this._paused = true;\n window.clearTimeout(this._call);\n this._core.leave('rotating');\n }\n };\n\n /**\n * Pauses the autoplay.\n * @public\n */\n _Autoplay.prototype.pause = function () {\n if (this._core.is('rotating') && !this._paused) {\n // Pause the clock.\n this._time = this.read();\n this._paused = true;\n window.clearTimeout(this._call);\n }\n };\n\n /**\n * Destroys the plugin.\n */\n _Autoplay.prototype.destroy = function () {\n var handler, property;\n this.stop();\n for (handler in this._handlers) {\n this._core.jQueryelement.off(handler, this._handlers[handler]);\n }\n for (property in Object.getOwnPropertyNames(this)) {\n typeof this[property] != 'function' && (this[property] = null);\n }\n };\n jQuery.fn.owlCarousel.Constructor.Plugins.autoplay = _Autoplay;\n})(window.Zepto || window.jQuery, window, document);\n\n/**\n * Navigation Plugin\n * @version 2.3.2\n * @author Artus Kolanowski\n * @author David Deutsch\n * @license The MIT License (MIT)\n */\n;\n(function (jQuery, window, document, undefined) {\n 'use strict';\n\n /**\n * Creates the navigation plugin.\n * @class The Navigation Plugin\n * @param {Owl} carousel - The Owl Carousel.\n */\n var _Navigation = function Navigation(carousel) {\n /**\n * Reference to the core.\n * @protected\n * @type {Owl}\n */\n this._core = carousel;\n\n /**\n * Indicates whether the plugin is initialized or not.\n * @protected\n * @type {Boolean}\n */\n this._initialized = false;\n\n /**\n * The current paging indexes.\n * @protected\n * @type {Array}\n */\n this._pages = [];\n\n /**\n * All DOM elements of the user interface.\n * @protected\n * @type {Object}\n */\n this._controls = {};\n\n /**\n * Markup for an indicator.\n * @protected\n * @type {Array.}\n */\n this._templates = [];\n\n /**\n * The carousel element.\n * @type {jQuery}\n */\n this.jQueryelement = this._core.jQueryelement;\n\n /**\n * Overridden methods of the carousel.\n * @protected\n * @type {Object}\n */\n this._overrides = {\n next: this._core.next,\n prev: this._core.prev,\n to: this._core.to\n };\n\n /**\n * All event handlers.\n * @protected\n * @type {Object}\n */\n this._handlers = {\n 'prepared.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace && this._core.settings.dotsData) {\n this._templates.push('
' + jQuery(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '
');\n }\n }, this),\n 'added.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace && this._core.settings.dotsData) {\n this._templates.splice(e.position, 0, this._templates.pop());\n }\n }, this),\n 'remove.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace && this._core.settings.dotsData) {\n this._templates.splice(e.position, 1);\n }\n }, this),\n 'changed.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace && e.property.name == 'position') {\n this.draw();\n }\n }, this),\n 'initialized.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace && !this._initialized) {\n this._core.trigger('initialize', null, 'navigation');\n this.initialize();\n this.update();\n this.draw();\n this._initialized = true;\n this._core.trigger('initialized', null, 'navigation');\n }\n }, this),\n 'refreshed.owl.carousel': jQuery.proxy(function (e) {\n if (e.namespace && this._initialized) {\n this._core.trigger('refresh', null, 'navigation');\n this.update();\n this.draw();\n this._core.trigger('refreshed', null, 'navigation');\n }\n }, this)\n };\n\n // set default options\n this._core.options = jQuery.extend({}, _Navigation.Defaults, this._core.options);\n\n // register event handlers\n this.jQueryelement.on(this._handlers);\n };\n\n /**\n * Default options.\n * @public\n * @todo Rename `slideBy` to `navBy`\n */\n _Navigation.Defaults = {\n nav: false,\n navText: ['‹', '›'],\n navSpeed: false,\n navElement: 'button type=\"button\" role=\"presentation\"',\n navContainer: false,\n navContainerClass: 'owl-nav',\n navClass: ['owl-prev', 'owl-next'],\n slideBy: 1,\n dotClass: 'owl-dot',\n dotsClass: 'owl-dots',\n dots: true,\n dotsEach: false,\n dotsData: false,\n dotsSpeed: false,\n dotsContainer: false\n };\n\n /**\n * Initializes the layout of the plugin and extends the carousel.\n * @protected\n */\n _Navigation.prototype.initialize = function () {\n var override,\n settings = this._core.settings;\n\n // create DOM structure for relative navigation\n this._controls.jQueryrelative = (settings.navContainer ? jQuery(settings.navContainer) : jQuery('
').addClass(settings.navContainerClass).appendTo(this.jQueryelement)).addClass('disabled');\n this._controls.jQueryprevious = jQuery('<' + settings.navElement + '>').addClass(settings.navClass[0]).html(settings.navText[0]).prependTo(this._controls.jQueryrelative).on('click', jQuery.proxy(function (e) {\n this.prev(settings.navSpeed);\n }, this));\n this._controls.jQuerynext = jQuery('<' + settings.navElement + '>').addClass(settings.navClass[1]).html(settings.navText[1]).appendTo(this._controls.jQueryrelative).on('click', jQuery.proxy(function (e) {\n this.next(settings.navSpeed);\n }, this));\n\n // create DOM structure for absolute navigation\n if (!settings.dotsData) {\n this._templates = [jQuery('