function SGRedirecto(){var e={},t="";e.setDefaultData=function(e,t){e.find("#spicegems_cr_mod_msg").html(t.customer_message),e.find("#spicegems_cr_btn_yes").html(t.yes_button_text),e.find("#spicegems_cr_btn_no").html(t.no_button_text)},e.sanitizeUrl=function(e){return e.replace("//www.","//").replace("http://","").replace("https://","").replace(/([^:])(\/\/+)/g,"$1/").replace("/?","?").replace(/\/$/,"").split("?")[0]},e.isNewAndCurrentURLSame=function(e,t){try{var o=window.location.href;o=(o=o.replace("//www.","//").replace(/\/$/,"").split("/"))[2];var r=e.replace("//www.","//").replace(/\/$/,"").replace("?","/").split("/");if(o!==(r=r[2]))return!0}catch(e){}return!1},e.addUtmParams=function(t,o){if(1==o)-1===t.indexOf("utm_source")&&""!=e.utm_source&&(t=t+"?utm_source="+e.utm_source),-1===t.indexOf("utm_medium")&&""!=e.utm_medium&&(t=t+"?utm_medium="+e.utm_medium),-1===t.indexOf("utm_campaign")&&""!=e.utm_campaign&&(t=t+"?utm_campaign="+e.utm_campaign);else{if(t.indexOf("?")>-1){var r=t.slice(t.indexOf("?")+1).split("&").filter(e.paramIsNotUtm),i=r.length?"?"+r.join("&"):"";t=t.split("?")[0]+i}""!=e.utm_source&&(t=t+"?utm_source="+e.utm_source),""!=e.utm_medium&&(t=t+"?utm_medium="+e.utm_medium),""!=e.utm_campaign&&(t=t+"?utm_campaign="+e.utm_campaign)}return t},e.paramIsNotUtm=function(e){return"utm_"!==e.slice(0,4)},e.paramIsUtm=function(e){return"utm_"==e.slice(0,4)},e.redirect=function(){1!=e.autoredirect&&1==e.cookieActionValue&&"y"!=SpiceGems_Cookies.get("country_redirect_spicegems")&&(0!=e.cookieExpiryTime?SpiceGems_Cookies.set("country_redirect_spicegems","y",{expires:e.cookieExpiryTime,path:"/"}):SpiceGems_Cookies.set("country_redirect_spicegems","y",{path:"/"}));var t=e.countryURL;if(t=-1==t.indexOf("://")?"http://"+t:t,1==e.add_relative_url)t+=e.getRelativeURL();else if(1==e.enable_utm_forward&&(t+=e.getQueryParams()).indexOf("?")>-1){var o=t.slice(t.indexOf("?")+1).split("&").filter(e.paramIsUtm),r=o.length?"?"+o.join("&"):"";t=t.split("?")[0]+r}(t=e.addUtmParams(t,e.enable_utm_forward)).indexOf("?")>-1&&(countryURLParams=t.substring(t.indexOf("?")+1),countryURLParams=countryURLParams.replace(/[?]/g,"&"),t=t.split("?")[0]+"?"+countryURLParams),window.location.href=t},e.closeBox=function(){1==e.cookieActionValue&&0!=e.cookieExpiryTime?SpiceGems_Cookies.set("country_redirect_spicegems","n",{expires:e.cookieExpiryTime,path:"/"}):SpiceGems_Cookies.set("country_redirect_spicegems","n",{path:"/"});var t=jQuery("#spicegems_cr_top_bar");t.length&&t.remove();var o=jQuery("#sg_country_redirect_mod");o.length&&o.modal("hide")},e.closeGDPRBar=function(){SpiceGems_Cookies.get("country_redirect_gdpr_bar")||(0!==e.gdpr_cookie_exp?SpiceGems_Cookies.set("country_redirect_gdpr_bar","1",{expires:e.gdpr_cookie_exp,path:"/"}):SpiceGems_Cookies.set("country_redirect_gdpr_bar","1",{path:"/"}));var t=jQuery("#spicegems_gdpr_banner");t.length&&t.remove()},e.extend=function(e,t){var o,r={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r},e.isEUVisitor=function(e){return-1!==["AX","AL","AD","AT","BY","BE","BA","BG","HR","CZ","DK","EE","FO","FI","FR","DE","GI","GR","GG","VA","HU","IS","IE","IM","IT","JE","LV","LI","LT","LU","MT","MD","MC","ME","NL","MK","NO","PL","PT","RO","RU","SM","RS","SK","SI","ES","SJ","SE","CH","UA","GB"].indexOf(e)},e.showGDPRCookieBar=function(t,o){var r=jQuery("body");jQuery(document).on("click","#spicegems_gdpr_main_btn",e.closeGDPRBar),"1"===o.gdpr_eu_only?e.isEUVisitor(t)&&(r.append(JSON.parse('\"";jQuery("body").append(r)},p.filter(function(t){if("enable"===t.status){var o=e.sanitizeUrl(t.match);if("contain"===t.type)return d.indexOf(o)>-1;if("exact"===t.type)return d===o}}).length<1&&n.app_status&&"-1"==a.indexOf(r)){if(n.countryData){var l,m,g=n.countryData;for(l in g)for(m in g[l]){if("-1"!=g[l][m].indexOf(o)){c=m;break}}}if(e.countryURL="",null==n.countries[c]?""!=n.default_rule&&"1"==(i=n.default_rule).enable_fallback_settings&&(e.countryURL=i.fallback_url):(i=n.countries[c],e.countryURL=i.url),location.href!==e.countryURL&&""!==e.countryURL&&e.isNewAndCurrentURLSame(e.countryURL,d)){var f=n.all_countries[o],y=n.message_show_option;e.autoredirect=n.autoredirect,e.add_relative_url=i.add_relative_url,e.countryURL.replace("http://","").replace("https://","").split(/[\/?#]/)[0]===u&&(e.add_relative_url=0);var h=n.cookie_settings?n.cookie_settings:{cookie_time:60,cookie_action:2,cookie_match_value:1};e.cookieExpiryTime=parseInt(h.cookie_time),e.cookieActionValue=parseInt(h.cookie_action),e.cookieMatchValue=parseInt(h.cookie_match_value);var b=i.utm_settings?JSON.parse(i.utm_settings):{enable_utm_forward:"1",utm_source:"",utm_medium:"",utm_campaign:""};e.enable_utm_forward=parseInt(b.enable_utm_forward),e.utm_source=b.utm_source,e.utm_medium=b.utm_medium,e.utm_campaign=b.utm_campaign,1==e.autoredirect?e.redirect():(_="spiceModalAndBar",t=i.store_name,"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?e.loadJQuery(_,n,f,t,y,o,s):document.addEventListener("DOMContentLoaded",function(){e.loadJQuery(_,n,f,t,y,o,s)}))}}"1"!==s.is_gdpr_active||SpiceGems_Cookies.get("country_redirect_gdpr_bar")||"spiceGDPRBar"!==_||("complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?e.loadJQuery(_,n,f,t,y,o,s):document.addEventListener("DOMContentLoaded",function(){e.loadJQuery(_,n,f,t,y,o,s)}))},e.loadJQuery=function(t,o,r,i,n,c,a){if("undefined"==typeof jQuery){var s=document.getElementsByTagName("head")[0],_=document.createElement("script");_.type="text/javascript",_.src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js",_.onload=function(){"1"!==a.is_gdpr_active||SpiceGems_Cookies.get("country_redirect_gdpr_bar")||"spiceModalAndBar"!==t?"spiceGDPRBar"===t?e.showGDPRCookieBar(c,a):e.showModalOrBar(o,r,i,n):(e.showModalOrBar(o,r,i,n),e.showGDPRCookieBar(c,a))},s.appendChild(_)}else"1"!==a.is_gdpr_active||SpiceGems_Cookies.get("country_redirect_gdpr_bar")||"spiceModalAndBar"!==t?"spiceGDPRBar"===t?e.showGDPRCookieBar(c,a):e.showModalOrBar(o,r,i,n):(e.showModalOrBar(o,r,i,n),e.showGDPRCookieBar(c,a))},e.showModalOrBar=function(t,o,r,i){!function(){SpiceGems_Cookies.get("country_redirect_cookie_match")!=e.cookieMatchValue&&(SpiceGems_Cookies.remove("country_redirect_spicegems"),0!=e.cookieExpiryTime?SpiceGems_Cookies.set("country_redirect_cookie_match",e.cookieMatchValue,{expires:e.cookieExpiryTime,path:"/"}):SpiceGems_Cookies.set("country_redirect_cookie_match",e.cookieMatchValue,{path:"/"}));jQuery(document).on("click","#spicegems_cr_btn_yes",e.redirect),jQuery(document).on("click","#spicegems_cr_btn_no",e.closeBox)}();var n=jQuery("body");if("n"==SpiceGems_Cookies.get("country_redirect_spicegems"))return!1;if("y"==SpiceGems_Cookies.get("country_redirect_spicegems"))e.redirect();else{var c=n.find("#sg_country_redirect_mod"),a=t.customer_message;if(a=(a=a.split("[country-name]").join(o)).split("[store-name]").join(r),t.customer_message=a,t.yes_button_text=t.yes_button_text.split("[country-name]").join(o),t.yes_button_text=t.yes_button_text.split("[store-name]").join(r),t.no_button_text=t.no_button_text.split("[country-name]").join(o),t.no_button_text=t.no_button_text.split("[store-name]").join(r),"box"==i)n.append(JSON.parse('\"