{"version":3,"sources":["vendd.globalHelpers.js","postMessages.js","functions.js","localstorage.js","scriptsActivator.js","vendd.service.js","callbacks.js","init.js"],"names":["setCookie","cname","cvalue","exdays","d","Date","setTime","getTime","expires","toUTCString","document","cookie","getCookie","name","ca","split","i","length","c","charAt","substring","indexOf","toArrayBuffer","buf","ab","ArrayBuffer","view","Uint8Array","decodeEntities","element","createElement","str","replace","innerHTML","textContent","allowOnlyNumbersInput","$container","$","keyup","value","this","stringToNumber","returnValue","currency","decimal","val","LhApp","Context","Currency","Symbol","DecimalSeparator","trim","parseFloat","toFixed","numberToString","addCurrency","clearZeros","fractional","RegExp","test","PostMessages","intervalId","lastHash","attachedCallback","window","receiveMessage","callback","sourceOrigin","e","origin","Object","prototype","toString","call","clearInterval","setInterval","hash","location","re","data","message","Action","Vendd","MessageBus","publishAsync","UserSelect","Messages","SubmitSetInterfaceUserInlineAdmin","LoginName","UserEmail","RedirectToAccount","OrderId","InLineAdminEndpoint","Function","Url","QueryString","String","Tracking","ga","canTrack","InitGoogleAnalytics","apply","arguments","cookieType","Consents","ConsentsManager","CheckoutConsentsManager","undefined","cookiesStatus","IsConsentsEnabled","getTrackingModel","trackingModel","TrackingData","IsTrackingEnabled","getTracker","trackerCode","tracker","Trackers","toLowerCase","Properties","getFeedItemId","product","productId","colorId","feedCodeField","FeedCodes","InitGoogleTagManager","tagManagerCode","GoogleTagManagerCode","w","s","l","push","gtm.start","event","f","getElementsByTagName","j","async","src","parentNode","insertBefore","analyticsCode","GoogleAnalyticsCode","o","r","q","a","m","getServiceEndpoint","url","rewritedUrl","Request","BaseUrl","unescape","FriendlyUrl","queryString","initialQueryString","iid","getValueOf","RawUrl","Item","Id","domainUrl","qsrt","qArray","parameterKey","parameterValue","href","parameters","pair","setParameterValue","setParameterValueOnUrl","hasQueryString","join","removeParameter","parameterKeys","removeParametersFromUrl","removeParameterFromUrl","removeParameters","newUrl","each","index","splice","getText","key","Text","match","resource","getTranslatableTextFromServer","result","ajax","type","dataType","contentType","ContentType","JSON","stringify","success","response","isEmail","text","isAlphaNumeric","initVisitorState","cookieValue","checkAndUpdateVisitorState","Service","onSuccess","res","oldUrl","cookieValueAsUrl","removeClass","removeAttr","oldLanguageCode","newLanguageCode","secure","IsSecure","oldCountryCode","newCountryCode","oldCurrencyCode","newCurrencyCode","hideExpandables","wrapper","item","$expandable","bindUndropables","$wrapper","on","preventDefault","bindExpandables","click","stopPropagation","triggerValue","$expandableContainer","$triggers","unbind","wItem","wItemContainer","hasClass","addClass","EventManager","trigger","isButtonDisabled","buttonWrapper","isDisabled","get","tagName","is","$internalButton","find","bindHrefButtons","bindScrollable","$this","time","offset","animate","scrollTop","height","top","bindLazyLoadableImages","innerWrapper","$innerWrapper","$lazyLoadOptions","opts","defOptions","effect","extend","parse","$images","fn","lazyload","remove","inArray","events","bind","PageTrackingRequest","decodeURIComponent","dataItem","querystring","query","cookies","Name","Value","Expires","Path","MailChimpEcommerce360Tracking","oId","cId","eId","orderId","campaignId","emailId","applyExchangeRate","price","applyExchangeRateExtended","ExchangeRate","rate","handleItemStatistics","itemStatisticsDataArray","control","$control","ItemId","showProductWishlists","MultipleWishlistsEnabled","$wishlistsWrapper","model","UserWishlist","GetClientModel","Product","html","Handlebars","bindProductWishlists","show","closest","$wrper","qs","id","skuId","path","qty","listId","currentListId","parseInt","Wishlist","Add","Widget","OpenWidget","WishlistWidget","hideAllProductWishlists","el","hide","RenderPrice","renderPriceExtended","RenderPriceExtended","isShopDefaultCurrency","separatorSymbol","prefixSymbol","suffixSymbol","renderPrice","symbol","numberOfDigits","NumberOfDigits","symbolShownFirst","SymbolShownFirst","doShowSymbol","DoShowSymbol","ShopDefaultCurrency","formatedPrice","RenderPointsPrice","pointsPrice","renderPointsPriceExtended","RenderPointsPriceExtended","commaSymbol","innerSuffixSymbol","validateClientModel","LangCode","Language","ReplacePrices","obj","itemId","attr","itemData","filter","DeletedPrice","Price","TotalPointsPrice","TotalPointsGain","PointsPrice","PointsGain","ReplaceAvailabilities","cartEnabled","CanBuy","CanBuyWithPoints","CanAddToList","validateTaxIdentifier","isInvoice","countryCode","taxIdentifier","isNaN","arrTaxId","map","Math","pow","pauseScroll","init","ScriptsActivator","consentStatus","marketingCookies","scroll","disqus_config","page","identifier","replaceIframe","idFrame","originalFrame","getElementById","newFrame","getAttribute","width","style","display","replaceChild","localStorage","setItem","removeItem","Storage","_setItem","ready","funcLoaded","markLoaded","statLoaded","loadScripts","scripts","keys","skey","ss","loadFunctionalityScripts","funcFn","loadMarketingScripts","markFn","loadStatisticsScripts","statFn","loadAllScripts","func","mark","stat","removeScriptsElements","script","options","defOpts","onErrorInternal","method","rawdata","servicenamespace","onFailure","err","onUnauthenticated","Error","_","protocol","host","ex","responseJSON","ExceptionType","pop","Message","failure","error","recaptchaLoaded","recaptchaMessagePublished","callback_recaptcha","checkAsyncLoad","googleMapsLoaded","googleMapsMessagePublished","callback_googlemaps","venddLoaded","callback_vendd","Plugins","RecaptcaLoaded","GoogleMapsLoaded","checkout_callback_googlemaps","angular","scope","Control","SetMap","Scripts"],"mappings":"AAAA,SAAAA,UAAAC,MAAAC,OAAAC,QACA,IAAAC,EAAA,IAAAC,KACAD,EAAAE,QAAAF,EAAAG,UAAA,GAAAJ,OAAA,GAAA,GAAA,KACA,IAAAK,QAAA,WAAAJ,EAAAK,cACAC,SAAAC,OAAAV,MAAA,IAAAC,OAAA,KAAAM,QAAA,WAGA,SAAAI,UAAAX,OAGA,IAFA,IAAAY,KAAAZ,MAAA,IACAa,GAAAJ,SAAAC,OAAAI,MAAA,KACAC,EAAA,EAAAA,EAAAF,GAAAG,OAAAD,IAAA,CAEA,IADA,IAAAE,EAAAJ,GAAAE,GACA,KAAAE,EAAAC,OAAA,IAAAD,EAAAA,EAAAE,UAAA,GACA,GAAA,GAAAF,EAAAG,QAAAR,MAAA,OAAAK,EAAAE,UAAAP,KAAAI,OAAAC,EAAAD,QAEA,MAAA,GAGA,SAAAK,cAAAC,KAGA,IAFA,IAAAC,GAAA,IAAA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W,MAAAC,WAAAC,aAAA,iBAAA,IAAAF,MAAAuX,QAAAnX,SAAAoX,gBACAT,2BAAA,GAGAG,mBAAAC,6BACAnX,MAAAC,WAAAC,aAAA,iBAAA,IAAAF,MAAAuX,QAAAnX,SAAAqX,kBACAN,4BAAA,KAKA,SAAAO,+BAEAC,SACAxa,EAAA,oBAAAya,SAAAza,EAAA,oBAAAya,QAAAC,SAAA,mBAAA1a,EAAA,oBAAAya,QAAAC,QAAA,QACA1a,EAAA,oBAAAya,QAAAC,QAAAC,SCxCA3a,EAAA3B,UAAA6Y,MAAA,WAEArU,OAAAA,MAAA+X,SAAA,mBAAA/X,MAAA+X,QAAAjF,MACA9S,MAAA+X,QAAAjF,OAEAlV,OAAAA,MAAAkV,MAAA,mBAAAlV,MAAAkV,MACAlV,MAAAkV","file":"vendd.global.min.js","sourcesContent":["function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \"; \" + expires + \"; \" + \"path=/\";\n}\n\nfunction getCookie(cname) {\n var name = cname + \"=\";\n var ca = document.cookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') c = c.substring(1);\n if (c.indexOf(name) == 0) return c.substring(name.length, c.length);\n }\n return \"\";\n}\n\nfunction toArrayBuffer(buf) {\n\tvar ab = new ArrayBuffer(buf.length);\n\tvar view = new Uint8Array(ab);\n\tfor (var i = 0; i < buf.length; ++i) {\n\t\tview[i] = buf[i];\n\t}\n\treturn ab;\n}\n\nvar decodeEntities = (function() {\n var element = document.createElement('div');\n \n function decodeHTMLEntities (str) {\n if(str && typeof str === 'string') {\n str = str.replace(/]*>([\\S\\s]*?)<\\/script>/gmi, '');\n str = str.replace(/<\\/?\\w(?:[^\"'>]|\"[^\"]*\"|'[^']*')*>/gmi, '');\n element.innerHTML = str;\n str = element.textContent;\n element.textContent = '';\n }\n \n return str;\n }\n \n return decodeHTMLEntities;\n })();\n\nfunction allowOnlyNumbersInput($container) {\n\n if (!$container || $container.length < 0) $container = $('html');\n\n $('*[data-only-numbers=\"true\"]', $container).keyup(function () {\n var value = this.value.replace(/[^0-9\\.,]/g, '');\n\n if (this.value != value) {\n this.value = value;\n }\n });\n}\n\nfunction stringToNumber(value) {\n\n var returnValue, currency, decimal, val = \"\" + value;\n\n currency = LhApp.Context.Currency.Symbol;\n decimal = LhApp.Context.Currency.DecimalSeparator;\n returnValue = val.replace(currency, '').replace(decimal, '.').trim();\n\n return parseFloat(returnValue).toFixed(2);\n}\n\nfunction numberToString(value, addCurrency, clearZeros) {\n var returnValue, currency, decimal, fractional, val = \"\" + value;\n\n currency = LhApp.Context.Currency.Symbol;\n decimal = LhApp.Context.Currency.DecimalSeparator;\n returnValue = val.replace(currency, '').replace('.', decimal).trim();\n\n\n if (clearZeros) {\n fractional = returnValue.split(decimal);\n \n if (fractional.length > 1) {\n if (new RegExp(\"^[0\\0]+$\").test(fractional[1])) {\n returnValue = fractional[0];\n }\n } \n }\n \n if (addCurrency)\n returnValue += \" \" + currency;\n\n return returnValue;\n}","var PostMessages = function () {\n\n var intervalId,\n lastHash,\n attachedCallback,\n window = this;\n\n return {\n receiveMessage: function (callback, sourceOrigin) {\n\n if (window['postMessage']) {\n if (callback) {\n attachedCallback = function (e) {\n if ((typeof sourceOrigin === 'string' && e.origin !== sourceOrigin)\n || (Object.prototype.toString.call(sourceOrigin) === \"[object Function]\" && sourceOrigin(e.origin) === !1)) {\n return !1;\n }\n callback(e);\n };\n }\n if (window['addEventListener']) {\n window[callback ? 'addEventListener' : 'removeEventListener']('message', attachedCallback, !1);\n } else {\n window[callback ? 'attachEvent' : 'detachEvent']('onmessage', attachedCallback);\n }\n } else {\n intervalId && clearInterval(intervalId);\n intervalId = null;\n\n if (callback) {\n intervalId = setInterval(function () {\n var hash = document.location.hash,\n re = /^#?\\d+&/;\n if (hash !== lastHash && re.test(hash)) {\n lastHash = hash;\n callback({ data: hash.replace(re, '') });\n }\n }, 100);\n }\n }\n }\n };\n}();\n\nPostMessages.receiveMessage(function (message) {\n\n if (message.data.Action === 'SetUser') {\n Vendd.MessageBus.publishAsync(Vendd.UserSelect, new Vendd.UserSelect.Messages.SubmitSetInterfaceUserInlineAdmin({ 'LoginName': message.data.UserEmail.trim(), 'RedirectToAccount': message.data.RedirectToAccount }));\n }\n\n if (message.data.Action === 'SetOrder') {\n Vendd.MessageBus.publishAsync(Vendd.UserSelect, new Vendd.UserSelect.Messages.SubmitSetInterfaceUserInlineAdmin({ 'LoginName': message.data.UserEmail.trim(), 'RedirectToAccount': message.data.RedirectToAccount, 'OrderId': message.data.OrderId }));\n }\n\n}, LhApp.Context.InLineAdminEndpoint);\n\n","LhApp = LhApp || {};\n\nLhApp.Function = {};\n\nLhApp.Function.Url = {};\nLhApp.Function.QueryString = {};\nLhApp.Function.String = {};\nLhApp.Function.Tracking = {};\n\n//custom ga in\nLhApp.Function.Tracking.ga = function () {\n\n if (!LhApp.Function.Tracking.canTrack('statisticCookies'))\n return;\n\n //pure ga tracking can be used only in conjuction with tag manager enabled\n if (!LhApp.Function.Tracking.InitGoogleAnalytics())\n return;\n\n ga.apply(this, arguments);\n}\n\nLhApp.Function.Tracking.canTrack = function (cookieType) {\n var Consents = (typeof (ConsentsManager) != \"undefined\" && ConsentsManager) || (typeof (CheckoutConsentsManager) != \"undefined\" && CheckoutConsentsManager);\n if (!Consents)\n return false;\n\n if (!cookieType)\n cookieType = 'marketingCookies';\n\n if (Consents.cookiesStatus[cookieType] === undefined)\n return false;\n\n return LhApp.Context.IsConsentsEnabled && Consents.cookiesStatus[cookieType] ? true : false;\n}\n\nLhApp.Function.Tracking.getTrackingModel = function () {\n var trackingModel = window.TrackingData;\n if (!trackingModel || !trackingModel.IsTrackingEnabled)\n return null;\n\n return trackingModel;\n}\n\nLhApp.Function.Tracking.getTracker = function (trackerCode, trackingModel) { \n if (!trackingModel || !trackingModel.IsTrackingEnabled)\n return null;\n\n var tracker = trackingModel.Trackers[trackerCode.toLowerCase()]; // if available than IsActive = 1 in DB\n if (!tracker)\n return null;\n\n if (!tracker.Properties)\n return null;\n\n return tracker;\n}\n\nLhApp.Function.Tracking.getFeedItemId = function (product, productId, colorId, feedCodeField) {\n if (!product || !productId)\n return null;\n\n if (product.FeedCodes && product.FeedCodes[feedCodeField])\n return product.FeedCodes[feedCodeField];\n\n productId = productId.toString();\n if (colorId && colorId > 0) {\n productId += \"_\" + colorId;\n }\n\n return productId;\n}\n\nLhApp.Function.Tracking.InitGoogleTagManager = function (tagManagerCode) {\n if (tagManagerCode === undefined) // if not defined\n {\n var trackingModel = LhApp.Function.Tracking.getTrackingModel();\n if (!trackingModel || !trackingModel.GoogleTagManagerCode)\n return false;\n tagManagerCode = trackingModel.GoogleTagManagerCode;\n }\n\n if (!tagManagerCode)\n return false;\n\n (function (w, d, s, l, i) {\n w[l] = w[l] || [];\n w[l].push({\n 'gtm.start': new Date().getTime(),\n event: 'gtm.js'\n });\n var f = d.getElementsByTagName(s)[0],\n j = d.createElement(s),\n dl = l != 'dataLayer' ? '&l=' + l : '';\n j.async = true;\n j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;\n f.parentNode.insertBefore(j, f);\n })(window, document, 'script', 'dataLayer', tagManagerCode);\n\n return true;\n}\n\nLhApp.Function.Tracking.InitGoogleAnalytics = function (analyticsCode) {\n if (analyticsCode === undefined) // if not defined\n {\n var trackingModel = LhApp.Function.Tracking.getTrackingModel();\n if (!trackingModel || !trackingModel.GoogleAnalyticsCode)\n return false;\n analyticsCode = trackingModel.GoogleAnalyticsCode;\n }\n\n if (!analyticsCode)\n return false;\n\n (function (i, s, o, g, r, a, m) {\n i['GoogleAnalyticsObject'] = r;\n i[r] = i[r] || function () {\n (i[r].q = i[r].q || []).push(arguments)\n }, i[r].l = 1 * new Date();\n a = s.createElement(o),\n m = s.getElementsByTagName(o)[0];\n a.async = 1;\n a.src = g;\n m.parentNode.insertBefore(a, m)\n })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');\n\n ga(\"create\", analyticsCode, 'auto');\n\n return true;\n}\n\nLhApp.Function.Url.getServiceEndpoint = function (url) {\n var rewritedUrl = LhApp.Context.Request.BaseUrl + '/services/';\n\n rewritedUrl += url;\n\n if (unescape(LhApp.Context.Request.FriendlyUrl).indexOf('?') != -1) {\n\n var queryString = '';\n var initialQueryString = unescape(LhApp.Context.Request.FriendlyUrl).substring(unescape(LhApp.Context.Request.FriendlyUrl).indexOf('?') + 1);\n\n var iid = LhApp.Function.QueryString.getValueOf('iid', unescape(LhApp.Context.Request.RawUrl));\n if (iid != '') queryString = 'iid=' + iid;\n else if (LhApp.Context.Item && LhApp.Context.Item.Id)\n queryString = 'iid=' + LhApp.Context.Item.Id;\n if (rewritedUrl.indexOf(initialQueryString) == -1) {\n\n if (initialQueryString.length > 0) queryString += '&' + initialQueryString;\n\n if (rewritedUrl.indexOf('?') == -1)\n queryString = '?' + queryString;\n else\n queryString = '&' + queryString;\n }\n rewritedUrl += queryString;\n }\n\n rewritedUrl = rewritedUrl.replace(\"?&\", \"?\");\n var domainUrl = rewritedUrl.split('?');\n var qsrt = \"\";\n if (domainUrl.length > 1) {\n \tvar q = domainUrl[1];\n \tvar qArray = q.split('&');\n \tvar operator = '?';\n \tfor (i = 0; i < qArray.length; i++) {\n \t\tif (qArray[i] != \"\" && qArray[i] != \"\" && qsrt.indexOf(qArray[i]) == -1) {\n \t\t\tif (i == 0) {\n \t\t\t\toperator = '?';\n \t\t\t} else {\n \t\t\t\toperator = '&';\n \t\t\t}\n \t\t\tqsrt += operator + qArray[i];\n \t\t}\n \t}\n }\n return domainUrl[0] + qsrt;\n};\n\nLhApp.Function.QueryString.getValueOf = function (parameterKey, url) {\n\n url = url || window.location.href;\n var parameterValue = '';\n\n var queryString = '';\n var hasQueryString = (url.indexOf('?') > -1);\n\n if (hasQueryString) {\n queryString = url.substring(url.indexOf('?') + 1);\n }\n\n var parameters = queryString.split(\"&\");\n\n if (queryString.indexOf(parameterKey) >= 0) {\n\n for (var i = 0; i < parameters.length; i++) {\n var pair = parameters[i].split(\"=\");\n if (pair[0] == parameterKey) {\n parameterValue = pair[1];\n }\n }\n }\n\n return parameterValue;\n};\n\nLhApp.Function.Url.setParameterValue = function (parameterKey, parameterValue) {\n\n var url = window.location.href;\n\n return this.setParameterValueOnUrl(url, parameterKey, parameterValue);\n};\n\nLhApp.Function.Url.setParameterValueOnUrl = function (url, parameterKey, parameterValue) {\n\n var newUrl;\n\n var queryString = '';\n var hasQueryString = (url.indexOf('?') > -1);\n\n if (hasQueryString) {\n queryString = url.substring(url.indexOf('?') + 1);\n }\n\n var parameters = queryString.split(\"&\");\n\n if (queryString.indexOf(parameterKey) >= 0) {\n\n for (var i = 0; i < parameters.length; i++) {\n var pair = parameters[i].split(\"=\");\n if (pair[0] == parameterKey) {\n parameters[i] = pair[0] + \"=\" + parameterValue;\n }\n }\n\n queryString = parameters.join(\"&\");\n\n } else {\n if (hasQueryString) {\n queryString += '&' + parameterKey + '=' + parameterValue;\n } else {\n queryString += '?' + parameterKey + '=' + parameterValue;\n }\n }\n\n if (hasQueryString) {\n newUrl = url.substring(0, url.indexOf('?') + 1) + queryString;\n } else {\n newUrl = url + queryString;\n }\n\n return newUrl;\n};\n\nLhApp.Function.Url.removeParameter = function (parameterKey) {\n\n var url = window.location.href;\n var parameterKeys = [parameterKey];\n\n return this.removeParametersFromUrl(url, parameterKeys);\n};\n\nLhApp.Function.Url.removeParameterFromUrl = function (url, parameterKey) {\n var parameterKeys = [parameterKey];\n\n return this.removeParametersFromUrl(url, parameterKeys);\n};\n\nLhApp.Function.Url.removeParameters = function (parameterKeys) {\n\n var url = window.location.href;\n\n return this.removeParametersFromUrl(url, parameterKeys);\n};\n\nLhApp.Function.Url.removeParametersFromUrl = function (url, parameterKeys) {\n\n var newUrl = url;\n\n $.each(parameterKeys, function (index, parameterKey) {\n\n var queryString = '';\n var hasQueryString = (newUrl.indexOf('?') > -1);\n\n if (hasQueryString) {\n queryString = newUrl.substring(newUrl.indexOf('?') + 1);\n\n var parameters = queryString.split(\"&\");\n\n if (queryString.indexOf(parameterKey) >= 0) {\n\n for (var i = 0; i < parameters.length; i++) {\n var pair = parameters[i].split(\"=\");\n if (pair[0] == parameterKey) {\n parameters.splice(i, 1);\n }\n }\n\n queryString = parameters.join(\"&\");\n if (queryString != \"\")\n newUrl = newUrl.substring(0, newUrl.indexOf('?') + 1) + queryString;\n else\n newUrl = newUrl.substring(0, newUrl.indexOf('?')) + queryString;\n }\n }\n });\n\n return newUrl;\n};\n\nLhApp.Function.getText = function (key) {\n\n if (typeof LhApp.Text == 'undefined')\n return '';\n\n var match = LhApp.Text[key];\n if (match === undefined) {\n var resource = LhApp.Function.getTranslatableTextFromServer(key);\n LhApp.Text[key] = resource;\n match = resource;\n }\n\n return match || '';\n};\n\nLhApp.Function.getTranslatableTextFromServer = function (key) {\n var result = key;\n $.ajax({\n async: false,\n type: 'POST',\n dataType: 'json',\n contentType: 'application/json; charset=UTF-8',\n ContentType: 'application/json; charset=UTF-8',\n url: LhApp.Function.Url.getServiceEndpoint('commonservice.svc/GetTranslatableResource'),\n data: JSON.stringify({\n key: key\n }),\n success: function (response) {\n result = response.d;\n }\n });\n\n return result;\n};\n\nLhApp.Function.String.isEmail = function(text) {\n //var re = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,20}$/i;\n var re = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-||_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+([a-z]+|\\d|-|\\.{0,1}|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])?([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n return re.test(text);\n};\n\nLhApp.Function.String.isAlphaNumeric = function (text) {\n var letterNumber = /^[0-9a-zA-Z]+$/;\n return text.match(letterNumber) || false;\n};\n\nLhApp.Function.initVisitorState = function () {\n\n var cookieValue = $.cookie(\"VisitorState\");\n if (cookieValue) {\n\n LhApp.Function.checkAndUpdateVisitorState(cookieValue);\n\n } else {\n\n Vendd.Service.call({\n url: 'CmsService.svc/InitVisitorState',\n data: null,\n onSuccess: function (res) {\n\n cookieValue = $.cookie(\"VisitorState\");\n if (res.success && cookieValue) {\n LhApp.Function.checkAndUpdateVisitorState(cookieValue);\n }\n }\n });\n }\n};\n\nLhApp.Function.checkAndUpdateVisitorState = function (cookieValue) {\n\n if (cookieValue) {\n\n var oldUrl = window.location.href;\n var cookieValueAsUrl = \"?\" + cookieValue;\n\n $('body').removeClass('x-checking-visitor-state').removeAttr('x-checking-visitor-state');\n\n // 1. Checks to update cookie values from querystring\n var oldLanguageCode = LhApp.Function.QueryString.getValueOf(\"languageCode\", cookieValueAsUrl).toLowerCase();\n var newLanguageCode = LhApp.Function.QueryString.getValueOf(\"lang\", oldUrl).toLowerCase();\n\n if (newLanguageCode != '' && newLanguageCode != oldLanguageCode) {\n cookieValue = LhApp.Function.Url.setParameterValueOnUrl(cookieValueAsUrl, \"languageCode\", newLanguageCode).replace(\"?\", \"\");\n $.cookie(\"VisitorState\", cookieValue, { secure: LhApp.Context.Request.IsSecure });\n cookieValueAsUrl = \"?\" + cookieValue;\n }\n\n var oldCountryCode = LhApp.Function.QueryString.getValueOf(\"countryCode\", cookieValueAsUrl).toLowerCase();\n var newCountryCode = LhApp.Function.QueryString.getValueOf(\"country\", oldUrl).toLowerCase();\n\n if (newCountryCode != '' && newCountryCode != oldCountryCode) {\n cookieValue = LhApp.Function.Url.setParameterValueOnUrl(cookieValueAsUrl, \"countryCode\", newCountryCode).replace(\"?\", \"\");\n $.cookie(\"VisitorState\", cookieValue, { secure: LhApp.Context.Request.IsSecure });\n cookieValueAsUrl = \"?\" + cookieValue;\n }\n\n var oldCurrencyCode = LhApp.Function.QueryString.getValueOf(\"currencyCode\", cookieValueAsUrl).toLowerCase();\n var newCurrencyCode = LhApp.Function.QueryString.getValueOf(\"currency\", oldUrl).toLowerCase();\n\n if (newCurrencyCode != '' && newCurrencyCode != oldCurrencyCode) {\n cookieValue = LhApp.Function.Url.setParameterValueOnUrl(cookieValueAsUrl, \"currencyCode\", newCurrencyCode).replace(\"?\", \"\");\n $.cookie(\"VisitorState\", cookieValue, { secure: LhApp.Context.Request.IsSecure });\n cookieValueAsUrl = \"?\" + cookieValue;\n }\n }\n};\n\nLhApp.Function.hideExpandables = function (wrapper) {\n var $expandables = $('*[data-expandablecontainer].x-expanded:not(.x-loading)', $(wrapper));\n $expandables.each(function (i, item) {\n var $expandable = $(item);\n $expandable.removeClass('x-expanded');\n $('*[data-expandabletrigger=\"' + $expandable.data('expandablecontainer') + '\"].x-open', $(wrapper)).removeClass('x-open');\n });\n};\n\nLhApp.Function.bindUndropables = function (wrapper) {\n var $wrapper = $(wrapper);\n\n var $undropableElements = $('*[data-undropable]', $wrapper);\n $undropableElements.on('drop', function (e) {\n if (typeof (e.preventDefault) === 'function')\n e.preventDefault();\n });\n};\n\nLhApp.Function.bindExpandables = function (wrapper) {\n var $wrapper = $(wrapper);\n\n var $expandableContainers = $('*[data-expandablecontainer]', $wrapper);\n $expandableContainers.click(function (e) {\n e.stopPropagation();\n });\n\n var $triggers = $('*[data-expandabletrigger]', $wrapper);\n $triggers.each(function (i, item) {\n var $trigger = $(item);\n\n var triggerValue = $trigger.data('expandabletrigger');\n var $expandableContainer = $('*[data-expandablecontainer=\"' + triggerValue + '\"]', $wrapper);\n\n var $triggers = $('*[data-expandabletrigger=\"' + triggerValue + '\"]', $wrapper);\n\n if ($expandableContainer.length > 0) {\n $triggers.unbind('click');\n $triggers.click(function (e) {\n e.preventDefault();\n e.stopPropagation();\n\n $('*[data-expandablecontainer].x-expanded').each(function (w, wItem) {\n var wItemContainer = $(wItem).data('expandablecontainer');\n if (wItemContainer != triggerValue) {\n $(wItem).removeClass('x-expanded');\n $('*[data-expandabletrigger=\"' + wItemContainer + '\"].x-open').removeClass('x-open');\n }\n });\n\n if ($expandableContainer.hasClass('x-expanded')) {\n $expandableContainer.removeClass('x-expanded');\n $triggers.removeClass('x-open');\n } else {\n $expandableContainer.addClass('x-expanded');\n $triggers.addClass('x-open');\n\n EventManager.trigger('lazyload');\n }\n });\n }\n });\n};\n\nLhApp.Function.isButtonDisabled = function (buttonWrapper) {\n var isDisabled = false;\n\n if ($(buttonWrapper).get(0).tagName.toLowerCase() == 'input') {\n if ($(buttonWrapper).is(':disabled'))\n isDisabled = true;\n }\n else {\n var $internalButton = $(buttonWrapper).find('input:button');\n if ($internalButton.length > 0) {\n if ($internalButton.is(':disabled'))\n isDisabled = true;\n }\n else if ($(buttonWrapper).hasClass('x-disabled')) {\n isDisabled = true;\n }\n }\n\n return isDisabled;\n};\n\nLhApp.Function.bindHrefButtons = function (wrapper) {\n $('*[data-href]', $(wrapper)).click(function (e) {\n if (e !== undefined && typeof (e.preventDefault) == 'function')\n e.preventDefault();\n\n var isDisabled = LhApp.Function.isButtonDisabled(this);\n if (isDisabled) {\n e.preventDefault();\n }\n else {\n document.location = $(this).data('href');\n }\n });\n};\n\nLhApp.Function.bindScrollable = function (wrapper) {\n $('*[data-scroll-to]', $(wrapper)).click(function () {\n var $this = $(this),\n element = $this.data('scroll-to'), time = $this.data('scroll-time'), offset = $this.data('scroll-offset'),\n time = (typeof time == \"undefined\" || time == \"\") ? 600 : time,\n offset = (typeof offset == \"undefined\" || offset == \"\") ? -10 : offset;\n\n if (element == \"\")\n return;\n\n if (element == \"top\") {\n $('html, body').animate({\n scrollTop: 0\n }, time);\n }\n if (element == \"bottom\") {\n $('html, body').animate({\n scrollTop: $('body').height()\n }, time);\n }\n if ($(element).length > 0) {\n $('html, body').animate({\n scrollTop: $(element).offset().top + offset\n }, time);\n }\n });\n};\n\nLhApp.Function.bindLazyLoadableImages = function (wrapper) {\n\n var $selectedWrapper;\n if ($(wrapper).data('lazy-load-init')) {\n $selectedWrapper = $(wrapper);\n } else {\n $selectedWrapper = $('*[data-lazy-load-init]', $(wrapper));\n }\n\n $selectedWrapper.each(function (i, innerWrapper) {\n\n var $innerWrapper = $(innerWrapper);\n var $lazyLoadOptions = $('*[data-input=\"lazy-load-options\"]', $innerWrapper);\n var initLazyLoad = $innerWrapper.data('lazy-load-init');\n\n if (initLazyLoad) {\n\n var opts = {};\n var defOptions = {\n effect: \"fadeIn\"\n };\n\n if ($lazyLoadOptions.length == 1) {\n $.extend(true, opts, defOptions, JSON.parse($lazyLoadOptions.val()));\n } else {\n $.extend(true, opts, defOptions);\n }\n\n var $images = $(\"img[data-lazyload]\", $innerWrapper);\n if ($images.length > 0 && typeof $.fn.lazyload === \"function\") {\n $($images, $innerWrapper).lazyload(opts);\n }\n\n }\n\n if ($lazyLoadOptions.length > 0) {\n $lazyLoadOptions.remove();\n }\n\n });\n\n if ($.inArray('lazyload', EventManager.events) == -1) {\n EventManager.bind('lazyload', function () {\n $(window).trigger('lazyload');\n });\n }\n\n};\n\nLhApp.Function.PageTrackingRequest = function () {\n var url = decodeURIComponent(LhApp.Context.Request.RawUrl);\n var qstr = url.substring(url.indexOf('?') + 1);\n var dataItem = {\n querystring: qstr,\n cookie: document.cookie\n };\n\n Vendd.Service.call({\n url: 'MarkService.svc/PageTracking',\n data: { query: dataItem },\n onSuccess: function (res) {\n\n var cookies = res;\n for (var i = 0; i < cookies.length; i++) {\n document.cookie = cookies[i].Name + \"=\" + cookies[i].Value + \"; expires=\" + (new Date(cookies[i].Expires)).toUTCString() + \"; path=\" + cookies[i].Path;\n }\n }\n });\n};\n\nLhApp.Function.MailChimpEcommerce360Tracking = function (oId, cId, eId) {\n\n Vendd.Service.call({\n url: 'MarkService.svc/MailChimpEcommerce360Tracking',\n data: { orderId: oId, campaignId: cId, emailId: eId }\n });\n};\n\nLhApp.Function.applyExchangeRate = function (price) {\n return LhApp.Function.applyExchangeRateExtended(price, LhApp.Context.Currency.ExchangeRate);\n};\n\nLhApp.Function.applyExchangeRateExtended = function (price, rate) {\n return price * rate;\n};\n\nLhApp.Function.handleItemStatistics = function () {\n\n var itemStatisticsDataArray = [];\n\n $('.x-control[data-manipulate-stats=\"true\"]').each(function (i, control) {\n\n var $control = $(control);\n var itemId = $control.data('stats-itemid');\n var action = $control.data('stats-action');\n var data = { ItemId: itemId, Action: action };\n\n if ($.inArray(data, itemStatisticsDataArray) == -1)\n itemStatisticsDataArray.push(data);\n });\n\n if (itemStatisticsDataArray.length > 0) {\n\n Vendd.Service.call({\n url: 'StatsService.svc/ManipulateItemStatistics',\n data: { data: itemStatisticsDataArray }\n });\n }\n};\n\n// multiple wishlists\nLhApp.Function.showProductWishlists = function($wrapper, product) {\n if (!LhApp.Context.MultipleWishlistsEnabled || $wrapper.length == 0)\n return;\n\n $wrapper.addClass('x-loading');\n\n var $wishlistsWrapper = $('.js-wishlist-lists', $wrapper);\n\n var model = Vendd.UserWishlist.GetClientModel();\n model = $.extend({}, model, { Product: product });\n\n var html = Vendd.Handlebars.parse(\"productWishlists\", model);\n $wishlistsWrapper.html(html);\n LhApp.Function.bindProductWishlists($wrapper);\n $wishlistsWrapper.show();\n\n $wrapper.removeClass('x-loading');\n};\n\nLhApp.Function.bindProductWishlists = function ($wrapper) {\n if (!LhApp.Context.MultipleWishlistsEnabled)\n return;\n\n var $lists = $('.js-list-select', $wrapper);\n $lists.on('click', function() {\n var $this = $(this);\n\n var $wishlistsWrapper = $this.closest('.js-product-wishlists');\n var $wrper = $this.closest('.product-wishlist');\n\n var qs = LhApp.Function.QueryString.getValueOf('list');\n\n var id = $wishlistsWrapper.data('id'),\n skuId = $wishlistsWrapper.data('skuid'),\n path = $wishlistsWrapper.data('path'),\n qty = $wishlistsWrapper.data('qty'),\n extraAttributes = [],\n bundleItems = [],\n listId = $wrper.data('list-id'),\n currentListId = qs ? parseInt(qs) || 0 : 0;\n\n Vendd.MessageBus.publishAsync($wrapper.get(0), new Vendd.Wishlist.Messages.Add(id, skuId, path, qty, extraAttributes, bundleItems, listId, currentListId));\n Vendd.MessageBus.publishAsync($wrapper.get(0), new Vendd.Widget.Messages.OpenWidget(Vendd.Widget.WishlistWidget, false));\n LhApp.Function.hideAllProductWishlists();\n });\n\n $wrapper.on('click', '.js-close-product-wishlists', function (e) {\n\t\te.preventDefault();\n\t\tLhApp.Function.hideAllProductWishlists();\n\t});\n};\n\nLhApp.Function.hideAllProductWishlists = function () {\n if (!LhApp.Context.MultipleWishlistsEnabled)\n return;\n\n $.each($('.js-wishlist-lists'), function (i, el) {\n $(el).html(\"\");\n $(el).hide();\n });\n};\n// multiple wishlists\n\nvar RenderPrice = function (price) {\n return LhApp.Function.renderPriceExtended(price, false, ' ', '', '');\n};\n\nvar RenderPriceExtended = function (price, isShopDefaultCurrency, separatorSymbol, prefixSymbol, suffixSymbol) {\n return LhApp.Function.renderPriceExtended(price, isShopDefaultCurrency, separatorSymbol, prefixSymbol, suffixSymbol);\n};\n\nLhApp.Function.renderPrice = function (price) {\n return LhApp.Function.renderPriceExtended(price, false, ' ', '', '');\n};\n\nLhApp.Function.renderPriceExtended = function (price, isShopDefaultCurrency, separatorSymbol, prefixSymbol, suffixSymbol) {\n\n var symbol = LhApp.Context.Currency.Symbol;\n var numberOfDigits = LhApp.Context.Currency.NumberOfDigits;\n var symbolShownFirst = LhApp.Context.Currency.SymbolShownFirst;\n var doShowSymbol = LhApp.Context.Currency.DoShowSymbol;\n\n if (isShopDefaultCurrency) {\n symbol = LhApp.Context.ShopDefaultCurrency.Symbol;\n numberOfDigits = LhApp.Context.ShopDefaultCurrency.NumberOfDigits;\n symbolShownFirst = LhApp.Context.ShopDefaultCurrency.SymbolShownFirst;\n doShowSymbol = LhApp.Context.ShopDefaultCurrency.DoShowSymbol;\n }\n\n var formatedPrice = price.toFixed(numberOfDigits).replace('.', ',');\n\n if (doShowSymbol) {\n if (!symbolShownFirst) {\n formatedPrice = formatedPrice + separatorSymbol + symbol;\n } else {\n formatedPrice = symbol + separatorSymbol + formatedPrice;\n }\n }\n\n if (prefixSymbol != '') {\n formatedPrice = prefixSymbol + separatorSymbol + formatedPrice;\n }\n\n if (suffixSymbol != '') {\n formatedPrice = formatedPrice + separatorSymbol + suffixSymbol;\n }\n\n return formatedPrice;\n};\n\nvar RenderPointsPrice = function (pointsPrice) {\n return LhApp.Function.renderPointsPriceExtended(pointsPrice, ',', ' ', '', '');\n};\n\nvar RenderPointsPriceExtended = function (pointsPrice, commaSymbol, separatorSymbol, prefixSymbol, suffixSymbol) {\n return LhApp.Function.renderPointsPriceExtended(pointsPrice, commaSymbol, prefixSymbol, suffixSymbol);\n};\n\nLhApp.Function.renderPointsPriceExtended = function (pointsPrice, commaSymbol, separatorSymbol, prefixSymbol, suffixSymbol) {\n\n if (suffixSymbol == '') {\n suffixSymbol = pointsPrice === 1 ? 'point' : 'points';\n }\n\n var innerSuffixSymbol = suffixSymbol.length > 1 ? ' ' + LhApp.Function.getText('Common:PointsPriceSymbol_' + suffixSymbol) : suffixSymbol;\n\n var formatedPrice = pointsPrice.toFixed(2).replace('.00', '').replace('.', commaSymbol);\n\n if (prefixSymbol != '') {\n formatedPrice = prefixSymbol + separatorSymbol + formatedPrice;\n }\n\n if (innerSuffixSymbol != '') {\n formatedPrice = formatedPrice + separatorSymbol + innerSuffixSymbol;\n }\n\n return formatedPrice;\n};\n\nLhApp.Function.validateClientModel = function(model) {\n if (!model) return false;\n\n if (!model.LangCode || model.LangCode != LhApp.Context.Language) return false;\n\n return true;\n}\n\nvar ReplacePrices = function (obj) {\n $('.x-product-box[data-productid]').each(function (i, el) {\n var itemId = parseInt($(el).attr('data-productid'));\n\n var itemData = obj.filter(function (a) { return a.Id === itemId })[0]\n\n var DeletedPrice = parseFloat(itemData.DeletedPrice);\n var Price = parseFloat(itemData.Price);\n var TotalPointsPrice = parseFloat(itemData.TotalPointsPrice);\n var TotalPointsGain = parseFloat(itemData.TotalPointsGain);\n var PointsPrice = parseFloat(itemData.PointsPrice);\n var PointsGain = parseFloat(itemData.PointsGain);\n\n // hide all\n $('.prices', el).addClass('hide');\n $('.deleted-price-container', el).addClass('hide');\n $('.current-price-container', el).addClass('hide');\n $('.current-point-price-container.1', el).addClass('hide');\n $('.current-point-price-container.2', el).addClass('hide');\n $('.current-point-price-container.3', el).addClass('hide');\n $('.current-point-price-container.4', el).addClass('hide');\n\n if (DeletedPrice > 0 || Price > 0 || TotalPointsPrice > 0 || TotalPointsGain > 0 || PointsPrice > 0 || PointsGain > 0) {\n $('.prices', el).removeClass('hide');\n\n if ((DeletedPrice > 0) && (DeletedPrice > Price)) {\n $('.deleted-price-container', el).removeClass('hide');\n $('.deleted-price', el).text(RenderPrice(itemData.DeletedPrice));\n }\n\n if (Price > 0) {\n $('.current-price-container', el).removeClass('hide');\n $('.current-price', el).text(RenderPrice(itemData.Price));\n }\n\n if (PointsPrice > 0 && PointsPrice != TotalPointsPrice) {\n $('.current-point-price-container.1', el).removeClass('hide');\n $('.current-point-price-container.1 .points-price', el).text(RenderPointsPrice(PointsPrice));\n }\n\n if (TotalPointsGain > 0) {\n $('.current-point-price-container.2', el).removeClass('hide');\n $('.current-point-price-container.2 .points-gain', el).text(RenderPointsPrice(TotalPointsGain));\n }\n\n if (PointsGain > 0 && TotalPointsGain === 0) {\n $('.current-point-price-container.3', el).removeClass('hide');\n $('.current-point-price-container.3 .points-gain', el).text(RenderPointsPrice(PointsGain));\n }\n\n if (TotalPointsPrice > 0) {\n $('.current-point-price-container.4', el).removeClass('hide');\n $('.current-point-price-container.4 .points-price', el).text(RenderPointsPrice(TotalPointsPrice));\n }\n }\n });\n}\n\nvar ReplaceAvailabilities = function (obj) {\n $('.x-product-box[data-productid]').each(function (i, el) {\n var itemId = parseInt($(el).attr('data-productid'));\n var itemData = obj.filter(function (a) { return a.Id === itemId })[0]\n\n var cartEnabled = itemData.CanBuy === true || itemData.CanBuyWithPoints === true;\n var wishlistEnabled = itemData.CanAddToList === true;\n\n if ($('.buttons .add-to-cart').length > 0 && $('.buttons .add-to-cart input').length > 0) {\n $('.buttons .add-to-cart').addClass('x-disabled');\n $('.buttons .add-to-cart input').attr('disabled', 'disabled');\n\n if (cartEnabled === true) {\n $('.buttons .add-to-cart').removeClass('x-disabled');\n $('.buttons .add-to-cart input').removeAttr('disabled', 'disabled');\n }\n }\n\n //if ($('.buttons .add-to-wishlist').length > 0 && $('.buttons .add-to-wishlist input').length > 0) {\n //$('.buttons .add-to-wishlist').addClass('x-disabled');\n //$('.buttons .add-to-wishlist input').attr('disabled', 'disabled');\n\n //if (wishlistEnabled === true) {\n //$('.buttons .add-to-wishlist').removeClass('x-disabled');\n //$('.buttons .add-to-wishlist input').removeAttr('disabled', 'disabled');\n //}\n //}\n });\n}\n\nLhApp.Function.validateTaxIdentifier = function (isInvoice, countryCode, taxIdentifier) {\n if (isInvoice === true && taxIdentifier.length > 0) {\n if (countryCode === 'GR') {\n if (!isNaN(parseInt(taxIdentifier)) && taxIdentifier.length === 9) {\n var result = 0;\n var arrTaxId = taxIdentifier.split(\"\").map(function (item) {\n return parseInt(item);\n });\n\n for (var i = arrTaxId.length - 2; i >= 0 ; i--) {\n result = result + arrTaxId[i] * Math.pow(2, (8 - i));\n }\n\n if ((result % 11) % 10 === arrTaxId[8]) {\n return true;\n } else {\n return false;\n }\n }\n }\n else\n return true;\n }\n\n return false;\n};\n\nLhApp.pauseScroll = false;\n\nLhApp.init = function () {\n\n LhApp.Function.bindScrollable($('body').get(0));\n LhApp.Function.bindExpandables($('body').get(0));\n LhApp.Function.bindHrefButtons($('body').get(0));\n LhApp.Function.bindUndropables($('body').get(0));\n //LhApp.Function.bindLazyLoadableImages($('body').get(0));\n\n if (LhApp.Context.IsConsentsEnabled) {\n if (window.ScriptsActivator.consentStatus.marketingCookies) {\n LhApp.Function.PageTrackingRequest();\n }\n } else {\n LhApp.Function.PageTrackingRequest();\n }\n\n LhApp.Function.handleItemStatistics();\n\n $('body').click(function (e) {\n LhApp.Function.hideExpandables(this);\n });\n\n $(document).scroll(function (e) {\n if (!LhApp.pauseScroll)\n LhApp.Function.hideExpandables($('body').get(0));\n });\n};\n\nvar disqus_config = function () {\n\n if (LhApp.Context.Item.Id && LhApp.Context.Request.FriendlyUrl) {\n\n this.page.url = LhApp.Context.Request.BaseUrl + LhApp.Context.Request.FriendlyUrl;\n this.page.identifier = LhApp.Context.Item.Id;\n\n }\n};\n\nvar replaceIframe = function (idFrame, url) {\n var originalFrame = document.getElementById(idFrame);\n var newFrame = document.createElement(\"iframe\");\n newFrame.id = originalFrame.getAttribute(\"id\");\n newFrame.width = originalFrame.getAttribute(\"width\");\n newFrame.height = originalFrame.getAttribute(\"height\");\n newFrame.style.display = \"none\";\n newFrame.src = url;\n var parent = originalFrame.parentNode;\n parent.replaceChild(newFrame, originalFrame);\n}\n\n","if (typeof localStorage === 'object') {\n\ttry {\n\t\tlocalStorage.setItem('localStorage', 1);\n\t\tlocalStorage.removeItem('localStorage');\n\t} catch (e) {\n\t\tStorage.prototype._setItem = Storage.prototype.setItem;\n\t\tStorage.prototype.setItem = function () { };\n\t}\n}","$(document).ready(function() {\n\n window.ScriptsActivator.funcLoaded = false;\n window.ScriptsActivator.markLoaded = false;\n window.ScriptsActivator.statLoaded = false;\n\n window.ScriptsActivator.loadScripts = function (scripts) {\n if (Object.keys(scripts).length === 0)\n return;\n\n for (var key in scripts) {\n var s = scripts[key];\n if (typeof s === \"function\") {\n s.call();\n } else {\n for (var skey in s) {\n var ss = s[skey];\n if (typeof ss === \"function\") {\n ss.call();\n }\n }\n }\n }\n }\n\n window.ScriptsActivator.loadFunctionalityScripts = function () {\n this.loadScripts(window.ScriptsActivator.funcFn);\n this.funcLoaded = true;\n };\n\n window.ScriptsActivator.loadMarketingScripts = function () {\n this.loadScripts(window.ScriptsActivator.markFn);\n this.markLoaded = true;\n };\n\n window.ScriptsActivator.loadStatisticsScripts = function () {\n this.loadScripts(window.ScriptsActivator.statFn);\n this.statLoaded = true;\n };\n\n window.ScriptsActivator.loadAllScripts = function (func, mark, stat) {\n if (func && !this.funcLoaded)\n this.loadFunctionalityScripts();\n\n if (mark && !this.markLoaded)\n this.loadMarketingScripts();\n\n if (stat && !this.statLoaded)\n this.loadStatisticsScripts();\n }\n\n window.ScriptsActivator.removeScriptsElements = function() {\n $(\"script[data-script]\").each(function(a,script) {\n if (script) {\n $(script).remove();\n }\n });\n }\n\n window.ScriptsActivator.removeScriptsElements();\n});\n","var Vendd = (function (Vendd) {\n 'use strict';\n\n Vendd.Service = (function (Service) {\n\n Service.call = function (options) {\n var baseUrl, defOpts, opts, rewritedUrl, onErrorInternal;\n\n defOpts = {\n async: true,\n method: 'POST',\n url: '#',\n data: {},\n rawdata: false,\n servicenamespace:'services',\n onSuccess: function (response) {\n },\n onFailure: function (err) {\n throw err;\n },\n onUnauthenticated: function (url) {\n throw new Error('not implemented: onUnauthenticated(url)');\n }\n };\n\n opts = _.extend(defOpts, options);\n\n baseUrl = document.location.protocol.toLowerCase() + '//' +\n document.location.host.toLowerCase() + '/';\n\n rewritedUrl = baseUrl + opts.servicenamespace + '/';\n\n rewritedUrl += opts.url;\n\n if (this.query)\n rewritedUrl += this.query;\n\n onErrorInternal = function (ex) {\n if (ex && ex.responseJSON && ex.responseJSON.ExceptionType) {\n var typeName = ex.responseJSON.ExceptionType.split('.').pop();\n\n if (typeName === 'AuthenticationServiceException') {\n if (typeof (opts.onUnauthenticated) === 'function') {\n opts.onUnauthenticated(ex.responseJSON.Message);\n }\n else {\n throw ex;\n }\n }\n else {\n if (typeof (opts.onFailure) === 'function') {\n opts.onFailure(ex);\n }\n else {\n throw ex;\n }\n }\n }\n else {\n if (typeof (opts.onFailure) === 'function') {\n opts.onFailure(ex);\n }\n else {\n throw ex;\n }\n }\n };\n\n $.ajax({\n async: opts.async || true,\n type: opts.method,\n dataType: opts.rawdata ? 'text' : 'json',\n contentType: opts.rawdata ? '' : 'application/json; charset=UTF-8',\n ContentType: opts.rawdata ? '' : 'application/json; charset=UTF-8',\n url: rewritedUrl,\n data: (opts.method == 'GET') ? null : opts.rawdata ? opts.data : JSON.stringify(opts.data),\n success: function (response) {\n\n var obj = response;\n\n if (response.d)\n obj = response.d;\n\n if (typeof obj === 'string' || obj instanceof String)\n obj = JSON.parse(obj);\n\n if (typeof (opts.onSuccess) === 'function') {\n opts.onSuccess(obj);\n }\n },\n failure: function (ex) {\n onErrorInternal(ex);\n },\n error: function (ex) {\n onErrorInternal(ex);\n }\n });\n };\n\n return Service;\n\n })(Vendd.Service || {});\n\n return Vendd;\n\n})(Vendd || {});","var recaptchaLoaded = false;\nvar recaptchaMessagePublished = false;\nvar callback_recaptcha = function () {\n recaptchaLoaded = true;\n checkAsyncLoad();\n};\n\nvar googleMapsLoaded = false;\nvar googleMapsMessagePublished = false;\nvar callback_googlemaps = function () {\n googleMapsLoaded = true;\n checkAsyncLoad();\n};\n\nvar venddLoaded = false;\nvar callback_vendd = function () {\n venddLoaded = true;\n checkAsyncLoad();\n};\n\nvar checkAsyncLoad = function () {\n if (!venddLoaded) \n return;\n\n if (recaptchaLoaded && !recaptchaMessagePublished) {\n Vendd.MessageBus.publishAsync('checkAsyncLoad', new Vendd.Plugins.Messages.RecaptcaLoaded());\n recaptchaMessagePublished = true;\n }\n \n if (googleMapsLoaded && !googleMapsMessagePublished) {\n Vendd.MessageBus.publishAsync('checkAsyncLoad', new Vendd.Plugins.Messages.GoogleMapsLoaded());\n googleMapsMessagePublished = true;\n }\n\n};\n\nfunction checkout_callback_googlemaps() {\n\n\tif (angular) {\n\t\tif ($('.x-checkoutstore').scope() && $('.x-checkoutstore').scope().Control && typeof ($('.x-checkoutstore').scope().Control.SetMap) === 'function') {\n\t\t\t$('.x-checkoutstore').scope().Control.SetMap();\n\t\t}\n\t}\n\n}","$(document).ready(function () {\n\n if (Vendd && Vendd.Scripts && (typeof Vendd.Scripts.init === 'function'))\n Vendd.Scripts.init();\n\n if (LhApp && LhApp.init && (typeof LhApp.init === 'function'))\n LhApp.init();\n});"]}