if (window.getEcwidV2Object === undefined) {
window.getEcwidV2Object = function() {
return window.Ecwid;
}
window.getEcwidV2ObjectName = function() {
return "Ecwid";
}
window.getEcwidV3Object = function() {
return undefined;
}
}
var ecwidV2ObjectName = window.getEcwidV2ObjectName();
window[ecwidV2ObjectName] = window[ecwidV2ObjectName] || {};
var EcwidObj = window.getEcwidV2Object();
try {
if (!window.console) {
window.console = {
log: function() {},
error: function() {}
}
}
var _xnext_included;
if (!_xnext_included && !window.location.href.match(/fb_xd_fragment/g)) {
_xnext_included = true;
window.ec = window.ec || {};
window.ec.config = window.ec.config || {};
window.ec.config.tracking = window.ec.config.tracking || {};
if(!document.body) {
throw "The tag
is missing";
}
function xInjectJs(src) {
var script = document.createElement("script");
script.setAttribute("src", src);
script.charset = "utf-8";
script.setAttribute("type", "text/javascript");
document.body.appendChild(script);
}
/*! lazysizes - v5.1.2 */
!function(a,b){var c=b(a,a.document);a.lazySizes=c,"object"==typeof module&&module.exports&&(module.exports=c)}("undefined"!=typeof window?window:{},function(a,b){"use strict";var c,d;if(function(){var b,c={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};d=a.lazySizesConfig||a.lazysizesConfig||{};for(b in c)b in d||(d[b]=c[b])}(),!b||!b.getElementsByClassName)return{init:function(){},cfg:d,noSupport:!0};var e=b.documentElement,f=a.Date,g=a.HTMLPictureElement,h="addEventListener",i="getAttribute",j=a[h],k=a.setTimeout,l=a.requestAnimationFrame||k,m=a.requestIdleCallback,n=/^picture$/i,o=["load","error","lazyincluded","_lazyloaded"],p={},q=Array.prototype.forEach,r=function(a,b){return p[b]||(p[b]=new RegExp("(\\s|^)"+b+"(\\s|$)")),p[b].test(a[i]("class")||"")&&p[b]},s=function(a,b){r(a,b)||a.setAttribute("class",(a[i]("class")||"").trim()+" "+b)},t=function(a,b){var c;(c=r(a,b))&&a.setAttribute("class",(a[i]("class")||"").replace(c," "))},u=function(a,b,c){var d=c?h:"removeEventListener";c&&u(a,b),o.forEach(function(c){a[d](c,b)})},v=function(a,d,e,f,g){var h=b.createEvent("Event");return e||(e={}),e.instance=c,h.initEvent(d,!f,!g),h.detail=e,a.dispatchEvent(h),h},w=function(b,c){var e;!g&&(e=a.picturefill||d.pf)?(c&&c.src&&!b[i]("srcset")&&b.setAttribute("srcset",c.src),e({reevaluate:!0,elements:[b]})):c&&c.src&&(b.src=c.src)},x=function(a,b){return(getComputedStyle(a,null)||{})[b]},y=function(a,b,c){for(c=c||a.offsetWidth;c49?function(){m(h,{timeout:g}),g!==d.ricTimeout&&(g=d.ricTimeout)}:A(function(){k(h)},!0);return function(a){var d;(a=!0===a)&&(g=33),b||(b=!0,d=e-(f.now()-c),d<0&&(d=0),a||d<9?i():k(i,d))}},C=function(a){var b,c,d=99,e=function(){b=null,a()},g=function(){var a=f.now()-c;a0)&&"visible"!=x(f,"overflow")&&(d=f.getBoundingClientRect(),g=H>d.left&&Gd.top-1&&F500&&e.clientWidth>500?500:370:d.expand,c._defEx=r,s=r*d.expFactor,t=d.hFac,J=null,O2&&o>2&&!b.hidden?(O=s,Q=0):O=o>1&&Q>1&&P<6?r:N),q!==m&&(y=innerWidth+m*t,D=innerHeight+m,n=-1*m,q=m),h=u[f].getBoundingClientRect(),(I=h.bottom)>=n&&(F=h.top)<=D&&(H=h.right)>=n*t&&(G=h.left)<=y&&(I||H||G||F)&&(d.loadHidden||S(u[f]))&&(l&&P<3&&!p&&(o<3||Q<4)||T(u[f],m))){if(aa(u[f]),k=!0,P>9)break}else!k&&l&&!j&&P<4&&Q<4&&o>2&&(g[0]||d.preloadAfterLoad)&&(g[0]||!p&&(I||H||G||F||"auto"!=u[f][i](d.sizesAttr)))&&(j=g[0]||u[f]);j&&!k&&aa(j)}},V=B(U),W=function(a){var b=a.target;if(b._lazyCache)return void delete b._lazyCache;R(a),s(b,d.loadedClass),t(b,d.loadingClass),u(b,Y),v(b,"lazyloaded")},X=A(W),Y=function(a){X({target:a.target})},Z=function(a,b){try{a.contentWindow.location.replace(b)}catch(c){a.src=b}},$=function(a){var b,c=a[i](d.srcsetAttr);(b=d.customMedia[a[i]("data-media")||a[i]("media")])&&a.setAttribute("media",b),c&&a.setAttribute("srcset",c)},_=A(function(a,b,c,e,f){var g,h,j,l,o,p;(o=v(a,"lazybeforeunveil",b)).defaultPrevented||(e&&(c?s(a,d.autosizesClass):a.setAttribute("sizes",e)),h=a[i](d.srcsetAttr),g=a[i](d.srcAttr),f&&(j=a.parentNode,l=j&&n.test(j.nodeName||"")),p=b.firesLoad||"src"in a&&(h||g||l),o={target:a},s(a,d.loadingClass),p&&(clearTimeout(m),m=k(R,2500),u(a,Y,!0)),l&&q.call(j.getElementsByTagName("source"),$),h?a.setAttribute("srcset",h):g&&!l&&(L.test(a.nodeName)?Z(a,g):a.src=g),f&&(h||l)&&w(a,{src:g})),a._lazyRace&&delete a._lazyRace,t(a,d.lazyClass),z(function(){var b=a.complete&&a.naturalWidth>1;p&&!b||(b&&s(a,"ls-is-cached"),W(o),a._lazyCache=!0,k(function(){"_lazyCache"in a&&delete a._lazyCache},9)),"lazy"==a.loading&&P--},!0)}),aa=function(a){if(!a._lazyRace){var b,c=K.test(a.nodeName),e=c&&(a[i](d.sizesAttr)||a[i]("sizes")),f="auto"==e;(!f&&l||!c||!a[i]("src")&&!a.srcset||a.complete||r(a,d.errorClass)||!r(a,d.lazyClass))&&(b=v(a,"lazyunveilread").detail,f&&E.updateElem(a,!0,a.offsetWidth),a._lazyRace=!0,P++,_(a,b,f,e,c))}},ba=C(function(){d.loadMode=3,V()}),ca=function(){3==d.loadMode&&(d.loadMode=2),ba()},da=function(){if(!l){if(f.now()-p<999)return void k(da,999);l=!0,d.loadMode=3,V(),j("scroll",ca,!0)}};return{_:function(){p=f.now(),c.elements=b.getElementsByClassName(d.lazyClass),g=b.getElementsByClassName(d.lazyClass+" "+d.preloadClass),j("scroll",V,!0),j("resize",V,!0),a.MutationObserver?new MutationObserver(V).observe(e,{childList:!0,subtree:!0,attributes:!0}):(e[h]("DOMNodeInserted",V,!0),e[h]("DOMAttrModified",V,!0),setInterval(V,999)),j("hashchange",V,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(a){b[h](a,V,!0)}),/d$|^c/.test(b.readyState)?da():(j("load",da),b[h]("DOMContentLoaded",V),k(da,2e4)),c.elements.length?(U(),z._lsFlush()):V()},checkElems:V,unveil:aa,_aLSL:ca}}(),E=function(){var a,c=A(function(a,b,c,d){var e,f,g;if(a._lazysizesWidth=d,d+="px",a.setAttribute("sizes",d),n.test(b.nodeName||""))for(e=b.getElementsByTagName("source"),f=0,g=e.length;f 1) {
loadedScripts.push(pathGroups[1]);
}
fullPathLoadedScripts.push(scriptPath);
}
}
return {"loadedScriptNames": loadedScripts, "fullPathLoadedScripts": fullPathLoadedScripts};
}
function _getIncompatibleScript() {
var scripts = _getLoadedScripts();
var loadedScriptNames = scripts.loadedScriptNames;
var fullPathLoadedScripts = scripts.fullPathLoadedScripts;
function isScriptLoadedByName(scriptName) {
return loadedScriptNames.indexOf(scriptName) != -1;
}
function isScriptLoadedByPath(scriptNameWithPath) {
for (var i in fullPathLoadedScripts) {
var path = fullPathLoadedScripts[i]
if (path.indexOf(scriptNameWithPath) != -1) {
return true;
}
}
return false;
}
var incompatibleScriptCheckFunctions = [
function checkForDdlevelsmenu() {
var hasScript = isScriptLoadedByName("menu.js");
var hasPlugin = typeof ddlevelsmenu != "undefined";
if (hasScript && hasPlugin) {
return "ddlevelsmenu";
}
return null;
},
function checkForMobmenu() {
var hasScripts = isScriptLoadedByName("mobmenu.js");
if (hasScripts) {
return "mobmenu";
}
return null;
},
function checkForPipdigBlossom() {
var hasThemeStyle = document.querySelectorAll("link[rel='stylesheet'][id='pipdig-style-css'][href*='themes/pipdig-blossom/style.css']").length > 0;
if (hasThemeStyle) {
return "pipdig-blossom";
}
return null;
},
function checkForSkel() {
var hasScripts = isScriptLoadedByName("skel-layers.min.js") || isScriptLoadedByName("skel-layers.js");
var hasPlugin = typeof skel != "undefined" && skel.hasOwnProperty('plugins') && skel.plugins.hasOwnProperty('layers');
if (hasScripts || hasPlugin) {
return "skel-layers";
}
return null;
},
function checkForJPanelMenu() {
var hasScripts = isScriptLoadedByName("jquery.jpanelmenu.min.js") || isScriptLoadedByName("jquery.jpanelmenu.js");
var hasPlugin = typeof jQuery != "undefined" && jQuery.hasOwnProperty('jPanelMenu') && typeof jQuery.jPanelMenu == "function";
if (hasScripts || hasPlugin) {
return "jPanelMenu";
}
return null;
},
function checkForWeeblyUnresponsiveTheme() {
var useUnresponsiveTheme = isScriptLoadedByName("main-mobile.js") && typeof Weebly != "undefined";
if (useUnresponsiveTheme) {
return "weeblyUnresponsiveTheme";
}
return null;
},
function checkForArtisteer() {
var badScriptLoaded = isScriptLoadedByName("script.responsive.js") && typeof responsiveDesign != "undefined";
if (badScriptLoaded) {
return "Artisteer";
}
return null;
}
];
for (var i = 0; i < incompatibleScriptCheckFunctions.length; i++) {
try {
var incompatibleScript = incompatibleScriptCheckFunctions[i]();
if (incompatibleScript) {
return incompatibleScript;
}
} catch (e) {
console.error("Failed to check plugin is included: " + e.message);
}
}
return null;
}
return function() {
if (cache != null) {
return cache;
}
cache = true;
if (cache) {
var incompatibleScript = _getIncompatibleScript();
if (incompatibleScript) {
cache = false;
EcwidLogger.log("Interactive was disabled by plugin or script " + incompatibleScript);
}
}
if (((window.ec || {}).config || {}).interactive != undefined) {
cache = !!window.ec.config.interactive;
EcwidLogger.log("Interactive was explicitly overriden with value " + cache);
}
return cache;
}
})();
EcwidObj._isHoverMustBeDisabledOnDevice = function() {
return ('ontouchstart' in window || !!(window.DocumentTouch && document instanceof DocumentTouch))
&& (typeof window.matchMedia == 'function' && !window.matchMedia('(pointer: fine)').matches && window.matchMedia('(hover: none)').matches);
};
EcwidObj._injectEcwidCss = function() {
var cssUrlAddition = '';
cssUrlAddition += window.css_selectors_prefix ? '&id-selector=' + window.css_selectors_prefix : '';
cssUrlAddition += EcwidObj._isHoverMustBeDisabledOnDevice() ? '&hover=disable' : '';
cssUrlAddition += '&frontendV2';
ChameleonIntegration = {
getChameleonColors: function () {
var colors = {};
var parent = this.findAncestor();
if (!parent) {
return colors;
}
var colorForeground = getComputedStyle(parent, null).color;
if (colorForeground.replace(/ /g,"") != "rgba(0,0,0,0)"
&& colorForeground != "transparent") {
colors['color-foreground'] = colorForeground;
colors['color-price'] = colors['color-foreground'];
}
var colorBackground = this.getBackground(parent);
if (colorBackground.replace(/ /g,"") != "rgba(0,0,0,0)"
&& colorBackground != "transparent") {
colors['color-background'] = colorBackground;
} else {
colors['color-background'] = 'white';
}
var colorLink = this.getLinkColor(parent);
if (colorLink.replace(/ /g,"") != "rgba(0,0,0,0)"
&& colorLink != "transparent") {
colors['color-link'] = colorLink;
}
return colors;
},
getChameleonFontFamily: function () {
var font = {};
var parent = this.findAncestor();
if (!parent) {
return font;
}
font['font-family'] = this.getStyle(parent, 'font-family');
return font;
},
findAncestor: function () {
var widgetTypes = ['ProductBrowser', 'SingleProduct', 'Product', 'Minicart', 'CategoriesV2', 'VCategories'];
for (var i = 0; i < widgetTypes.length; ++i) {
var productWidget = this.extractWidget(widgetTypes[i]);
if (productWidget) {
var widget = document.querySelector("#" + productWidget.id);
return widget ? widget.parentNode : undefined;
}
}
var nodes = document.getElementsByClassName('ec-cart-widget')
if (nodes.length > 0) {
return nodes[nodes.length - 1].parentNode;
}
return undefined;
},
extractWidget: function (widgetType) {
var widgets = window._xnext_initialization_scripts;
if (!widgets) {
return;
}
for (var i = widgets.length - 1; i >= 0; i--) {
if (widgets[i].widgetType == widgetType) {
return widgets[i];
}
}
},
getLinkColor: function (parent) {
var a = document.createElement('a');
a.href = a.textContent = url = '';
parent.appendChild(a);
var primary_link = document.defaultView.getComputedStyle(a, null).color;
parent.removeChild(a);
return primary_link;
},
toCamelCase: function (s) {
for (var exp = /-([a-z])/; exp.test(s); s = s.replace(exp, RegExp.$1.toUpperCase()));
return s;
},
getStyle: function (e, a) {
var v = null;
if (document.defaultView && document.defaultView.getComputedStyle) {
var cs = document.defaultView.getComputedStyle(e, null);
if (cs && cs.getPropertyValue)
v = cs.getPropertyValue(a);
}
if (!v && e.currentStyle)
v = e.currentStyle[this.toCamelCase(a)];
return v;
},
getBackground: function (e) {
var v = this.getStyle(e, 'background-color');
while (!v || v == 'transparent' || v == '#000000' || v == 'rgba(0, 0, 0, 0)') {
if (e == document.documentElement)
v = 'white';
else {
e = e.parentNode;
v = this.getStyle(e, 'background-color');
}
}
return v;
}
};
function isOnIframe() {
return window.top.location != window.location;
}
function getAdditionalCssUrlParams(colors, valueLengthLimit) {
var cssColorParams = "";
for (var key in colors) {
if (colors.hasOwnProperty(key)) {
var value = colors[key];
cssColorParams += "&" + encodeURIComponent(key) + "=" + encodeURIComponent(value.substring(0, valueLengthLimit));
}
}
return cssColorParams;
}
function isIOS13() {
var ua = navigator.userAgent;
var uaSimilarToIos = (/Version\/13/.test(ua) && (/iPad/.test(ua) || /iPod/.test(ua) || /iPhone/.test(ua) || /Intel Mac OS X/.test(ua)));
var supportTouchEvents = 'ontouchstart' in window || !!(window.DocumentTouch && document instanceof DocumentTouch);
return uaSimilarToIos && supportTouchEvents;
}
var colors;
if (window.ec && window.ec.config && window.ec.config.chameleon && window.ec.config.chameleon.colors) {
colors = window.ec.config.chameleon.colors;
}
// disable 'chameleon' if the page doesn't have additional styles (ECWID-26112)
var countStyles = document.styleSheets.length;
var noStyle = (countStyles == 0) || (countStyles == 1 && window.ecwid_loader_shown);
var chameleonEnabled = false || true && !isOnIframe();
if ((!colors && chameleonEnabled || colors === "auto") && !noStyle) {
colors = ChameleonIntegration.getChameleonColors();
}
window.ec = window.ec || {};
window.ec.config = window.ec.config || {};
window.ec.config.chameleonDefaults = window.ec.config.chameleonDefaults || {};
window.ec.config.chameleonDefaults.gallery = window.ec.config.chameleonDefaults.gallery || {};
var valueLengthLimit;
if (!!colors) {
valueLengthLimit = 50;
cssUrlAddition += getAdditionalCssUrlParams(colors, valueLengthLimit);
window.ec.config.chameleonDefaults.colors = colors;
}
var font;
if (window.ec && window.ec.config && window.ec.config.chameleon && window.ec.config.chameleon.font) {
font = window.ec.config.chameleon.font;
}
if (!font && chameleonEnabled || font === "auto") {
font = ChameleonIntegration.getChameleonFontFamily();
}
if (isIOS13() && !/-apple-system/.test(font)) {
if (!font) {
font = {"font-family": "-apple-system"};
} else {
font["font-family"] += ", -apple-system";
}
}
if (!!font) {
valueLengthLimit = 150;
var fontFamily = font["font-family"];
if (!!fontFamily) {
var families = fontFamily.split(/,\s*/)
var str = "";
var delimiter = "";
for (var i = 0; i < families.length; i++) {
if (str.length + families[i].length + delimiter.length > valueLengthLimit) {
break;
}
str += delimiter + families[i];
delimiter = ",";
}
cssUrlAddition += "&font-family="+encodeURIComponent(str);
window.ec.config.chameleonDefaults.font = { "font-family": str };
}
}
var useExactColors;
if (window.ec && window.ec.config && window.ec.config.chameleon && window.ec.config.chameleon.gallery && window.ec.config.chameleon.gallery.useExactColors) {
useExactColors = window.ec.config.chameleon.gallery.useExactColors;
}
if (!useExactColors && chameleonEnabled) {
useExactColors = false;
}
if (typeof useExactColors !== 'undefined') {
if (useExactColors) {
useExactColors = true;
} else {
useExactColors = false;
}
cssUrlAddition += "&useExactGalleryColors=" + useExactColors;
}
window.ec_legacyCssUrl = 'https://d1oxsl77a1kjht.cloudfront.net/css/new?hc=970435316&ownerid=28332770' + cssUrlAddition;
var cssUrl = 'https://d1oxsl77a1kjht.cloudfront.net/css/new?hc=970435316&ownerid=28332770' + cssUrlAddition;
var l = document.createElement('link');
l.onload = function() {
try {
const cssUrlObject = new URL(cssUrl);
Array.from(document.getElementsByTagName('link')).forEach((linkEl) => {
try {
const linkElUrlObject = new URL(linkEl.href);
if (linkElUrlObject.origin === cssUrlObject.origin && linkElUrlObject.pathname === cssUrlObject.pathname && linkEl !== l) {
EcwidLogger.log("Remove not actual stylesheet link element");
linkEl.remove();
}
} finally {}
});
} finally {}
};
l.setAttribute('rel', 'stylesheet');
l.setAttribute('href', cssUrl);
document.getElementsByTagName('head')[0].appendChild(l);
window.ec.cssLinkElement = l;
}
EcwidObj._isAllCssLoaded = function() {
if (!true) {
return false;
}
var styleLinks = document.getElementsByTagName('link');
for (var i = 0; i < styleLinks.length; i++) {
var styleLink = styleLinks[i];
if (styleLink.rel !== 'stylesheet') continue;
if (!!styleLink.customAppStyle) continue;
if (!EcwidObj._styleLinkIsLoaded(styleLink)) {
return false;
}
}
EcwidLogger.log("CSS loaded: all css files exist in stylesheets");
return true;
};
EcwidObj._styleLinkIsLoaded = function(styleLink) {
var styleSheets = document.styleSheets;
for (var i = 0; i < styleSheets.length; i++) {
if (styleSheets[i].href === styleLink.href) {
return true;
}
}
return false;
};
EcwidObj._documentReadyStateIsComplete = function() {
var isComplete = /complete/.test(document.readyState);
if (isComplete) {
EcwidLogger.log("CSS loaded: document readyState is complete");
}
return isComplete;
};
EcwidObj._waitForCssLoaded = function(callback) {
var ecwidCssLoadedTimer = setInterval(function() {
try {
if (EcwidObj._documentReadyStateIsComplete() || /interactive/.test(document.readyState) && EcwidObj._isAllCssLoaded()) {
clearInterval(ecwidCssLoadedTimer);
callback();
}
} catch(e) {
console.warn("waitForCssLoaded exception: " + e.message);
}
}, 10);
};
EcwidObj._autoChameleonEnabled = function() {
window.ec = window.ec || {};
window.ec.config = window.ec.config || {};
window.ec.config.chameleon = window.ec.config.chameleon || {};
var colors = window.ec.config.chameleon.colors;
var chameleonEnabled = false || true && !isOnIframe();
if (!colors && chameleonEnabled || colors === "auto") {
return true;
}
var font = window.ec.config.chameleon.font;
if (!font && chameleonEnabled || font === "auto") {
return true;
}
return false;
};
EcwidObj._loadEcwidCss = function() {
var ecwidCssLoaded = !!window.ec.cssLinkElement;
if (ecwidCssLoaded) {
return;
}
if (EcwidObj._isInteractiveEnabled() && EcwidObj._autoChameleonEnabled()) {
EcwidObj._waitForCssLoaded(function() {
EcwidObj._injectEcwidCss();
});
} else {
EcwidObj._injectEcwidCss();
}
};
EcwidObj._unloadEcwidCss = function() {
if (window.ec && window.ec.cssLinkElement) {
window.ec.cssLinkElement.parentNode.removeChild(window.ec.cssLinkElement);
delete window.ec.cssLinkElement;
}
};
EcwidObj._loadEcwidAsync = function() {
setTimeout(function() {
EcwidObj._onBodyDone();
EcwidObj._onComplete();
}, 10);
};
EcwidObj._loadEcwidSync = function() {
if (document.addEventListener) {
document.addEventListener("DOMContentLoaded", function() {
EcwidObj._onBodyDone();
}, false);
}
window.ecwid_onBodyDoneTimerId = setInterval(function() {
if (/loaded|complete/.test(document.readyState)) {
EcwidObj._onBodyDone();
}
}, 50);
document.onreadystatechange = function () {
if (document.readyState === "complete") {
EcwidObj._onComplete();
}
}
};
EcwidObj._hasFacebookIframe = function() {
return window.location.href.match(/fb_xd_fragment/g);
};
EcwidObj._isStorefrontV2 = function() {
return true;
};
EcwidObj._showPBLoader = function(id) {
var html;
html = '\
\
';
var element = document.createElement("div")
element.innerHTML = html;
var e = document.getElementById(id);
if (e) {
e.appendChild(element);
}
(function() {
var getRGB = function(b){
var a;
if (b && b.constructor==Array && b.length==3)
return b;
if (a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))
return [parseInt(a[1]),parseInt(a[2]),parseInt(a[3])];
if (a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))
return [parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];
if (a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))
return [parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)];
if (a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))
return [parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];
return false;
}
var getLuminance = function(color){
var rgb = getRGB(color);
return (rgb) ? 0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2] : false;
}
var getBackgroundColor = function(el){
var bg = getStyle(el, 'background-color');
while (!bg || bg == 'transparent' || bg == 'rgba(0, 0, 0, 0)'){
if (el == document.body)
bg = '#fff';
else {
el = el.parentNode;
bg = getStyle(el, 'background-color');
}
}
return bg;
}
var isDark = function(el){
var color = getStyle(el, 'color');
var bg = getBackgroundColor(el);
return (getLuminance(color) > getLuminance(bg)) ? true : false;
}
var getStyle = function(el, cssRule){
var val = '';
if(document.defaultView && document.defaultView.getComputedStyle){
val = document.defaultView.getComputedStyle(el, '').getPropertyValue(cssRule);
}
else if(el.currentStyle){
cssRule = cssRule.replace(/\-(\w)/g, function (m, p){
return p.toUpperCase();
});
val = el.currentStyle[cssRule];
}
return val;
}
var placeholder = document.querySelector('.ecwid-pb-placeholder'),
grid = placeholder.querySelector('.ecwid-pb-placeholder__grid'),
skin = (isDark(grid)) ? 'ecwid-pb-placeholder--dark' : 'ecwid-pb-placeholder--light';
placeholder.className += ' ecwid-pb-placeholder--animate '+ skin;
})(); };
EcwidObj._onBodyDone = function() {
if ((!window.ecwid_bodyDone && !EcwidObj._hasFacebookIframe() && !window.ecwid_dynamic_widgets) || window.ecwid_dynamic_widgets && !window.ecwid_bodyDone) {
window.ecwid_bodyDone = true;
EcwidObj._loadEcwidCss();
// ========================= STUBBED NOCACHE BEGIN =========================
ru_cdev_xnext_frontend_LegacyFrontend=function(){var U='bootstrap',V='begin',W='gwt.codesvr.ru.cdev.xnext.frontend.LegacyFrontend=',X='gwt.codesvr=',Y='ru.cdev.xnext.frontend.LegacyFrontend',Z='startup',$='DUMMY',_=0,ab=1,bb='iframe',cb='fitvidsignore',db='position:absolute; width:0; height:0; border:none; left: -1000px;',eb=' top: -1000px;',fb='CSS1Compat',gb='',hb='',ib='<\/head><\/body><\/html>',jb='undefined',kb='readystatechange',lb=10,mb='script',nb='function',ob='javascript',pb='ru_cdev_xnext_frontend_LegacyFrontend',qb='Failed to load ',rb='moduleStartup',sb='scriptTagAdded',tb='moduleRequested',ub='meta',vb='name',wb='ru.cdev.xnext.frontend.LegacyFrontend::',xb='::',yb='gwt:property',zb='content',Ab='=',Bb='gwt:onPropertyErrorFn',Cb='Bad handler "',Db='" for "gwt:onPropertyErrorFn"',Eb='gwt:onLoadErrorFn',Fb='" for "gwt:onLoadErrorFn"',Gb='#',Hb='?',Ib='/',Jb='img',Kb='clear.cache.gif',Lb='baseUrl',Mb='ru.cdev.xnext.frontend.LegacyFrontend.nocache.js',Nb='base',Ob='//',Pb='user.agent',Qb='webkit',Rb='safari',Sb='msie',Tb=11,Ub='iemobile/10',Vb='ie10',Wb=9,Xb='ie9',Yb='msie 6.',Zb='msie 7.',$b=8,_b='ie8',ac='gecko',bc='opera',cc='gecko1_8',dc=2,ec=3,fc=4,gc='selectingPermutation',hc='ru.cdev.xnext.frontend.LegacyFrontend.devmode.js',ic='1B54CC595C157C0B739BA19329178AE1',jc='1F50BCB00C8491E891B7385B2FCD1C81',kc='81D7D0C55260AACB8D7940025EC1980C',lc='C277562A51EB24CC10E3A890C557175D',mc='FFAE47FB798A84C4E25943DC0690B626',nc=':',oc='.cache.js',pc='loadExternalRefs',qc='end',rc='http:',sc='https:',tc='file:',uc='_gwt_dummy_',vc='__gwtDevModeHook:ru.cdev.xnext.frontend.LegacyFrontend',wc='Ignoring non-whitelisted Dev Mode URL: ',xc=':moduleBase',yc='head',zc=500,Ac='src',Bc=30,Cc=300,Dc=100,Ec='ecwid-loadingIndicator-cursor',Fc='style';var o;var p=window;var q=document;s(U,V);function r(){var a=p.location.search;return a.indexOf(W)!=-1||a.indexOf(X)!=-1}
function s(a,b){if(p.__gwtStatsEvent){p.__gwtStatsEvent({moduleName:Y,sessionId:p.__gwtStatsSessionId,subSystem:Z,evtGroup:a,millis:(new Date).getTime(),type:b})}}
ru_cdev_xnext_frontend_LegacyFrontend.__sendStats=s;ru_cdev_xnext_frontend_LegacyFrontend.__moduleName=Y;ru_cdev_xnext_frontend_LegacyFrontend.__errFn=null;ru_cdev_xnext_frontend_LegacyFrontend.__moduleBase=$;ru_cdev_xnext_frontend_LegacyFrontend.__softPermutationId=_;ru_cdev_xnext_frontend_LegacyFrontend.__computePropValue=null;ru_cdev_xnext_frontend_LegacyFrontend.__getPropMap=null;ru_cdev_xnext_frontend_LegacyFrontend.__installRunAsyncCode=function(){};ru_cdev_xnext_frontend_LegacyFrontend.__gwtStartLoadingFragment=function(){return null};ru_cdev_xnext_frontend_LegacyFrontend.__gwt_isKnownPropertyValue=function(){return false};ru_cdev_xnext_frontend_LegacyFrontend.__gwt_getMetaProperty=function(){return null};var t=null;var u=p.__gwt_activeModules=p.__gwt_activeModules||{};u[Y]={moduleName:Y};ru_cdev_xnext_frontend_LegacyFrontend.__moduleStartupDone=function(e){var f=u[Y].bindings;u[Y].bindings=function(){var a=f?f():{};var b=e[ru_cdev_xnext_frontend_LegacyFrontend.__softPermutationId];for(var c=_;c=_){continue}if(k==yb){l=j.getAttribute(zb);if(l){var m,n=l.indexOf(Ab);if(n>=_){k=l.substring(_,n);m=l.substring(n+ab)}else{k=l;m=hb}c[k]=m}}else if(k==Bb){l=j.getAttribute(zb);if(l){try{d=eval(l)}catch(a){alert(Cb+l+Db)}}}else if(k==Eb){l=j.getAttribute(zb);if(l){try{e=eval(l)}catch(a){alert(Cb+l+Fb)}}}}}__gwt_getMetaProperty=function(a){var b=c[a];return b==null?null:b};t=d;ru_cdev_xnext_frontend_LegacyFrontend.__errFn=e}
function G(){if(window.ecwid_script_base){o=window.ecwid_script_base;return o}function e(a){var b=a.lastIndexOf(Gb);if(b==-1){b=a.length}var c=a.indexOf(Hb);if(c==-1){c=a.length}var d=a.lastIndexOf(Ib,Math.min(c,b));return d>=_?a.substring(_,d+ab):hb}
function f(a){if(a.match(/^\w+:\/\//)){}else{var b=q.createElement(Jb);b.src=a+Kb;a=e(b.src)}return a}
function g(){var a=__gwt_getMetaProperty(Lb);if(a!=null){return a}return hb}
function h(){var a=q.getElementsByTagName(mb);for(var b=_;b_){return a[a.length-ab].href}return hb}
function k(){var a=q.location;return a.href==a.protocol+Ob+a.host+a.pathname+a.search+a.hash}
var l=g();if(l==hb){l=h()}if(l==hb){l=j()}if(l==hb&&k()){l=e(q.location.href)}l=f(l);return l}
function H(a){if(a.match(/^\//)){return a}if(a.match(/^[a-zA-Z]+:\/\//)){return a}return ru_cdev_xnext_frontend_LegacyFrontend.__moduleBase+a}
function I(){var f=[];var g=_;function h(a,b){var c=f;for(var d=_,e=a.length-ab;d=lb&&b=Wb&&b=$b&&b=Tb||a.indexOf(bc)!=-1)}())return cc;return Rb};j[Pb]={'gecko1_8':_,'ie10':ab,'ie8':dc,'ie9':ec,'safari':fc};__gwt_isKnownPropertyValue=function(a,b){return b in j[a]};ru_cdev_xnext_frontend_LegacyFrontend.__getPropMap=function(){var a={};for(var b in j){if(j.hasOwnProperty(b)){a[b]=l(b)}}return a};ru_cdev_xnext_frontend_LegacyFrontend.__computePropValue=l;p.__gwt_activeModules[Y].bindings=ru_cdev_xnext_frontend_LegacyFrontend.__getPropMap;s(U,gc);if(r()){return H(hc)}var m;try{h([Xb],ic);h([Rb],jc);h([_b],kc);h([cc],lc);h([Vb],mc);m=f[l(Pb)];var n=m.indexOf(nc);if(n!=-1){g=parseInt(m.substring(n+ab),lb);m=m.substring(_,n)}}catch(a){}ru_cdev_xnext_frontend_LegacyFrontend.__softPermutationId=g;return H(m+oc)}
function J(){if(!p.__gwt_stylesLoaded){p.__gwt_stylesLoaded={}}s(pc,V);s(pc,qc)}
F();ru_cdev_xnext_frontend_LegacyFrontend.__moduleBase=G();u[Y].moduleBase=ru_cdev_xnext_frontend_LegacyFrontend.__moduleBase;var K=I();if(p){var L=!!(p.location.protocol==rc||(p.location.protocol==sc||p.location.protocol==tc));p.__gwt_activeModules[Y].canRedirect=L;function M(){var b=uc;try{p.sessionStorage.setItem(b,b);p.sessionStorage.removeItem(b);return true}catch(a){return false}}
if(L&&M()){var N=vc;var O=p.sessionStorage[N];if(!/^https:\/\/\w+.local.ecwid.com(:\d+)?\/.*$/.test(O)){if(O&&(window.console&&console.log)){console.log(wc+O)}O=hb}if(O&&!p[N]){p[N]=true;p[N+xc]=G();var P=q.createElement(mb);P.src=O;var Q=q.getElementsByTagName(yc)[_];Q.insertBefore(P,Q.firstElementChild||Q.children[_]);return false}}}J();s(U,qc);function R(b){var c=zc;var d=setInterval(function(){if(!c){clearInterval(d)}else{var a=document.getElementById(ru_cdev_xnext_frontend_LegacyFrontend.__moduleName).contentWindow.document.getElementsByTagName(mb);if(a.length!==_&&a[_].hasAttribute(Ac)){clearInterval(d);b()}c--}},Bc)}
function S(b){var c=Cc;var d=setInterval(function(){if(!c){clearInterval(d)}else{var a=document.getElementById(ru_cdev_xnext_frontend_LegacyFrontend.__moduleName).contentWindow.document.getElementsByTagName(mb);if(a.length===_||!a[_].hasAttribute(Ac)){clearInterval(d);b()}c--}},Dc)}
function T(){document.getElementById(ru_cdev_xnext_frontend_LegacyFrontend.__moduleName).remove();var b=document.getElementsByClassName(Ec);if(b[_]!==undefined){b[_].remove()}A();for(i=_;i 1) {
hashParams = hashParams[1].split('&');
for (var i = 0; i < hashParams.length; i++) {
var hashParam = hashParams[i];
var paramPrefix = '_x' + widgetType + '_';
if (hashParam.indexOf(paramPrefix) != 0) {
continue;
}
hashParam = hashParam.split('=');
if (hashParam.length != 2) {
continue;
}
var paramName = hashParam[0].replace(paramPrefix, '');
var paramValue = decodeURIComponent(hashParam[1]);
var replaceIndex = args.length;
for (var j = 0; j < args.length; j++) {
if (args[j].indexOf(paramName + '=') == 0) {
replaceIndex = j;
break;
}
}
args[replaceIndex] = paramName + '=' + paramValue;
}
}
if(id && document.getElementById(id)) {
var e = document.getElementById(id);
while(e.hasChildNodes()) e.removeChild(e.firstChild);
e.setAttribute("style", style);
try { e.style.cssText = style; } catch(ex) { } // IE
} else {
i=1;
do {
id = widgetType+"-"+i++;
} while (document.getElementById(id));
if (!!document.currentScript && !!document.currentScript.parentElement) {
var widgetElem = document.createElement("div");
widgetElem.id = id;
if (style) {
widgetElem.setAttribute("style", style);
} else {
if (widgetType == "Product") {
widgetElem.setAttribute("style", "display: none");
}
}
document.currentScript.parentElement.appendChild(widgetElem);
} else {
var html = "";
var div = document.createElement("div");
div.innerHTML = html;
document.body.appendChild(div.firstChild);
}
}
if (widgetType == "ProductBrowser" ||
widgetType == "Categories") {
ecwid_loader(id);
}
var l = 0;
if (!window._xnext_initialization_scripts) {
window._xnext_initialization_scripts = [];
} else {
l = window._xnext_initialization_scripts.length;
}
EcwidLogger.log("Widget " + widgetType + " " + id + " added");
window._xnext_initialization_scripts[l] = {widgetType:widgetType, id:id, arg:args};
window.ecwid_dynamic_widgets && EcwidObj._onBodyDone();
};
window.xProductBrowser = window.xProductBrowser || function() {
window.ecwid_dynamic_widgets && EcwidObj.destroy();
xAddWidget("ProductBrowser", arguments);
};
window.ecwid_loader = window.ecwid_loader || function(id) {
if (!window.ecwid_loader_shown && !EcwidObj._hasFacebookIframe()) {
if (!window.ecwid_use_custom_loading_indicator) {
EcwidObj._showPBLoader(id);
}
window.ecwid_loader_shown = true;
}
};
window.xAddToBag = window.xAddToBag || function() {
xAddWidget("AddToBag", arguments);
};
window.xProductThumbnail = window.xProductThumbnail || function() {
xAddWidget("ProductThumbnail", arguments);
};
window.xLoginForm = window.xLoginForm || function() {
xAddWidget("LoginForm", arguments);
};
window.xMinicart = window.xMinicart || function() {
xAddWidget("Minicart", arguments);
};
window.xCategories = window.xCategories || function() {
xAddWidget("Categories", arguments);
};
window.xVCategories = window.xVCategories || function() {
xAddWidget("VCategories", arguments);
};
window.xCategoriesV2 = window.xCategoriesV2 || function() {
xAddWidget("CategoriesV2", arguments);
};
window.xSearchPanel = window.xSearchPanel || function() {
xAddWidget("SearchPanel", arguments);
};
window.xSearch = window.xSearch || function() {
xAddWidget("SearchWidget", arguments);
};
window.xGadget = window.xGadget || function() {
xAddWidget("Gadget", arguments);
}
window.xSingleProduct = window.xSingleProduct || function() {
xAddWidget("SingleProduct", arguments)
};
window.xProduct = window.xProduct || function() {
xAddWidget("Product", arguments)
};
(function(w, undefined) {
var injectRosettaRetry = 0;
function tryInjectRosettaScript(cdnUrl, s3Url) {
injectRosettaRetry++;
var url = (injectRosettaRetry < 5) ? cdnUrl : s3Url;
var script = document.createElement('script');
script.type = 'text/javascript';
script.onerror = function() {
document.getElementsByTagName('head')[0].removeChild(script);
if (injectRosettaRetry < 10) {
setTimeout(tryInjectRosettaScript.bind(this, cdnUrl, s3Url), 200);
} else {
if (!!window.ga) {
window.ga('send', 'exception', {
'exDescription': 'Translation with url ' + url + ' not loaded.',
'exFatal': true
});
}
console && console.error && console.error("Load translation failed: ", url);
window.ecwid_elm_config = window.ecwid_elm_config || {};
window.ecwid_elm_config.translations_load_failed_url = url;
if (!!window.ecwidEvents) {
window.ecwidEvents.trigger('TRANSLATIONS_LOAD_FAILED', url);
}
if (!!window.Ecwid && !!window.Ecwid.logException) {
window.Ecwid.logException('Failed to load translations. Url: ' + url + '. retry number: ' + injectRosettaRetry);
}
}
};
script.onload = function () {
window.ecwid_elm_config = window.ecwid_elm_config || {};
window.ecwid_elm_config.translations_loaded = true;
if (!!window.ecwidEvents) {
window.ecwidEvents.trigger('TRANSLATIONS_LOADED');
}
}
script.src = url;
document.getElementsByTagName('head')[0].appendChild(script);
}
var EcwidObj = w.getEcwidV2Object();
EcwidObj.renderCartWidget = renderCartWidget;
EcwidObj.readyToCreate = readyToCreate;
EcwidObj.init = init;
var widgets = [];
let initCart = false;
function init() {
var nodes = document.getElementsByClassName('ec-cart-widget')
for (var i = 0; i < nodes.length ; i++) {
widgets.push({type:"cart", node: nodes[i]});
initCart = true;
}
maybeLoad();
if (initCart) {
addCartWidget();
}
}
function renderCartWidget(node) {
widgets.push({type:"cart", node: node})
maybeLoad();
}
function readyToCreate() {
maybeLoad()
}
function maybeLoad() {
maybeLoadSource();
!!EcwidObj.__loadWidgets && EcwidObj.__loadWidgets(widgets);
}
function maybeLoadSource() {
if (!window.ecwid_elm_config) {
window.ecwid_init_elm_config()
}
}
function addCartWidget() {
let l = 0
if (typeof(window._xnext_initialization_scripts) == "undefined" || window._xnext_initialization_scripts == null) {
window._xnext_initialization_scripts = []
} else {
l = window._xnext_initialization_scripts.length
}
window._xnext_initialization_scripts[l] = {widgetType: "MinicartV2", id:"", arg:[]}
}
})(window);
window.xAffiliate = window.xAffiliate || function(id) {
EcwidObj.affiliateId = id;
};
if (typeof xInitialized == 'function') xInitialized();
}
} catch (e) {
function xReportError(msg) {
var html = '
';
var element = document.createElement("div");
element.innerHTML = html;
document.body.appendChild(element);
}
var commonError = "The store cannot be loaded in your browser because of some JavaScript errors, sorry. Below here's the exact error occurred.";
var bodyTagError = "This document doesn't contain the required " +
" and tags (see http://www.htmldog.com/reference/htmltags/body). " +
"Thus your Ecwid store cannot be loaded. " +
"Please add these tags and refresh the page. This message will disappear and you will see your store.";
var isWindowsMobile2005 = /(msie 4).*(windows ce)/i.test(navigator.userAgent);
if (!document.body && !isWindowsMobile2005) {
console.error(bodyTagError);
} else {
xReportError(commonError + '
Error: ' + e.message + '');
}
throw e;
}
EcwidObj.getAppPublicConfig = function(namespace) {
var publicData = {"shopkeep-app":"{}","shopkeep-payments":"{}","ecwid-degenerator-app":"{}","ecwid-apigate-app":"{}","ecwid-storefront":"{}"};
var result = EcwidObj._isAppEnabled(namespace) ? publicData[namespace] : null;
return typeof result === 'string' ? result : null;
return null
}