{"version":3,"file":"application-355c27cb.js","sources":["../../../node_modules/lazysizes/lazysizes.js","../../../node_modules/lazysizes/plugins/attrchange/ls.attrchange.js","../../../node_modules/lazysizes/plugins/unveilhooks/ls.unveilhooks.js","../../javascripts/libs/jquery.browser.js","../../javascripts/libs/jquery_ujs.js","../../javascripts/libs/jquery.sidr.min.js","../../../client/src/javascripts/customer_pages/_application/jquery_uamatch_patch.js","../../javascripts/libs/jquery.cookie.js","../../javascripts/libs/jquery.mustache.js","../../../client/src/javascripts/customer_pages/_application/megamenu.js","../../../node_modules/handlebars/dist/cjs/handlebars/utils.js","../../../node_modules/handlebars/dist/cjs/handlebars/exception.js","../../../node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js","../../../node_modules/handlebars/dist/cjs/handlebars/helpers/each.js","../../../node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js","../../../node_modules/handlebars/dist/cjs/handlebars/helpers/if.js","../../../node_modules/handlebars/dist/cjs/handlebars/helpers/log.js","../../../node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js","../../../node_modules/handlebars/dist/cjs/handlebars/helpers/with.js","../../../node_modules/handlebars/dist/cjs/handlebars/helpers.js","../../../node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js","../../../node_modules/handlebars/dist/cjs/handlebars/decorators.js","../../../node_modules/handlebars/dist/cjs/handlebars/logger.js","../../../node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js","../../../node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js","../../../node_modules/handlebars/dist/cjs/handlebars/base.js","../../../node_modules/handlebars/dist/cjs/handlebars/safe-string.js","../../../node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js","../../../node_modules/handlebars/dist/cjs/handlebars/runtime.js","../../../node_modules/handlebars/dist/cjs/handlebars/no-conflict.js","../../../node_modules/handlebars/dist/cjs/handlebars.runtime.js","../../../node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js","../../../node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js","../../../node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js","../../../node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js","../../../node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js","../../../node_modules/handlebars/dist/cjs/handlebars/compiler/base.js","../../../node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js","../../../node_modules/source-map/lib/base64.js","../../../node_modules/source-map/lib/base64-vlq.js","../../../node_modules/source-map/lib/util.js","../../../node_modules/source-map/lib/array-set.js","../../../node_modules/source-map/lib/mapping-list.js","../../../node_modules/source-map/lib/source-map-generator.js","../../../node_modules/source-map/lib/binary-search.js","../../../node_modules/source-map/lib/quick-sort.js","../../../node_modules/source-map/lib/source-map-consumer.js","../../../node_modules/source-map/lib/source-node.js","../../../node_modules/source-map/source-map.js","../../../node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js","../../../node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js","../../../node_modules/handlebars/dist/cjs/handlebars.js","../../../client/src/coffeescripts/order-app.js","../../../node_modules/jstz/dist/jstz.js","../../../node_modules/jstz/index.js","../../../client/src/javascripts/customer_pages/_libs/set-time-zone.js","../../../client/src/coffeescripts/general.js","../../../client/src/javascripts/customer_pages/_application/basket-item-length.js","../../../client/src/javascripts/customer_pages/_application/google-tag-manager-data-layer.js","../../../client/src/javascripts/customer_pages/_application/stash-login.js","../../../client/src/javascripts/customer_pages/_analytics/add-google-analytics-event-trackers.js","../../../client/src/javascripts/customer_pages/_application/google-analytics-event-tracking.js"],"sourcesContent":["(function(window, factory) {\n\tvar lazySizes = factory(window, window.document, Date);\n\twindow.lazySizes = lazySizes;\n\tif(typeof module == 'object' && module.exports){\n\t\tmodule.exports = lazySizes;\n\t}\n}(typeof window != 'undefined' ?\n window : {}, \n/**\n * import(\"./types/global\")\n * @typedef { import(\"./types/lazysizes-config\").LazySizesConfigPartial } LazySizesConfigPartial\n */\nfunction l(window, document, Date) { // Pass in the window Date function also for SSR because the Date class can be lost\n\t'use strict';\n\t/*jshint eqnull:true */\n\n\tvar lazysizes,\n\t\t/**\n\t\t * @type { LazySizesConfigPartial }\n\t\t */\n\t\tlazySizesCfg;\n\n\t(function(){\n\t\tvar prop;\n\n\t\tvar lazySizesDefaults = {\n\t\t\tlazyClass: 'lazyload',\n\t\t\tloadedClass: 'lazyloaded',\n\t\t\tloadingClass: 'lazyloading',\n\t\t\tpreloadClass: 'lazypreload',\n\t\t\terrorClass: 'lazyerror',\n\t\t\t//strictClass: 'lazystrict',\n\t\t\tautosizesClass: 'lazyautosizes',\n\t\t\tfastLoadedClass: 'ls-is-cached',\n\t\t\tiframeLoadMode: 0,\n\t\t\tsrcAttr: 'data-src',\n\t\t\tsrcsetAttr: 'data-srcset',\n\t\t\tsizesAttr: 'data-sizes',\n\t\t\t//preloadAfterLoad: false,\n\t\t\tminSize: 40,\n\t\t\tcustomMedia: {},\n\t\t\tinit: true,\n\t\t\texpFactor: 1.5,\n\t\t\thFac: 0.8,\n\t\t\tloadMode: 2,\n\t\t\tloadHidden: true,\n\t\t\tricTimeout: 0,\n\t\t\tthrottleDelay: 125,\n\t\t};\n\n\t\tlazySizesCfg = window.lazySizesConfig || window.lazysizesConfig || {};\n\n\t\tfor(prop in lazySizesDefaults){\n\t\t\tif(!(prop in lazySizesCfg)){\n\t\t\t\tlazySizesCfg[prop] = lazySizesDefaults[prop];\n\t\t\t}\n\t\t}\n\t})();\n\n\tif (!document || !document.getElementsByClassName) {\n\t\treturn {\n\t\t\tinit: function () {},\n\t\t\t/**\n\t\t\t * @type { LazySizesConfigPartial }\n\t\t\t */\n\t\t\tcfg: lazySizesCfg,\n\t\t\t/**\n\t\t\t * @type { true }\n\t\t\t */\n\t\t\tnoSupport: true,\n\t\t};\n\t}\n\n\tvar docElem = document.documentElement;\n\n\tvar supportPicture = window.HTMLPictureElement;\n\n\tvar _addEventListener = 'addEventListener';\n\n\tvar _getAttribute = 'getAttribute';\n\n\t/**\n\t * Update to bind to window because 'this' becomes null during SSR\n\t * builds.\n\t */\n\tvar addEventListener = window[_addEventListener].bind(window);\n\n\tvar setTimeout = window.setTimeout;\n\n\tvar requestAnimationFrame = window.requestAnimationFrame || setTimeout;\n\n\tvar requestIdleCallback = window.requestIdleCallback;\n\n\tvar regPicture = /^picture$/i;\n\n\tvar loadEvents = ['load', 'error', 'lazyincluded', '_lazyloaded'];\n\n\tvar regClassCache = {};\n\n\tvar forEach = Array.prototype.forEach;\n\n\t/**\n\t * @param ele {Element}\n\t * @param cls {string}\n\t */\n\tvar hasClass = function(ele, cls) {\n\t\tif(!regClassCache[cls]){\n\t\t\tregClassCache[cls] = new RegExp('(\\\\s|^)'+cls+'(\\\\s|$)');\n\t\t}\n\t\treturn regClassCache[cls].test(ele[_getAttribute]('class') || '') && regClassCache[cls];\n\t};\n\n\t/**\n\t * @param ele {Element}\n\t * @param cls {string}\n\t */\n\tvar addClass = function(ele, cls) {\n\t\tif (!hasClass(ele, cls)){\n\t\t\tele.setAttribute('class', (ele[_getAttribute]('class') || '').trim() + ' ' + cls);\n\t\t}\n\t};\n\n\t/**\n\t * @param ele {Element}\n\t * @param cls {string}\n\t */\n\tvar removeClass = function(ele, cls) {\n\t\tvar reg;\n\t\tif ((reg = hasClass(ele,cls))) {\n\t\t\tele.setAttribute('class', (ele[_getAttribute]('class') || '').replace(reg, ' '));\n\t\t}\n\t};\n\n\tvar addRemoveLoadEvents = function(dom, fn, add){\n\t\tvar action = add ? _addEventListener : 'removeEventListener';\n\t\tif(add){\n\t\t\taddRemoveLoadEvents(dom, fn);\n\t\t}\n\t\tloadEvents.forEach(function(evt){\n\t\t\tdom[action](evt, fn);\n\t\t});\n\t};\n\n\t/**\n\t * @param elem { Element }\n\t * @param name { string }\n\t * @param detail { any }\n\t * @param noBubbles { boolean }\n\t * @param noCancelable { boolean }\n\t * @returns { CustomEvent }\n\t */\n\tvar triggerEvent = function(elem, name, detail, noBubbles, noCancelable){\n\t\tvar event = document.createEvent('Event');\n\n\t\tif(!detail){\n\t\t\tdetail = {};\n\t\t}\n\n\t\tdetail.instance = lazysizes;\n\n\t\tevent.initEvent(name, !noBubbles, !noCancelable);\n\n\t\tevent.detail = detail;\n\n\t\telem.dispatchEvent(event);\n\t\treturn event;\n\t};\n\n\tvar updatePolyfill = function (el, full){\n\t\tvar polyfill;\n\t\tif( !supportPicture && ( polyfill = (window.picturefill || lazySizesCfg.pf) ) ){\n\t\t\tif(full && full.src && !el[_getAttribute]('srcset')){\n\t\t\t\tel.setAttribute('srcset', full.src);\n\t\t\t}\n\t\t\tpolyfill({reevaluate: true, elements: [el]});\n\t\t} else if(full && full.src){\n\t\t\tel.src = full.src;\n\t\t}\n\t};\n\n\tvar getCSS = function (elem, style){\n\t\treturn (getComputedStyle(elem, null) || {})[style];\n\t};\n\n\t/**\n\t *\n\t * @param elem { Element }\n\t * @param parent { Element }\n\t * @param [width] {number}\n\t * @returns {number}\n\t */\n\tvar getWidth = function(elem, parent, width){\n\t\twidth = width || elem.offsetWidth;\n\n\t\twhile(width < lazySizesCfg.minSize && parent && !elem._lazysizesWidth){\n\t\t\twidth = parent.offsetWidth;\n\t\t\tparent = parent.parentNode;\n\t\t}\n\n\t\treturn width;\n\t};\n\n\tvar rAF = (function(){\n\t\tvar running, waiting;\n\t\tvar firstFns = [];\n\t\tvar secondFns = [];\n\t\tvar fns = firstFns;\n\n\t\tvar run = function(){\n\t\t\tvar runFns = fns;\n\n\t\t\tfns = firstFns.length ? secondFns : firstFns;\n\n\t\t\trunning = true;\n\t\t\twaiting = false;\n\n\t\t\twhile(runFns.length){\n\t\t\t\trunFns.shift()();\n\t\t\t}\n\n\t\t\trunning = false;\n\t\t};\n\n\t\tvar rafBatch = function(fn, queue){\n\t\t\tif(running && !queue){\n\t\t\t\tfn.apply(this, arguments);\n\t\t\t} else {\n\t\t\t\tfns.push(fn);\n\n\t\t\t\tif(!waiting){\n\t\t\t\t\twaiting = true;\n\t\t\t\t\t(document.hidden ? setTimeout : requestAnimationFrame)(run);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\trafBatch._lsFlush = run;\n\n\t\treturn rafBatch;\n\t})();\n\n\tvar rAFIt = function(fn, simple){\n\t\treturn simple ?\n\t\t\tfunction() {\n\t\t\t\trAF(fn);\n\t\t\t} :\n\t\t\tfunction(){\n\t\t\t\tvar that = this;\n\t\t\t\tvar args = arguments;\n\t\t\t\trAF(function(){\n\t\t\t\t\tfn.apply(that, args);\n\t\t\t\t});\n\t\t\t}\n\t\t;\n\t};\n\n\tvar throttle = function(fn){\n\t\tvar running;\n\t\tvar lastTime = 0;\n\t\tvar gDelay = lazySizesCfg.throttleDelay;\n\t\tvar rICTimeout = lazySizesCfg.ricTimeout;\n\t\tvar run = function(){\n\t\t\trunning = false;\n\t\t\tlastTime = Date.now();\n\t\t\tfn();\n\t\t};\n\t\tvar idleCallback = requestIdleCallback && rICTimeout > 49 ?\n\t\t\tfunction(){\n\t\t\t\trequestIdleCallback(run, {timeout: rICTimeout});\n\n\t\t\t\tif(rICTimeout !== lazySizesCfg.ricTimeout){\n\t\t\t\t\trICTimeout = lazySizesCfg.ricTimeout;\n\t\t\t\t}\n\t\t\t} :\n\t\t\trAFIt(function(){\n\t\t\t\tsetTimeout(run);\n\t\t\t}, true)\n\t\t;\n\n\t\treturn function(isPriority){\n\t\t\tvar delay;\n\n\t\t\tif((isPriority = isPriority === true)){\n\t\t\t\trICTimeout = 33;\n\t\t\t}\n\n\t\t\tif(running){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\trunning = true;\n\n\t\t\tdelay = gDelay - (Date.now() - lastTime);\n\n\t\t\tif(delay < 0){\n\t\t\t\tdelay = 0;\n\t\t\t}\n\n\t\t\tif(isPriority || delay < 9){\n\t\t\t\tidleCallback();\n\t\t\t} else {\n\t\t\t\tsetTimeout(idleCallback, delay);\n\t\t\t}\n\t\t};\n\t};\n\n\t//based on http://modernjavascript.blogspot.de/2013/08/building-better-debounce.html\n\tvar debounce = function(func) {\n\t\tvar timeout, timestamp;\n\t\tvar wait = 99;\n\t\tvar run = function(){\n\t\t\ttimeout = null;\n\t\t\tfunc();\n\t\t};\n\t\tvar later = function() {\n\t\t\tvar last = Date.now() - timestamp;\n\n\t\t\tif (last < wait) {\n\t\t\t\tsetTimeout(later, wait - last);\n\t\t\t} else {\n\t\t\t\t(requestIdleCallback || run)(run);\n\t\t\t}\n\t\t};\n\n\t\treturn function() {\n\t\t\ttimestamp = Date.now();\n\n\t\t\tif (!timeout) {\n\t\t\t\ttimeout = setTimeout(later, wait);\n\t\t\t}\n\t\t};\n\t};\n\n\tvar loader = (function(){\n\t\tvar preloadElems, isCompleted, resetPreloadingTimer, loadMode, started;\n\n\t\tvar eLvW, elvH, eLtop, eLleft, eLright, eLbottom, isBodyHidden;\n\n\t\tvar regImg = /^img$/i;\n\t\tvar regIframe = /^iframe$/i;\n\n\t\tvar supportScroll = ('onscroll' in window) && !(/(gle|ing)bot/.test(navigator.userAgent));\n\n\t\tvar shrinkExpand = 0;\n\t\tvar currentExpand = 0;\n\n\t\tvar isLoading = 0;\n\t\tvar lowRuns = -1;\n\n\t\tvar resetPreloading = function(e){\n\t\t\tisLoading--;\n\t\t\tif(!e || isLoading < 0 || !e.target){\n\t\t\t\tisLoading = 0;\n\t\t\t}\n\t\t};\n\n\t\tvar isVisible = function (elem) {\n\t\t\tif (isBodyHidden == null) {\n\t\t\t\tisBodyHidden = getCSS(document.body, 'visibility') == 'hidden';\n\t\t\t}\n\n\t\t\treturn isBodyHidden || !(getCSS(elem.parentNode, 'visibility') == 'hidden' && getCSS(elem, 'visibility') == 'hidden');\n\t\t};\n\n\t\tvar isNestedVisible = function(elem, elemExpand){\n\t\t\tvar outerRect;\n\t\t\tvar parent = elem;\n\t\t\tvar visible = isVisible(elem);\n\n\t\t\teLtop -= elemExpand;\n\t\t\teLbottom += elemExpand;\n\t\t\teLleft -= elemExpand;\n\t\t\teLright += elemExpand;\n\n\t\t\twhile(visible && (parent = parent.offsetParent) && parent != document.body && parent != docElem){\n\t\t\t\tvisible = ((getCSS(parent, 'opacity') || 1) > 0);\n\n\t\t\t\tif(visible && getCSS(parent, 'overflow') != 'visible'){\n\t\t\t\t\touterRect = parent.getBoundingClientRect();\n\t\t\t\t\tvisible = eLright > outerRect.left &&\n\t\t\t\t\t\teLleft < outerRect.right &&\n\t\t\t\t\t\teLbottom > outerRect.top - 1 &&\n\t\t\t\t\t\teLtop < outerRect.bottom + 1\n\t\t\t\t\t;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn visible;\n\t\t};\n\n\t\tvar checkElements = function() {\n\t\t\tvar eLlen, i, rect, autoLoadElem, loadedSomething, elemExpand, elemNegativeExpand, elemExpandVal,\n\t\t\t\tbeforeExpandVal, defaultExpand, preloadExpand, hFac;\n\t\t\tvar lazyloadElems = lazysizes.elements;\n\n\t\t\tif((loadMode = lazySizesCfg.loadMode) && isLoading < 8 && (eLlen = lazyloadElems.length)){\n\n\t\t\t\ti = 0;\n\n\t\t\t\tlowRuns++;\n\n\t\t\t\tfor(; i < eLlen; i++){\n\n\t\t\t\t\tif(!lazyloadElems[i] || lazyloadElems[i]._lazyRace){continue;}\n\n\t\t\t\t\tif(!supportScroll || (lazysizes.prematureUnveil && lazysizes.prematureUnveil(lazyloadElems[i]))){unveilElement(lazyloadElems[i]);continue;}\n\n\t\t\t\t\tif(!(elemExpandVal = lazyloadElems[i][_getAttribute]('data-expand')) || !(elemExpand = elemExpandVal * 1)){\n\t\t\t\t\t\telemExpand = currentExpand;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!defaultExpand) {\n\t\t\t\t\t\tdefaultExpand = (!lazySizesCfg.expand || lazySizesCfg.expand < 1) ?\n\t\t\t\t\t\t\tdocElem.clientHeight > 500 && docElem.clientWidth > 500 ? 500 : 370 :\n\t\t\t\t\t\t\tlazySizesCfg.expand;\n\n\t\t\t\t\t\tlazysizes._defEx = defaultExpand;\n\n\t\t\t\t\t\tpreloadExpand = defaultExpand * lazySizesCfg.expFactor;\n\t\t\t\t\t\thFac = lazySizesCfg.hFac;\n\t\t\t\t\t\tisBodyHidden = null;\n\n\t\t\t\t\t\tif(currentExpand < preloadExpand && isLoading < 1 && lowRuns > 2 && loadMode > 2 && !document.hidden){\n\t\t\t\t\t\t\tcurrentExpand = preloadExpand;\n\t\t\t\t\t\t\tlowRuns = 0;\n\t\t\t\t\t\t} else if(loadMode > 1 && lowRuns > 1 && isLoading < 6){\n\t\t\t\t\t\t\tcurrentExpand = defaultExpand;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcurrentExpand = shrinkExpand;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif(beforeExpandVal !== elemExpand){\n\t\t\t\t\t\teLvW = innerWidth + (elemExpand * hFac);\n\t\t\t\t\t\telvH = innerHeight + elemExpand;\n\t\t\t\t\t\telemNegativeExpand = elemExpand * -1;\n\t\t\t\t\t\tbeforeExpandVal = elemExpand;\n\t\t\t\t\t}\n\n\t\t\t\t\trect = lazyloadElems[i].getBoundingClientRect();\n\n\t\t\t\t\tif ((eLbottom = rect.bottom) >= elemNegativeExpand &&\n\t\t\t\t\t\t(eLtop = rect.top) <= elvH &&\n\t\t\t\t\t\t(eLright = rect.right) >= elemNegativeExpand * hFac &&\n\t\t\t\t\t\t(eLleft = rect.left) <= eLvW &&\n\t\t\t\t\t\t(eLbottom || eLright || eLleft || eLtop) &&\n\t\t\t\t\t\t(lazySizesCfg.loadHidden || isVisible(lazyloadElems[i])) &&\n\t\t\t\t\t\t((isCompleted && isLoading < 3 && !elemExpandVal && (loadMode < 3 || lowRuns < 4)) || isNestedVisible(lazyloadElems[i], elemExpand))){\n\t\t\t\t\t\tunveilElement(lazyloadElems[i]);\n\t\t\t\t\t\tloadedSomething = true;\n\t\t\t\t\t\tif(isLoading > 9){break;}\n\t\t\t\t\t} else if(!loadedSomething && isCompleted && !autoLoadElem &&\n\t\t\t\t\t\tisLoading < 4 && lowRuns < 4 && loadMode > 2 &&\n\t\t\t\t\t\t(preloadElems[0] || lazySizesCfg.preloadAfterLoad) &&\n\t\t\t\t\t\t(preloadElems[0] || (!elemExpandVal && ((eLbottom || eLright || eLleft || eLtop) || lazyloadElems[i][_getAttribute](lazySizesCfg.sizesAttr) != 'auto')))){\n\t\t\t\t\t\tautoLoadElem = preloadElems[0] || lazyloadElems[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(autoLoadElem && !loadedSomething){\n\t\t\t\t\tunveilElement(autoLoadElem);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tvar throttledCheckElements = throttle(checkElements);\n\n\t\tvar switchLoadingClass = function(e){\n\t\t\tvar elem = e.target;\n\n\t\t\tif (elem._lazyCache) {\n\t\t\t\tdelete elem._lazyCache;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresetPreloading(e);\n\t\t\taddClass(elem, lazySizesCfg.loadedClass);\n\t\t\tremoveClass(elem, lazySizesCfg.loadingClass);\n\t\t\taddRemoveLoadEvents(elem, rafSwitchLoadingClass);\n\t\t\ttriggerEvent(elem, 'lazyloaded');\n\t\t};\n\t\tvar rafedSwitchLoadingClass = rAFIt(switchLoadingClass);\n\t\tvar rafSwitchLoadingClass = function(e){\n\t\t\trafedSwitchLoadingClass({target: e.target});\n\t\t};\n\n\t\tvar changeIframeSrc = function(elem, src){\n\t\t\tvar loadMode = elem.getAttribute('data-load-mode') || lazySizesCfg.iframeLoadMode;\n\n\t\t\t// loadMode can be also a string!\n\t\t\tif (loadMode == 0) {\n\t\t\t\telem.contentWindow.location.replace(src);\n\t\t\t} else if (loadMode == 1) {\n\t\t\t\telem.src = src;\n\t\t\t}\n\t\t};\n\n\t\tvar handleSources = function(source){\n\t\t\tvar customMedia;\n\n\t\t\tvar sourceSrcset = source[_getAttribute](lazySizesCfg.srcsetAttr);\n\n\t\t\tif( (customMedia = lazySizesCfg.customMedia[source[_getAttribute]('data-media') || source[_getAttribute]('media')]) ){\n\t\t\t\tsource.setAttribute('media', customMedia);\n\t\t\t}\n\n\t\t\tif(sourceSrcset){\n\t\t\t\tsource.setAttribute('srcset', sourceSrcset);\n\t\t\t}\n\t\t};\n\n\t\tvar lazyUnveil = rAFIt(function (elem, detail, isAuto, sizes, isImg){\n\t\t\tvar src, srcset, parent, isPicture, event, firesLoad;\n\n\t\t\tif(!(event = triggerEvent(elem, 'lazybeforeunveil', detail)).defaultPrevented){\n\n\t\t\t\tif(sizes){\n\t\t\t\t\tif(isAuto){\n\t\t\t\t\t\taddClass(elem, lazySizesCfg.autosizesClass);\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem.setAttribute('sizes', sizes);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tsrcset = elem[_getAttribute](lazySizesCfg.srcsetAttr);\n\t\t\t\tsrc = elem[_getAttribute](lazySizesCfg.srcAttr);\n\n\t\t\t\tif(isImg) {\n\t\t\t\t\tparent = elem.parentNode;\n\t\t\t\t\tisPicture = parent && regPicture.test(parent.nodeName || '');\n\t\t\t\t}\n\n\t\t\t\tfiresLoad = detail.firesLoad || (('src' in elem) && (srcset || src || isPicture));\n\n\t\t\t\tevent = {target: elem};\n\n\t\t\t\taddClass(elem, lazySizesCfg.loadingClass);\n\n\t\t\t\tif(firesLoad){\n\t\t\t\t\tclearTimeout(resetPreloadingTimer);\n\t\t\t\t\tresetPreloadingTimer = setTimeout(resetPreloading, 2500);\n\t\t\t\t\taddRemoveLoadEvents(elem, rafSwitchLoadingClass, true);\n\t\t\t\t}\n\n\t\t\t\tif(isPicture){\n\t\t\t\t\tforEach.call(parent.getElementsByTagName('source'), handleSources);\n\t\t\t\t}\n\n\t\t\t\tif(srcset){\n\t\t\t\t\telem.setAttribute('srcset', srcset);\n\t\t\t\t} else if(src && !isPicture){\n\t\t\t\t\tif(regIframe.test(elem.nodeName)){\n\t\t\t\t\t\tchangeIframeSrc(elem, src);\n\t\t\t\t\t} else {\n\t\t\t\t\t\telem.src = src;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(isImg && (srcset || isPicture)){\n\t\t\t\t\tupdatePolyfill(elem, {src: src});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(elem._lazyRace){\n\t\t\t\tdelete elem._lazyRace;\n\t\t\t}\n\t\t\tremoveClass(elem, lazySizesCfg.lazyClass);\n\n\t\t\trAF(function(){\n\t\t\t\t// Part of this can be removed as soon as this fix is older: https://bugs.chromium.org/p/chromium/issues/detail?id=7731 (2015)\n\t\t\t\tvar isLoaded = elem.complete && elem.naturalWidth > 1;\n\n\t\t\t\tif( !firesLoad || isLoaded){\n\t\t\t\t\tif (isLoaded) {\n\t\t\t\t\t\taddClass(elem, lazySizesCfg.fastLoadedClass);\n\t\t\t\t\t}\n\t\t\t\t\tswitchLoadingClass(event);\n\t\t\t\t\telem._lazyCache = true;\n\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\tif ('_lazyCache' in elem) {\n\t\t\t\t\t\t\tdelete elem._lazyCache;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 9);\n\t\t\t\t}\n\t\t\t\tif (elem.loading == 'lazy') {\n\t\t\t\t\tisLoading--;\n\t\t\t\t}\n\t\t\t}, true);\n\t\t});\n\n\t\t/**\n\t\t *\n\t\t * @param elem { Element }\n\t\t */\n\t\tvar unveilElement = function (elem){\n\t\t\tif (elem._lazyRace) {return;}\n\t\t\tvar detail;\n\n\t\t\tvar isImg = regImg.test(elem.nodeName);\n\n\t\t\t//allow using sizes=\"auto\", but don't use. it's invalid. Use data-sizes=\"auto\" or a valid value for sizes instead (i.e.: sizes=\"80vw\")\n\t\t\tvar sizes = isImg && (elem[_getAttribute](lazySizesCfg.sizesAttr) || elem[_getAttribute]('sizes'));\n\t\t\tvar isAuto = sizes == 'auto';\n\n\t\t\tif( (isAuto || !isCompleted) && isImg && (elem[_getAttribute]('src') || elem.srcset) && !elem.complete && !hasClass(elem, lazySizesCfg.errorClass) && hasClass(elem, lazySizesCfg.lazyClass)){return;}\n\n\t\t\tdetail = triggerEvent(elem, 'lazyunveilread').detail;\n\n\t\t\tif(isAuto){\n\t\t\t\t autoSizer.updateElem(elem, true, elem.offsetWidth);\n\t\t\t}\n\n\t\t\telem._lazyRace = true;\n\t\t\tisLoading++;\n\n\t\t\tlazyUnveil(elem, detail, isAuto, sizes, isImg);\n\t\t};\n\n\t\tvar afterScroll = debounce(function(){\n\t\t\tlazySizesCfg.loadMode = 3;\n\t\t\tthrottledCheckElements();\n\t\t});\n\n\t\tvar altLoadmodeScrollListner = function(){\n\t\t\tif(lazySizesCfg.loadMode == 3){\n\t\t\t\tlazySizesCfg.loadMode = 2;\n\t\t\t}\n\t\t\tafterScroll();\n\t\t};\n\n\t\tvar onload = function(){\n\t\t\tif(isCompleted){return;}\n\t\t\tif(Date.now() - started < 999){\n\t\t\t\tsetTimeout(onload, 999);\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t\tisCompleted = true;\n\n\t\t\tlazySizesCfg.loadMode = 3;\n\n\t\t\tthrottledCheckElements();\n\n\t\t\taddEventListener('scroll', altLoadmodeScrollListner, true);\n\t\t};\n\n\t\treturn {\n\t\t\t_: function(){\n\t\t\t\tstarted = Date.now();\n\n\t\t\t\tlazysizes.elements = document.getElementsByClassName(lazySizesCfg.lazyClass);\n\t\t\t\tpreloadElems = document.getElementsByClassName(lazySizesCfg.lazyClass + ' ' + lazySizesCfg.preloadClass);\n\n\t\t\t\taddEventListener('scroll', throttledCheckElements, true);\n\n\t\t\t\taddEventListener('resize', throttledCheckElements, true);\n\n\t\t\t\taddEventListener('pageshow', function (e) {\n\t\t\t\t\tif (e.persisted) {\n\t\t\t\t\t\tvar loadingElements = document.querySelectorAll('.' + lazySizesCfg.loadingClass);\n\n\t\t\t\t\t\tif (loadingElements.length && loadingElements.forEach) {\n\t\t\t\t\t\t\trequestAnimationFrame(function () {\n\t\t\t\t\t\t\t\tloadingElements.forEach( function (img) {\n\t\t\t\t\t\t\t\t\tif (img.complete) {\n\t\t\t\t\t\t\t\t\t\tunveilElement(img);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif(window.MutationObserver){\n\t\t\t\t\tnew MutationObserver( throttledCheckElements ).observe( docElem, {childList: true, subtree: true, attributes: true} );\n\t\t\t\t} else {\n\t\t\t\t\tdocElem[_addEventListener]('DOMNodeInserted', throttledCheckElements, true);\n\t\t\t\t\tdocElem[_addEventListener]('DOMAttrModified', throttledCheckElements, true);\n\t\t\t\t\tsetInterval(throttledCheckElements, 999);\n\t\t\t\t}\n\n\t\t\t\taddEventListener('hashchange', throttledCheckElements, true);\n\n\t\t\t\t//, 'fullscreenchange'\n\t\t\t\t['focus', 'mouseover', 'click', 'load', 'transitionend', 'animationend'].forEach(function(name){\n\t\t\t\t\tdocument[_addEventListener](name, throttledCheckElements, true);\n\t\t\t\t});\n\n\t\t\t\tif((/d$|^c/.test(document.readyState))){\n\t\t\t\t\tonload();\n\t\t\t\t} else {\n\t\t\t\t\taddEventListener('load', onload);\n\t\t\t\t\tdocument[_addEventListener]('DOMContentLoaded', throttledCheckElements);\n\t\t\t\t\tsetTimeout(onload, 20000);\n\t\t\t\t}\n\n\t\t\t\tif(lazysizes.elements.length){\n\t\t\t\t\tcheckElements();\n\t\t\t\t\trAF._lsFlush();\n\t\t\t\t} else {\n\t\t\t\t\tthrottledCheckElements();\n\t\t\t\t}\n\t\t\t},\n\t\t\tcheckElems: throttledCheckElements,\n\t\t\tunveil: unveilElement,\n\t\t\t_aLSL: altLoadmodeScrollListner,\n\t\t};\n\t})();\n\n\n\tvar autoSizer = (function(){\n\t\tvar autosizesElems;\n\n\t\tvar sizeElement = rAFIt(function(elem, parent, event, width){\n\t\t\tvar sources, i, len;\n\t\t\telem._lazysizesWidth = width;\n\t\t\twidth += 'px';\n\n\t\t\telem.setAttribute('sizes', width);\n\n\t\t\tif(regPicture.test(parent.nodeName || '')){\n\t\t\t\tsources = parent.getElementsByTagName('source');\n\t\t\t\tfor(i = 0, len = sources.length; i < len; i++){\n\t\t\t\t\tsources[i].setAttribute('sizes', width);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!event.detail.dataAttr){\n\t\t\t\tupdatePolyfill(elem, event.detail);\n\t\t\t}\n\t\t});\n\t\t/**\n\t\t *\n\t\t * @param elem {Element}\n\t\t * @param dataAttr\n\t\t * @param [width] { number }\n\t\t */\n\t\tvar getSizeElement = function (elem, dataAttr, width){\n\t\t\tvar event;\n\t\t\tvar parent = elem.parentNode;\n\n\t\t\tif(parent){\n\t\t\t\twidth = getWidth(elem, parent, width);\n\t\t\t\tevent = triggerEvent(elem, 'lazybeforesizes', {width: width, dataAttr: !!dataAttr});\n\n\t\t\t\tif(!event.defaultPrevented){\n\t\t\t\t\twidth = event.detail.width;\n\n\t\t\t\t\tif(width && width !== elem._lazysizesWidth){\n\t\t\t\t\t\tsizeElement(elem, parent, event, width);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tvar updateElementsSizes = function(){\n\t\t\tvar i;\n\t\t\tvar len = autosizesElems.length;\n\t\t\tif(len){\n\t\t\t\ti = 0;\n\n\t\t\t\tfor(; i < len; i++){\n\t\t\t\t\tgetSizeElement(autosizesElems[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tvar debouncedUpdateElementsSizes = debounce(updateElementsSizes);\n\n\t\treturn {\n\t\t\t_: function(){\n\t\t\t\tautosizesElems = document.getElementsByClassName(lazySizesCfg.autosizesClass);\n\t\t\t\taddEventListener('resize', debouncedUpdateElementsSizes);\n\t\t\t},\n\t\t\tcheckElems: debouncedUpdateElementsSizes,\n\t\t\tupdateElem: getSizeElement\n\t\t};\n\t})();\n\n\tvar init = function(){\n\t\tif(!init.i && document.getElementsByClassName){\n\t\t\tinit.i = true;\n\t\t\tautoSizer._();\n\t\t\tloader._();\n\t\t}\n\t};\n\n\tsetTimeout(function(){\n\t\tif(lazySizesCfg.init){\n\t\t\tinit();\n\t\t}\n\t});\n\n\tlazysizes = {\n\t\t/**\n\t\t * @type { LazySizesConfigPartial }\n\t\t */\n\t\tcfg: lazySizesCfg,\n\t\tautoSizer: autoSizer,\n\t\tloader: loader,\n\t\tinit: init,\n\t\tuP: updatePolyfill,\n\t\taC: addClass,\n\t\trC: removeClass,\n\t\thC: hasClass,\n\t\tfire: triggerEvent,\n\t\tgW: getWidth,\n\t\trAF: rAF,\n\t};\n\n\treturn lazysizes;\n}\n));\n","(function(window, factory) {\n\tif(!window) {return;}\n\tvar globalInstall = function(){\n\t\tfactory(window.lazySizes);\n\t\twindow.removeEventListener('lazyunveilread', globalInstall, true);\n\t};\n\n\tfactory = factory.bind(null, window, window.document);\n\n\tif(typeof module == 'object' && module.exports){\n\t\tfactory(require('lazysizes'));\n\t} else if (typeof define == 'function' && define.amd) {\n\t\tdefine(['lazysizes'], factory);\n\t} else if(window.lazySizes) {\n\t\tglobalInstall();\n\t} else {\n\t\twindow.addEventListener('lazyunveilread', globalInstall, true);\n\t}\n}(typeof window != 'undefined' ?\n\twindow : 0, function(window, document, lazySizes) {\n\t'use strict';\n\n\tvar addObserver = function(){\n\t\tvar connect, disconnect, observer, connected;\n\t\tvar lsCfg = lazySizes.cfg;\n\t\tvar attributes = {'data-bgset': 1, 'data-include': 1, 'data-poster': 1, 'data-bg': 1, 'data-script': 1};\n\t\tvar regClassTest = '(\\\\s|^)(' + lsCfg.loadedClass;\n\t\tvar docElem = document.documentElement;\n\n\t\tvar setClass = function(target){\n\t\t\tlazySizes.rAF(function(){\n\t\t\t\tlazySizes.rC(target, lsCfg.loadedClass);\n\t\t\t\tif(lsCfg.unloadedClass){\n\t\t\t\t\tlazySizes.rC(target, lsCfg.unloadedClass);\n\t\t\t\t}\n\t\t\t\tlazySizes.aC(target, lsCfg.lazyClass);\n\n\t\t\t\tif(target.style.display == 'none' || (target.parentNode && target.parentNode.style.display == 'none')){\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\tlazySizes.loader.unveil(target);\n\t\t\t\t\t}, 0);\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\tvar onMutation = function(mutations){\n\t\t\tvar i, len, mutation, target;\n\t\t\tfor(i = 0, len = mutations.length; i < len; i++){\n\t\t\t\tmutation = mutations[i];\n\t\t\t\ttarget = mutation.target;\n\n\t\t\t\tif(!target.getAttribute(mutation.attributeName)){continue;}\n\n\t\t\t\tif(target.localName == 'source' && target.parentNode){\n\t\t\t\t\ttarget = target.parentNode.querySelector('img');\n\t\t\t\t}\n\n\t\t\t\tif(target && regClassTest.test(target.className)){\n\t\t\t\t\tsetClass(target);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tif(lsCfg.unloadedClass){\n\t\t\tregClassTest += '|' + lsCfg.unloadedClass;\n\t\t}\n\n\t\tregClassTest += '|' + lsCfg.loadingClass + ')(\\\\s|$)';\n\n\t\tregClassTest = new RegExp(regClassTest);\n\n\t\tattributes[lsCfg.srcAttr] = 1;\n\t\tattributes[lsCfg.srcsetAttr] = 1;\n\n\t\tif(window.MutationObserver){\n\t\t\tobserver = new MutationObserver(onMutation);\n\n\t\t\tconnect = function(){\n\t\t\t\tif(!connected){\n\t\t\t\t\tconnected = true;\n\t\t\t\t\tobserver.observe( docElem, { subtree: true, attributes: true, attributeFilter: Object.keys(attributes)} );\n\t\t\t\t}\n\t\t\t};\n\t\t\tdisconnect = function(){\n\t\t\t\tif(connected){\n\t\t\t\t\tconnected = false;\n\t\t\t\t\tobserver.disconnect();\n\t\t\t\t}\n\t\t\t};\n\t\t} else {\n\t\t\tdocElem.addEventListener('DOMAttrModified', (function(){\n\t\t\t\tvar runs;\n\t\t\t\tvar modifications = [];\n\t\t\t\tvar callMutations = function(){\n\t\t\t\t\tonMutation(modifications);\n\t\t\t\t\tmodifications = [];\n\t\t\t\t\truns = false;\n\t\t\t\t};\n\t\t\t\treturn function(e){\n\t\t\t\t\tif(connected && attributes[e.attrName] && e.newValue){\n\t\t\t\t\t\tmodifications.push({target: e.target, attributeName: e.attrName});\n\t\t\t\t\t\tif(!runs){\n\t\t\t\t\t\t\tsetTimeout(callMutations);\n\t\t\t\t\t\t\truns = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t})(), true);\n\n\t\t\tconnect = function(){\n\t\t\t\tconnected = true;\n\t\t\t};\n\t\t\tdisconnect = function(){\n\t\t\t\tconnected = false;\n\t\t\t};\n\t\t}\n\n\t\taddEventListener('lazybeforeunveil', disconnect, true);\n\t\taddEventListener('lazybeforeunveil', connect);\n\n\t\taddEventListener('lazybeforesizes', disconnect, true);\n\t\taddEventListener('lazybeforesizes', connect);\n\t\tconnect();\n\n\t\tremoveEventListener('lazybeforeunveil', addObserver);\n\t};\n\n\n\taddEventListener('lazybeforeunveil', addObserver);\n}));\n","/*\nThis plugin extends lazySizes to lazyLoad:\nbackground images, videos/posters and scripts\n\nBackground-Image:\nFor background images, use data-bg attribute:\n
\n\n Video:\n For video/audio use data-poster and preload=\"none\":\n \n\n For video that plays automatically if in view:\n \n\n Scripts:\n For scripts use data-script:\n \n\n\n Script modules using require:\n For modules using require use data-require:\n \n*/\n\n(function(window, factory) {\n\tvar globalInstall = function(){\n\t\tfactory(window.lazySizes);\n\t\twindow.removeEventListener('lazyunveilread', globalInstall, true);\n\t};\n\n\tfactory = factory.bind(null, window, window.document);\n\n\tif(typeof module == 'object' && module.exports){\n\t\tfactory(require('lazysizes'));\n\t} else if (typeof define == 'function' && define.amd) {\n\t\tdefine(['lazysizes'], factory);\n\t} else if(window.lazySizes) {\n\t\tglobalInstall();\n\t} else {\n\t\twindow.addEventListener('lazyunveilread', globalInstall, true);\n\t}\n}(window, function(window, document, lazySizes) {\n\t/*jshint eqnull:true */\n\t'use strict';\n\tvar bgLoad, regBgUrlEscape;\n\tvar uniqueUrls = {};\n\n\tif(document.addEventListener){\n\t\tregBgUrlEscape = /\\(|\\)|\\s|'/;\n\n\t\tbgLoad = function (url, cb){\n\t\t\tvar img = document.createElement('img');\n\t\t\timg.onload = function(){\n\t\t\t\timg.onload = null;\n\t\t\t\timg.onerror = null;\n\t\t\t\timg = null;\n\t\t\t\tcb();\n\t\t\t};\n\t\t\timg.onerror = img.onload;\n\n\t\t\timg.src = url;\n\n\t\t\tif(img && img.complete && img.onload){\n\t\t\t\timg.onload();\n\t\t\t}\n\t\t};\n\n\t\taddEventListener('lazybeforeunveil', function(e){\n\t\t\tif(e.detail.instance != lazySizes){return;}\n\n\t\t\tvar tmp, load, bg, poster;\n\t\t\tif(!e.defaultPrevented) {\n\n\t\t\t\tvar target = e.target;\n\n\t\t\t\tif(target.preload == 'none'){\n\t\t\t\t\ttarget.preload = target.getAttribute('data-preload') || 'auto';\n\t\t\t\t}\n\n\t\t\t\tif (target.getAttribute('data-autoplay') != null) {\n\t\t\t\t\tif (target.getAttribute('data-expand') && !target.autoplay) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ttarget.play();\n\t\t\t\t\t\t} catch (er) {}\n\t\t\t\t\t} else {\n\t\t\t\t\t\trequestAnimationFrame(function () {\n\t\t\t\t\t\t\ttarget.setAttribute('data-expand', '-10');\n\t\t\t\t\t\t\tlazySizes.aC(target, lazySizes.cfg.lazyClass);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttmp = target.getAttribute('data-link');\n\t\t\t\tif(tmp){\n\t\t\t\t\taddStyleScript(tmp, true);\n\t\t\t\t}\n\n\t\t\t\t// handle data-script\n\t\t\t\ttmp = target.getAttribute('data-script');\n\t\t\t\tif(tmp){\n\t\t\t\t\te.detail.firesLoad = true;\n\t\t\t\t\tload = function(){\n\t\t\t\t\t\te.detail.firesLoad = false;\n\t\t\t\t\t\tlazySizes.fire(target, '_lazyloaded', {}, true, true);\n\t\t\t\t\t};\n\t\t\t\t\taddStyleScript(tmp, null, load);\n\t\t\t\t}\n\n\t\t\t\t// handle data-require\n\t\t\t\ttmp = target.getAttribute('data-require');\n\t\t\t\tif(tmp){\n\t\t\t\t\tif(lazySizes.cfg.requireJs){\n\t\t\t\t\t\tlazySizes.cfg.requireJs([tmp]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\taddStyleScript(tmp);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// handle data-bg\n\t\t\t\tbg = target.getAttribute('data-bg');\n\t\t\t\tif (bg) {\n\t\t\t\t\te.detail.firesLoad = true;\n\t\t\t\t\tload = function(){\n\t\t\t\t\t\ttarget.style.backgroundImage = 'url(' + (regBgUrlEscape.test(bg) ? JSON.stringify(bg) : bg ) + ')';\n\t\t\t\t\t\te.detail.firesLoad = false;\n\t\t\t\t\t\tlazySizes.fire(target, '_lazyloaded', {}, true, true);\n\t\t\t\t\t};\n\n\t\t\t\t\tbgLoad(bg, load);\n\t\t\t\t}\n\n\t\t\t\t// handle data-poster\n\t\t\t\tposter = target.getAttribute('data-poster');\n\t\t\t\tif(poster){\n\t\t\t\t\te.detail.firesLoad = true;\n\t\t\t\t\tload = function(){\n\t\t\t\t\t\ttarget.poster = poster;\n\t\t\t\t\t\te.detail.firesLoad = false;\n\t\t\t\t\t\tlazySizes.fire(target, '_lazyloaded', {}, true, true);\n\t\t\t\t\t};\n\n\t\t\t\t\tbgLoad(poster, load);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}, false);\n\n\t}\n\n\tfunction addStyleScript(src, style, cb){\n\t\tif(uniqueUrls[src]){\n\t\t\treturn;\n\t\t}\n\t\tvar elem = document.createElement(style ? 'link' : 'script');\n\t\tvar insertElem = document.getElementsByTagName('script')[0];\n\n\t\tif(style){\n\t\t\telem.rel = 'stylesheet';\n\t\t\telem.href = src;\n\t\t} else {\n\t\t\telem.onload = function(){\n\t\t\t\telem.onerror = null;\n\t\t\t\telem.onload = null;\n\t\t\t\tcb();\n\t\t\t};\n\t\t\telem.onerror = elem.onload;\n\n\t\t\telem.src = src;\n\t\t}\n\t\tuniqueUrls[src] = true;\n\t\tuniqueUrls[elem.src || elem.href] = true;\n\t\tinsertElem.parentNode.insertBefore(elem, insertElem);\n\t}\n}));\n","// jQuery 1.9 has removed the `$.browser` property, fancybox relies on\n// it, so we patch it here if it's missing.\n// This has been copied from jQuery migrate 1.1.1.\nif ( !jQuery.browser ) {\n var uaMatch = function( ua ) {\n ua = ua.toLowerCase();\n\n var match = /(chrome)[ \\/]([\\w.]+)/.exec( ua ) ||\n /(webkit)[ \\/]([\\w.]+)/.exec( ua ) ||\n /(opera)(?:.*version|)[ \\/]([\\w.]+)/.exec( ua ) ||\n /(msie) ([\\w.]+)/.exec( ua ) ||\n ua.indexOf(\"compatible\") < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec( ua ) ||\n [];\n\n return {\n browser: match[ 1 ] || \"\",\n version: match[ 2 ] || \"0\"\n };\n };\n\n var matched = uaMatch( navigator.userAgent );\n var browser = {};\n\n if ( matched.browser ) {\n browser[ matched.browser ] = true;\n browser.version = matched.version;\n }\n\n // Chrome is Webkit, but Webkit is also Safari.\n if ( browser.chrome ) {\n browser.webkit = true;\n } else if ( browser.webkit ) {\n browser.safari = true;\n }\n\n jQuery.browser = browser;\n}\n","/* jshint node: true */\n\n/**\n * Unobtrusive scripting adapter for jQuery\n * https://github.com/rails/jquery-ujs\n *\n * Requires jQuery 1.8.0 or later.\n *\n * Released under the MIT license\n *\n */\n\n(function() {\n 'use strict';\n\n var jqueryUjsInit = function($, undefined) {\n\n // Cut down on the number of issues from people inadvertently including jquery_ujs twice\n // by detecting and raising an error when it happens.\n if ( $.rails !== undefined ) {\n $.error('jquery-ujs has already been loaded!');\n }\n\n // Shorthand to make it a little easier to call public rails functions from within rails.js\n var rails;\n var $document = $(document);\n\n $.rails = rails = {\n // Link elements bound by jquery-ujs\n linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',\n\n // Button elements bound by jquery-ujs\n buttonClickSelector: 'button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)',\n\n // Select elements bound by jquery-ujs\n inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',\n\n // Form elements bound by jquery-ujs\n formSubmitSelector: 'form:not([data-turbo=true])',\n\n // Form input elements bound by jquery-ujs\n formInputClickSelector: 'form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',\n\n // Form input elements disabled during form submission\n disableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',\n\n // Form input elements re-enabled after form submission\n enableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',\n\n // Form required input elements\n requiredInputSelector: 'input[name][required]:not([disabled]), textarea[name][required]:not([disabled])',\n\n // Form file input elements\n fileInputSelector: 'input[name][type=file]:not([disabled])',\n\n // Link onClick disable selector with possible reenable after remote submission\n linkDisableSelector: 'a[data-disable-with], a[data-disable]',\n\n // Button onClick disable selector with possible reenable after remote submission\n buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]',\n\n // Up-to-date Cross-Site Request Forgery token\n csrfToken: function() {\n return $('meta[name=csrf-token]').attr('content');\n },\n\n // URL param that must contain the CSRF token\n csrfParam: function() {\n return $('meta[name=csrf-param]').attr('content');\n },\n\n // Make sure that every Ajax request sends the CSRF token\n CSRFProtection: function(xhr) {\n var token = rails.csrfToken();\n if (token) xhr.setRequestHeader('X-CSRF-Token', token);\n },\n\n // Make sure that all forms have actual up-to-date tokens (cached forms contain old ones)\n refreshCSRFTokens: function(){\n $('form input[name=\"' + rails.csrfParam() + '\"]').val(rails.csrfToken());\n },\n\n // Triggers an event on an element and returns false if the event result is false\n fire: function(obj, name, data) {\n var event = $.Event(name);\n obj.trigger(event, data);\n return event.result !== false;\n },\n\n // Default confirm dialog, may be overridden with custom confirm dialog in $.rails.confirm\n confirm: function(message) {\n return confirm(message);\n },\n\n // Default ajax function, may be overridden with custom function in $.rails.ajax\n ajax: function(options) {\n return $.ajax(options);\n },\n\n // Default way to get an element's href. May be overridden at $.rails.href.\n href: function(element) {\n return element[0].href;\n },\n\n // Checks \"data-remote\" if true to handle the request through a XHR request.\n isRemote: function(element) {\n return element.data('remote') !== undefined && element.data('remote') !== false;\n },\n\n // Submits \"remote\" forms and links with ajax\n handleRemote: function(element) {\n var method, url, data, withCredentials, dataType, options;\n\n if (rails.fire(element, 'ajax:before')) {\n withCredentials = element.data('with-credentials') || null;\n dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType);\n\n if (element.is('form')) {\n method = element.data('ujs:submit-button-formmethod') || element.attr('method');\n url = element.data('ujs:submit-button-formaction') || element.attr('action');\n data = $(element[0]).serializeArray();\n // memoized value from clicked submit button\n var button = element.data('ujs:submit-button');\n if (button) {\n data.push(button);\n element.data('ujs:submit-button', null);\n }\n element.data('ujs:submit-button-formmethod', null);\n element.data('ujs:submit-button-formaction', null);\n } else if (element.is(rails.inputChangeSelector)) {\n method = element.data('method');\n url = element.data('url');\n data = element.serialize();\n if (element.data('params')) data = data + '&' + element.data('params');\n } else if (element.is(rails.buttonClickSelector)) {\n method = element.data('method') || 'get';\n url = element.data('url');\n data = element.serialize();\n if (element.data('params')) data = data + '&' + element.data('params');\n } else {\n method = element.data('method');\n url = rails.href(element);\n data = element.data('params') || null;\n }\n\n options = {\n type: method || 'GET', data: data, dataType: dataType,\n // stopping the \"ajax:beforeSend\" event will cancel the ajax request\n beforeSend: function(xhr, settings) {\n if (settings.dataType === undefined) {\n xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script);\n }\n if (rails.fire(element, 'ajax:beforeSend', [xhr, settings])) {\n element.trigger('ajax:send', xhr);\n } else {\n return false;\n }\n },\n success: function(data, status, xhr) {\n element.trigger('ajax:success', [data, status, xhr]);\n },\n complete: function(xhr, status) {\n element.trigger('ajax:complete', [xhr, status]);\n },\n error: function(xhr, status, error) {\n element.trigger('ajax:error', [xhr, status, error]);\n },\n crossDomain: rails.isCrossDomain(url)\n };\n\n // There is no withCredentials for IE6-8 when\n // \"Enable native XMLHTTP support\" is disabled\n if (withCredentials) {\n options.xhrFields = {\n withCredentials: withCredentials\n };\n }\n\n // Only pass url to `ajax` options if not blank\n if (url) { options.url = url; }\n\n return rails.ajax(options);\n } else {\n return false;\n }\n },\n\n // Determines if the request is a cross domain request.\n isCrossDomain: function(url) {\n var originAnchor = document.createElement('a');\n originAnchor.href = location.href;\n var urlAnchor = document.createElement('a');\n\n try {\n urlAnchor.href = url;\n // This is a workaround to a IE bug.\n urlAnchor.href = urlAnchor.href;\n\n // If URL protocol is false or is a string containing a single colon\n // *and* host are false, assume it is not a cross-domain request\n // (should only be the case for IE7 and IE compatibility mode).\n // Otherwise, evaluate protocol and host of the URL against the origin\n // protocol and host.\n return !(((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host) ||\n (originAnchor.protocol + '//' + originAnchor.host ===\n urlAnchor.protocol + '//' + urlAnchor.host));\n } catch (e) {\n // If there is an error parsing the URL, assume it is crossDomain.\n return true;\n }\n },\n\n // Handles \"data-method\" on links such as:\n // Delete\n handleMethod: function(link) {\n var href = rails.href(link),\n method = link.data('method'),\n target = link.attr('target'),\n csrfToken = rails.csrfToken(),\n csrfParam = rails.csrfParam(),\n form = $(''),\n metadataInput = '';\n\n if (csrfParam !== undefined && csrfToken !== undefined && !rails.isCrossDomain(href)) {\n metadataInput += '';\n }\n\n if (target) { form.attr('target', target); }\n\n form.hide().append(metadataInput).appendTo('body');\n form.submit();\n },\n\n // Helper function that returns form elements that match the specified CSS selector\n // If form is actually a \"form\" element this will return associated elements outside the from that have\n // the html form attribute set\n formElements: function(form, selector) {\n return form.is('form') ? $(form[0].elements).filter(selector) : form.find(selector);\n },\n\n /* Disables form elements:\n - Caches element value in 'ujs:enable-with' data store\n - Replaces element text with value of 'data-disable-with' attribute\n - Sets disabled property to true\n */\n disableFormElements: function(form) {\n rails.formElements(form, rails.disableSelector).each(function() {\n rails.disableFormElement($(this));\n });\n },\n\n disableFormElement: function(element) {\n var method, replacement;\n\n method = element.is('button') ? 'html' : 'val';\n replacement = element.data('disable-with');\n\n if (replacement !== undefined) {\n element.data('ujs:enable-with', element[method]());\n element[method](replacement);\n }\n\n element.prop('disabled', true);\n element.data('ujs:disabled', true);\n },\n\n /* Re-enables disabled form elements:\n - Replaces element text with cached value from 'ujs:enable-with' data store (created in `disableFormElements`)\n - Sets disabled property to false\n */\n enableFormElements: function(form) {\n rails.formElements(form, rails.enableSelector).each(function() {\n rails.enableFormElement($(this));\n });\n },\n\n enableFormElement: function(element) {\n var method = element.is('button') ? 'html' : 'val';\n if (element.data('ujs:enable-with') !== undefined) {\n element[method](element.data('ujs:enable-with'));\n element.removeData('ujs:enable-with'); // clean up cache\n }\n element.prop('disabled', false);\n element.removeData('ujs:disabled');\n },\n\n /* For 'data-confirm' attribute:\n - Fires `confirm` event\n - Shows the confirmation dialog\n - Fires the `confirm:complete` event\n\n Returns `true` if no function stops the chain and user chose yes; `false` otherwise.\n Attaching a handler to the element's `confirm` event that returns a `falsy` value cancels the confirmation dialog.\n Attaching a handler to the element's `confirm:complete` event that returns a `falsy` value makes this function\n return false. The `confirm:complete` event is fired whether or not the user answered true or false to the dialog.\n */\n allowAction: function(element) {\n var message = element.data('confirm'),\n answer = false, callback;\n if (!message) { return true; }\n\n if (rails.fire(element, 'confirm')) {\n try {\n answer = rails.confirm(message);\n } catch (e) {\n (console.error || console.log).call(console, e.stack || e);\n }\n callback = rails.fire(element, 'confirm:complete', [answer]);\n }\n return answer && callback;\n },\n\n // Helper function which checks for blank inputs in a form that match the specified CSS selector\n blankInputs: function(form, specifiedSelector, nonBlank) {\n var foundInputs = $(),\n input,\n valueToCheck,\n radiosForNameWithNoneSelected,\n radioName,\n selector = specifiedSelector || 'input,textarea',\n requiredInputs = form.find(selector),\n checkedRadioButtonNames = {};\n\n requiredInputs.each(function() {\n input = $(this);\n if (input.is('input[type=radio]')) {\n\n // Don't count unchecked required radio as blank if other radio with same name is checked,\n // regardless of whether same-name radio input has required attribute or not. The spec\n // states https://www.w3.org/TR/html5/forms.html#the-required-attribute\n radioName = input.attr('name');\n\n // Skip if we've already seen the radio with this name.\n if (!checkedRadioButtonNames[radioName]) {\n\n // If none checked\n if (form.find('input[type=radio]:checked[name=\"' + radioName + '\"]').length === 0) {\n radiosForNameWithNoneSelected = form.find(\n 'input[type=radio][name=\"' + radioName + '\"]');\n foundInputs = foundInputs.add(radiosForNameWithNoneSelected);\n }\n\n // We only need to check each name once.\n checkedRadioButtonNames[radioName] = radioName;\n }\n } else {\n valueToCheck = input.is('input[type=checkbox],input[type=radio]') ? input.is(':checked') : !!input.val();\n if (valueToCheck === nonBlank) {\n foundInputs = foundInputs.add(input);\n }\n }\n });\n return foundInputs.length ? foundInputs : false;\n },\n\n // Helper function which checks for non-blank inputs in a form that match the specified CSS selector\n nonBlankInputs: function(form, specifiedSelector) {\n return rails.blankInputs(form, specifiedSelector, true); // true specifies nonBlank\n },\n\n // Helper function, needed to provide consistent behavior in IE\n stopEverything: function(e) {\n $(e.target).trigger('ujs:everythingStopped');\n e.stopImmediatePropagation();\n return false;\n },\n\n // Replace element's html with the 'data-disable-with' after storing original html\n // and prevent clicking on it\n disableElement: function(element) {\n var replacement = element.data('disable-with');\n\n if (replacement !== undefined) {\n element.data('ujs:enable-with', element.html()); // store enabled state\n element.html(replacement);\n }\n\n element.on('click.railsDisable', function(e) { // prevent further clicking\n return rails.stopEverything(e);\n });\n element.data('ujs:disabled', true);\n },\n\n // Restore element to its original state which was disabled by 'disableElement' above\n enableElement: function(element) {\n if (element.data('ujs:enable-with') !== undefined) {\n element.html(element.data('ujs:enable-with')); // set to old enabled state\n element.removeData('ujs:enable-with'); // clean up cache\n }\n element.off('click.railsDisable'); // enable element\n element.removeData('ujs:disabled');\n }\n };\n\n if (rails.fire($document, 'rails:attachBindings')) {\n\n $.ajaxPrefilter(function(options, originalOptions, xhr){ if ( !options.crossDomain ) { rails.CSRFProtection(xhr); }});\n\n // This event works the same as the load event, except that it fires every\n // time the page is loaded.\n //\n // See https://github.com/rails/jquery-ujs/issues/357\n // See https://developer.mozilla.org/en-US/docs/Using_Firefox_1.5_caching\n $(window).on('pageshow.rails', function () {\n $($.rails.enableSelector).each(function () {\n var element = $(this);\n\n if (element.data('ujs:disabled')) {\n $.rails.enableFormElement(element);\n }\n });\n\n $($.rails.linkDisableSelector).each(function () {\n var element = $(this);\n\n if (element.data('ujs:disabled')) {\n $.rails.enableElement(element);\n }\n });\n });\n\n $document.on('ajax:complete', rails.linkDisableSelector, function() {\n rails.enableElement($(this));\n });\n\n $document.on('ajax:complete', rails.buttonDisableSelector, function() {\n rails.enableFormElement($(this));\n });\n\n $document.on('click.rails', rails.linkClickSelector, function(e) {\n var link = $(this), method = link.data('method'), data = link.data('params'), metaClick = e.metaKey || e.ctrlKey;\n if (!rails.allowAction(link)) return rails.stopEverything(e);\n\n if (!metaClick && link.is(rails.linkDisableSelector)) rails.disableElement(link);\n\n if (rails.isRemote(link)) {\n if (metaClick && (!method || method === 'GET') && !data) { return true; }\n\n var handleRemote = rails.handleRemote(link);\n // Response from rails.handleRemote() will either be false or a deferred object promise.\n if (handleRemote === false) {\n rails.enableElement(link);\n } else {\n handleRemote.fail( function() { rails.enableElement(link); } );\n }\n return false;\n\n } else if (method) {\n rails.handleMethod(link);\n return false;\n }\n });\n\n $document.on('click.rails', rails.buttonClickSelector, function(e) {\n var button = $(this);\n\n if (!rails.allowAction(button) || !rails.isRemote(button)) return rails.stopEverything(e);\n\n if (button.is(rails.buttonDisableSelector)) rails.disableFormElement(button);\n\n var handleRemote = rails.handleRemote(button);\n // Response from rails.handleRemote() will either be false or a deferred object promise.\n if (handleRemote === false) {\n rails.enableFormElement(button);\n } else {\n handleRemote.fail( function() { rails.enableFormElement(button); } );\n }\n return false;\n });\n\n $document.on('change.rails', rails.inputChangeSelector, function(e) {\n var link = $(this);\n if (!rails.allowAction(link) || !rails.isRemote(link)) return rails.stopEverything(e);\n\n rails.handleRemote(link);\n return false;\n });\n\n $document.on('submit.rails', rails.formSubmitSelector, function(e) {\n var form = $(this),\n remote = rails.isRemote(form),\n blankRequiredInputs,\n nonBlankFileInputs;\n\n if (!rails.allowAction(form)) return rails.stopEverything(e);\n\n // Skip other logic when required values are missing or file upload is present\n if (form.attr('novalidate') === undefined) {\n if (form.data('ujs:formnovalidate-button') === undefined) {\n blankRequiredInputs = rails.blankInputs(form, rails.requiredInputSelector, false);\n if (blankRequiredInputs && rails.fire(form, 'ajax:aborted:required', [blankRequiredInputs])) {\n return rails.stopEverything(e);\n }\n } else {\n // Clear the formnovalidate in case the next button click is not on a formnovalidate button\n // Not strictly necessary to do here, since it is also reset on each button click, but just to be certain\n form.data('ujs:formnovalidate-button', undefined);\n }\n }\n\n if (remote) {\n nonBlankFileInputs = rails.nonBlankInputs(form, rails.fileInputSelector);\n if (nonBlankFileInputs) {\n // Slight timeout so that the submit button gets properly serialized\n // (make it easy for event handler to serialize form without disabled values)\n setTimeout(function(){ rails.disableFormElements(form); }, 13);\n var aborted = rails.fire(form, 'ajax:aborted:file', [nonBlankFileInputs]);\n\n // Re-enable form elements if event bindings return false (canceling normal form submission)\n if (!aborted) { setTimeout(function(){ rails.enableFormElements(form); }, 13); }\n\n return aborted;\n }\n\n rails.handleRemote(form);\n return false;\n\n } else {\n // Slight timeout so that the submit button gets properly serialized\n setTimeout(function(){ rails.disableFormElements(form); }, 13);\n }\n });\n\n $document.on('click.rails', rails.formInputClickSelector, function(event) {\n var button = $(this);\n\n if (!rails.allowAction(button)) return rails.stopEverything(event);\n\n // Register the pressed submit button\n var name = button.attr('name'),\n data = name ? {name:name, value:button.val()} : null;\n\n var form = button.closest('form');\n if (form.length === 0) {\n form = $('#' + button.attr('form'));\n }\n form.data('ujs:submit-button', data);\n\n // Save attributes from button\n form.data('ujs:formnovalidate-button', button.attr('formnovalidate'));\n form.data('ujs:submit-button-formaction', button.attr('formaction'));\n form.data('ujs:submit-button-formmethod', button.attr('formmethod'));\n });\n\n $document.on('ajax:send.rails', rails.formSubmitSelector, function(event) {\n if (this === event.target) rails.disableFormElements($(this));\n });\n\n $document.on('ajax:complete.rails', rails.formSubmitSelector, function(event) {\n if (this === event.target) rails.enableFormElements($(this));\n });\n\n $(function(){\n rails.refreshCSRFTokens();\n });\n }\n\n };\n\n if (window.jQuery) {\n jqueryUjsInit(jQuery);\n } else if (typeof exports === 'object' && typeof module === 'object') {\n module.exports = jqueryUjsInit;\n }\n})();\n","/*! Sidr - v1.2.1 - 2013-11-06\n * https://github.com/artberri/sidr\n * Copyright (c) 2013 Alberto Varela; Licensed MIT */\n(function(e){var t=!1,i=!1,n={isUrl:function(e){var t=RegExp(\"^(https?:\\\\/\\\\/)?((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*(\\\\?[;&a-z\\\\d%_.~+=-]*)?(\\\\#[-a-z\\\\d_]*)?$\",\"i\");return t.test(e)?!0:!1},loadContent:function(e,t){e.html(t)},addPrefix:function(e){var t=e.attr(\"id\"),i=e.attr(\"class\");\"string\"==typeof t&&\"\"!==t&&e.attr(\"id\",t.replace(/([A-Za-z0-9_.\\-]+)/g,\"sidr-id-$1\")),\"string\"==typeof i&&\"\"!==i&&\"sidr-inner\"!==i&&e.attr(\"class\",i.replace(/([A-Za-z0-9_.\\-]+)/g,\"sidr-class-$1\")),e.removeAttr(\"style\")},execute:function(n,s,a){\"function\"==typeof s?(a=s,s=\"sidr\"):s||(s=\"sidr\");var r,d,l,c=e(\"#\"+s),u=e(c.data(\"body\")),f=e(\"html\"),p=c.outerWidth(!0),g=c.data(\"speed\"),h=c.data(\"side\"),m=c.data(\"displace\"),v=c.data(\"onOpen\"),y=c.data(\"onClose\"),x=\"sidr\"===s?\"sidr-open\":\"sidr-open \"+s+\"-open\";if(\"open\"===n||\"toggle\"===n&&!c.is(\":visible\")){if(c.is(\":visible\")||t)return;if(i!==!1)return o.close(i,function(){o.open(s)}),void 0;t=!0,\"left\"===h?(r={left:p+\"px\"},d={left:\"0px\"}):(r={right:p+\"px\"},d={right:\"0px\"}),u.is(\"body\")&&(l=f.scrollTop(),f.css(\"overflow-x\",\"hidden\").scrollTop(l)),m?u.addClass(\"sidr-animating\").css({width:u.width(),position:\"absolute\"}).animate(r,g,function(){e(this).addClass(x)}):setTimeout(function(){e(this).addClass(x)},g),c.css(\"display\",\"block\").animate(d,g,function(){t=!1,i=s,\"function\"==typeof a&&a(s),u.removeClass(\"sidr-animating\")}),v()}else{if(!c.is(\":visible\")||t)return;t=!0,\"left\"===h?(r={left:0},d={left:\"-\"+p+\"px\"}):(r={right:0},d={right:\"-\"+p+\"px\"}),u.is(\"body\")&&(l=f.scrollTop(),f.removeAttr(\"style\").scrollTop(l)),u.addClass(\"sidr-animating\").animate(r,g).removeClass(x),c.animate(d,g,function(){c.removeAttr(\"style\").hide(),u.removeAttr(\"style\"),e(\"html\").removeAttr(\"style\"),t=!1,i=!1,\"function\"==typeof a&&a(s),u.removeClass(\"sidr-animating\")}),y()}}},o={open:function(e,t){n.execute(\"open\",e,t)},close:function(e,t){n.execute(\"close\",e,t)},toggle:function(e,t){n.execute(\"toggle\",e,t)},toogle:function(e,t){n.execute(\"toggle\",e,t)}};e.sidr=function(t){return o[t]?o[t].apply(this,Array.prototype.slice.call(arguments,1)):\"function\"!=typeof t&&\"string\"!=typeof t&&t?(e.error(\"Method \"+t+\" does not exist on jQuery.sidr\"),void 0):o.toggle.apply(this,arguments)},e.fn.sidr=function(t){var i=e.extend({name:\"sidr\",speed:200,side:\"left\",source:null,renaming:!0,body:\"body\",displace:!0,onOpen:function(){},onClose:function(){}},t),s=i.name,a=e(\"#\"+s);if(0===a.length&&(a=e(\"\").attr(\"id\",s).appendTo(e(\"body\"))),a.addClass(\"sidr\").addClass(i.side).data({speed:i.speed,side:i.side,body:i.body,displace:i.displace,onOpen:i.onOpen,onClose:i.onClose}),\"function\"==typeof i.source){var r=i.source(s);n.loadContent(a,r)}else if(\"string\"==typeof i.source&&n.isUrl(i.source))e.get(i.source,function(e){n.loadContent(a,e)});else if(\"string\"==typeof i.source){var d=\"\",l=i.source.split(\",\");if(e.each(l,function(t,i){d+='