{"version":3,"names":[],"mappings":"","sources":["owl.carousel.js"],"sourcesContent":["/**\r\n * Owl Carousel v2.3.4\r\n * Copyright 2013-2018 David Deutsch\r\n * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE\r\n */\r\n/**\r\n * Owl carousel\r\n * @version 2.3.4\r\n * @author Bartosz Wojciechowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n * @todo Lazy Load Icon\r\n * @todo prevent animationend bubling\r\n * @todo itemsScaleUp\r\n * @todo Test Zepto\r\n * @todo stagePadding calculate wrong active classes\r\n */\r\n;(function($, window, document, undefined) {\r\n\r\n\t/**\r\n\t * Creates a carousel.\r\n\t * @class The Owl Carousel.\r\n\t * @public\r\n\t * @param {HTMLElement|jQuery} element - The element to create the carousel for.\r\n\t * @param {Object} [options] - The options\r\n\t */\r\n\tfunction Owl(element, options) {\r\n\r\n\t\t/**\r\n\t\t * Current settings for the carousel.\r\n\t\t * @public\r\n\t\t */\r\n\t\tthis.settings = null;\r\n\r\n\t\t/**\r\n\t\t * Current options set by the caller including defaults.\r\n\t\t * @public\r\n\t\t */\r\n\t\tthis.options = $.extend({}, Owl.Defaults, options);\r\n\r\n\t\t/**\r\n\t\t * Plugin element.\r\n\t\t * @public\r\n\t\t */\r\n\t\tthis.$element = $(element);\r\n\r\n\t\t/**\r\n\t\t * Proxied event handlers.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._handlers = {};\r\n\r\n\t\t/**\r\n\t\t * References to the running plugins of this carousel.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._plugins = {};\r\n\r\n\t\t/**\r\n\t\t * Currently suppressed events to prevent them from being retriggered.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._supress = {};\r\n\r\n\t\t/**\r\n\t\t * Absolute current position.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._current = null;\r\n\r\n\t\t/**\r\n\t\t * Animation speed in milliseconds.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._speed = null;\r\n\r\n\t\t/**\r\n\t\t * Coordinates of all items in pixel.\r\n\t\t * @todo The name of this member is missleading.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._coordinates = [];\r\n\r\n\t\t/**\r\n\t\t * Current breakpoint.\r\n\t\t * @todo Real media queries would be nice.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._breakpoint = null;\r\n\r\n\t\t/**\r\n\t\t * Current width of the plugin element.\r\n\t\t */\r\n\t\tthis._width = null;\r\n\r\n\t\t/**\r\n\t\t * All real items.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._items = [];\r\n\r\n\t\t/**\r\n\t\t * All cloned items.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._clones = [];\r\n\r\n\t\t/**\r\n\t\t * Merge values of all items.\r\n\t\t * @todo Maybe this could be part of a plugin.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._mergers = [];\r\n\r\n\t\t/**\r\n\t\t * Widths of all items.\r\n\t\t */\r\n\t\tthis._widths = [];\r\n\r\n\t\t/**\r\n\t\t * Invalidated parts within the update process.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._invalidated = {};\r\n\r\n\t\t/**\r\n\t\t * Ordered list of workers for the update process.\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._pipe = [];\r\n\r\n\t\t/**\r\n\t\t * Current state information for the drag operation.\r\n\t\t * @todo #261\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._drag = {\r\n\t\t\ttime: null,\r\n\t\t\ttarget: null,\r\n\t\t\tpointer: null,\r\n\t\t\tstage: {\r\n\t\t\t\tstart: null,\r\n\t\t\t\tcurrent: null\r\n\t\t\t},\r\n\t\t\tdirection: null\r\n\t\t};\r\n\r\n\t\t/**\r\n\t\t * Current state information and their tags.\r\n\t\t * @type {Object}\r\n\t\t * @protected\r\n\t\t */\r\n\t\tthis._states = {\r\n\t\t\tcurrent: {},\r\n\t\t\ttags: {\r\n\t\t\t\t'initializing': [ 'busy' ],\r\n\t\t\t\t'animating': [ 'busy' ],\r\n\t\t\t\t'dragging': [ 'interacting' ]\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t$.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler) {\r\n\t\t\tthis._handlers[handler] = $.proxy(this[handler], this);\r\n\t\t}, this));\r\n\r\n\t\t$.each(Owl.Plugins, $.proxy(function(key, plugin) {\r\n\t\t\tthis._plugins[key.charAt(0).toLowerCase() + key.slice(1)]\r\n\t\t\t\t= new plugin(this);\r\n\t\t}, this));\r\n\r\n\t\t$.each(Owl.Workers, $.proxy(function(priority, worker) {\r\n\t\t\tthis._pipe.push({\r\n\t\t\t\t'filter': worker.filter,\r\n\t\t\t\t'run': $.proxy(worker.run, this)\r\n\t\t\t});\r\n\t\t}, this));\r\n\r\n\t\tthis.setup();\r\n\t\tthis.initialize();\r\n\t}\r\n\r\n\t/**\r\n\t * Default options for the carousel.\r\n\t * @public\r\n\t */\r\n\tOwl.Defaults = {\r\n\t\titems: 3,\r\n\t\tloop: false,\r\n\t\tcenter: false,\r\n\t\trewind: false,\r\n\t\tcheckVisibility: true,\r\n\r\n\t\tmouseDrag: true,\r\n\t\ttouchDrag: true,\r\n\t\tpullDrag: true,\r\n\t\tfreeDrag: false,\r\n\r\n\t\tmargin: 0,\r\n\t\tstagePadding: 0,\r\n\r\n\t\tmerge: false,\r\n\t\tmergeFit: true,\r\n\t\tautoWidth: false,\r\n\r\n\t\tstartPosition: 0,\r\n\t\trtl: false,\r\n\r\n\t\tsmartSpeed: 250,\r\n\t\tfluidSpeed: false,\r\n\t\tdragEndSpeed: false,\r\n\r\n\t\tresponsive: {},\r\n\t\tresponsiveRefreshRate: 200,\r\n\t\tresponsiveBaseElement: window,\r\n\r\n\t\tfallbackEasing: 'swing',\r\n\t\tslideTransition: '',\r\n\r\n\t\tinfo: false,\r\n\r\n\t\tnestedItemSelector: false,\r\n\t\titemElement: 'div',\r\n\t\tstageElement: 'div',\r\n\r\n\t\trefreshClass: 'owl-refresh',\r\n\t\tloadedClass: 'owl-loaded',\r\n\t\tloadingClass: 'owl-loading',\r\n\t\trtlClass: 'owl-rtl',\r\n\t\tresponsiveClass: 'owl-responsive',\r\n\t\tdragClass: 'owl-drag',\r\n\t\titemClass: 'owl-item',\r\n\t\tstageClass: 'owl-stage',\r\n\t\tstageOuterClass: 'owl-stage-outer',\r\n\t\tgrabClass: 'owl-grab'\r\n\t};\r\n\r\n\t/**\r\n\t * Enumeration for width.\r\n\t * @public\r\n\t * @readonly\r\n\t * @enum {String}\r\n\t */\r\n\tOwl.Width = {\r\n\t\tDefault: 'default',\r\n\t\tInner: 'inner',\r\n\t\tOuter: 'outer'\r\n\t};\r\n\r\n\t/**\r\n\t * Enumeration for types.\r\n\t * @public\r\n\t * @readonly\r\n\t * @enum {String}\r\n\t */\r\n\tOwl.Type = {\r\n\t\tEvent: 'event',\r\n\t\tState: 'state'\r\n\t};\r\n\r\n\t/**\r\n\t * Contains all registered plugins.\r\n\t * @public\r\n\t */\r\n\tOwl.Plugins = {};\r\n\r\n\t/**\r\n\t * List of workers involved in the update process.\r\n\t */\r\n\tOwl.Workers = [ {\r\n\t\tfilter: [ 'width', 'settings' ],\r\n\t\trun: function() {\r\n\t\t\tthis._width = this.$element.width();\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'width', 'items', 'settings' ],\r\n\t\trun: function(cache) {\r\n\t\t\tcache.current = this._items && this._items[this.relative(this._current)];\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'items', 'settings' ],\r\n\t\trun: function() {\r\n\t\t\tthis.$stage.children('.cloned').remove();\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'width', 'items', 'settings' ],\r\n\t\trun: function(cache) {\r\n\t\t\tvar margin = this.settings.margin || '',\r\n\t\t\t\tgrid = !this.settings.autoWidth,\r\n\t\t\t\trtl = this.settings.rtl,\r\n\t\t\t\tcss = {\r\n\t\t\t\t\t'width': 'auto',\r\n\t\t\t\t\t'margin-left': rtl ? margin : '',\r\n\t\t\t\t\t'margin-right': rtl ? '' : margin\r\n\t\t\t\t};\r\n\r\n\t\t\t!grid && this.$stage.children().css(css);\r\n\r\n\t\t\tcache.css = css;\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'width', 'items', 'settings' ],\r\n\t\trun: function(cache) {\r\n\t\t\tvar width = (this.width() / this.settings.items).toFixed(3) - this.settings.margin,\r\n\t\t\t\tmerge = null,\r\n\t\t\t\titerator = this._items.length,\r\n\t\t\t\tgrid = !this.settings.autoWidth,\r\n\t\t\t\twidths = [];\r\n\r\n\t\t\tcache.items = {\r\n\t\t\t\tmerge: false,\r\n\t\t\t\twidth: width\r\n\t\t\t};\r\n\r\n\t\t\twhile (iterator--) {\r\n\t\t\t\tmerge = this._mergers[iterator];\r\n\t\t\t\tmerge = this.settings.mergeFit && Math.min(merge, this.settings.items) || merge;\r\n\r\n\t\t\t\tcache.items.merge = merge > 1 || cache.items.merge;\r\n\r\n\t\t\t\twidths[iterator] = !grid ? this._items[iterator].width() : width * merge;\r\n\t\t\t}\r\n\r\n\t\t\tthis._widths = widths;\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'items', 'settings' ],\r\n\t\trun: function() {\r\n\t\t\tvar clones = [],\r\n\t\t\t\titems = this._items,\r\n\t\t\t\tsettings = this.settings,\r\n\t\t\t\t// TODO: Should be computed from number of min width items in stage\r\n\t\t\t\tview = Math.max(settings.items * 2, 4),\r\n\t\t\t\tsize = Math.ceil(items.length / 2) * 2,\r\n\t\t\t\trepeat = settings.loop && items.length ? settings.rewind ? view : Math.max(view, size) : 0,\r\n\t\t\t\tappend = '',\r\n\t\t\t\tprepend = '';\r\n\r\n\t\t\trepeat /= 2;\r\n\r\n\t\t\twhile (repeat > 0) {\r\n\t\t\t\t// Switch to only using appended clones\r\n\t\t\t\tclones.push(this.normalize(clones.length / 2, true));\r\n\t\t\t\tappend = append + items[clones[clones.length - 1]][0].outerHTML;\r\n\t\t\t\tclones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true));\r\n\t\t\t\tprepend = items[clones[clones.length - 1]][0].outerHTML + prepend;\r\n\t\t\t\trepeat -= 1;\r\n\t\t\t}\r\n\r\n\t\t\tthis._clones = clones;\r\n\r\n\t\t\t$(append).addClass('cloned').appendTo(this.$stage);\r\n\t\t\t$(prepend).addClass('cloned').prependTo(this.$stage);\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'width', 'items', 'settings' ],\r\n\t\trun: function() {\r\n\t\t\tvar rtl = this.settings.rtl ? 1 : -1,\r\n\t\t\t\tsize = this._clones.length + this._items.length,\r\n\t\t\t\titerator = -1,\r\n\t\t\t\tprevious = 0,\r\n\t\t\t\tcurrent = 0,\r\n\t\t\t\tcoordinates = [];\r\n\r\n\t\t\twhile (++iterator < size) {\r\n\t\t\t\tprevious = coordinates[iterator - 1] || 0;\r\n\t\t\t\tcurrent = this._widths[this.relative(iterator)] + this.settings.margin;\r\n\t\t\t\tcoordinates.push(previous + current * rtl);\r\n\t\t\t}\r\n\r\n\t\t\tthis._coordinates = coordinates;\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'width', 'items', 'settings' ],\r\n\t\trun: function() {\r\n\t\t\tvar padding = this.settings.stagePadding,\r\n\t\t\t\tcoordinates = this._coordinates,\r\n\t\t\t\tcss = {\r\n\t\t\t\t\t'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2,\r\n\t\t\t\t\t'padding-left': padding || '',\r\n\t\t\t\t\t'padding-right': padding || ''\r\n\t\t\t\t};\r\n\r\n\t\t\tthis.$stage.css(css);\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'width', 'items', 'settings' ],\r\n\t\trun: function(cache) {\r\n\t\t\tvar iterator = this._coordinates.length,\r\n\t\t\t\tgrid = !this.settings.autoWidth,\r\n\t\t\t\titems = this.$stage.children();\r\n\r\n\t\t\tif (grid && cache.items.merge) {\r\n\t\t\t\twhile (iterator--) {\r\n\t\t\t\t\tcache.css.width = this._widths[this.relative(iterator)];\r\n\t\t\t\t\titems.eq(iterator).css(cache.css);\r\n\t\t\t\t}\r\n\t\t\t} else if (grid) {\r\n\t\t\t\tcache.css.width = cache.items.width;\r\n\t\t\t\titems.css(cache.css);\r\n\t\t\t}\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'items' ],\r\n\t\trun: function() {\r\n\t\t\tthis._coordinates.length < 1 && this.$stage.removeAttr('style');\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'width', 'items', 'settings' ],\r\n\t\trun: function(cache) {\r\n\t\t\tcache.current = cache.current ? this.$stage.children().index(cache.current) : 0;\r\n\t\t\tcache.current = Math.max(this.minimum(), Math.min(this.maximum(), cache.current));\r\n\t\t\tthis.reset(cache.current);\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'position' ],\r\n\t\trun: function() {\r\n\t\t\tthis.animate(this.coordinates(this._current));\r\n\t\t}\r\n\t}, {\r\n\t\tfilter: [ 'width', 'position', 'items', 'settings' ],\r\n\t\trun: function() {\r\n\t\t\tvar rtl = this.settings.rtl ? 1 : -1,\r\n\t\t\t\tpadding = this.settings.stagePadding * 2,\r\n\t\t\t\tbegin = this.coordinates(this.current()) + padding,\r\n\t\t\t\tend = begin + this.width() * rtl,\r\n\t\t\t\tinner, outer, matches = [], i, n;\r\n\r\n\t\t\tfor (i = 0, n = this._coordinates.length; i < n; i++) {\r\n\t\t\t\tinner = this._coordinates[i - 1] || 0;\r\n\t\t\t\touter = Math.abs(this._coordinates[i]) + padding * rtl;\r\n\r\n\t\t\t\tif ((this.op(inner, '<=', begin) && (this.op(inner, '>', end)))\r\n\t\t\t\t\t|| (this.op(outer, '<', begin) && this.op(outer, '>', end))) {\r\n\t\t\t\t\tmatches.push(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.$stage.children('.active').removeClass('active');\r\n\t\t\tthis.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active');\r\n\r\n\t\t\tthis.$stage.children('.center').removeClass('center');\r\n\t\t\tif (this.settings.center) {\r\n\t\t\t\tthis.$stage.children().eq(this.current()).addClass('center');\r\n\t\t\t}\r\n\t\t}\r\n\t} ];\r\n\r\n\t/**\r\n\t * Create the stage DOM element\r\n\t */\r\n\tOwl.prototype.initializeStage = function() {\r\n\t\tthis.$stage = this.$element.find('.' + this.settings.stageClass);\r\n\r\n\t\t// if the stage is already in the DOM, grab it and skip stage initialization\r\n\t\tif (this.$stage.length) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.$element.addClass(this.options.loadingClass);\r\n\r\n\t\t// create stage\r\n\t\tthis.$stage = $('<' + this.settings.stageElement + '>', {\r\n\t\t\t\"class\": this.settings.stageClass\r\n\t\t}).wrap( $( '
', {\r\n\t\t\t\"class\": this.settings.stageOuterClass\r\n\t\t}));\r\n\r\n\t\t// append stage\r\n\t\tthis.$element.append(this.$stage.parent());\r\n\t};\r\n\r\n\t/**\r\n\t * Create item DOM elements\r\n\t */\r\n\tOwl.prototype.initializeItems = function() {\r\n\t\tvar $items = this.$element.find('.owl-item');\r\n\r\n\t\t// if the items are already in the DOM, grab them and skip item initialization\r\n\t\tif ($items.length) {\r\n\t\t\tthis._items = $items.get().map(function(item) {\r\n\t\t\t\treturn $(item);\r\n\t\t\t});\r\n\r\n\t\t\tthis._mergers = this._items.map(function() {\r\n\t\t\t\treturn 1;\r\n\t\t\t});\r\n\r\n\t\t\tthis.refresh();\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// append content\r\n\t\tthis.replace(this.$element.children().not(this.$stage.parent()));\r\n\r\n\t\t// check visibility\r\n\t\tif (this.isVisible()) {\r\n\t\t\t// update view\r\n\t\t\tthis.refresh();\r\n\t\t} else {\r\n\t\t\t// invalidate width\r\n\t\t\tthis.invalidate('width');\r\n\t\t}\r\n\r\n\t\tthis.$element\r\n\t\t\t.removeClass(this.options.loadingClass)\r\n\t\t\t.addClass(this.options.loadedClass);\r\n\t};\r\n\r\n\t/**\r\n\t * Initializes the carousel.\r\n\t * @protected\r\n\t */\r\n\tOwl.prototype.initialize = function() {\r\n\t\tthis.enter('initializing');\r\n\t\tthis.trigger('initialize');\r\n\r\n\t\tthis.$element.toggleClass(this.settings.rtlClass, this.settings.rtl);\r\n\r\n\t\tif (this.settings.autoWidth && !this.is('pre-loading')) {\r\n\t\t\tvar imgs, nestedSelector, width;\r\n\t\t\timgs = this.$element.find('img');\r\n\t\t\tnestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined;\r\n\t\t\twidth = this.$element.children(nestedSelector).width();\r\n\r\n\t\t\tif (imgs.length && width <= 0) {\r\n\t\t\t\tthis.preloadAutoWidthImages(imgs);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.initializeStage();\r\n\t\tthis.initializeItems();\r\n\r\n\t\t// register event handlers\r\n\t\tthis.registerEventHandlers();\r\n\r\n\t\tthis.leave('initializing');\r\n\t\tthis.trigger('initialized');\r\n\t};\r\n\r\n\t/**\r\n\t * @returns {Boolean} visibility of $element\r\n\t * if you know the carousel will always be visible you can set `checkVisibility` to `false` to\r\n\t * prevent the expensive browser layout forced reflow the $element.is(':visible') does\r\n\t */\r\n\tOwl.prototype.isVisible = function() {\r\n\t\treturn this.settings.checkVisibility\r\n\t\t\t? this.$element.is(':visible')\r\n\t\t\t: true;\r\n\t};\r\n\r\n\t/**\r\n\t * Setups the current settings.\r\n\t * @todo Remove responsive classes. Why should adaptive designs be brought into IE8?\r\n\t * @todo Support for media queries by using `matchMedia` would be nice.\r\n\t * @public\r\n\t */\r\n\tOwl.prototype.setup = function() {\r\n\t\tvar viewport = this.viewport(),\r\n\t\t\toverwrites = this.options.responsive,\r\n\t\t\tmatch = -1,\r\n\t\t\tsettings = null;\r\n\r\n\t\tif (!overwrites) {\r\n\t\t\tsettings = $.extend({}, this.options);\r\n\t\t} else {\r\n\t\t\t$.each(overwrites, function(breakpoint) {\r\n\t\t\t\tif (breakpoint <= viewport && breakpoint > match) {\r\n\t\t\t\t\tmatch = Number(breakpoint);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tsettings = $.extend({}, this.options, overwrites[match]);\r\n\t\t\tif (typeof settings.stagePadding === 'function') {\r\n\t\t\t\tsettings.stagePadding = settings.stagePadding();\r\n\t\t\t}\r\n\t\t\tdelete settings.responsive;\r\n\r\n\t\t\t// responsive class\r\n\t\t\tif (settings.responsiveClass) {\r\n\t\t\t\tthis.$element.attr('class',\r\n\t\t\t\t\tthis.$element.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\\\S+\\\\s', 'g'), '$1' + match)\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.trigger('change', { property: { name: 'settings', value: settings } });\r\n\t\tthis._breakpoint = match;\r\n\t\tthis.settings = settings;\r\n\t\tthis.invalidate('settings');\r\n\t\tthis.trigger('changed', { property: { name: 'settings', value: this.settings } });\r\n\t};\r\n\r\n\t/**\r\n\t * Updates option logic if necessery.\r\n\t * @protected\r\n\t */\r\n\tOwl.prototype.optionsLogic = function() {\r\n\t\tif (this.settings.autoWidth) {\r\n\t\t\tthis.settings.stagePadding = false;\r\n\t\t\tthis.settings.merge = false;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Prepares an item before add.\r\n\t * @todo Rename event parameter `content` to `item`.\r\n\t * @protected\r\n\t * @returns {jQuery|HTMLElement} - The item container.\r\n\t */\r\n\tOwl.prototype.prepare = function(item) {\r\n\t\tvar event = this.trigger('prepare', { content: item });\r\n\r\n\t\tif (!event.data) {\r\n\t\t\tevent.data = $('<' + this.settings.itemElement + '/>')\r\n\t\t\t\t.addClass(this.options.itemClass).append(item)\r\n\t\t}\r\n\r\n\t\tthis.trigger('prepared', { content: event.data });\r\n\r\n\t\treturn event.data;\r\n\t};\r\n\r\n\t/**\r\n\t * Updates the view.\r\n\t * @public\r\n\t */\r\n\tOwl.prototype.update = function() {\r\n\t\tvar i = 0,\r\n\t\t\tn = this._pipe.length,\r\n\t\t\tfilter = $.proxy(function(p) { return this[p] }, this._invalidated),\r\n\t\t\tcache = {};\r\n\r\n\t\twhile (i < n) {\r\n\t\t\tif (this._invalidated.all || $.grep(this._pipe[i].filter, filter).length > 0) {\r\n\t\t\t\tthis._pipe[i].run(cache);\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\tthis._invalidated = {};\r\n\r\n\t\t!this.is('valid') && this.enter('valid');\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the width of the view.\r\n\t * @public\r\n\t * @param {Owl.Width} [dimension=Owl.Width.Default] - The dimension to return.\r\n\t * @returns {Number} - The width of the view in pixel.\r\n\t */\r\n\tOwl.prototype.width = function(dimension) {\r\n\t\tdimension = dimension || Owl.Width.Default;\r\n\t\tswitch (dimension) {\r\n\t\t\tcase Owl.Width.Inner:\r\n\t\t\tcase Owl.Width.Outer:\r\n\t\t\t\treturn this._width;\r\n\t\t\tdefault:\r\n\t\t\t\treturn this._width - this.settings.stagePadding * 2 + this.settings.margin;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Refreshes the carousel primarily for adaptive purposes.\r\n\t * @public\r\n\t */\r\n\tOwl.prototype.refresh = function() {\r\n\t\tthis.enter('refreshing');\r\n\t\tthis.trigger('refresh');\r\n\r\n\t\tthis.setup();\r\n\r\n\t\tthis.optionsLogic();\r\n\r\n\t\tthis.$element.addClass(this.options.refreshClass);\r\n\r\n\t\tthis.update();\r\n\r\n\t\tthis.$element.removeClass(this.options.refreshClass);\r\n\r\n\t\tthis.leave('refreshing');\r\n\t\tthis.trigger('refreshed');\r\n\t};\r\n\r\n\t/**\r\n\t * Checks window `resize` event.\r\n\t * @protected\r\n\t */\r\n\tOwl.prototype.onThrottledResize = function() {\r\n\t\twindow.clearTimeout(this.resizeTimer);\r\n\t\tthis.resizeTimer = window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate);\r\n\t};\r\n\r\n\t/**\r\n\t * Checks window `resize` event.\r\n\t * @protected\r\n\t */\r\n\tOwl.prototype.onResize = function() {\r\n\t\tif (!this._items.length) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._width === this.$element.width()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (!this.isVisible()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.enter('resizing');\r\n\r\n\t\tif (this.trigger('resize').isDefaultPrevented()) {\r\n\t\t\tthis.leave('resizing');\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.invalidate('width');\r\n\r\n\t\tthis.refresh();\r\n\r\n\t\tthis.leave('resizing');\r\n\t\tthis.trigger('resized');\r\n\t};\r\n\r\n\t/**\r\n\t * Registers event handlers.\r\n\t * @todo Check `msPointerEnabled`\r\n\t * @todo #261\r\n\t * @protected\r\n\t */\r\n\tOwl.prototype.registerEventHandlers = function() {\r\n\t\tif ($.support.transition) {\r\n\t\t\tthis.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.onTransitionEnd, this));\r\n\t\t}\r\n\r\n\t\tif (this.settings.responsive !== false) {\r\n\t\t\tthis.on(window, 'resize', this._handlers.onThrottledResize);\r\n\t\t}\r\n\r\n\t\tif (this.settings.mouseDrag) {\r\n\t\t\tthis.$element.addClass(this.options.dragClass);\r\n\t\t\tthis.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this));\r\n\t\t\tthis.$stage.on('dragstart.owl.core selectstart.owl.core', function() { return false });\r\n\t\t}\r\n\r\n\t\tif (this.settings.touchDrag){\r\n\t\t\tthis.$stage.on('touchstart.owl.core', $.proxy(this.onDragStart, this));\r\n\t\t\tthis.$stage.on('touchcancel.owl.core', $.proxy(this.onDragEnd, this));\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Handles `touchstart` and `mousedown` events.\r\n\t * @todo Horizontal swipe threshold as option\r\n\t * @todo #261\r\n\t * @protected\r\n\t * @param {Event} event - The event arguments.\r\n\t */\r\n\tOwl.prototype.onDragStart = function(event) {\r\n\t\tvar stage = null;\r\n\r\n\t\tif (event.which === 3) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ($.support.transform) {\r\n\t\t\tstage = this.$stage.css('transform').replace(/.*\\(|\\)| /g, '').split(',');\r\n\t\t\tstage = {\r\n\t\t\t\tx: stage[stage.length === 16 ? 12 : 4],\r\n\t\t\t\ty: stage[stage.length === 16 ? 13 : 5]\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tstage = this.$stage.position();\r\n\t\t\tstage = {\r\n\t\t\t\tx: this.settings.rtl ?\r\n\t\t\t\t\tstage.left + this.$stage.width() - this.width() + this.settings.margin :\r\n\t\t\t\t\tstage.left,\r\n\t\t\t\ty: stage.top\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tif (this.is('animating')) {\r\n\t\t\t$.support.transform ? this.animate(stage.x) : this.$stage.stop()\r\n\t\t\tthis.invalidate('position');\r\n\t\t}\r\n\r\n\t\tthis.$element.toggleClass(this.options.grabClass, event.type === 'mousedown');\r\n\r\n\t\tthis.speed(0);\r\n\r\n\t\tthis._drag.time = new Date().getTime();\r\n\t\tthis._drag.target = $(event.target);\r\n\t\tthis._drag.stage.start = stage;\r\n\t\tthis._drag.stage.current = stage;\r\n\t\tthis._drag.pointer = this.pointer(event);\r\n\r\n\t\t$(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this));\r\n\r\n\t\t$(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event) {\r\n\t\t\tvar delta = this.difference(this._drag.pointer, this.pointer(event));\r\n\r\n\t\t\t$(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this));\r\n\r\n\t\t\tif (Math.abs(delta.x) < Math.abs(delta.y) && this.is('valid')) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tevent.preventDefault();\r\n\r\n\t\t\tthis.enter('dragging');\r\n\t\t\tthis.trigger('drag');\r\n\t\t}, this));\r\n\t};\r\n\r\n\t/**\r\n\t * Handles the `touchmove` and `mousemove` events.\r\n\t * @todo #261\r\n\t * @protected\r\n\t * @param {Event} event - The event arguments.\r\n\t */\r\n\tOwl.prototype.onDragMove = function(event) {\r\n\t\tvar minimum = null,\r\n\t\t\tmaximum = null,\r\n\t\t\tpull = null,\r\n\t\t\tdelta = this.difference(this._drag.pointer, this.pointer(event)),\r\n\t\t\tstage = this.difference(this._drag.stage.start, delta);\r\n\r\n\t\tif (!this.is('dragging')) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tevent.preventDefault();\r\n\r\n\t\tif (this.settings.loop) {\r\n\t\t\tminimum = this.coordinates(this.minimum());\r\n\t\t\tmaximum = this.coordinates(this.maximum() + 1) - minimum;\r\n\t\t\tstage.x = (((stage.x - minimum) % maximum + maximum) % maximum) + minimum;\r\n\t\t} else {\r\n\t\t\tminimum = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum());\r\n\t\t\tmaximum = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum());\r\n\t\t\tpull = this.settings.pullDrag ? -1 * delta.x / 5 : 0;\r\n\t\t\tstage.x = Math.max(Math.min(stage.x, minimum + pull), maximum + pull);\r\n\t\t}\r\n\r\n\t\tthis._drag.stage.current = stage;\r\n\r\n\t\tthis.animate(stage.x);\r\n\t};\r\n\r\n\t/**\r\n\t * Handles the `touchend` and `mouseup` events.\r\n\t * @todo #261\r\n\t * @todo Threshold for click event\r\n\t * @protected\r\n\t * @param {Event} event - The event arguments.\r\n\t */\r\n\tOwl.prototype.onDragEnd = function(event) {\r\n\t\tvar delta = this.difference(this._drag.pointer, this.pointer(event)),\r\n\t\t\tstage = this._drag.stage.current,\r\n\t\t\tdirection = delta.x > 0 ^ this.settings.rtl ? 'left' : 'right';\r\n\r\n\t\t$(document).off('.owl.core');\r\n\r\n\t\tthis.$element.removeClass(this.options.grabClass);\r\n\r\n\t\tif (delta.x !== 0 && this.is('dragging') || !this.is('valid')) {\r\n\t\t\tthis.speed(this.settings.dragEndSpeed || this.settings.smartSpeed);\r\n\t\t\tthis.current(this.closest(stage.x, delta.x !== 0 ? direction : this._drag.direction));\r\n\t\t\tthis.invalidate('position');\r\n\t\t\tthis.update();\r\n\r\n\t\t\tthis._drag.direction = direction;\r\n\r\n\t\t\tif (Math.abs(delta.x) > 3 || new Date().getTime() - this._drag.time > 300) {\r\n\t\t\t\tthis._drag.target.one('click.owl.core', function() { return false; });\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!this.is('dragging')) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.leave('dragging');\r\n\t\tthis.trigger('dragged');\r\n\t};\r\n\r\n\t/**\r\n\t * Gets absolute position of the closest item for a coordinate.\r\n\t * @todo Setting `freeDrag` makes `closest` not reusable. See #165.\r\n\t * @protected\r\n\t * @param {Number} coordinate - The coordinate in pixel.\r\n\t * @param {String} direction - The direction to check for the closest item. Ether `left` or `right`.\r\n\t * @return {Number} - The absolute position of the closest item.\r\n\t */\r\n\tOwl.prototype.closest = function(coordinate, direction) {\r\n\t\tvar position = -1,\r\n\t\t\tpull = 30,\r\n\t\t\twidth = this.width(),\r\n\t\t\tcoordinates = this.coordinates();\r\n\r\n\t\tif (!this.settings.freeDrag) {\r\n\t\t\t// check closest item\r\n\t\t\t$.each(coordinates, $.proxy(function(index, value) {\r\n\t\t\t\t// on a left pull, check on current index\r\n\t\t\t\tif (direction === 'left' && coordinate > value - pull && coordinate < value + pull) {\r\n\t\t\t\t\tposition = index;\r\n\t\t\t\t// on a right pull, check on previous index\r\n\t\t\t\t// to do so, subtract width from value and set position = index + 1\r\n\t\t\t\t} else if (direction === 'right' && coordinate > value - width - pull && coordinate < value - width + pull) {\r\n\t\t\t\t\tposition = index + 1;\r\n\t\t\t\t} else if (this.op(coordinate, '<', value)\r\n\t\t\t\t\t&& this.op(coordinate, '>', coordinates[index + 1] !== undefined ? coordinates[index + 1] : value - width)) {\r\n\t\t\t\t\tposition = direction === 'left' ? index + 1 : index;\r\n\t\t\t\t}\r\n\t\t\t\treturn position === -1;\r\n\t\t\t}, this));\r\n\t\t}\r\n\r\n\t\tif (!this.settings.loop) {\r\n\t\t\t// non loop boundries\r\n\t\t\tif (this.op(coordinate, '>', coordinates[this.minimum()])) {\r\n\t\t\t\tposition = coordinate = this.minimum();\r\n\t\t\t} else if (this.op(coordinate, '<', coordinates[this.maximum()])) {\r\n\t\t\t\tposition = coordinate = this.maximum();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn position;\r\n\t};\r\n\r\n\t/**\r\n\t * Animates the stage.\r\n\t * @todo #270\r\n\t * @public\r\n\t * @param {Number} coordinate - The coordinate in pixels.\r\n\t */\r\n\tOwl.prototype.animate = function(coordinate) {\r\n\t\tvar animate = this.speed() > 0;\r\n\r\n\t\tthis.is('animating') && this.onTransitionEnd();\r\n\r\n\t\tif (animate) {\r\n\t\t\tthis.enter('animating');\r\n\t\t\tthis.trigger('translate');\r\n\t\t}\r\n\r\n\t\tif ($.support.transform3d && $.support.transition) {\r\n\t\t\tthis.$stage.css({\r\n\t\t\t\ttransform: 'translate3d(' + coordinate + 'px,0px,0px)',\r\n\t\t\t\ttransition: (this.speed() / 1000) + 's' + (\r\n\t\t\t\t\tthis.settings.slideTransition ? ' ' + this.settings.slideTransition : ''\r\n\t\t\t\t)\r\n\t\t\t});\r\n\t\t} else if (animate) {\r\n\t\t\tthis.$stage.animate({\r\n\t\t\t\tleft: coordinate + 'px'\r\n\t\t\t}, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this));\r\n\t\t} else {\r\n\t\t\tthis.$stage.css({\r\n\t\t\t\tleft: coordinate + 'px'\r\n\t\t\t});\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Checks whether the carousel is in a specific state or not.\r\n\t * @param {String} state - The state to check.\r\n\t * @returns {Boolean} - The flag which indicates if the carousel is busy.\r\n\t */\r\n\tOwl.prototype.is = function(state) {\r\n\t\treturn this._states.current[state] && this._states.current[state] > 0;\r\n\t};\r\n\r\n\t/**\r\n\t * Sets the absolute position of the current item.\r\n\t * @public\r\n\t * @param {Number} [position] - The new absolute position or nothing to leave it unchanged.\r\n\t * @returns {Number} - The absolute position of the current item.\r\n\t */\r\n\tOwl.prototype.current = function(position) {\r\n\t\tif (position === undefined) {\r\n\t\t\treturn this._current;\r\n\t\t}\r\n\r\n\t\tif (this._items.length === 0) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tposition = this.normalize(position);\r\n\r\n\t\tif (this._current !== position) {\r\n\t\t\tvar event = this.trigger('change', { property: { name: 'position', value: position } });\r\n\r\n\t\t\tif (event.data !== undefined) {\r\n\t\t\t\tposition = this.normalize(event.data);\r\n\t\t\t}\r\n\r\n\t\t\tthis._current = position;\r\n\r\n\t\t\tthis.invalidate('position');\r\n\r\n\t\t\tthis.trigger('changed', { property: { name: 'position', value: this._current } });\r\n\t\t}\r\n\r\n\t\treturn this._current;\r\n\t};\r\n\r\n\t/**\r\n\t * Invalidates the given part of the update routine.\r\n\t * @param {String} [part] - The part to invalidate.\r\n\t * @returns {Array.} - The invalidated parts.\r\n\t */\r\n\tOwl.prototype.invalidate = function(part) {\r\n\t\tif ($.type(part) === 'string') {\r\n\t\t\tthis._invalidated[part] = true;\r\n\t\t\tthis.is('valid') && this.leave('valid');\r\n\t\t}\r\n\t\treturn $.map(this._invalidated, function(v, i) { return i });\r\n\t};\r\n\r\n\t/**\r\n\t * Resets the absolute position of the current item.\r\n\t * @public\r\n\t * @param {Number} position - The absolute position of the new item.\r\n\t */\r\n\tOwl.prototype.reset = function(position) {\r\n\t\tposition = this.normalize(position);\r\n\r\n\t\tif (position === undefined) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._speed = 0;\r\n\t\tthis._current = position;\r\n\r\n\t\tthis.suppress([ 'translate', 'translated' ]);\r\n\r\n\t\tthis.animate(this.coordinates(position));\r\n\r\n\t\tthis.release([ 'translate', 'translated' ]);\r\n\t};\r\n\r\n\t/**\r\n\t * Normalizes an absolute or a relative position of an item.\r\n\t * @public\r\n\t * @param {Number} position - The absolute or relative position to normalize.\r\n\t * @param {Boolean} [relative=false] - Whether the given position is relative or not.\r\n\t * @returns {Number} - The normalized position.\r\n\t */\r\n\tOwl.prototype.normalize = function(position, relative) {\r\n\t\tvar n = this._items.length,\r\n\t\t\tm = relative ? 0 : this._clones.length;\r\n\r\n\t\tif (!this.isNumeric(position) || n < 1) {\r\n\t\t\tposition = undefined;\r\n\t\t} else if (position < 0 || position >= n + m) {\r\n\t\t\tposition = ((position - m / 2) % n + n) % n + m / 2;\r\n\t\t}\r\n\r\n\t\treturn position;\r\n\t};\r\n\r\n\t/**\r\n\t * Converts an absolute position of an item into a relative one.\r\n\t * @public\r\n\t * @param {Number} position - The absolute position to convert.\r\n\t * @returns {Number} - The converted position.\r\n\t */\r\n\tOwl.prototype.relative = function(position) {\r\n\t\tposition -= this._clones.length / 2;\r\n\t\treturn this.normalize(position, true);\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the maximum position for the current item.\r\n\t * @public\r\n\t * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.\r\n\t * @returns {Number}\r\n\t */\r\n\tOwl.prototype.maximum = function(relative) {\r\n\t\tvar settings = this.settings,\r\n\t\t\tmaximum = this._coordinates.length,\r\n\t\t\titerator,\r\n\t\t\treciprocalItemsWidth,\r\n\t\t\telementWidth;\r\n\r\n\t\tif (settings.loop) {\r\n\t\t\tmaximum = this._clones.length / 2 + this._items.length - 1;\r\n\t\t} else if (settings.autoWidth || settings.merge) {\r\n\t\t\titerator = this._items.length;\r\n\t\t\tif (iterator) {\r\n\t\t\t\treciprocalItemsWidth = this._items[--iterator].width();\r\n\t\t\t\telementWidth = this.$element.width();\r\n\t\t\t\twhile (iterator--) {\r\n\t\t\t\t\treciprocalItemsWidth += this._items[iterator].width() + this.settings.margin;\r\n\t\t\t\t\tif (reciprocalItemsWidth > elementWidth) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmaximum = iterator + 1;\r\n\t\t} else if (settings.center) {\r\n\t\t\tmaximum = this._items.length - 1;\r\n\t\t} else {\r\n\t\t\tmaximum = this._items.length - settings.items;\r\n\t\t}\r\n\r\n\t\tif (relative) {\r\n\t\t\tmaximum -= this._clones.length / 2;\r\n\t\t}\r\n\r\n\t\treturn Math.max(maximum, 0);\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the minimum position for the current item.\r\n\t * @public\r\n\t * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position.\r\n\t * @returns {Number}\r\n\t */\r\n\tOwl.prototype.minimum = function(relative) {\r\n\t\treturn relative ? 0 : this._clones.length / 2;\r\n\t};\r\n\r\n\t/**\r\n\t * Gets an item at the specified relative position.\r\n\t * @public\r\n\t * @param {Number} [position] - The relative position of the item.\r\n\t * @return {jQuery|Array.} - The item at the given position or all items if no position was given.\r\n\t */\r\n\tOwl.prototype.items = function(position) {\r\n\t\tif (position === undefined) {\r\n\t\t\treturn this._items.slice();\r\n\t\t}\r\n\r\n\t\tposition = this.normalize(position, true);\r\n\t\treturn this._items[position];\r\n\t};\r\n\r\n\t/**\r\n\t * Gets an item at the specified relative position.\r\n\t * @public\r\n\t * @param {Number} [position] - The relative position of the item.\r\n\t * @return {jQuery|Array.} - The item at the given position or all items if no position was given.\r\n\t */\r\n\tOwl.prototype.mergers = function(position) {\r\n\t\tif (position === undefined) {\r\n\t\t\treturn this._mergers.slice();\r\n\t\t}\r\n\r\n\t\tposition = this.normalize(position, true);\r\n\t\treturn this._mergers[position];\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the absolute positions of clones for an item.\r\n\t * @public\r\n\t * @param {Number} [position] - The relative position of the item.\r\n\t * @returns {Array.} - The absolute positions of clones for the item or all if no position was given.\r\n\t */\r\n\tOwl.prototype.clones = function(position) {\r\n\t\tvar odd = this._clones.length / 2,\r\n\t\t\teven = odd + this._items.length,\r\n\t\t\tmap = function(index) { return index % 2 === 0 ? even + index / 2 : odd - (index + 1) / 2 };\r\n\r\n\t\tif (position === undefined) {\r\n\t\t\treturn $.map(this._clones, function(v, i) { return map(i) });\r\n\t\t}\r\n\r\n\t\treturn $.map(this._clones, function(v, i) { return v === position ? map(i) : null });\r\n\t};\r\n\r\n\t/**\r\n\t * Sets the current animation speed.\r\n\t * @public\r\n\t * @param {Number} [speed] - The animation speed in milliseconds or nothing to leave it unchanged.\r\n\t * @returns {Number} - The current animation speed in milliseconds.\r\n\t */\r\n\tOwl.prototype.speed = function(speed) {\r\n\t\tif (speed !== undefined) {\r\n\t\t\tthis._speed = speed;\r\n\t\t}\r\n\r\n\t\treturn this._speed;\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the coordinate of an item.\r\n\t * @todo The name of this method is missleanding.\r\n\t * @public\r\n\t * @param {Number} position - The absolute position of the item within `minimum()` and `maximum()`.\r\n\t * @returns {Number|Array.} - The coordinate of the item in pixel or all coordinates.\r\n\t */\r\n\tOwl.prototype.coordinates = function(position) {\r\n\t\tvar multiplier = 1,\r\n\t\t\tnewPosition = position - 1,\r\n\t\t\tcoordinate;\r\n\r\n\t\tif (position === undefined) {\r\n\t\t\treturn $.map(this._coordinates, $.proxy(function(coordinate, index) {\r\n\t\t\t\treturn this.coordinates(index);\r\n\t\t\t}, this));\r\n\t\t}\r\n\r\n\t\tif (this.settings.center) {\r\n\t\t\tif (this.settings.rtl) {\r\n\t\t\t\tmultiplier = -1;\r\n\t\t\t\tnewPosition = position + 1;\r\n\t\t\t}\r\n\r\n\t\t\tcoordinate = this._coordinates[position];\r\n\t\t\tcoordinate += (this.width() - coordinate + (this._coordinates[newPosition] || 0)) / 2 * multiplier;\r\n\t\t} else {\r\n\t\t\tcoordinate = this._coordinates[newPosition] || 0;\r\n\t\t}\r\n\r\n\t\tcoordinate = Math.ceil(coordinate);\r\n\r\n\t\treturn coordinate;\r\n\t};\r\n\r\n\t/**\r\n\t * Calculates the speed for a translation.\r\n\t * @protected\r\n\t * @param {Number} from - The absolute position of the start item.\r\n\t * @param {Number} to - The absolute position of the target item.\r\n\t * @param {Number} [factor=undefined] - The time factor in milliseconds.\r\n\t * @returns {Number} - The time in milliseconds for the translation.\r\n\t */\r\n\tOwl.prototype.duration = function(from, to, factor) {\r\n\t\tif (factor === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\treturn Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor || this.settings.smartSpeed));\r\n\t};\r\n\r\n\t/**\r\n\t * Slides to the specified item.\r\n\t * @public\r\n\t * @param {Number} position - The position of the item.\r\n\t * @param {Number} [speed] - The time in milliseconds for the transition.\r\n\t */\r\n\tOwl.prototype.to = function(position, speed) {\r\n\t\tvar current = this.current(),\r\n\t\t\trevert = null,\r\n\t\t\tdistance = position - this.relative(current),\r\n\t\t\tdirection = (distance > 0) - (distance < 0),\r\n\t\t\titems = this._items.length,\r\n\t\t\tminimum = this.minimum(),\r\n\t\t\tmaximum = this.maximum();\r\n\r\n\t\tif (this.settings.loop) {\r\n\t\t\tif (!this.settings.rewind && Math.abs(distance) > items / 2) {\r\n\t\t\t\tdistance += direction * -1 * items;\r\n\t\t\t}\r\n\r\n\t\t\tposition = current + distance;\r\n\t\t\trevert = ((position - minimum) % items + items) % items + minimum;\r\n\r\n\t\t\tif (revert !== position && revert - distance <= maximum && revert - distance > 0) {\r\n\t\t\t\tcurrent = revert - distance;\r\n\t\t\t\tposition = revert;\r\n\t\t\t\tthis.reset(current);\r\n\t\t\t}\r\n\t\t} else if (this.settings.rewind) {\r\n\t\t\tmaximum += 1;\r\n\t\t\tposition = (position % maximum + maximum) % maximum;\r\n\t\t} else {\r\n\t\t\tposition = Math.max(minimum, Math.min(maximum, position));\r\n\t\t}\r\n\r\n\t\tthis.speed(this.duration(current, position, speed));\r\n\t\tthis.current(position);\r\n\r\n\t\tif (this.isVisible()) {\r\n\t\t\tthis.update();\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Slides to the next item.\r\n\t * @public\r\n\t * @param {Number} [speed] - The time in milliseconds for the transition.\r\n\t */\r\n\tOwl.prototype.next = function(speed) {\r\n\t\tspeed = speed || false;\r\n\t\tthis.to(this.relative(this.current()) + 1, speed);\r\n\t};\r\n\r\n\t/**\r\n\t * Slides to the previous item.\r\n\t * @public\r\n\t * @param {Number} [speed] - The time in milliseconds for the transition.\r\n\t */\r\n\tOwl.prototype.prev = function(speed) {\r\n\t\tspeed = speed || false;\r\n\t\tthis.to(this.relative(this.current()) - 1, speed);\r\n\t};\r\n\r\n\t/**\r\n\t * Handles the end of an animation.\r\n\t * @protected\r\n\t * @param {Event} event - The event arguments.\r\n\t */\r\n\tOwl.prototype.onTransitionEnd = function(event) {\r\n\r\n\t\t// if css2 animation then event object is undefined\r\n\t\tif (event !== undefined) {\r\n\t\t\tevent.stopPropagation();\r\n\r\n\t\t\t// Catch only owl-stage transitionEnd event\r\n\t\t\tif ((event.target || event.srcElement || event.originalTarget) !== this.$stage.get(0)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.leave('animating');\r\n\t\tthis.trigger('translated');\r\n\t};\r\n\r\n\t/**\r\n\t * Gets viewport width.\r\n\t * @protected\r\n\t * @return {Number} - The width in pixel.\r\n\t */\r\n\tOwl.prototype.viewport = function() {\r\n\t\tvar width;\r\n\t\tif (this.options.responsiveBaseElement !== window) {\r\n\t\t\twidth = $(this.options.responsiveBaseElement).width();\r\n\t\t} else if (window.innerWidth) {\r\n\t\t\twidth = window.innerWidth;\r\n\t\t} else if (document.documentElement && document.documentElement.clientWidth) {\r\n\t\t\twidth = document.documentElement.clientWidth;\r\n\t\t} else {\r\n\t\t\tconsole.warn('Can not detect viewport width.');\r\n\t\t}\r\n\t\treturn width;\r\n\t};\r\n\r\n\t/**\r\n\t * Replaces the current content.\r\n\t * @public\r\n\t * @param {HTMLElement|jQuery|String} content - The new content.\r\n\t */\r\n\tOwl.prototype.replace = function(content) {\r\n\t\tthis.$stage.empty();\r\n\t\tthis._items = [];\r\n\r\n\t\tif (content) {\r\n\t\t\tcontent = (content instanceof jQuery) ? content : $(content);\r\n\t\t}\r\n\r\n\t\tif (this.settings.nestedItemSelector) {\r\n\t\t\tcontent = content.find('.' + this.settings.nestedItemSelector);\r\n\t\t}\r\n\r\n\t\tcontent.filter(function() {\r\n\t\t\treturn this.nodeType === 1;\r\n\t\t}).each($.proxy(function(index, item) {\r\n\t\t\titem = this.prepare(item);\r\n\t\t\tthis.$stage.append(item);\r\n\t\t\tthis._items.push(item);\r\n\t\t\tthis._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);\r\n\t\t}, this));\r\n\r\n\t\tthis.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0);\r\n\r\n\t\tthis.invalidate('items');\r\n\t};\r\n\r\n\t/**\r\n\t * Adds an item.\r\n\t * @todo Use `item` instead of `content` for the event arguments.\r\n\t * @public\r\n\t * @param {HTMLElement|jQuery|String} content - The item content to add.\r\n\t * @param {Number} [position] - The relative position at which to insert the item otherwise the item will be added to the end.\r\n\t */\r\n\tOwl.prototype.add = function(content, position) {\r\n\t\tvar current = this.relative(this._current);\r\n\r\n\t\tposition = position === undefined ? this._items.length : this.normalize(position, true);\r\n\t\tcontent = content instanceof jQuery ? content : $(content);\r\n\r\n\t\tthis.trigger('add', { content: content, position: position });\r\n\r\n\t\tcontent = this.prepare(content);\r\n\r\n\t\tif (this._items.length === 0 || position === this._items.length) {\r\n\t\t\tthis._items.length === 0 && this.$stage.append(content);\r\n\t\t\tthis._items.length !== 0 && this._items[position - 1].after(content);\r\n\t\t\tthis._items.push(content);\r\n\t\t\tthis._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);\r\n\t\t} else {\r\n\t\t\tthis._items[position].before(content);\r\n\t\t\tthis._items.splice(position, 0, content);\r\n\t\t\tthis._mergers.splice(position, 0, content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1);\r\n\t\t}\r\n\r\n\t\tthis._items[current] && this.reset(this._items[current].index());\r\n\r\n\t\tthis.invalidate('items');\r\n\r\n\t\tthis.trigger('added', { content: content, position: position });\r\n\t};\r\n\r\n\t/**\r\n\t * Removes an item by its position.\r\n\t * @todo Use `item` instead of `content` for the event arguments.\r\n\t * @public\r\n\t * @param {Number} position - The relative position of the item to remove.\r\n\t */\r\n\tOwl.prototype.remove = function(position) {\r\n\t\tposition = this.normalize(position, true);\r\n\r\n\t\tif (position === undefined) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.trigger('remove', { content: this._items[position], position: position });\r\n\r\n\t\tthis._items[position].remove();\r\n\t\tthis._items.splice(position, 1);\r\n\t\tthis._mergers.splice(position, 1);\r\n\r\n\t\tthis.invalidate('items');\r\n\r\n\t\tthis.trigger('removed', { content: null, position: position });\r\n\t};\r\n\r\n\t/**\r\n\t * Preloads images with auto width.\r\n\t * @todo Replace by a more generic approach\r\n\t * @protected\r\n\t */\r\n\tOwl.prototype.preloadAutoWidthImages = function(images) {\r\n\t\timages.each($.proxy(function(i, element) {\r\n\t\t\tthis.enter('pre-loading');\r\n\t\t\telement = $(element);\r\n\t\t\t$(new Image()).one('load', $.proxy(function(e) {\r\n\t\t\t\telement.attr('src', e.target.src);\r\n\t\t\t\telement.css('opacity', 1);\r\n\t\t\t\tthis.leave('pre-loading');\r\n\t\t\t\t!this.is('pre-loading') && !this.is('initializing') && this.refresh();\r\n\t\t\t}, this)).attr('src', element.attr('src') || element.attr('data-src') || element.attr('data-src-retina'));\r\n\t\t}, this));\r\n\t};\r\n\r\n\t/**\r\n\t * Destroys the carousel.\r\n\t * @public\r\n\t */\r\n\tOwl.prototype.destroy = function() {\r\n\r\n\t\tthis.$element.off('.owl.core');\r\n\t\tthis.$stage.off('.owl.core');\r\n\t\t$(document).off('.owl.core');\r\n\r\n\t\tif (this.settings.responsive !== false) {\r\n\t\t\twindow.clearTimeout(this.resizeTimer);\r\n\t\t\tthis.off(window, 'resize', this._handlers.onThrottledResize);\r\n\t\t}\r\n\r\n\t\tfor (var i in this._plugins) {\r\n\t\t\tthis._plugins[i].destroy();\r\n\t\t}\r\n\r\n\t\tthis.$stage.children('.cloned').remove();\r\n\r\n\t\tthis.$stage.unwrap();\r\n\t\tthis.$stage.children().contents().unwrap();\r\n\t\tthis.$stage.children().unwrap();\r\n\t\tthis.$stage.remove();\r\n\t\tthis.$element\r\n\t\t\t.removeClass(this.options.refreshClass)\r\n\t\t\t.removeClass(this.options.loadingClass)\r\n\t\t\t.removeClass(this.options.loadedClass)\r\n\t\t\t.removeClass(this.options.rtlClass)\r\n\t\t\t.removeClass(this.options.dragClass)\r\n\t\t\t.removeClass(this.options.grabClass)\r\n\t\t\t.attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\\\S+\\\\s', 'g'), ''))\r\n\t\t\t.removeData('owl.carousel');\r\n\t};\r\n\r\n\t/**\r\n\t * Operators to calculate right-to-left and left-to-right.\r\n\t * @protected\r\n\t * @param {Number} [a] - The left side operand.\r\n\t * @param {String} [o] - The operator.\r\n\t * @param {Number} [b] - The right side operand.\r\n\t */\r\n\tOwl.prototype.op = function(a, o, b) {\r\n\t\tvar rtl = this.settings.rtl;\r\n\t\tswitch (o) {\r\n\t\t\tcase '<':\r\n\t\t\t\treturn rtl ? a > b : a < b;\r\n\t\t\tcase '>':\r\n\t\t\t\treturn rtl ? a < b : a > b;\r\n\t\t\tcase '>=':\r\n\t\t\t\treturn rtl ? a <= b : a >= b;\r\n\t\t\tcase '<=':\r\n\t\t\t\treturn rtl ? a >= b : a <= b;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Attaches to an internal event.\r\n\t * @protected\r\n\t * @param {HTMLElement} element - The event source.\r\n\t * @param {String} event - The event name.\r\n\t * @param {Function} listener - The event handler to attach.\r\n\t * @param {Boolean} capture - Wether the event should be handled at the capturing phase or not.\r\n\t */\r\n\tOwl.prototype.on = function(element, event, listener, capture) {\r\n\t\tif (element.addEventListener) {\r\n\t\t\telement.addEventListener(event, listener, capture);\r\n\t\t} else if (element.attachEvent) {\r\n\t\t\telement.attachEvent('on' + event, listener);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Detaches from an internal event.\r\n\t * @protected\r\n\t * @param {HTMLElement} element - The event source.\r\n\t * @param {String} event - The event name.\r\n\t * @param {Function} listener - The attached event handler to detach.\r\n\t * @param {Boolean} capture - Wether the attached event handler was registered as a capturing listener or not.\r\n\t */\r\n\tOwl.prototype.off = function(element, event, listener, capture) {\r\n\t\tif (element.removeEventListener) {\r\n\t\t\telement.removeEventListener(event, listener, capture);\r\n\t\t} else if (element.detachEvent) {\r\n\t\t\telement.detachEvent('on' + event, listener);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Triggers a public event.\r\n\t * @todo Remove `status`, `relatedTarget` should be used instead.\r\n\t * @protected\r\n\t * @param {String} name - The event name.\r\n\t * @param {*} [data=null] - The event data.\r\n\t * @param {String} [namespace=carousel] - The event namespace.\r\n\t * @param {String} [state] - The state which is associated with the event.\r\n\t * @param {Boolean} [enter=false] - Indicates if the call enters the specified state or not.\r\n\t * @returns {Event} - The event arguments.\r\n\t */\r\n\tOwl.prototype.trigger = function(name, data, namespace, state, enter) {\r\n\t\tvar status = {\r\n\t\t\titem: { count: this._items.length, index: this.current() }\r\n\t\t}, handler = $.camelCase(\r\n\t\t\t$.grep([ 'on', name, namespace ], function(v) { return v })\r\n\t\t\t\t.join('-').toLowerCase()\r\n\t\t), event = $.Event(\r\n\t\t\t[ name, 'owl', namespace || 'carousel' ].join('.').toLowerCase(),\r\n\t\t\t$.extend({ relatedTarget: this }, status, data)\r\n\t\t);\r\n\r\n\t\tif (!this._supress[name]) {\r\n\t\t\t$.each(this._plugins, function(name, plugin) {\r\n\t\t\t\tif (plugin.onTrigger) {\r\n\t\t\t\t\tplugin.onTrigger(event);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tthis.register({ type: Owl.Type.Event, name: name });\r\n\t\t\tthis.$element.trigger(event);\r\n\r\n\t\t\tif (this.settings && typeof this.settings[handler] === 'function') {\r\n\t\t\t\tthis.settings[handler].call(this, event);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn event;\r\n\t};\r\n\r\n\t/**\r\n\t * Enters a state.\r\n\t * @param name - The state name.\r\n\t */\r\n\tOwl.prototype.enter = function(name) {\r\n\t\t$.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) {\r\n\t\t\tif (this._states.current[name] === undefined) {\r\n\t\t\t\tthis._states.current[name] = 0;\r\n\t\t\t}\r\n\r\n\t\t\tthis._states.current[name]++;\r\n\t\t}, this));\r\n\t};\r\n\r\n\t/**\r\n\t * Leaves a state.\r\n\t * @param name - The state name.\r\n\t */\r\n\tOwl.prototype.leave = function(name) {\r\n\t\t$.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) {\r\n\t\t\tthis._states.current[name]--;\r\n\t\t}, this));\r\n\t};\r\n\r\n\t/**\r\n\t * Registers an event or state.\r\n\t * @public\r\n\t * @param {Object} object - The event or state to register.\r\n\t */\r\n\tOwl.prototype.register = function(object) {\r\n\t\tif (object.type === Owl.Type.Event) {\r\n\t\t\tif (!$.event.special[object.name]) {\r\n\t\t\t\t$.event.special[object.name] = {};\r\n\t\t\t}\r\n\r\n\t\t\tif (!$.event.special[object.name].owl) {\r\n\t\t\t\tvar _default = $.event.special[object.name]._default;\r\n\t\t\t\t$.event.special[object.name]._default = function(e) {\r\n\t\t\t\t\tif (_default && _default.apply && (!e.namespace || e.namespace.indexOf('owl') === -1)) {\r\n\t\t\t\t\t\treturn _default.apply(this, arguments);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn e.namespace && e.namespace.indexOf('owl') > -1;\r\n\t\t\t\t};\r\n\t\t\t\t$.event.special[object.name].owl = true;\r\n\t\t\t}\r\n\t\t} else if (object.type === Owl.Type.State) {\r\n\t\t\tif (!this._states.tags[object.name]) {\r\n\t\t\t\tthis._states.tags[object.name] = object.tags;\r\n\t\t\t} else {\r\n\t\t\t\tthis._states.tags[object.name] = this._states.tags[object.name].concat(object.tags);\r\n\t\t\t}\r\n\r\n\t\t\tthis._states.tags[object.name] = $.grep(this._states.tags[object.name], $.proxy(function(tag, i) {\r\n\t\t\t\treturn $.inArray(tag, this._states.tags[object.name]) === i;\r\n\t\t\t}, this));\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Suppresses events.\r\n\t * @protected\r\n\t * @param {Array.} events - The events to suppress.\r\n\t */\r\n\tOwl.prototype.suppress = function(events) {\r\n\t\t$.each(events, $.proxy(function(index, event) {\r\n\t\t\tthis._supress[event] = true;\r\n\t\t}, this));\r\n\t};\r\n\r\n\t/**\r\n\t * Releases suppressed events.\r\n\t * @protected\r\n\t * @param {Array.} events - The events to release.\r\n\t */\r\n\tOwl.prototype.release = function(events) {\r\n\t\t$.each(events, $.proxy(function(index, event) {\r\n\t\t\tdelete this._supress[event];\r\n\t\t}, this));\r\n\t};\r\n\r\n\t/**\r\n\t * Gets unified pointer coordinates from event.\r\n\t * @todo #261\r\n\t * @protected\r\n\t * @param {Event} - The `mousedown` or `touchstart` event.\r\n\t * @returns {Object} - Contains `x` and `y` coordinates of current pointer position.\r\n\t */\r\n\tOwl.prototype.pointer = function(event) {\r\n\t\tvar result = { x: null, y: null };\r\n\r\n\t\tevent = event.originalEvent || event || window.event;\r\n\r\n\t\tevent = event.touches && event.touches.length ?\r\n\t\t\tevent.touches[0] : event.changedTouches && event.changedTouches.length ?\r\n\t\t\t\tevent.changedTouches[0] : event;\r\n\r\n\t\tif (event.pageX) {\r\n\t\t\tresult.x = event.pageX;\r\n\t\t\tresult.y = event.pageY;\r\n\t\t} else {\r\n\t\t\tresult.x = event.clientX;\r\n\t\t\tresult.y = event.clientY;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t};\r\n\r\n\t/**\r\n\t * Determines if the input is a Number or something that can be coerced to a Number\r\n\t * @protected\r\n\t * @param {Number|String|Object|Array|Boolean|RegExp|Function|Symbol} - The input to be tested\r\n\t * @returns {Boolean} - An indication if the input is a Number or can be coerced to a Number\r\n\t */\r\n\tOwl.prototype.isNumeric = function(number) {\r\n\t\treturn !isNaN(parseFloat(number));\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the difference of two vectors.\r\n\t * @todo #261\r\n\t * @protected\r\n\t * @param {Object} - The first vector.\r\n\t * @param {Object} - The second vector.\r\n\t * @returns {Object} - The difference.\r\n\t */\r\n\tOwl.prototype.difference = function(first, second) {\r\n\t\treturn {\r\n\t\t\tx: first.x - second.x,\r\n\t\t\ty: first.y - second.y\r\n\t\t};\r\n\t};\r\n\r\n\t/**\r\n\t * The jQuery Plugin for the Owl Carousel\r\n\t * @todo Navigation plugin `next` and `prev`\r\n\t * @public\r\n\t */\r\n\t$.fn.owlCarousel = function(option) {\r\n\t\tvar args = Array.prototype.slice.call(arguments, 1);\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tvar $this = $(this),\r\n\t\t\t\tdata = $this.data('owl.carousel');\r\n\r\n\t\t\tif (!data) {\r\n\t\t\t\tdata = new Owl(this, typeof option == 'object' && option);\r\n\t\t\t\t$this.data('owl.carousel', data);\r\n\r\n\t\t\t\t$.each([\r\n\t\t\t\t\t'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove'\r\n\t\t\t\t], function(i, event) {\r\n\t\t\t\t\tdata.register({ type: Owl.Type.Event, name: event });\r\n\t\t\t\t\tdata.$element.on(event + '.owl.carousel.core', $.proxy(function(e) {\r\n\t\t\t\t\t\tif (e.namespace && e.relatedTarget !== this) {\r\n\t\t\t\t\t\t\tthis.suppress([ event ]);\r\n\t\t\t\t\t\t\tdata[event].apply(this, [].slice.call(arguments, 1));\r\n\t\t\t\t\t\t\tthis.release([ event ]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, data));\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (typeof option == 'string' && option.charAt(0) !== '_') {\r\n\t\t\t\tdata[option].apply(data, args);\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\r\n\t/**\r\n\t * The constructor for the jQuery Plugin\r\n\t * @public\r\n\t */\r\n\t$.fn.owlCarousel.Constructor = Owl;\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n\r\n/**\r\n * AutoRefresh Plugin\r\n * @version 2.3.4\r\n * @author Artus Kolanowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n */\r\n;(function($, window, document, undefined) {\r\n\r\n\t/**\r\n\t * Creates the auto refresh plugin.\r\n\t * @class The Auto Refresh Plugin\r\n\t * @param {Owl} carousel - The Owl Carousel\r\n\t */\r\n\tvar AutoRefresh = function(carousel) {\r\n\t\t/**\r\n\t\t * Reference to the core.\r\n\t\t * @protected\r\n\t\t * @type {Owl}\r\n\t\t */\r\n\t\tthis._core = carousel;\r\n\r\n\t\t/**\r\n\t\t * Refresh interval.\r\n\t\t * @protected\r\n\t\t * @type {number}\r\n\t\t */\r\n\t\tthis._interval = null;\r\n\r\n\t\t/**\r\n\t\t * Whether the element is currently visible or not.\r\n\t\t * @protected\r\n\t\t * @type {Boolean}\r\n\t\t */\r\n\t\tthis._visible = null;\r\n\r\n\t\t/**\r\n\t\t * All event handlers.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._handlers = {\r\n\t\t\t'initialized.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.autoRefresh) {\r\n\t\t\t\t\tthis.watch();\r\n\t\t\t\t}\r\n\t\t\t}, this)\r\n\t\t};\r\n\r\n\t\t// set default options\r\n\t\tthis._core.options = $.extend({}, AutoRefresh.Defaults, this._core.options);\r\n\r\n\t\t// register event handlers\r\n\t\tthis._core.$element.on(this._handlers);\r\n\t};\r\n\r\n\t/**\r\n\t * Default options.\r\n\t * @public\r\n\t */\r\n\tAutoRefresh.Defaults = {\r\n\t\tautoRefresh: true,\r\n\t\tautoRefreshInterval: 500\r\n\t};\r\n\r\n\t/**\r\n\t * Watches the element.\r\n\t */\r\n\tAutoRefresh.prototype.watch = function() {\r\n\t\tif (this._interval) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._visible = this._core.isVisible();\r\n\t\tthis._interval = window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval);\r\n\t};\r\n\r\n\t/**\r\n\t * Refreshes the element.\r\n\t */\r\n\tAutoRefresh.prototype.refresh = function() {\r\n\t\tif (this._core.isVisible() === this._visible) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._visible = !this._visible;\r\n\r\n\t\tthis._core.$element.toggleClass('owl-hidden', !this._visible);\r\n\r\n\t\tthis._visible && (this._core.invalidate('width') && this._core.refresh());\r\n\t};\r\n\r\n\t/**\r\n\t * Destroys the plugin.\r\n\t */\r\n\tAutoRefresh.prototype.destroy = function() {\r\n\t\tvar handler, property;\r\n\r\n\t\twindow.clearInterval(this._interval);\r\n\r\n\t\tfor (handler in this._handlers) {\r\n\t\t\tthis._core.$element.off(handler, this._handlers[handler]);\r\n\t\t}\r\n\t\tfor (property in Object.getOwnPropertyNames(this)) {\r\n\t\t\ttypeof this[property] != 'function' && (this[property] = null);\r\n\t\t}\r\n\t};\r\n\r\n\t$.fn.owlCarousel.Constructor.Plugins.AutoRefresh = AutoRefresh;\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n\r\n/**\r\n * Lazy Plugin\r\n * @version 2.3.4\r\n * @author Bartosz Wojciechowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n */\r\n;(function($, window, document, undefined) {\r\n\r\n\t/**\r\n\t * Creates the lazy plugin.\r\n\t * @class The Lazy Plugin\r\n\t * @param {Owl} carousel - The Owl Carousel\r\n\t */\r\n\tvar Lazy = function(carousel) {\r\n\r\n\t\t/**\r\n\t\t * Reference to the core.\r\n\t\t * @protected\r\n\t\t * @type {Owl}\r\n\t\t */\r\n\t\tthis._core = carousel;\r\n\r\n\t\t/**\r\n\t\t * Already loaded items.\r\n\t\t * @protected\r\n\t\t * @type {Array.}\r\n\t\t */\r\n\t\tthis._loaded = [];\r\n\r\n\t\t/**\r\n\t\t * Event handlers.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._handlers = {\r\n\t\t\t'initialized.owl.carousel change.owl.carousel resized.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (!e.namespace) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this._core.settings || !this._core.settings.lazyLoad) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ((e.property && e.property.name == 'position') || e.type == 'initialized') {\r\n\t\t\t\t\tvar settings = this._core.settings,\r\n\t\t\t\t\t\tn = (settings.center && Math.ceil(settings.items / 2) || settings.items),\r\n\t\t\t\t\t\ti = ((settings.center && n * -1) || 0),\r\n\t\t\t\t\t\tposition = (e.property && e.property.value !== undefined ? e.property.value : this._core.current()) + i,\r\n\t\t\t\t\t\tclones = this._core.clones().length,\r\n\t\t\t\t\t\tload = $.proxy(function(i, v) { this.load(v) }, this);\r\n\t\t\t\t\t//TODO: Need documentation for this new option\r\n\t\t\t\t\tif (settings.lazyLoadEager > 0) {\r\n\t\t\t\t\t\tn += settings.lazyLoadEager;\r\n\t\t\t\t\t\t// If the carousel is looping also preload images that are to the \"left\"\r\n\t\t\t\t\t\tif (settings.loop) {\r\n position -= settings.lazyLoadEager;\r\n n++;\r\n }\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\twhile (i++ < n) {\r\n\t\t\t\t\t\tthis.load(clones / 2 + this._core.relative(position));\r\n\t\t\t\t\t\tclones && $.each(this._core.clones(this._core.relative(position)), load);\r\n\t\t\t\t\t\tposition++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, this)\r\n\t\t};\r\n\r\n\t\t// set the default options\r\n\t\tthis._core.options = $.extend({}, Lazy.Defaults, this._core.options);\r\n\r\n\t\t// register event handler\r\n\t\tthis._core.$element.on(this._handlers);\r\n\t};\r\n\r\n\t/**\r\n\t * Default options.\r\n\t * @public\r\n\t */\r\n\tLazy.Defaults = {\r\n\t\tlazyLoad: false,\r\n\t\tlazyLoadEager: 0\r\n\t};\r\n\r\n\t/**\r\n\t * Loads all resources of an item at the specified position.\r\n\t * @param {Number} position - The absolute position of the item.\r\n\t * @protected\r\n\t */\r\n\tLazy.prototype.load = function(position) {\r\n\t\tvar $item = this._core.$stage.children().eq(position),\r\n\t\t\t$elements = $item && $item.find('.owl-lazy');\r\n\r\n\t\tif (!$elements || $.inArray($item.get(0), this._loaded) > -1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$elements.each($.proxy(function(index, element) {\r\n\t\t\tvar $element = $(element), image,\r\n url = (window.devicePixelRatio > 1 && $element.attr('data-src-retina')) || $element.attr('data-src') || $element.attr('data-srcset');\r\n\r\n\t\t\tthis._core.trigger('load', { element: $element, url: url }, 'lazy');\r\n\r\n\t\t\tif ($element.is('img')) {\r\n\t\t\t\t$element.one('load.owl.lazy', $.proxy(function() {\r\n\t\t\t\t\t$element.css('opacity', 1);\r\n\t\t\t\t\tthis._core.trigger('loaded', { element: $element, url: url }, 'lazy');\r\n\t\t\t\t}, this)).attr('src', url);\r\n } else if ($element.is('source')) {\r\n $element.one('load.owl.lazy', $.proxy(function() {\r\n this._core.trigger('loaded', { element: $element, url: url }, 'lazy');\r\n }, this)).attr('srcset', url);\r\n\t\t\t} else {\r\n\t\t\t\timage = new Image();\r\n\t\t\t\timage.onload = $.proxy(function() {\r\n\t\t\t\t\t$element.css({\r\n\t\t\t\t\t\t'background-image': 'url(\"' + url + '\")',\r\n\t\t\t\t\t\t'opacity': '1'\r\n\t\t\t\t\t});\r\n\t\t\t\t\tthis._core.trigger('loaded', { element: $element, url: url }, 'lazy');\r\n\t\t\t\t}, this);\r\n\t\t\t\timage.src = url;\r\n\t\t\t}\r\n\t\t}, this));\r\n\r\n\t\tthis._loaded.push($item.get(0));\r\n\t};\r\n\r\n\t/**\r\n\t * Destroys the plugin.\r\n\t * @public\r\n\t */\r\n\tLazy.prototype.destroy = function() {\r\n\t\tvar handler, property;\r\n\r\n\t\tfor (handler in this.handlers) {\r\n\t\t\tthis._core.$element.off(handler, this.handlers[handler]);\r\n\t\t}\r\n\t\tfor (property in Object.getOwnPropertyNames(this)) {\r\n\t\t\ttypeof this[property] != 'function' && (this[property] = null);\r\n\t\t}\r\n\t};\r\n\r\n\t$.fn.owlCarousel.Constructor.Plugins.Lazy = Lazy;\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n\r\n/**\r\n * AutoHeight Plugin\r\n * @version 2.3.4\r\n * @author Bartosz Wojciechowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n */\r\n;(function($, window, document, undefined) {\r\n\r\n\t/**\r\n\t * Creates the auto height plugin.\r\n\t * @class The Auto Height Plugin\r\n\t * @param {Owl} carousel - The Owl Carousel\r\n\t */\r\n\tvar AutoHeight = function(carousel) {\r\n\t\t/**\r\n\t\t * Reference to the core.\r\n\t\t * @protected\r\n\t\t * @type {Owl}\r\n\t\t */\r\n\t\tthis._core = carousel;\r\n\r\n\t\tthis._previousHeight = null;\r\n\r\n\t\t/**\r\n\t\t * All event handlers.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._handlers = {\r\n\t\t\t'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.autoHeight) {\r\n\t\t\t\t\tthis.update();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'changed.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.autoHeight && e.property.name === 'position'){\r\n\t\t\t\t\tthis.update();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'loaded.owl.lazy': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.autoHeight\r\n\t\t\t\t\t&& e.element.closest('.' + this._core.settings.itemClass).index() === this._core.current()) {\r\n\t\t\t\t\tthis.update();\r\n\t\t\t\t}\r\n\t\t\t}, this)\r\n\t\t};\r\n\r\n\t\t// set default options\r\n\t\tthis._core.options = $.extend({}, AutoHeight.Defaults, this._core.options);\r\n\r\n\t\t// register event handlers\r\n\t\tthis._core.$element.on(this._handlers);\r\n\t\tthis._intervalId = null;\r\n\t\tvar refThis = this;\r\n\r\n\t\t// These changes have been taken from a PR by gavrochelegnou proposed in #1575\r\n\t\t// and have been made compatible with the latest jQuery version\r\n\t\t$(window).on('load', function() {\r\n\t\t\tif (refThis._core.settings.autoHeight) {\r\n\t\t\t\trefThis.update();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// Autoresize the height of the carousel when window is resized\r\n\t\t// When carousel has images, the height is dependent on the width\r\n\t\t// and should also change on resize\r\n\t\t$(window).resize(function() {\r\n\t\t\tif (refThis._core.settings.autoHeight) {\r\n\t\t\t\tif (refThis._intervalId != null) {\r\n\t\t\t\t\tclearTimeout(refThis._intervalId);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trefThis._intervalId = setTimeout(function() {\r\n\t\t\t\t\trefThis.update();\r\n\t\t\t\t}, 250);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t};\r\n\r\n\t/**\r\n\t * Default options.\r\n\t * @public\r\n\t */\r\n\tAutoHeight.Defaults = {\r\n\t\tautoHeight: false,\r\n\t\tautoHeightClass: 'owl-height'\r\n\t};\r\n\r\n\t/**\r\n\t * Updates the view.\r\n\t */\r\n\tAutoHeight.prototype.update = function() {\r\n\t\tvar start = this._core._current,\r\n\t\t\tend = start + this._core.settings.items,\r\n\t\t\tlazyLoadEnabled = this._core.settings.lazyLoad,\r\n\t\t\tvisible = this._core.$stage.children().toArray().slice(start, end),\r\n\t\t\theights = [],\r\n\t\t\tmaxheight = 0;\r\n\r\n\t\t$.each(visible, function(index, item) {\r\n\t\t\theights.push($(item).height());\r\n\t\t});\r\n\r\n\t\tmaxheight = Math.max.apply(null, heights);\r\n\r\n\t\tif (maxheight <= 1 && lazyLoadEnabled && this._previousHeight) {\r\n\t\t\tmaxheight = this._previousHeight;\r\n\t\t}\r\n\r\n\t\tthis._previousHeight = maxheight;\r\n\r\n\t\tthis._core.$stage.parent()\r\n\t\t\t.height(maxheight)\r\n\t\t\t.addClass(this._core.settings.autoHeightClass);\r\n\t};\r\n\r\n\tAutoHeight.prototype.destroy = function() {\r\n\t\tvar handler, property;\r\n\r\n\t\tfor (handler in this._handlers) {\r\n\t\t\tthis._core.$element.off(handler, this._handlers[handler]);\r\n\t\t}\r\n\t\tfor (property in Object.getOwnPropertyNames(this)) {\r\n\t\t\ttypeof this[property] !== 'function' && (this[property] = null);\r\n\t\t}\r\n\t};\r\n\r\n\t$.fn.owlCarousel.Constructor.Plugins.AutoHeight = AutoHeight;\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n\r\n/**\r\n * Video Plugin\r\n * @version 2.3.4\r\n * @author Bartosz Wojciechowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n */\r\n;(function($, window, document, undefined) {\r\n\r\n\t/**\r\n\t * Creates the video plugin.\r\n\t * @class The Video Plugin\r\n\t * @param {Owl} carousel - The Owl Carousel\r\n\t */\r\n\tvar Video = function(carousel) {\r\n\t\t/**\r\n\t\t * Reference to the core.\r\n\t\t * @protected\r\n\t\t * @type {Owl}\r\n\t\t */\r\n\t\tthis._core = carousel;\r\n\r\n\t\t/**\r\n\t\t * Cache all video URLs.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._videos = {};\r\n\r\n\t\t/**\r\n\t\t * Current playing item.\r\n\t\t * @protected\r\n\t\t * @type {jQuery}\r\n\t\t */\r\n\t\tthis._playing = null;\r\n\r\n\t\t/**\r\n\t\t * All event handlers.\r\n\t\t * @todo The cloned content removale is too late\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._handlers = {\r\n\t\t\t'initialized.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace) {\r\n\t\t\t\t\tthis._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] });\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'resize.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.video && this.isInFullScreen()) {\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'refreshed.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.is('resizing')) {\r\n\t\t\t\t\tthis._core.$stage.find('.cloned .owl-video-frame').remove();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'changed.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && e.property.name === 'position' && this._playing) {\r\n\t\t\t\t\tthis.stop();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'prepared.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (!e.namespace) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar $element = $(e.content).find('.owl-video');\r\n\r\n\t\t\t\tif ($element.length) {\r\n\t\t\t\t\t$element.css('display', 'none');\r\n\t\t\t\t\tthis.fetch($element, $(e.content));\r\n\t\t\t\t}\r\n\t\t\t}, this)\r\n\t\t};\r\n\r\n\t\t// set default options\r\n\t\tthis._core.options = $.extend({}, Video.Defaults, this._core.options);\r\n\r\n\t\t// register event handlers\r\n\t\tthis._core.$element.on(this._handlers);\r\n\r\n\t\tthis._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e) {\r\n\t\t\tthis.play(e);\r\n\t\t}, this));\r\n\t};\r\n\r\n\t/**\r\n\t * Default options.\r\n\t * @public\r\n\t */\r\n\tVideo.Defaults = {\r\n\t\tvideo: false,\r\n\t\tvideoHeight: false,\r\n\t\tvideoWidth: false\r\n\t};\r\n\r\n\t/**\r\n\t * Gets the video ID and the type (YouTube/Vimeo/vzaar only).\r\n\t * @protected\r\n\t * @param {jQuery} target - The target containing the video data.\r\n\t * @param {jQuery} item - The item containing the video.\r\n\t */\r\n\tVideo.prototype.fetch = function(target, item) {\r\n\t\t\tvar type = (function() {\r\n\t\t\t\t\tif (target.attr('data-vimeo-id')) {\r\n\t\t\t\t\t\treturn 'vimeo';\r\n\t\t\t\t\t} else if (target.attr('data-vzaar-id')) {\r\n\t\t\t\t\t\treturn 'vzaar'\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn 'youtube';\r\n\t\t\t\t\t}\r\n\t\t\t\t})(),\r\n\t\t\t\tid = target.attr('data-vimeo-id') || target.attr('data-youtube-id') || target.attr('data-vzaar-id'),\r\n\t\t\t\twidth = target.attr('data-width') || this._core.settings.videoWidth,\r\n\t\t\t\theight = target.attr('data-height') || this._core.settings.videoHeight,\r\n\t\t\t\turl = target.attr('href');\r\n\r\n\t\tif (url) {\r\n\r\n\t\t\t/*\r\n\t\t\t\t\tParses the id's out of the following urls (and probably more):\r\n\t\t\t\t\thttps://www.youtube.com/watch?v=:id\r\n\t\t\t\t\thttps://youtu.be/:id\r\n\t\t\t\t\thttps://vimeo.com/:id\r\n\t\t\t\t\thttps://vimeo.com/channels/:channel/:id\r\n\t\t\t\t\thttps://vimeo.com/groups/:group/videos/:id\r\n\t\t\t\t\thttps://app.vzaar.com/videos/:id\r\n\r\n\t\t\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\r\n\t\t\t*/\r\n\r\n\t\t\tid = 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._%-]*)(\\&\\S+)?/);\r\n\r\n\t\t\tif (id[3].indexOf('youtu') > -1) {\r\n\t\t\t\ttype = 'youtube';\r\n\t\t\t} else if (id[3].indexOf('vimeo') > -1) {\r\n\t\t\t\ttype = 'vimeo';\r\n\t\t\t} else if (id[3].indexOf('vzaar') > -1) {\r\n\t\t\t\ttype = 'vzaar';\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Error('Video URL not supported.');\r\n\t\t\t}\r\n\t\t\tid = id[6];\r\n\t\t} else {\r\n\t\t\tthrow new Error('Missing video URL.');\r\n\t\t}\r\n\r\n\t\tthis._videos[url] = {\r\n\t\t\ttype: type,\r\n\t\t\tid: id,\r\n\t\t\twidth: width,\r\n\t\t\theight: height\r\n\t\t};\r\n\r\n\t\titem.attr('data-video', url);\r\n\r\n\t\tthis.thumbnail(target, this._videos[url]);\r\n\t};\r\n\r\n\t/**\r\n\t * Creates video thumbnail.\r\n\t * @protected\r\n\t * @param {jQuery} target - The target containing the video data.\r\n\t * @param {Object} info - The video info object.\r\n\t * @see `fetch`\r\n\t */\r\n\tVideo.prototype.thumbnail = function(target, video) {\r\n\t\tvar tnLink,\r\n\t\t\ticon,\r\n\t\t\tpath,\r\n\t\t\tdimensions = video.width && video.height ? 'width:' + video.width + 'px;height:' + video.height + 'px;' : '',\r\n\t\t\tcustomTn = target.find('img'),\r\n\t\t\tsrcType = 'src',\r\n\t\t\tlazyClass = '',\r\n\t\t\tsettings = this._core.settings,\r\n\t\t\tcreate = function(path) {\r\n\t\t\t\ticon = '
';\r\n\r\n\t\t\t\tif (settings.lazyLoad) {\r\n\t\t\t\t\ttnLink = $('
',{\r\n\t\t\t\t\t\t\"class\": 'owl-video-tn ' + lazyClass,\r\n\t\t\t\t\t\t\"srcType\": path\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttnLink = $( '
', {\r\n\t\t\t\t\t\t\"class\": \"owl-video-tn\",\r\n\t\t\t\t\t\t\"style\": 'opacity:1;background-image:url(' + path + ')'\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\ttarget.after(tnLink);\r\n\t\t\t\ttarget.after(icon);\r\n\t\t\t};\r\n\r\n\t\t// wrap video content into owl-video-wrapper div\r\n\t\ttarget.wrap( $( '
', {\r\n\t\t\t\"class\": \"owl-video-wrapper\",\r\n\t\t\t\"style\": dimensions\r\n\t\t}));\r\n\r\n\t\tif (this._core.settings.lazyLoad) {\r\n\t\t\tsrcType = 'data-src';\r\n\t\t\tlazyClass = 'owl-lazy';\r\n\t\t}\r\n\r\n\t\t// custom thumbnail\r\n\t\tif (customTn.length) {\r\n\t\t\tcreate(customTn.attr(srcType));\r\n\t\t\tcustomTn.remove();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (video.type === 'youtube') {\r\n\t\t\tpath = \"//img.youtube.com/vi/\" + video.id + \"/hqdefault.jpg\";\r\n\t\t\tcreate(path);\r\n\t\t} else if (video.type === 'vimeo') {\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: 'GET',\r\n\t\t\t\turl: '//vimeo.com/api/v2/video/' + video.id + '.json',\r\n\t\t\t\tjsonp: 'callback',\r\n\t\t\t\tdataType: 'jsonp',\r\n\t\t\t\tsuccess: function(data) {\r\n\t\t\t\t\tpath = data[0].thumbnail_large;\r\n\t\t\t\t\tcreate(path);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else if (video.type === 'vzaar') {\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: 'GET',\r\n\t\t\t\turl: '//vzaar.com/api/videos/' + video.id + '.json',\r\n\t\t\t\tjsonp: 'callback',\r\n\t\t\t\tdataType: 'jsonp',\r\n\t\t\t\tsuccess: function(data) {\r\n\t\t\t\t\tpath = data.framegrab_url;\r\n\t\t\t\t\tcreate(path);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Stops the current video.\r\n\t * @public\r\n\t */\r\n\tVideo.prototype.stop = function() {\r\n\t\tthis._core.trigger('stop', null, 'video');\r\n\t\tthis._playing.find('.owl-video-frame').remove();\r\n\t\tthis._playing.removeClass('owl-video-playing');\r\n\t\tthis._playing = null;\r\n\t\tthis._core.leave('playing');\r\n\t\tthis._core.trigger('stopped', null, 'video');\r\n\t};\r\n\r\n\t/**\r\n\t * Starts the current video.\r\n\t * @public\r\n\t * @param {Event} event - The event arguments.\r\n\t */\r\n\tVideo.prototype.play = function(event) {\r\n\t\tvar target = $(event.target),\r\n\t\t\titem = target.closest('.' + this._core.settings.itemClass),\r\n\t\t\tvideo = this._videos[item.attr('data-video')],\r\n\t\t\twidth = video.width || '100%',\r\n\t\t\theight = video.height || this._core.$stage.height(),\r\n\t\t\thtml,\r\n\t\t\tiframe;\r\n\r\n\t\tif (this._playing) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._core.enter('playing');\r\n\t\tthis._core.trigger('play', null, 'video');\r\n\r\n\t\titem = this._core.items(this._core.relative(item.index()));\r\n\r\n\t\tthis._core.reset(item.index());\r\n\r\n\t\thtml = $( '' );\r\n\t\thtml.attr( 'height', height );\r\n\t\thtml.attr( 'width', width );\r\n\t\tif (video.type === 'youtube') {\r\n\t\t\thtml.attr( 'src', '//www.youtube.com/embed/' + video.id + '?autoplay=1&rel=0&v=' + video.id );\r\n\t\t} else if (video.type === 'vimeo') {\r\n\t\t\thtml.attr( 'src', '//player.vimeo.com/video/' + video.id + '?autoplay=1' );\r\n\t\t} else if (video.type === 'vzaar') {\r\n\t\t\thtml.attr( 'src', '//view.vzaar.com/' + video.id + '/player?autoplay=true' );\r\n\t\t}\r\n\r\n\t\tiframe = $(html).wrap( '
' ).insertAfter(item.find('.owl-video'));\r\n\r\n\t\tthis._playing = item.addClass('owl-video-playing');\r\n\t};\r\n\r\n\t/**\r\n\t * Checks whether an video is currently in full screen mode or not.\r\n\t * @todo Bad style because looks like a readonly method but changes members.\r\n\t * @protected\r\n\t * @returns {Boolean}\r\n\t */\r\n\tVideo.prototype.isInFullScreen = function() {\r\n\t\tvar element = document.fullscreenElement || document.mozFullScreenElement ||\r\n\t\t\t\tdocument.webkitFullscreenElement;\r\n\r\n\t\treturn element && $(element).parent().hasClass('owl-video-frame');\r\n\t};\r\n\r\n\t/**\r\n\t * Destroys the plugin.\r\n\t */\r\n\tVideo.prototype.destroy = function() {\r\n\t\tvar handler, property;\r\n\r\n\t\tthis._core.$element.off('click.owl.video');\r\n\r\n\t\tfor (handler in this._handlers) {\r\n\t\t\tthis._core.$element.off(handler, this._handlers[handler]);\r\n\t\t}\r\n\t\tfor (property in Object.getOwnPropertyNames(this)) {\r\n\t\t\ttypeof this[property] != 'function' && (this[property] = null);\r\n\t\t}\r\n\t};\r\n\r\n\t$.fn.owlCarousel.Constructor.Plugins.Video = Video;\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n\r\n/**\r\n * Animate Plugin\r\n * @version 2.3.4\r\n * @author Bartosz Wojciechowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n */\r\n;(function($, window, document, undefined) {\r\n\r\n\t/**\r\n\t * Creates the animate plugin.\r\n\t * @class The Navigation Plugin\r\n\t * @param {Owl} scope - The Owl Carousel\r\n\t */\r\n\tvar Animate = function(scope) {\r\n\t\tthis.core = scope;\r\n\t\tthis.core.options = $.extend({}, Animate.Defaults, this.core.options);\r\n\t\tthis.swapping = true;\r\n\t\tthis.previous = undefined;\r\n\t\tthis.next = undefined;\r\n\r\n\t\tthis.handlers = {\r\n\t\t\t'change.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && e.property.name == 'position') {\r\n\t\t\t\t\tthis.previous = this.core.current();\r\n\t\t\t\t\tthis.next = e.property.value;\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace) {\r\n\t\t\t\t\tthis.swapping = e.type == 'translated';\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'translate.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn)) {\r\n\t\t\t\t\tthis.swap();\r\n\t\t\t\t}\r\n\t\t\t}, this)\r\n\t\t};\r\n\r\n\t\tthis.core.$element.on(this.handlers);\r\n\t};\r\n\r\n\t/**\r\n\t * Default options.\r\n\t * @public\r\n\t */\r\n\tAnimate.Defaults = {\r\n\t\tanimateOut: false,\r\n\t\tanimateIn: false\r\n\t};\r\n\r\n\t/**\r\n\t * Toggles the animation classes whenever an translations starts.\r\n\t * @protected\r\n\t * @returns {Boolean|undefined}\r\n\t */\r\n\tAnimate.prototype.swap = function() {\r\n\r\n\t\tif (this.core.settings.items !== 1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!$.support.animation || !$.support.transition) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.core.speed(0);\r\n\r\n\t\tvar left,\r\n\t\t\tclear = $.proxy(this.clear, this),\r\n\t\t\tprevious = this.core.$stage.children().eq(this.previous),\r\n\t\t\tnext = this.core.$stage.children().eq(this.next),\r\n\t\t\tincoming = this.core.settings.animateIn,\r\n\t\t\toutgoing = this.core.settings.animateOut;\r\n\r\n\t\tif (this.core.current() === this.previous) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (outgoing) {\r\n\t\t\tleft = this.core.coordinates(this.previous) - this.core.coordinates(this.next);\r\n\t\t\tprevious.one($.support.animation.end, clear)\r\n\t\t\t\t.css( { 'left': left + 'px' } )\r\n\t\t\t\t.addClass('animated owl-animated-out')\r\n\t\t\t\t.addClass(outgoing);\r\n\t\t}\r\n\r\n\t\tif (incoming) {\r\n\t\t\tnext.one($.support.animation.end, clear)\r\n\t\t\t\t.addClass('animated owl-animated-in')\r\n\t\t\t\t.addClass(incoming);\r\n\t\t}\r\n\t};\r\n\r\n\tAnimate.prototype.clear = function(e) {\r\n\t\t$(e.target).css( { 'left': '' } )\r\n\t\t\t.removeClass('animated owl-animated-out owl-animated-in')\r\n\t\t\t.removeClass(this.core.settings.animateIn)\r\n\t\t\t.removeClass(this.core.settings.animateOut);\r\n\t\tthis.core.onTransitionEnd();\r\n\t};\r\n\r\n\t/**\r\n\t * Destroys the plugin.\r\n\t * @public\r\n\t */\r\n\tAnimate.prototype.destroy = function() {\r\n\t\tvar handler, property;\r\n\r\n\t\tfor (handler in this.handlers) {\r\n\t\t\tthis.core.$element.off(handler, this.handlers[handler]);\r\n\t\t}\r\n\t\tfor (property in Object.getOwnPropertyNames(this)) {\r\n\t\t\ttypeof this[property] != 'function' && (this[property] = null);\r\n\t\t}\r\n\t};\r\n\r\n\t$.fn.owlCarousel.Constructor.Plugins.Animate = Animate;\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n\r\n/**\r\n * Autoplay Plugin\r\n * @version 2.3.4\r\n * @author Bartosz Wojciechowski\r\n * @author Artus Kolanowski\r\n * @author David Deutsch\r\n * @author Tom De Caluwé\r\n * @license The MIT License (MIT)\r\n */\r\n;(function($, window, document, undefined) {\r\n\r\n\t/**\r\n\t * Creates the autoplay plugin.\r\n\t * @class The Autoplay Plugin\r\n\t * @param {Owl} scope - The Owl Carousel\r\n\t */\r\n\tvar Autoplay = function(carousel) {\r\n\t\t/**\r\n\t\t * Reference to the core.\r\n\t\t * @protected\r\n\t\t * @type {Owl}\r\n\t\t */\r\n\t\tthis._core = carousel;\r\n\r\n\t\t/**\r\n\t\t * The autoplay timeout id.\r\n\t\t * @type {Number}\r\n\t\t */\r\n\t\tthis._call = null;\r\n\r\n\t\t/**\r\n\t\t * Depending on the state of the plugin, this variable contains either\r\n\t\t * the start time of the timer or the current timer value if it's\r\n\t\t * paused. Since we start in a paused state we initialize the timer\r\n\t\t * value.\r\n\t\t * @type {Number}\r\n\t\t */\r\n\t\tthis._time = 0;\r\n\r\n\t\t/**\r\n\t\t * Stores the timeout currently used.\r\n\t\t * @type {Number}\r\n\t\t */\r\n\t\tthis._timeout = 0;\r\n\r\n\t\t/**\r\n\t\t * Indicates whenever the autoplay is paused.\r\n\t\t * @type {Boolean}\r\n\t\t */\r\n\t\tthis._paused = true;\r\n\r\n\t\t/**\r\n\t\t * All event handlers.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._handlers = {\r\n\t\t\t'changed.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && e.property.name === 'settings') {\r\n\t\t\t\t\tif (this._core.settings.autoplay) {\r\n\t\t\t\t\t\tthis.play();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.stop();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (e.namespace && e.property.name === 'position' && this._paused) {\r\n\t\t\t\t\t// Reset the timer. This code is triggered when the position\r\n\t\t\t\t\t// of the carousel was changed through user interaction.\r\n\t\t\t\t\tthis._time = 0;\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'initialized.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.autoplay) {\r\n\t\t\t\t\tthis.play();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'play.owl.autoplay': $.proxy(function(e, t, s) {\r\n\t\t\t\tif (e.namespace) {\r\n\t\t\t\t\tthis.play(t, s);\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'stop.owl.autoplay': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace) {\r\n\t\t\t\t\tthis.stop();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'mouseover.owl.autoplay': $.proxy(function() {\r\n\t\t\t\tif (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {\r\n\t\t\t\t\tthis.pause();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'mouseleave.owl.autoplay': $.proxy(function() {\r\n\t\t\t\tif (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {\r\n\t\t\t\t\tthis.play();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'touchstart.owl.core': $.proxy(function() {\r\n\t\t\t\tif (this._core.settings.autoplayHoverPause && this._core.is('rotating')) {\r\n\t\t\t\t\tthis.pause();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'touchend.owl.core': $.proxy(function() {\r\n\t\t\t\tif (this._core.settings.autoplayHoverPause) {\r\n\t\t\t\t\tthis.play();\r\n\t\t\t\t}\r\n\t\t\t}, this)\r\n\t\t};\r\n\r\n\t\t// register event handlers\r\n\t\tthis._core.$element.on(this._handlers);\r\n\r\n\t\t// set default options\r\n\t\tthis._core.options = $.extend({}, Autoplay.Defaults, this._core.options);\r\n\t};\r\n\r\n\t/**\r\n\t * Default options.\r\n\t * @public\r\n\t */\r\n\tAutoplay.Defaults = {\r\n\t\tautoplay: false,\r\n\t\tautoplayTimeout: 5000,\r\n\t\tautoplayHoverPause: false,\r\n\t\tautoplaySpeed: false\r\n\t};\r\n\r\n\t/**\r\n\t * Transition to the next slide and set a timeout for the next transition.\r\n\t * @private\r\n\t * @param {Number} [speed] - The animation speed for the animations.\r\n\t */\r\n\tAutoplay.prototype._next = function(speed) {\r\n\t\tthis._call = window.setTimeout(\r\n\t\t\t$.proxy(this._next, this, speed),\r\n\t\t\tthis._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read()\r\n\t\t);\r\n\r\n\t\tif (this._core.is('interacting') || document.hidden) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._core.next(speed || this._core.settings.autoplaySpeed);\r\n\t}\r\n\r\n\t/**\r\n\t * Reads the current timer value when the timer is playing.\r\n\t * @public\r\n\t */\r\n\tAutoplay.prototype.read = function() {\r\n\t\treturn new Date().getTime() - this._time;\r\n\t};\r\n\r\n\t/**\r\n\t * Starts the autoplay.\r\n\t * @public\r\n\t * @param {Number} [timeout] - The interval before the next animation starts.\r\n\t * @param {Number} [speed] - The animation speed for the animations.\r\n\t */\r\n\tAutoplay.prototype.play = function(timeout, speed) {\r\n\t\tvar elapsed;\r\n\r\n\t\tif (!this._core.is('rotating')) {\r\n\t\t\tthis._core.enter('rotating');\r\n\t\t}\r\n\r\n\t\ttimeout = timeout || this._core.settings.autoplayTimeout;\r\n\r\n\t\t// Calculate the elapsed time since the last transition. If the carousel\r\n\t\t// wasn't playing this calculation will yield zero.\r\n\t\telapsed = Math.min(this._time % (this._timeout || timeout), timeout);\r\n\r\n\t\tif (this._paused) {\r\n\t\t\t// Start the clock.\r\n\t\t\tthis._time = this.read();\r\n\t\t\tthis._paused = false;\r\n\t\t} else {\r\n\t\t\t// Clear the active timeout to allow replacement.\r\n\t\t\twindow.clearTimeout(this._call);\r\n\t\t}\r\n\r\n\t\t// Adjust the origin of the timer to match the new timeout value.\r\n\t\tthis._time += this.read() % timeout - elapsed;\r\n\r\n\t\tthis._timeout = timeout;\r\n\t\tthis._call = window.setTimeout($.proxy(this._next, this, speed), timeout - elapsed);\r\n\t};\r\n\r\n\t/**\r\n\t * Stops the autoplay.\r\n\t * @public\r\n\t */\r\n\tAutoplay.prototype.stop = function() {\r\n\t\tif (this._core.is('rotating')) {\r\n\t\t\t// Reset the clock.\r\n\t\t\tthis._time = 0;\r\n\t\t\tthis._paused = true;\r\n\r\n\t\t\twindow.clearTimeout(this._call);\r\n\t\t\tthis._core.leave('rotating');\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Pauses the autoplay.\r\n\t * @public\r\n\t */\r\n\tAutoplay.prototype.pause = function() {\r\n\t\tif (this._core.is('rotating') && !this._paused) {\r\n\t\t\t// Pause the clock.\r\n\t\t\tthis._time = this.read();\r\n\t\t\tthis._paused = true;\r\n\r\n\t\t\twindow.clearTimeout(this._call);\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Destroys the plugin.\r\n\t */\r\n\tAutoplay.prototype.destroy = function() {\r\n\t\tvar handler, property;\r\n\r\n\t\tthis.stop();\r\n\r\n\t\tfor (handler in this._handlers) {\r\n\t\t\tthis._core.$element.off(handler, this._handlers[handler]);\r\n\t\t}\r\n\t\tfor (property in Object.getOwnPropertyNames(this)) {\r\n\t\t\ttypeof this[property] != 'function' && (this[property] = null);\r\n\t\t}\r\n\t};\r\n\r\n\t$.fn.owlCarousel.Constructor.Plugins.autoplay = Autoplay;\r\n\r\n})(window.Zepto || window.jQuery, window, document);\r\n\r\n/**\r\n * Navigation Plugin\r\n * @version 2.3.4\r\n * @author Artus Kolanowski\r\n * @author David Deutsch\r\n * @license The MIT License (MIT)\r\n */\r\n;(function($, window, document, undefined) {\r\n\t'use strict';\r\n\r\n\t/**\r\n\t * Creates the navigation plugin.\r\n\t * @class The Navigation Plugin\r\n\t * @param {Owl} carousel - The Owl Carousel.\r\n\t */\r\n\tvar Navigation = function(carousel) {\r\n\t\t/**\r\n\t\t * Reference to the core.\r\n\t\t * @protected\r\n\t\t * @type {Owl}\r\n\t\t */\r\n\t\tthis._core = carousel;\r\n\r\n\t\t/**\r\n\t\t * Indicates whether the plugin is initialized or not.\r\n\t\t * @protected\r\n\t\t * @type {Boolean}\r\n\t\t */\r\n\t\tthis._initialized = false;\r\n\r\n\t\t/**\r\n\t\t * The current paging indexes.\r\n\t\t * @protected\r\n\t\t * @type {Array}\r\n\t\t */\r\n\t\tthis._pages = [];\r\n\r\n\t\t/**\r\n\t\t * All DOM elements of the user interface.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._controls = {};\r\n\r\n\t\t/**\r\n\t\t * Markup for an indicator.\r\n\t\t * @protected\r\n\t\t * @type {Array.}\r\n\t\t */\r\n\t\tthis._templates = [];\r\n\r\n\t\t/**\r\n\t\t * The carousel element.\r\n\t\t * @type {jQuery}\r\n\t\t */\r\n\t\tthis.$element = this._core.$element;\r\n\r\n\t\t/**\r\n\t\t * Overridden methods of the carousel.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._overrides = {\r\n\t\t\tnext: this._core.next,\r\n\t\t\tprev: this._core.prev,\r\n\t\t\tto: this._core.to\r\n\t\t};\r\n\r\n\t\t/**\r\n\t\t * All event handlers.\r\n\t\t * @protected\r\n\t\t * @type {Object}\r\n\t\t */\r\n\t\tthis._handlers = {\r\n\t\t\t'prepared.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.dotsData) {\r\n\t\t\t\t\tthis._templates.push('
' +\r\n\t\t\t\t\t\t$(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '
');\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'added.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.dotsData) {\r\n\t\t\t\t\tthis._templates.splice(e.position, 0, this._templates.pop());\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'remove.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._core.settings.dotsData) {\r\n\t\t\t\t\tthis._templates.splice(e.position, 1);\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'changed.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && e.property.name == 'position') {\r\n\t\t\t\t\tthis.draw();\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'initialized.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && !this._initialized) {\r\n\t\t\t\t\tthis._core.trigger('initialize', null, 'navigation');\r\n\t\t\t\t\tthis.initialize();\r\n\t\t\t\t\tthis.update();\r\n\t\t\t\t\tthis.draw();\r\n\t\t\t\t\tthis._initialized = true;\r\n\t\t\t\t\tthis._core.trigger('initialized', null, 'navigation');\r\n\t\t\t\t}\r\n\t\t\t}, this),\r\n\t\t\t'refreshed.owl.carousel': $.proxy(function(e) {\r\n\t\t\t\tif (e.namespace && this._initialized) {\r\n\t\t\t\t\tthis._core.trigger('refresh', null, 'navigation');\r\n\t\t\t\t\tthis.update();\r\n\t\t\t\t\tthis.draw();\r\n\t\t\t\t\tthis._core.trigger('refreshed', null, 'navigation');\r\n\t\t\t\t}\r\n\t\t\t}, this)\r\n\t\t};\r\n\r\n\t\t// set default options\r\n\t\tthis._core.options = $.extend({}, Navigation.Defaults, this._core.options);\r\n\r\n\t\t// register event handlers\r\n\t\tthis.$element.on(this._handlers);\r\n\t};\r\n\r\n\t/**\r\n\t * Default options.\r\n\t * @public\r\n\t * @todo Rename `slideBy` to `navBy`\r\n\t */\r\n\tNavigation.Defaults = {\r\n\t\tnav: false,\r\n\t\tnavText: [\r\n\t\t\t'',\r\n\t\t\t''\r\n\t\t],\r\n\t\tnavSpeed: false,\r\n\t\tnavElement: 'button type=\"button\" role=\"presentation\"',\r\n\t\tnavContainer: false,\r\n\t\tnavContainerClass: 'owl-nav',\r\n\t\tnavClass: [\r\n\t\t\t'owl-prev',\r\n\t\t\t'owl-next'\r\n\t\t],\r\n\t\tslideBy: 1,\r\n\t\tdotClass: 'owl-dot',\r\n\t\tdotsClass: 'owl-dots',\r\n\t\tdots: true,\r\n\t\tdotsEach: false,\r\n\t\tdotsData: false,\r\n\t\tdotsSpeed: false,\r\n\t\tdotsContainer: false\r\n\t};\r\n\r\n\t/**\r\n\t * Initializes the layout of the plugin and extends the carousel.\r\n\t * @protected\r\n\t */\r\n\tNavigation.prototype.initialize = function() {\r\n\t\tvar override,\r\n\t\t\tsettings = this._core.settings;\r\n\r\n\t\t// create DOM structure for relative navigation\r\n\t\tthis._controls.$relative = (settings.navContainer ? $(settings.navContainer)\r\n\t\t\t: $('
').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled');\r\n\r\n\t\tthis._controls.$previous = $('<' + settings.navElement + '>')\r\n\t\t\t.addClass(settings.navClass[0])\r\n\t\t\t.html(settings.navText[0])\r\n\t\t\t.prependTo(this._controls.$relative)\r\n\t\t\t.on('click', $.proxy(function(e) {\r\n\t\t\t\tthis.prev(settings.navSpeed);\r\n\t\t\t}, this));\r\n\t\tthis._controls.$next = $('<' + settings.navElement + '>')\r\n\t\t\t.addClass(settings.navClass[1])\r\n\t\t\t.html(settings.navText[1])\r\n\t\t\t.appendTo(this._controls.$relative)\r\n\t\t\t.on('click', $.proxy(function(e) {\r\n\t\t\t\tthis.next(settings.navSpeed);\r\n\t\t\t}, this));\r\n\r\n\t\t// create DOM structure for absolute navigation\r\n\t\tif (!settings.dotsData) {\r\n\t\t\tthis._templates = [ $('