var default_currency='USD';
var default_rate='1.00000';
var default_symbol_left='$';
var default_currency_key='26';
var default_mobile_view_type = 'gallery';

var custom_currency='';
var custom_rate='';
var custom_symbol_left='';
var custom_currency_key='';

var free_amounts = JSON.parse('{"1851":["69","69","USD","26"],"1902":["129","129","USD","26"],"8860":["179","179","USD","26"],"8783":["109","109","USD","26"],"1812":{"0":60.049999999999997,"1":"95","2":"AUD","3":"35","app":{"usd":49.93,"value":"79","currencies_id":"35"}},"1803":["69","69","USD","26"],"1881":["79","79","USD","26"],"7754":["69","69","USD","26"],"1798":["69","69","USD","26"],"8868":["69","69","USD","26"],"8997":["69","69","USD","26"],"1824":["69","69","USD","26"],"1787":["69","69","USD","26"],"1784":{"0":68.079999999999998,"1":"99","2":"CAD","3":"34","app":{"usd":54.32,"value":"79","currencies_id":"34"}},"1890":["109","109","USD","26"],"1954":["69","69","USD","26"],"1829":["179","179","USD","26"],"1842":["69","69","USD","26"],"1872":["109","109","USD","26"],"1833":["69","69","USD","26"],"1807":["69","69","USD","26"],"1924":["109","109","USD","26"],"1836":["69","69","USD","26"],"8870":["109","109","USD","26"],"1808":["69","69","USD","26"],"1794":[51.770000000000003,"55","EUR","32"],"1797":{"0":51.770000000000003,"1":"55","2":"EUR","3":"32","app":{"usd":42.359999999999999,"value":"45","currencies_id":"32"}},"8781":["79","79","USD","26"],"1804":["109","109","USD","26"],"9377":["69","69","USD","26"],"1955":["69","69","USD","26"],"1848":["69","69","USD","26"],"1811":["179","179","USD","26"],"1801":{"0":"69","1":"69","2":"USD","3":"26","app":{"usd":"49","value":"49","currencies_id":"26"}},"1871":["69","69","USD","26"],"1796":[51.770000000000003,"55","EUR","32"],"1815":["69","69","USD","26"],"1879":["79","79","USD","26"],"1819":["89","89","USD","26"],"8886":["69","69","USD","26"],"1816":["69","69","USD","26"],"1820":["89","89","USD","26"],"1837":["69","69","USD","26"],"8890":["69","69","USD","26"],"8679":["69","69","USD","26"],"1956":["69","69","USD","26"],"2303":["109","109","USD","26"],"1785":["69","69","USD","26"],"1806":["69","69","USD","26"],"1828":["89","89","USD","26"],"1839":["89","89","USD","26"],"8898":["79","79","USD","26"],"1947":["129","129","USD","26"],"8766":["69","69","USD","26"],"8944":["129","129","USD","26"],"1800":["69","69","USD","26"],"1813":{"0":"69","1":"69","2":"USD","3":"26","app":{"usd":"49","value":"49","currencies_id":"26"}},"1809":["79","79","USD","26"],"1861":["79","79","USD","26"],"1830":["109","109","USD","26"],"2005":["69","69","USD","26"],"1847":["69","69","USD","26"],"1805":["109","109","USD","26"],"1889":{"0":"69","1":"69","2":"USD","3":"26","app":{"usd":"49","value":"49","currencies_id":"26"}},"1868":["109","109","USD","26"],"1849":["69","69","USD","26"],"8926":["69","69","USD","26"],"1876":["69","69","USD","26"],"8989":["179","179","USD","26"],"1843":["69","69","USD","26"],"2004":["69","69","USD","26"],"1840":["69","69","USD","26"],"1841":["69","69","USD","26"],"1951":["109","109","USD","26"],"1795":["69","69","USD","26"],"8992":["79","79","USD","26"],"1810":["69","69","USD","26"],"1802":["69","69","USD","26"],"1957":["129","129","USD","26"],"1786":["69","69","USD","26"],"8769":["79","79","USD","26"],"1856":["69","69","USD","26"],"8936":["109","109","USD","26"],"9341":["109","109","USD","26"],"1878":["69","69","USD","26"],"1793":{"0":55.600000000000001,"1":"45","2":"GBP","3":"33","app":{"usd":48.189999999999998,"value":"39","currencies_id":"33"}},"1783":{"0":"69","1":"69","2":"USD","3":"26","app":{"usd":"49","value":"49","currencies_id":"26"}},"1822":["89","89","USD","26"],"8775":["79","79","USD","26"],"9340":["69","69","USD","26"]}');
var special_currencies = JSON.parse('{"JPY":"JPY","HUF":"HUF","DKK":"DKK","HKD":"HKD","ILS":"ILS","MXN":"MXN","NOK":"NOK","SEK":"SEK","ZAR":"ZAR"}');
var currency = baseCurrencys =new Array();
var symbol_left=new Array();
var symbol_right=new Array();
var rate = baseRates=new Array();
var countrys = baseCountrys=new Array();
var country_ids=new Array();
var country_codes=new Array();
var size_keys=new Array();
var language_keys=new Array();
var no_shipping_country_codes = new Array();

if(getCookie("currency")==null)
{
    setCookie("currency",default_currency,30);
}
if(getCookie("rate")==null)
{
    setCookie("rate",default_rate,30);
}
if(getCookie("symbol_left")==null)
{
    setCookie("symbol_left",default_symbol_left,30);
}
if(getCookie("currency_key")==null)
{
    setCookie("currency_key",default_currency_key,30);
}
if(getCookie("mobile_view_type")==null)
{
    setCookie("mobile_view_type",default_mobile_view_type,30);
}

currency[26]='USD';
currency[34]='CAD';
currency[33]='GBP';
currency[35]='AUD';
currency[32]='EUR';
currency[46]='ILS';
currency[48]='NZD';
currency[49]='MXN';
currency[44]='SEK';
currency[36]='CHF';
currency[37]='HKD';
currency[38]='JPY';
currency[42]='NOK';
currency[43]='DKK';
currency[51]='ZAR';

baseCurrencys = currency;

symbol_left[26]='$';
symbol_left[34]='$';
symbol_left[33]='£';
symbol_left[35]='$';
symbol_left[32]='€';
symbol_left[46]='₪';
symbol_left[48]='$';
symbol_left[49]='$';
symbol_left[44]='Kr.';
symbol_left[36]='₣';
symbol_left[37]='$';
symbol_left[38]='¥';
symbol_left[42]='kr.';
symbol_left[43]='kr.';
symbol_left[51]='';

symbol_right[26]='';
symbol_right[34]='';
symbol_right[33]='';
symbol_right[35]='';
symbol_right[32]='';
symbol_right[46]='';
symbol_right[48]='';
symbol_right[49]='';
symbol_right[44]='';
symbol_right[36]='';
symbol_right[37]='';
symbol_right[38]='';
symbol_right[42]='';
symbol_right[43]='';
symbol_right[51]='';

rate[26]='1.00000';
rate[34]='1.45425';
rate[33]='0.80937';
rate[35]='1.58214';
rate[32]='1.06237';
rate[46]='3.97519';
rate[48]='1.74825';
rate[49]='20.89724';
rate[44]='12.15286';
rate[36]='0.99613';
rate[37]='8.16025';
rate[38]='159.59055';
rate[42]='12.57467';
rate[43]='7.92672';
rate[51]='17.65319';

baseRates = rate;

countrys[1851]="Albania";
countrys[1902]="Algeria";
countrys[8860]="Andorra";
countrys[8783]="Aruba";
countrys[1812]="Australia";
countrys[1803]="Austria";
countrys[1881]="Azerbaijan";
countrys[7754]="Bangladesh";
countrys[1798]="Belgium";
countrys[8868]="Bermuda";
countrys[8997]="Bhutan";
countrys[1824]="Brazil";
countrys[1787]="Cambodia";
countrys[1784]="Canada";
countrys[1890]="Chile";
countrys[1954]="China(P.R.C)";
countrys[1829]="Colombia";
countrys[1842]="Croatia";
countrys[1872]="Cyprus";
countrys[1833]="Czech Republic";
countrys[1807]="Denmark";
countrys[1924]="Egypt";
countrys[1836]="Estonia";
countrys[8870]="Faroe Islands";
countrys[1808]="Finland";
countrys[1794]="France";
countrys[1797]="Germany";
countrys[8781]="Gibraltar";
countrys[1804]="Greece";
countrys[9377]="Guam";
countrys[1955]="Hongkong";
countrys[1848]="Hungary";
countrys[1811]="Iceland";
countrys[1801]="Ireland";
countrys[1871]="Israel";
countrys[1796]="Italy";
countrys[1815]="Japan";
countrys[1879]="Jordan";
countrys[1819]="Kazakhstan";
countrys[8886]="Kiribati";
countrys[1816]="Korea, The Republic of";
countrys[1820]="Kyrgyzstan";
countrys[1837]="Latvia";
countrys[8890]="Liechtenstein";
countrys[8679]="Luxembourg";
countrys[1956]="Macau";
countrys[2303]="Macedonia";
countrys[1785]="Malaysia";
countrys[1806]="Malta";
countrys[1828]="Mexico";
countrys[1839]="Moldova";
countrys[8898]="Monaco";
countrys[1947]="Morocco";
countrys[8766]="Myanmar";
countrys[8944]="Namibia";
countrys[1800]="Netherlands";
countrys[1813]="New Zealand";
countrys[1809]="Norway";
countrys[1861]="Oman";
countrys[1830]="Peru";
countrys[2005]="Philippines";
countrys[1847]="Poland";
countrys[1805]="Portugal";
countrys[1889]="Puerto Rico";
countrys[1868]="Qatar";
countrys[1849]="Romania";
countrys[8926]="San Marino";
countrys[1876]="Saudi Arabia";
countrys[8989]="Senegal";
countrys[1843]="Serbia";
countrys[2004]="Singapore";
countrys[1840]="Slovakia";
countrys[1841]="Slovenia";
countrys[1951]="South Africa";
countrys[1795]="Spain";
countrys[8992]="Swaziland";
countrys[1810]="Sweden";
countrys[1802]="Switzerland";
countrys[1957]="Taiwan";
countrys[1786]="Thailand";
countrys[8769]="Tonga";
countrys[1856]="Turkey";
countrys[8936]="Tuvalu";
countrys[9341]="U.S. Virgin Islands";
countrys[1878]="United Arab Emirates";
countrys[1793]="United Kingdom";
countrys[1783]="United States";
countrys[1822]="Uzbekistan";
countrys[8775]="Vanuatu";
countrys[9340]="Vietnam";

baseCountrys = countrys;

country_ids[1851]="1851";
country_ids[1902]="1902";
country_ids[8860]="8860";
country_ids[8783]="8783";
country_ids[1812]="1812";
country_ids[1803]="1803";
country_ids[1881]="1881";
country_ids[7754]="7754";
country_ids[1798]="1798";
country_ids[8868]="8868";
country_ids[8997]="8997";
country_ids[1824]="1824";
country_ids[1787]="1787";
country_ids[1784]="1784";
country_ids[1890]="1890";
country_ids[1954]="1954";
country_ids[1829]="1829";
country_ids[1842]="1842";
country_ids[1872]="1872";
country_ids[1833]="1833";
country_ids[1807]="1807";
country_ids[1924]="1924";
country_ids[1836]="1836";
country_ids[8870]="8870";
country_ids[1808]="1808";
country_ids[1794]="1794";
country_ids[1797]="1797";
country_ids[8781]="8781";
country_ids[1804]="1804";
country_ids[9377]="9377";
country_ids[1955]="1955";
country_ids[1848]="1848";
country_ids[1811]="1811";
country_ids[1801]="1801";
country_ids[1871]="1871";
country_ids[1796]="1796";
country_ids[1815]="1815";
country_ids[1879]="1879";
country_ids[1819]="1819";
country_ids[8886]="8886";
country_ids[1816]="1816";
country_ids[1820]="1820";
country_ids[1837]="1837";
country_ids[8890]="8890";
country_ids[8679]="8679";
country_ids[1956]="1956";
country_ids[2303]="2303";
country_ids[1785]="1785";
country_ids[1806]="1806";
country_ids[1828]="1828";
country_ids[1839]="1839";
country_ids[8898]="8898";
country_ids[1947]="1947";
country_ids[8766]="8766";
country_ids[8944]="8944";
country_ids[1800]="1800";
country_ids[1813]="1813";
country_ids[1809]="1809";
country_ids[1861]="1861";
country_ids[1830]="1830";
country_ids[2005]="2005";
country_ids[1847]="1847";
country_ids[1805]="1805";
country_ids[1889]="1889";
country_ids[1868]="1868";
country_ids[1849]="1849";
country_ids[8926]="8926";
country_ids[1876]="1876";
country_ids[8989]="8989";
country_ids[1843]="1843";
country_ids[2004]="2004";
country_ids[1840]="1840";
country_ids[1841]="1841";
country_ids[1951]="1951";
country_ids[1795]="1795";
country_ids[8992]="8992";
country_ids[1810]="1810";
country_ids[1802]="1802";
country_ids[1957]="1957";
country_ids[1786]="1786";
country_ids[8769]="8769";
country_ids[1856]="1856";
country_ids[8936]="8936";
country_ids[9341]="9341";
country_ids[1878]="1878";
country_ids[1793]="1793";
country_ids[1783]="1783";
country_ids[1822]="1822";
country_ids[8775]="8775";
country_ids[9340]="9340";

country_codes[1851]="AL";
country_codes[1902]="DZ";
country_codes[8860]="AD";
country_codes[8783]="AW";
country_codes[1812]="AU";
country_codes[1803]="AT";
country_codes[1881]="AZ";
country_codes[7754]="BD";
country_codes[1798]="BE";
country_codes[8868]="BM";
country_codes[8997]="BT";
country_codes[1824]="BR";
country_codes[1787]="KH";
country_codes[1784]="CA";
country_codes[1890]="CL";
country_codes[1954]="CN";
country_codes[1829]="CO";
country_codes[1842]="HR";
country_codes[1872]="CY";
country_codes[1833]="CZ";
country_codes[1807]="DK";
country_codes[1924]="EG";
country_codes[1836]="EE";
country_codes[8870]="FO";
country_codes[1808]="FI";
country_codes[1794]="FR";
country_codes[1797]="DE";
country_codes[8781]="GI";
country_codes[1804]="GR";
country_codes[9377]="GU";
country_codes[1955]="HK";
country_codes[1848]="HU";
country_codes[1811]="IS";
country_codes[1801]="IE";
country_codes[1871]="IL";
country_codes[1796]="IT";
country_codes[1815]="JP";
country_codes[1879]="JO";
country_codes[1819]="KZ";
country_codes[8886]="KI";
country_codes[1816]="KR";
country_codes[1820]="KG";
country_codes[1837]="LV";
country_codes[8890]="LI";
country_codes[8679]="LU";
country_codes[1956]="MO";
country_codes[2303]="MK";
country_codes[1785]="MY";
country_codes[1806]="MT";
country_codes[1828]="MX";
country_codes[1839]="MD";
country_codes[8898]="MC";
country_codes[1947]="MA";
country_codes[8766]="MM";
country_codes[8944]="NA";
country_codes[1800]="NL";
country_codes[1813]="NZ";
country_codes[1809]="NO";
country_codes[1861]="OM";
country_codes[1830]="PE";
country_codes[2005]="PH";
country_codes[1847]="PL";
country_codes[1805]="PT";
country_codes[1889]="PR";
country_codes[1868]="QA";
country_codes[1849]="RO";
country_codes[8926]="SM";
country_codes[1876]="SA";
country_codes[8989]="SN";
country_codes[1843]="RS";
country_codes[2004]="SG";
country_codes[1840]="SK";
country_codes[1841]="SI";
country_codes[1951]="ZA";
country_codes[1795]="ES";
country_codes[8992]="SZ";
country_codes[1810]="SE";
country_codes[1802]="CH";
country_codes[1957]="TW";
country_codes[1786]="TH";
country_codes[8769]="TO";
country_codes[1856]="TR";
country_codes[8936]="TV";
country_codes[9341]="VI";
country_codes[1878]="AE";
country_codes[1793]="GB";
country_codes[1783]="US";
country_codes[1822]="UZ";
country_codes[8775]="VU";
country_codes[9340]="VN";

size_keys[1851]="6";
size_keys[1902]="6";
size_keys[8860]="6";
size_keys[8783]="6";
size_keys[1812]="4";
size_keys[1803]="5";
size_keys[1881]="6";
size_keys[7754]="6";
size_keys[1798]="5";
size_keys[8868]="2";
size_keys[8997]="6";
size_keys[1824]="6";
size_keys[1787]="6";
size_keys[1784]="3";
size_keys[1890]="6";
size_keys[1954]="8";
size_keys[1829]="6";
size_keys[1842]="5";
size_keys[1872]="5";
size_keys[1833]="5";
size_keys[1807]="5";
size_keys[1924]="6";
size_keys[1836]="5";
size_keys[8870]="6";
size_keys[1808]="5";
size_keys[1794]="5";
size_keys[1797]="5";
size_keys[8781]="6";
size_keys[1804]="5";
size_keys[9377]="6";
size_keys[1955]="6";
size_keys[1848]="5";
size_keys[1811]="6";
size_keys[1801]="5";
size_keys[1871]="6";
size_keys[1796]="5";
size_keys[1815]="6";
size_keys[1879]="6";
size_keys[1819]="6";
size_keys[8886]="6";
size_keys[1816]="6";
size_keys[1820]="6";
size_keys[1837]="5";
size_keys[8890]="6";
size_keys[8679]="5";
size_keys[1956]="6";
size_keys[2303]="6";
size_keys[1785]="6";
size_keys[1806]="5";
size_keys[1828]="6";
size_keys[1839]="6";
size_keys[8898]="6";
size_keys[1947]="6";
size_keys[8766]="6";
size_keys[8944]="6";
size_keys[1800]="5";
size_keys[1813]="7";
size_keys[1809]="6";
size_keys[1861]="6";
size_keys[1830]="6";
size_keys[2005]="6";
size_keys[1847]="5";
size_keys[1805]="5";
size_keys[1889]="1";
size_keys[1868]="6";
size_keys[1849]="5";
size_keys[8926]="6";
size_keys[1876]="6";
size_keys[8989]="6";
size_keys[1843]="6";
size_keys[2004]="6";
size_keys[1840]="5";
size_keys[1841]="5";
size_keys[1951]="6";
size_keys[1795]="5";
size_keys[8992]="6";
size_keys[1810]="5";
size_keys[1802]="6";
size_keys[1957]="6";
size_keys[1786]="6";
size_keys[8769]="6";
size_keys[1856]="6";
size_keys[8936]="6";
size_keys[9341]="6";
size_keys[1878]="6";
size_keys[1793]="2";
size_keys[1783]="1";
size_keys[1822]="6";
size_keys[8775]="6";
size_keys[9340]="6";

language_keys[1851]="0";
language_keys[1902]="0";
language_keys[8860]="0";
language_keys[8783]="0";
language_keys[1812]="0";
language_keys[1803]="0";
language_keys[1881]="0";
language_keys[7754]="0";
language_keys[1798]="0";
language_keys[8868]="0";
language_keys[8997]="0";
language_keys[1824]="0";
language_keys[1787]="0";
language_keys[1784]="0";
language_keys[1890]="0";
language_keys[1954]="0";
language_keys[1829]="0";
language_keys[1842]="4";
language_keys[1872]="0";
language_keys[1833]="0";
language_keys[1807]="0";
language_keys[1924]="0";
language_keys[1836]="0";
language_keys[8870]="0";
language_keys[1808]="0";
language_keys[1794]="2";
language_keys[1797]="5";
language_keys[8781]="0";
language_keys[1804]="0";
language_keys[9377]="0";
language_keys[1955]="0";
language_keys[1848]="0";
language_keys[1811]="0";
language_keys[1801]="0";
language_keys[1871]="1";
language_keys[1796]="7";
language_keys[1815]="0";
language_keys[1879]="0";
language_keys[1819]="0";
language_keys[8886]="0";
language_keys[1816]="0";
language_keys[1820]="0";
language_keys[1837]="0";
language_keys[8890]="0";
language_keys[8679]="0";
language_keys[1956]="0";
language_keys[2303]="0";
language_keys[1785]="0";
language_keys[1806]="0";
language_keys[1828]="0";
language_keys[1839]="0";
language_keys[8898]="0";
language_keys[1947]="0";
language_keys[8766]="0";
language_keys[8944]="0";
language_keys[1800]="0";
language_keys[1813]="0";
language_keys[1809]="0";
language_keys[1861]="0";
language_keys[1830]="6";
language_keys[2005]="0";
language_keys[1847]="0";
language_keys[1805]="0";
language_keys[1889]="0";
language_keys[1868]="0";
language_keys[1849]="0";
language_keys[8926]="0";
language_keys[1876]="0";
language_keys[8989]="0";
language_keys[1843]="0";
language_keys[2004]="0";
language_keys[1840]="0";
language_keys[1841]="0";
language_keys[1951]="0";
language_keys[1795]="0";
language_keys[8992]="0";
language_keys[1810]="3";
language_keys[1802]="5";
language_keys[1957]="0";
language_keys[1786]="0";
language_keys[8769]="0";
language_keys[1856]="0";
language_keys[8936]="0";
language_keys[9341]="0";
language_keys[1878]="0";
language_keys[1793]="0";
language_keys[1783]="0";
language_keys[1822]="0";
language_keys[8775]="0";
language_keys[9340]="0";

var afterpay_currency=new Array();
afterpay_currency[1783] = "USD";
afterpay_currency[1793] = "GBP";
afterpay_currency[1784] = "CAD";
afterpay_currency[1812] = "AUD";


var klarna_currency=new Array();
klarna_currency[1783] = "USD";
klarna_currency[1793] = "GBP";
klarna_currency[1803] = "EUR";
klarna_currency[1807] = "DKK";
klarna_currency[1808] = "EUR";
klarna_currency[1800] = "EUR";
klarna_currency[1809] = "NOK";
klarna_currency[1810] = "SEK";

var klarna_locale=new Array();
klarna_locale[1783] = "en-US";
klarna_locale[1793] = "en-GB";
klarna_locale[1797] = "en-DE";
klarna_locale[1794] = "en-FR";
klarna_locale[1795] = "en-ES";
klarna_locale[1803] = "en-AT";
klarna_locale[1798] = "en-BE";
klarna_locale[1802] = "en-CH";
klarna_locale[1807] = "en-DK";
klarna_locale[1808] = "en-FI";
klarna_locale[1796] = "en-IT";
klarna_locale[1800] = "en-NL";
klarna_locale[1809] = "en-NO";
klarna_locale[1810] = "en-SE";

no_shipping_country_codes[0]="ID";
no_shipping_country_codes[1]="BN";
no_shipping_country_codes[2]="PG";
no_shipping_country_codes[3]="MN";
no_shipping_country_codes[4]="TJ";
no_shipping_country_codes[5]="CU";
no_shipping_country_codes[6]="AR";
no_shipping_country_codes[7]="PA";
no_shipping_country_codes[8]="RU";
no_shipping_country_codes[9]="BY";
no_shipping_country_codes[10]="UA";
no_shipping_country_codes[11]="LT";
no_shipping_country_codes[12]="BA";
no_shipping_country_codes[13]="BG";
no_shipping_country_codes[14]="LK";
no_shipping_country_codes[15]="KW";
no_shipping_country_codes[16]="LB";
no_shipping_country_codes[17]="GE";
no_shipping_country_codes[18]="IN";
no_shipping_country_codes[19]="NP";
no_shipping_country_codes[20]="IR";
no_shipping_country_codes[21]="PK";
no_shipping_country_codes[22]="LA";
no_shipping_country_codes[23]="VE";
no_shipping_country_codes[24]="UY";
no_shipping_country_codes[25]="PY";
no_shipping_country_codes[26]="JM";
no_shipping_country_codes[27]="EC";
no_shipping_country_codes[28]="CR";
no_shipping_country_codes[29]="TN";
no_shipping_country_codes[30]="RE";
no_shipping_country_codes[31]="LY";
no_shipping_country_codes[32]="ET";
no_shipping_country_codes[33]="SC";
no_shipping_country_codes[34]="MU";
no_shipping_country_codes[35]="BJ";
no_shipping_country_codes[36]="TZ";
no_shipping_country_codes[37]="MV";
no_shipping_country_codes[38]="SD";
no_shipping_country_codes[39]="PF";
no_shipping_country_codes[40]="MP";
no_shipping_country_codes[41]="FJ";
no_shipping_country_codes[42]="NC";
no_shipping_country_codes[43]="PW";
no_shipping_country_codes[44]="MH";
no_shipping_country_codes[45]="AS";
no_shipping_country_codes[46]="GL";
no_shipping_country_codes[47]="BS";
no_shipping_country_codes[48]="BB";
no_shipping_country_codes[49]="KY";
no_shipping_country_codes[50]="GH";
no_shipping_country_codes[51]="IQ";
no_shipping_country_codes[52]="BZ";
no_shipping_country_codes[53]="FK";
no_shipping_country_codes[54]="GF";
no_shipping_country_codes[55]="GD";
no_shipping_country_codes[56]="GG";
no_shipping_country_codes[57]="HT";
no_shipping_country_codes[58]="JE";
no_shipping_country_codes[59]="KV";
no_shipping_country_codes[60]="MQ";
no_shipping_country_codes[61]="NR";
no_shipping_country_codes[62]="AN";
no_shipping_country_codes[63]="NI";
no_shipping_country_codes[64]="NU";
no_shipping_country_codes[65]="LC";
no_shipping_country_codes[66]="VC";
no_shipping_country_codes[67]="SB";
no_shipping_country_codes[68]="SR";
no_shipping_country_codes[69]="TC";
no_shipping_country_codes[70]="BF";
no_shipping_country_codes[71]="BI";
no_shipping_country_codes[72]="CV";
no_shipping_country_codes[73]="CF";
no_shipping_country_codes[74]="TD";
no_shipping_country_codes[75]="KM";
no_shipping_country_codes[76]="CD";
no_shipping_country_codes[77]="CI";
no_shipping_country_codes[78]="DJ";
no_shipping_country_codes[79]="GQ";
no_shipping_country_codes[80]="ER";
no_shipping_country_codes[81]="GA";
no_shipping_country_codes[82]="GM";
no_shipping_country_codes[83]="GN";
no_shipping_country_codes[84]="LS";
no_shipping_country_codes[85]="LR";
no_shipping_country_codes[86]="MG";
no_shipping_country_codes[87]="MW";
no_shipping_country_codes[88]="ML";
no_shipping_country_codes[89]="MR";
no_shipping_country_codes[90]="YT";
no_shipping_country_codes[91]="MZ";
no_shipping_country_codes[92]="NE";
no_shipping_country_codes[93]="RW";
no_shipping_country_codes[94]="ST";
no_shipping_country_codes[95]="SO";
no_shipping_country_codes[96]="TG";
no_shipping_country_codes[97]="UG";
no_shipping_country_codes[98]="ZM";
no_shipping_country_codes[99]="ZW";
no_shipping_country_codes[100]="AF";
no_shipping_country_codes[101]="TP";
no_shipping_country_codes[102]="CG";
no_shipping_country_codes[103]="XB";
no_shipping_country_codes[104]="XS";
no_shipping_country_codes[105]="VG";
no_shipping_country_codes[106]="XN";
no_shipping_country_codes[107]="XE";
no_shipping_country_codes[108]="XM";
no_shipping_country_codes[109]="KP";
no_shipping_country_codes[110]="SH";
no_shipping_country_codes[111]="AO";
no_shipping_country_codes[112]="SL";
no_shipping_country_codes[113]="BW";
no_shipping_country_codes[114]="NG";
no_shipping_country_codes[115]="BH";
no_shipping_country_codes[116]="default";

var consignee_country_id = 0;
window.change_org_currencies_id = true;

function setCurrency(key)
{
    if(window.change_org_currencies_id)
    {
        setCookie("org_currencies_id",key,30);
    }
    
    var selected_currency=baseCurrencys[key];
    if(selected_currency && (selected_currency != undefined))
    {
        setCookie("currencies_id",key,30);
        setCookie("currency_key",key,30);
        setCookie("currency_id",key,30);
    }
    var selected_rate=baseRates[key];
    var selected_symbol_left=symbol_left[key];
    var selected_symbol_left_t = selected_symbol_left;
    var region_id = (arguments[1]!=undefined)?arguments[1]:-1;
    if (region_id > -1) 
    {
        region_id = region_id == 1954 ? 1783 : region_id;
        var selected_country=baseCountrys[region_id];
        var selected_country_id=country_ids[region_id];
        var selected_country_code=country_codes[region_id];
        var selected_size_display=size_keys[region_id];
        var selected_lang_key=language_keys[region_id];
        var free_amount = free_amounts[region_id][0];
        if(selected_country_id)
        {
            setCookie("country",selected_country,30);
            setCookie("country_id",selected_country_id,30);
            setCookie("country_code",selected_country_code,30);
            setCookie("free_amount",free_amount,30);
            setSizeDisplay(selected_size_display);
        }
        // setShowLanguage(selected_lang_key);
    }
    else
    {
        var country_id ='';
        country_id = country_id == 1954 ? 1783 : country_id;
        var selected_country = countrys[country_id];
    }
    var selected_country_code=getCookie("country_code");
    //不在可发货地区
    if($.inArray(selected_country_code, country_codes) === -1 || ($.inArray(selected_country_code, no_shipping_country_codes) !== -1))
    {
        selected_country = getCookie("country");
        selected_country = selected_country + ' NOT SHIP';
        selected_currency = getCookie("currency");
        selected_symbol_left_t = selected_symbol_left = getCookie("symbol_left");
        selected_rate = getCookie("rate");
    }
    setCookie("currency",selected_currency,30);
    setCookie("rate",selected_rate,30);
    setCookie("symbol_left",selected_symbol_left,30);

    if(selected_currency == 'USD' || selected_currency == 'CAD' || selected_currency == 'AUD' || selected_currency == 'HKD')
    {
        selected_symbol_left_t = '$';
    }
    var selected_con="<div class='country_flag css_"+selected_country_code+"'></div><span>"+selected_currency+"</span><span>"+selected_symbol_left_t+"</span>";
    $("#country-flag").html("<span>"+selected_country+"</span>");        
    var footer_selected_con="<span class='country_flag css_"+selected_country_code+"'></span><span>"+selected_country+"</span><span>"+selected_currency+selected_symbol_left_t+"</span>";
    $("#foot-country-flag").html(footer_selected_con);
    $("#currency-flag").html("<span>"+selected_currency+"</span><span>"+selected_symbol_left_t+"</span>");
    $("#foot-country-selector").html("<span>"+selected_currency+"</span><span>"+selected_symbol_left_t+"</span>");
    $("#header-country-selector").html(selected_con);
    show_klarna_info(0);//判断klarna提示是否显示
    setAllPrice(selected_currency,selected_rate,selected_symbol_left);
    
    if(document.getElementById("ECS_SURPLUS") != undefined && $("#ot_surplus").attr('orgp') != undefined){
        var surplus = parseFloat($("#ot_surplus").attr('orgp')) * parseFloat(selected_rate);
        if(selected_currency in special_currencies)
        {
            surplus=FormatDecimal(0,surplus.toString());
        }
        else
        {
            surplus=FormatDecimal(2,surplus.toString());
        }
        document.getElementById("ECS_SURPLUS").value = surplus;
    }
    
    //$("#currency_list").hide();
    getPaymentCode();
    setDefaultReturnPolicy();
    if($('.afterpay_info').length > 0)
    {
        show_afterpay_info();//判断afterpay提示是否显示
    }
}

    /**
     * 判断klarna提示是否显示
     * shop_price 商品价格
     */
    function show_klarna_info(shop_price)
    {
        shop_price = shop_price ? parseFloat(shop_price) : 0;
        if(document.getElementById("klarna_info"))
        {
            div_id = 'MY_PRICE_klarna';
            shop_price = shop_price > 0 ? shop_price : $("#MY_PRICE").attr('orgp');
            if(document.getElementById("fast_MY_PRICE_klarna"))
            {
                div_id = 'fast_MY_PRICE_klarna';
                shop_price = $("#MY_FAST_PRICE").attr('orgp');
            }

            var country_id  = getCookie("country_id");
            var selected_currency = getCookie("currency");
            var ap_currency = klarna_currency[country_id] == undefined ? '' : klarna_currency[country_id];
            if(ap_currency == selected_currency)
            {
                var rate   = getCookie("rate");
                shop_price = parseFloat(shop_price)*parseFloat(rate);
                shop_price = FormatDecimal(2,shop_price.toString());
                shop_price = parseInt(shop_price * 100);
                $("#"+div_id).attr('data-purchase-amount',shop_price);
                removejscssfile('https://na-library.klarnaservices.com/lib.js');
                removejscssfile('https://eu-library.klarnaservices.com/lib.js');
                if(country_id == 1783)
                {
                    addScript('https://na-library.klarnaservices.com/lib.js','37f27103-0fd2-5393-812d-d1ad0f360ad4');
                    $("#"+div_id).attr("data-locale","en-US");
                }
                else
                {
                    addScript('https://eu-library.klarnaservices.com/lib.js','f8b8210c-3524-577b-944f-1dfa89184ee3');
                    $("#"+div_id).attr("data-locale",klarna_locale[country_id]);
                }

                window.KlarnaOnsiteService = window.KlarnaOnsiteService || [];
                window.KlarnaOnsiteService.push({eventName: 'refresh-placements'});

                $("#klarna_info").show();
                $("#klarna_info").attr('data-country-id',country_id);
                base_gtm_event_data_push('','View','klarna Tips::View_'+country_id);
            }
            else
            {
                $("#klarna_info").hide();
            }
        }
    }
    function addScript(url,client_id)
    {
        //alert(url);
        var script = document.createElement('script');
        script.setAttribute('async',true);
        script.setAttribute('src',url);
        script.setAttribute('data-client-id',client_id);
        document.getElementsByTagName('head')[0].appendChild(script);
    }
    //移除已经加载过的js/css
    function removejscssfile(filename)
    {
        var targetelement= "script";
        var targetattr = "src";
        var allsuspects = document.getElementsByTagName(targetelement)
        for (var i=allsuspects.length; i>=0;i--){
            if (allsuspects[i] && allsuspects[i].getAttribute(targetattr)!=null && allsuspects[i].getAttribute(targetattr).indexOf(filename)!=-1)
                allsuspects[i].parentNode.removeChild(allsuspects[i])
        }
    }
function setAllPrice(code,rate,symbol_left)
{
    var code_t = code;
    var cur_price_min='';
    if(getCookie("filter_price_min")!=null)
    {
        cur_price_min=getCookie("filter_price_min");
    }

    if(code in special_currencies)
    {
        var precision=0;
    }
    else{
        var precision=2;
    }
    var code_right = '';
    if(code == 'EUR')
    {
        code_right = code_t;
        code_t = '';
    }
    var cur_price_max='';
    if(getCookie("filter_price_max")!=null)
    {
        cur_price_max=getCookie("filter_price_max");
    }

    if(code == 'USD' || code == 'EUR' || code == 'GBP' || code == 'CAD' || code == 'AUD' || code == 'HKD')
    {
        code_t = symbol_left;
    }


    $(".my_shop_price").each(function(){
        //获取美金价格
        var shop_price=$(this).attr('orgp');
        if(!isNaN(shop_price))
        {
            var minlab = $(this).attr('data-minlab');
            minlab = minlab == undefined ? '' : minlab;
            $(this).attr('data-minlab',minlab);
            shop_price=parseFloat(shop_price)*parseFloat(rate);
            
            if(code in special_currencies)
            {
                shop_price=FormatDecimal(0,shop_price.toString());
            }
            else
            {
                shop_price=FormatDecimal(2,shop_price.toString());
            }

            if ($(this).attr('data-minlab') == code && cur_price_min) 
            {
                $(this).html(code_t+cur_price_min);
            }
            else if($(this).attr('data-maxlab') == code && cur_price_min)
            {
                $(this).html(code_t+cur_price_max);
            }
            else
            {
                $(this).hasClass('small-bizhong') ? $(this).html(`<span>${code_t}</span>${shop_price}`) : $(this).html(code_t+shop_price);
            }
        }
    });

    $(".my_shop_price_new").each(function(){
        //获取美金价格
        var shop_price=$(this).attr('orgp');
        shop_price=parseFloat(shop_price)*parseFloat(rate);
        shop_price=FormatDecimal(precision,shop_price.toString());
        $(this).html(code_t+shop_price+code_right);
    });
    
    $(".my_shop_price2").each(function(){
        //获取美金价格
        var shop_price=$(this).attr('orgp');
        
        shop_price=parseFloat(shop_price)*parseFloat(rate);
        
        if(code in special_currencies)
        {
            shop_price=FormatDecimal(0,shop_price.toString());
        }
        else
        {
            shop_price=FormatDecimal(2,shop_price.toString());
        }
        
        $(this).html(shop_price);
    });  
    $(".filter_price_min").each(function(){
        //获取美金价格
        var shop_price=$(this).attr('orgp');
        if (shop_price) 
        {
            shop_price=parseFloat(shop_price)*parseFloat(rate);
            
            if(code in special_currencies)
            {
                shop_price=FormatDecimal(0,shop_price.toString());
            }
            else
            {
                shop_price=FormatDecimal(2,shop_price.toString());
            }
            if ($(this).hasClass('filter-price-input')) 
            {
                $(this).val(shop_price);
            }
            else
            {
                shop_price=Math.floor(shop_price);
                $(this).html(code_t+shop_price);
            }
        }
        
    });
    
    $(".filter_price_max").each(function(){
        //获取美金价格
        var shop_price=$(this).attr('orgp');
        if (shop_price) 
        {
            shop_price=parseFloat(shop_price)*parseFloat(rate);
            
            if(code in special_currencies)
            {
                shop_price=FormatDecimal(0,shop_price.toString());
            }
            else
            {
                shop_price=FormatDecimal(2,shop_price.toString());
            }
            if ($(this).hasClass('filter-price-input')) 
            {
                $(this).val(shop_price);
            }
            else
            {
                shop_price=Math.ceil(shop_price);
                $(this).html(code_t+shop_price);
            }
        }
    }); 
    $(".my_shop_price3").html(code);

    var combo_child=$("#combo_offer_iframe").contents();
    if(combo_child)
    {
        combo_child.find(".my_shop_price").each(function(){
            //获取美金价格
            var shop_price=$(this).attr('orgp');
            if(!isNaN(shop_price))
            {
                var minlab = $(this).attr('data-minlab');
                minlab = minlab == undefined ? '' : minlab;
                $(this).attr('data-minlab',minlab);
                shop_price=parseFloat(shop_price)*parseFloat(rate);
                
                if(code in special_currencies)
                {
                    shop_price=FormatDecimal(0,shop_price.toString());
                }
                else
                {
                    shop_price=FormatDecimal(2,shop_price.toString());
                }

                if ($(this).attr('data-minlab') == code && cur_price_min) 
                {
                    $(this).html(code_t+cur_price_min);
                }
                else if($(this).attr('data-maxlab') == code && cur_price_min)
                {
                    $(this).html(code_t+cur_price_max);
                }
                else
                {
                    $(this).hasClass('small-bizhong') ? $(this).html(`<span>${code_t}</span>${shop_price}`) : $(this).html(code_t+shop_price);
                }
            }
        });
    }

    if(document.getElementById("klarna_above") != undefined){
        var ot_total = $("#price_total").attr('orgp');
        //1797德国,1803奥地利,1798比利时,1802瑞士
        if(consignee_country_id != 1797 && consignee_country_id != 1803 && consignee_country_id != 1798 && consignee_country_id != 1802 && consignee_country_id != 1807 && consignee_country_id != 1808 && consignee_country_id != 1800 && consignee_country_id != 1809 && consignee_country_id != 1810 && ot_total < 10)
        {
            $('#pay_desc_19').hide();
            klarna_above_price = code_t ? code_t + "10" : "10"+ code_right;
            klarna_above = "Klarna, Available for order above "+klarna_above_price;
            $('#klarna_above').html(klarna_above);
            $('#klarna_above').show();
        }
    }

    //购物车显示klarna提示
    if(document.getElementById("pay_discount_span_19") != undefined && consignee_country_id == 0)
    {
        $('#pay_discount_span_19').hide();
        var country_id = getCookie("country_id");
        var selected_currency = getCookie("currency");
        var pp_currency = klarna_currency[country_id] == undefined ? '' : klarna_currency[country_id];
        if(pp_currency == selected_currency)
        {
            var pay_discount = $('#pay_discount_19').attr('orgp');
            if(pay_discount > 0)
            {
                $('#pay_discount_span_19').show();
            }
        }
    }
    setDefaultReturnPolicy();   
}

function initCurrency()
{
    setDefaultReturnPolicy();
    //$("#currency_selector").html(getCookie("symbol_left")+getCookie("currency"));
    var currency_id = getCookie("currency_id");
    var currency = getCookie("currency");
    var select_symbol_left=symbol_left[currency_id];
    var select_symbol_left_t = select_symbol_left;
    if(currency == 'USD' || currency == 'CAD' || currency == 'AUD' || currency == 'HKD')
    {
        select_symbol_left_t = '$';
    }
    var country_code=getCookie("country_code");
    var country_id=getCookie("country_id");
    country_id = country_id == 1954 ? 1783 : country_id;

    var selected_country = countrys[country_id];
    if($.inArray(country_code, country_codes) === -1 || ($.inArray(country_code, no_shipping_country_codes) !== -1))
    {
        selected_country = getCookie("country");
        selected_country = selected_country + ' NOT SHIP';
        select_symbol_left_t = select_symbol_left = getCookie("symbol_left");
    }

    var selected_con="<div class='country_flag css_"+country_code+"'></div><span>"+currency+"</span><span>"+select_symbol_left_t+"</span>";
    $("#country-flag").html("<span>"+selected_country+"</span>");
    var footer_selected_con="<span class='country_flag css_"+country_code+"'></span><span>"+selected_country+"</span>, <span>"+currency+select_symbol_left_t+"</span>";
    $("#foot-country-flag").html(footer_selected_con);
    $("#currency-flag").html("<span>"+currency+"</span><span>"+select_symbol_left_t+"</span>");
    $("#foot-country-selector").html("<span>"+currency+"</span><span>"+select_symbol_left_t+"</span>");;
    $("#header-country-selector").html(selected_con);
    // $("#cursel").val(currency_key);
    // $("#cursel option").each(function(){
    //         if($(this).val() == currency_key){
    //       $(this).attr('selected', true);
    //     }
    // });
    // $("#cursel-head").val(currency_key);
    // $("#cursel-head option").each(function(){
    //         if($(this).val() == currency_key){
    //       $(this).attr('selected', true);
    //     }
    // });
    setAllPrice(getCookie("currency"),getCookie("rate"),select_symbol_left);
}

function getPaymentCode()
{
    if(document.getElementById("pay_online"))
    {
        var order_id=$("#pay_online").attr('order_id');

        Ajax.call('user.php', 'act=get_payment_code&order_id='+order_id, getPaymentCodeResponse, 'POST', 'JSON');
    }
}

function getPaymentCodeResponse(res)
{
    $("#pay_online").html(res.pay_online);
}


$(document).ready(function(){
    initCurrency();
    show_klarna_info(0);//判断klarna提示是否显示
});

function FormatDecimal(bit,strDecimal)
{
    var i=0;
    //补零    
    var strFill="";
    //四舍五入后要加的数值
    var addDecimal="0.";             
    while(i<bit)
    {           
      strFill=strFill+"0";
      if(i==bit-1)
      {            
         addDecimal=addDecimal+"1";            
      }
      else
      {            
         addDecimal=addDecimal+"0";
      }         
      i=i+1;         
    } 
    i=0;          
    var beginPlace=strDecimal.indexOf(".");
    //判断此浮点数是否无小数部份
    if(beginPlace==-1)
    {
         if(bit==0)
         {
         //精确位数到个位           
          return strDecimal;                      
         }
         // 精确位数到个位，小数位数不足时添零      
         return strDecimal+"."+strFill;         
    }            
    var strDecimalC=strDecimal+strFill;
    
    var str= strDecimalC.split(/[.]/);      
    var strInt=str[0];      
    var strDecimal=str[1]+strFill;
    var IntDecimal=parseFloat("0."+strDecimal);       
    var validPlace=beginPlace+bit+1;
    var validData=strDecimalC.substring(validPlace,validPlace+1);    
    //进行四舍五入判断
    if(parseInt(validData)>4)
    {  
         if(bit==0)
          {
              //精确位数到个位            
              return parseInt(strInt)+1;                    
          }
         //精确到小数的位数
         var differents="0."+strFill+strDecimal.substring(bit,strDecimal.length);
         IntDecimal=IntDecimal-parseFloat(differents);
         IntDecimal=IntDecimal+parseFloat(addDecimal);
   
         var DecimalValue=parseInt(strInt)+IntDecimal;
        
         if(DecimalValue.toString().indexOf(".")== -1 )//如果算出的值刚好为整数,如"30"; 
            DecimalValue=DecimalValue.toString()+".";//则在末尾加上小数点'.'
           
         strDecimalC=DecimalValue.toString(10)+strFill;
    }
    //strDecimalC为重新得到的浮点数字符串 
    var beginPlace=strDecimalC.indexOf(".");
    //得到整数部分                   
    var beginStr=strDecimalC.substring(0,beginPlace);
    if(bit==0)
    {      
        return beginStr;            
    }
    return strDecimalC.substring(0, beginPlace+bit+1);
}


function setDefaultReturnPolicy(country_id = 0)
{
    country_id = country_id == undefined ? 0 : country_id;
    country_id = country_id > 0 ? country_id : getCookie("country_id");
    country_id = country_id == undefined ? 1783 : country_id;

    if(!(country_id in free_amounts))
    {
        country_id = 1783;
    }

    var free_amount_usd = free_amounts[country_id][0];
    var free_amount = free_amounts[country_id][1];
    var free_amount_currency = free_amounts[country_id][2];
    var currencies_id = free_amounts[country_id][3];
    var symbol = symbol_left[currencies_id];
    free_amount = free_amount == undefined ? 69 : free_amount;
    free_amount_usd = free_amount_usd == undefined ? 69 : free_amount_usd;

    $('.app_free_shipping_order_amount').attr('orgp',free_amount_usd).html(symbol+free_amount);
    $('#down-app-box .txt2').addClass('none');
    $('#down-app-box .txt3').addClass('none');
    if('app' in free_amounts[country_id])
    {
        var app_usd_free_amount_value = free_amounts[country_id]['app']['usd'];
        var app_usd_free_amount = free_amounts[country_id]['app']['value'];
        var app_currencies_id = free_amounts[country_id]['app']['currencies_id'];
        var app_symbol = symbol_left[app_currencies_id];
        $('.app_free_shipping_order_amount').attr('orgp',app_usd_free_amount_value).html(app_symbol+app_usd_free_amount);
        if(app_usd_free_amount_value == free_amount_usd) $('.app_line_through_amount').hide();
        if(app_usd_free_amount_value>=free_amount_usd)
        {
            $('#down-app-box .txt3').removeClass('none');
        }
        else{

            $('#down-app-box .txt2').removeClass('none');
        }
    }
    else
    {
        $('.app_line_through_amount').hide();
        $('#down-app-box .txt3').removeClass('none');
    }

    if (country_id == '1783') 
    {
        $('.us_free_shipping_order_amount').attr('orgp',free_amount_usd).html(symbol+free_amount);
        $('.us-merchant-return-policy').show();
        $('.merchant-return-policy').hide();
        $('#return_policy_menu').show();
        $('#return_policy_menu .us-ul').removeClass('none');
        $('#return_policy_menu .uk-ul').addClass('none');
        $('#return_policy_menu .ca-ul').addClass('none');
        $('.article-return-policy').hide();
        $('.us-normal-return-policy').show();
        $('.product-shock-show').show();
        $('.sms_subscription_ads').show();
    }
    else
    {
        $('.free_shipping_order_amount').attr('orgp',free_amount_usd).html(symbol+free_amount);
        $('.us-merchant-return-policy').hide();
        $('.merchant-return-policy').show();
        if (country_id == '1793')
        {
            $('#return_policy_menu').show();
            $('#return_policy_menu .uk-ul').removeClass('none');
            $('#return_policy_menu .ca-ul').addClass('none');
            $('#return_policy_menu .us-ul').addClass('none');
            $('.article-return-policy').hide();
            $('.uk-normal-return-policy').show();
        }
        else if (country_id == '1784')
        {
            $('#return_policy_menu').show();
            $('#return_policy_menu .ca-ul').removeClass('none');
            $('#return_policy_menu .uk-ul').addClass('none');
            $('#return_policy_menu .us-ul').addClass('none');
            $('.article-return-policy').hide();
            $('.ca-normal-return-policy').show();
        }
        else
        {
            $('#return_policy_menu').hide();
            $('.article-return-policy').hide();
            $('.normal-return-policy').show();
        }
        $('.product-shock-show').hide();
        $('.sms_subscription_ads').hide();
    }

    let country_code = getCookie('country_code');
    country_code = country_code == '' || country_code == null ? 'US' : country_code;
    $('.payment-method-icons').each(function(){
        let countrys = $(this).attr('data-countrys');
        countrys = countrys == undefined ? '' : countrys;
        if(countrys == '')
        {
            $(this).removeClass('none_show');
        }
        else
        {
            countrys = countrys.split(',');
            let flag = false;
            for (var i = countrys.length - 1; i >= 0; i--)
            {
                if(countrys[i] == country_code)
                {
                    flag = true;
                }
            }
            if(flag)
            {
                $(this).removeClass('none_show');
            }
            else
            {
                $(this).addClass('none_show');
            }
        }
    });
}var country_id = "1783";
var default_size_display="1";
var size_variety_list = JSON.parse('{"1":"US","2":"UK","3":"CA","4":"AU","5":"EU","6":"INT","7":"NZ","8":"CN"}');
var size_list = JSON.parse('{"2":{"1":{"S":"S | US2-4","M":"M | US6-8","L":"L | US10-12","XL":"XL | US14-16","XXL":"XXL | US18"},"2":{"S":"S | UK6-8","M":"M | UK10-12","L":"L | UK14-16","XL":"XL | UK18-20","XXL":"XXL | UK22"},"3":{"S":"S | CA2-4","M":"M | CA6-8","L":"L | CA10-12","XL":"XL | CA14-16","XXL":"XXL | CA18"},"4":{"S":"S | AU6-8","M":"M | AU10-12","L":"L | AU14-16","XL":"XL | AU18-20","XXL":"XXL | AU22"},"5":{"S":"S | EU34-36","M":"M | EU38-40","L":"L | EU42-44","XL":"XL | EU46-48","XXL":"XXL | EU50"},"6":{"S":"S","M":"M","L":"L","XL":"XL","XXL":"XXL"},"7":{"S":"S | NZ6-8","M":"M | NZ10-12","L":"L | NZ14-16","XL":"XL | NZ18-20","XXL":"XXL | NZ22"}},"3":{"1":{"0X":"0X | US14","1X":"1X | US16-18","2X":"2X | US18W-20W","3X":"3X | US22W-24W"},"2":{"0X":"0X | UK18","1X":"1X | UK20-22","2X":"2X | UK22-24","3X":"3X | UK26-28"},"3":{"0X":"0X | CA14","1X":"1X | CA16-18","2X":"2X | CA18W-20W","3X":"3X | CA22W-24W"},"4":{"0X":"0X | AU18","1X":"1X | AU20-22","2X":"2X | AU22-24","3X":"3X | AU26-28"},"5":{"0X":"0X | EU46","1X":"1X | EU48-50","2X":"2X | EU50-52","3X":"3X | EU54-56"},"6":{"0X":"0X","1X":"1X","2X":"2X","3X":"3X"},"7":{"0X":"0X | NZ18","1X":"1X | NZ20-22","2X":"2X | NZ22-24","3X":"3X | NZ26-28"}},"4":{"1":{"S":"S | US4-6","M":"M | US8","L":"L | US10","XL":"XL | US12","XXL":"XXL | US14","XXXL":"XXXL | US16-18"},"2":{"S":"S | UK8-10","M":"M | UK12","L":"L | UK14","XL":"XL | UK16","XXL":"XXL | UK18","XXXL":"XXXL | UK20-22"},"3":{"S":"S | CA4-6","M":"M | CA8","L":"L | CA10","XL":"XL | CA12","XXL":"XXL | CA14","XXXL":"XXXL | CA16-18"},"4":{"S":"S | AU8-10","M":"M | AU12","L":"L | AU14","XL":"XL | AU16","XXL":"XXL | AU18","XXXL":"XXXL | AU20-22"},"5":{"S":"S | EU36-38","M":"M | EU40","L":"L | EU42","XL":"XL | EU44","XXL":"XXL | EU46","XXXL":"XXXL | EU48-50"},"6":{"S":"S","M":"M","L":"L","XL":"XL","XXL":"XXL","XXXL":"XXXL"},"7":{"S":"S | NZ8-10","M":"M | NZ12","L":"L | NZ14","XL":"XL | NZ16","XXL":"XXL | NZ18","XXXL":"XXXL | NZ20-22"}},"5":{"1":{"000":"US 000","00":"US 00","0":"US 0","2":"US 2","4":"US 4","6":"US 6","8":"US 8","10":"US 10","12":"US 12","14":"US 14","16":"US 16","18":"US 18","20":"US 20"},"2":{"000":"UK 0","00":"UK 2","0":"UK 4","2":"UK 6","4":"UK 8","6":"UK 10","8":"UK 10","10":"UK 12","12":"UK 14","14":"UK 16","16":"UK 18","18":"UK 20","20":"UK 22"},"3":{"000":"CA 000","00":"CA 00","0":"CA 0","2":"CA 2","4":"CA 4","6":"CA 6","8":"CA 8","10":"CA 10","12":"CA 12","14":"CA 14","16":"CA 16","18":"CA 18","20":"CA 20"},"4":{"000":"AU 0","00":"AU 2","0":"AU 4","2":"AU 6","4":"AU 8","6":"AU 10","8":"AU 10","10":"AU 12","12":"AU 14","14":"AU 16","16":"AU 18","18":"AU 20","20":"AU 22"},"5":{"000":"EU 28","00":"EU 30","0":"EU 32","2":"EU 34","4":"EU 36","6":"EU 38","8":"EU 38","10":"EU 40","12":"EU 42","14":"EU 44","16":"EU 46","18":"EU 48","20":"EU 50"},"6":{"000":"XXS | US000","00":"XXS | US00","0":"XS | US0","2":"XS | US2","4":"S | US4","6":"S | US6","8":"M | US8","10":"M | US10","12":"L | US12","14":"L | US14","16":"XL | US16","18":"XL | US18","20":"1X | US20"},"7":{"000":"NZ 0","00":"NZ 2","0":"NZ 4","2":"NZ 6","4":"NZ 8","6":"NZ 10","8":"NZ 10","10":"NZ 12","12":"NZ 14","14":"NZ 16","16":"NZ 18","18":"NZ 20","20":"NZ 22"}},"6":{"1":{"14W":"US 14W","16W":"US 16W","18W":"US 18W","20W":"US 20W","22W":"US 22W","24W":"US 24W"},"2":{"14W":"UK 20","16W":"UK 22","18W":"UK 24","20W":"UK 26","22W":"UK 28","24W":"UK 30"},"3":{"14W":"CA 14W","16W":"CA 16W","18W":"CA 18W","20W":"CA 20W","22W":"CA 22W","24W":"CA 24W"},"4":{"14W":"AU 20","16W":"AU 22","18W":"AU 24","20W":"AU 26","22W":"AU 28","24W":"AU 30"},"5":{"14W":"EU 48","16W":"EU 50","18W":"EU 52","20W":"EU 54","22W":"EU 56","24W":"EU 58"},"6":{"14W":"0X | US14W","16W":"1X | US16W","18W":"1X | US18W","20W":"2X | US20W","22W":"2X | US22W","24W":"3X | US24W"},"7":{"14W":"NZ 20","16W":"NZ 22","18W":"NZ 24","20W":"NZ 26","22W":"NZ 28","24W":"NZ 30"}},"7":{"1":{"5.5":"US 5.5","6.5":"US 6.5","7.5":"US 7.5","8.5":"US 8.5","9.5":"US 9.5"},"2":{"5.5":"UK 3.5","6.5":"UK 4.5","7.5":"UK 5.5","8.5":"UK 6.5","9.5":"UK 7.5"},"3":{"5.5":"CA 5.5","6.5":"CA 6.5","7.5":"CA 7.5","8.5":"CA 8.5","9.5":"CA 9.5"},"4":{"5.5":"AU 5.5","6.5":"AU 6.5","7.5":"AU 7.5","8.5":"AU 8.5","9.5":"AU 9.5"},"5":{"5.5":"EU 36","6.5":"EU 37","7.5":"EU 38","8.5":"EU 39","9.5":"EU 40"},"6":{"5.5":"INT 230","6.5":"INT 235","7.5":"INT 240","8.5":"INT 245","9.5":"INT 250"},"7":{"5.5":"NZ 5.5","6.5":"NZ 6.5","7.5":"NZ 7.5","8.5":"NZ 8.5","9.5":"NZ 9.5"}},"8":{"1":{"M":"S-M | US0-6","XL":"L-XL | US8-12","3XL":"2XL-3XL | US14-18","5XL":"4XL-5XL | US18W-20W","7XL":"6XL-7XL | US22W-24W"},"2":{"M":"S-M | UK4-10","XL":"L-XL | UK12-16","3XL":"2XL-3XL | UK18-22","5XL":"4XL-5XL | UK18W-20W","7XL":"6XL-7XL | UK26-28"},"3":{"M":"S-M | CA0-6","XL":"L-XL | CA8-12","3XL":"2XL-3XL | CA14-18","5XL":"4XL-5XL | CA18W-20W","7XL":"6XL-7XL | CA22W-24W"},"4":{"M":"S-M | AU4-10","XL":"L-XL | AU12-16","3XL":"2XL-3XL | AU18-22","5XL":"4XL-5XL | AU18W-20W","7XL":"6XL-7XL | AU26-28"},"5":{"M":"S-M | EU32-38","XL":"L-XL | EU40-44","3XL":"2XL-3XL | EU46-50","5XL":"4XL-5XL | EU40-52","7XL":"6XL-7XL | EU26-28"},"6":{"M":"S-M","XL":"L-XL","3XL":"2XL-3XL","5XL":"4XL-5XL","7XL":"6XL-7XL"},"7":{"M":"S-M | NZ4-10","XL":"L-XL | NZ12-16","3XL":"2XL-3XL | NZ18-22","5XL":"4XL-5XL | NZ18W-20W","7XL":"6XL-7XL | NZ26-28"}},"9":{"1":{"000":"000","00":"00","0":"0","2":"2","4":"4","6":"6","8":"8","10":"10","12":"12","14":"14","16":"16","18":"18","20":"20","18W":"18W","20W":"20W","22W":"22W","24W":"24W","26W":"26W","28W":"28W","30W":"30W","32W":"32W"},"2":{"000":"0","00":"2","0":"4","2":"6","4":"8","6":"10","8":"12","10":"14","12":"16","14":"18","16":"20","18":"22","20":"24","18W":"22","20W":"24","22W":"26","24W":"28","26W":"30","28W":"32","30W":"34","32W":"36"},"3":{"000":"000","00":"00","0":"0","2":"2","4":"4","6":"6","8":"8","10":"10","12":"12","14":"14","16":"16","18":"18","20":"20","18W":"18W","20W":"20W","22W":"22W","24W":"24W","26W":"26W","28W":"28W","30W":"30W","32W":"32W"},"4":{"000":"0","00":"2","0":"4","2":"6","4":"8","6":"10","8":"12","10":"14","12":"16","14":"18","16":"20","18":"22","20":"24","18W":"22","20W":"24","22W":"26","24W":"28","26W":"30","28W":"32","30W":"34","32W":"36"},"5":{"000":"28","00":"30","0":"32","2":"34","4":"36","6":"38","8":"40","10":"42","12":"44","14":"46","16":"48","18":"50","20":"52","18W":"50","20W":"52","22W":"54","24W":"56","26W":"58","28W":"60","30W":"62","32W":"64"},"7":{"000":"0","00":"2","0":"4","2":"6","4":"8","6":"10","8":"12","10":"14","12":"16","14":"18","16":"20","18":"22","20":"24","18W":"22","20W":"24","22W":"26","24W":"28","26W":"30","28W":"32","30W":"34","32W":"36"}},"10":{"1":{"XXS":"XXS | US000-00","XS":"XS | US0-2","S":"S | US4-6","M":"M | US8-10","L":"L | US12-14","XL":"XL | US16-18","XXL":"XXL | US20","1X":"1X | US18W-20W","2X":"2X | US22W-24W","3X":"3X | US26W-28W","4X":"4X | US30W-32W"},"2":{"XXS":"XXS | UK0-2","XS":"XS | UK4-6","S":"S | UK8-10","M":"M | UK12-14","L":"L | UK16-18","XL":"XL | UK20-22","XXL":"XXL | UK24","1X":"1X | UK22-24","2X":"2X | UK26-28","3X":"3X | UK30-32","4X":"4X | UK34-36"},"3":{"XXS":"XXS | CA000-00","XS":"XS | CA0-2","S":"S | CA4-6","M":"M | CA8-10","L":"L | CA12-14","XL":"XL | CA16-18","XXL":"XXL | CA20","1X":"1X | CA18W-20W","2X":"2X | CA22W-24W","3X":"3X | CA26W-28W","4X":"4X | CA30W-32W"},"4":{"XXS":"XXS | AU0-2","XS":"XS | AU4-6","S":"S | AU8-10","M":"M | AU12-14","L":"L | AU16-18","XL":"XL | AU20-22","XXL":"XXL | AU24","1X":"1X | AU22-24","2X":"2X | AU26-28","3X":"3X | AU30-32","4X":"4X | AU34-36"},"5":{"XXS":"XXS | EU28-30","XS":"XS | EU32-34","S":"S | EU36-38","M":"M | EU40-42","L":"L | EU44-46","XL":"XL | EU48-50","XXL":"XXL | EU52","1X":"1X | EU50-52","2X":"2X | EU54-56","3X":"3X | EU58-60","4X":"4X | EU62-64"},"6":{"XXS":"XXS","XS":"XS","S":"S","M":"M","L":"L","XL":"XL","XXL":"XXL","1X":"1X","2X":"2X","3X":"3X","4X":"4X"},"7":{"XXS":"XXS | NZ0-2","XS":"XS | NZ4-6","S":"S | NZ8-10","M":"M | NZ12-14","L":"L | NZ16-18","XL":"XL | NZ20-22","XXL":"XXL | NZ24","1X":"1X | NZ22-24","2X":"2X | NZ26-28","3X":"3X | NZ30-32","4X":"4X | NZ34-36"}},"11":{"1":{"XXS":"XXS | US000-00","XS":"XS | US0-2","S":"S | US4-6","M":"M | US8-10","L":"L | US12-14","XL":"XL | US16-18","XXL":"XXL | US20","1X":"1X | US18W-20W","2X":"2X | US22W-24W","3X":"3X | US26W-28W","4X":"4X | US30W-32W"},"2":{"XXS":"XXS | UK0-2","XS":"XS | UK4-6","S":"S | UK8-10","M":"M | UK12-14","L":"L | UK16-18","XL":"XL | UK20-22","XXL":"XXL | UK24","1X":"1X | UK22-24","2X":"2X | UK26-28","3X":"3X | UK30-32","4X":"4X | UK34-36"},"3":{"XXS":"XXS | CA000-00","XS":"XS | CA0-2","S":"S | CA4-6","M":"M | CA8-10","L":"L | CA12-14","XL":"XL | CA16-18","XXL":"XXL | CA20","1X":"1X | CA18W-20W","2X":"2X | CA22W-24W","3X":"3X | CA26W-28W","4X":"4X | CA30W-32W"},"4":{"XXS":"XXS | AU0-2","XS":"XS | AU4-6","S":"S | AU8-10","M":"M | AU12-14","L":"L | AU16-18","XL":"XL | AU20-22","XXL":"XXL | AU24","1X":"1X | AU22-24","2X":"2X | AU26-28","3X":"3X | AU30-32","4X":"4X | AU34-36"},"5":{"XXS":"XXS | EU28-30","XS":"XS | EU32-34","S":"S | EU36-38","M":"M | EU40-42","L":"L | EU44-46","XL":"XL | EU48-50","XXL":"XXL | EU52","1X":"1X | EU50-52","2X":"2X | EU54-56","3X":"3X | EU58-60","4X":"4X | EU62-64"},"6":{"XXS":"XXS","XS":"XS","S":"S","M":"M","L":"L","XL":"XL","XXL":"XXL","1X":"1X","2X":"2X","3X":"3X","4X":"4X"},"7":{"XXS":"XXS | NZ0-2","XS":"XS | NZ4-6","S":"S | NZ8-10","M":"M | NZ12-14","L":"L | NZ16-18","XL":"XL | NZ20-22","XXL":"XXL | NZ24","1X":"1X | NZ22-24","2X":"2X | NZ26-28","3X":"3X | NZ30-32","4X":"4X | NZ34-36"}},"12":{"1":{"000":"US 000","00":"US 00","0":"US 0","2":"US 2","4":"US 4","6":"US 6","8":"US 8","10":"US 10","12":"US 12","14":"US 14","16":"US 16","18":"US 18","20":"US 20","18W":"US 18W","20W":"US 20W","22W":"US 22W","24W":"US 24W","26W":"US 26W","28W":"US 28W","30W":"US 30W","32W":"US 32W"},"2":{"000":"UK 0","00":"UK 2","0":"UK 4","2":"UK 6","4":"UK 8","6":"UK 10","8":"UK 12","10":"UK 14","12":"UK 16","14":"UK 18","16":"UK 20","18":"UK 22","20":"UK 24","18W":"UK 22","20W":"UK 24","22W":"UK 26","24W":"UK 28","26W":"UK 30","28W":"UK 32","30W":"UK 34","32W":"UK 36"},"3":{"000":"CA 000","00":"CA 00","0":"CA 0","2":"CA 2","4":"CA 4","6":"CA 6","8":"CA 8","10":"CA 10","12":"CA 12","14":"CA 14","16":"CA 16","18":"CA 18","20":"CA 20","18W":"CA 18W","20W":"CA 20W","22W":"CA 22W","24W":"CA 24W","26W":"CA 26W","28W":"CA 28W","30W":"CA 30W","32W":"CA 32W"},"4":{"000":"AU 0","00":"AU 2","0":"AU 4","2":"AU 6","4":"AU 8","6":"AU 10","8":"AU 12","10":"AU 14","12":"AU 16","14":"AU 18","16":"AU 20","18":"AU 22","20":"AU 24","18W":"AU 22","20W":"AU 24","22W":"AU 26","24W":"AU 28","26W":"AU 30","28W":"AU 32","30W":"AU 34","32W":"AU 36"},"5":{"000":"EU 28","00":"EU 30","0":"EU 32","2":"EU 34","4":"EU 36","6":"EU 38","8":"EU 40","10":"EU 42","12":"EU 44","14":"EU 46","16":"EU 48","18":"EU 50","20":"EU 52","18W":"EU 50","20W":"EU 52","22W":"EU 54","24W":"EU 56","26W":"EU 58","28W":"EU 60","30W":"EU 62","32W":"EU 64"},"6":{"000":"XXS | US000","00":"XXS | US00","0":"XS | US0","2":"XS | US2","4":"S | US4","6":"S | US6","8":"M | US8","10":"M | US10","12":"L | US12","14":"L | US14","16":"XL | US16","18":"XL | US18","20":"XXL | US20","18W":"1X | US18W","20W":"1X | US20W","22W":"2X | US22W","24W":"2X | US24W","26W":"3X | US26W","28W":"3X | US28W","30W":"4X | US30W","32W":"4X | US32W"},"7":{"000":"NZ 0","00":"NZ 2","0":"NZ 4","2":"NZ 6","4":"NZ 8","6":"NZ 10","8":"NZ 12","10":"NZ 14","12":"NZ 16","14":"NZ 18","16":"NZ 20","18":"NZ 22","20":"NZ 24","18W":"NZ 22","20W":"NZ 24","22W":"NZ 26","24W":"NZ 28","26W":"NZ 30","28W":"NZ 32","30W":"NZ 34","32W":"NZ 36"}},"13":{"1":{"000":"US 000","00":"US 00","0":"US 0","2":"US 2","4":"US 4","6":"US 6","8":"US 8","10":"US 10","12":"US 12","14":"US 14","16":"US 16","18":"US 18","20":"US 20","18W":"US 18W","20W":"US 20W","22W":"US 22W","24W":"US 24W","26W":"US 26W","28W":"US 28W","30W":"US 30W","32W":"US 32W"},"2":{"000":"UK 0","00":"UK 2","0":"UK 4","2":"UK 6","4":"UK 8","6":"UK 10","8":"UK 12","10":"UK 14","12":"UK 16","14":"UK 18","16":"UK 20","18":"UK 22","20":"UK 24","18W":"UK 22","20W":"UK 24","22W":"UK 26","24W":"UK 28","26W":"UK 30","28W":"UK 32","30W":"UK 34","32W":"UK 36"},"3":{"000":"CA 000","00":"CA 00","0":"CA 0","2":"CA 2","4":"CA 4","6":"CA 6","8":"CA 8","10":"CA 10","12":"CA 12","14":"CA 14","16":"CA 16","18":"CA 18","20":"CA 20","18W":"CA 18W","20W":"CA 20W","22W":"CA 22W","24W":"CA 24W","26W":"CA 26W","28W":"CA 28W","30W":"CA 30W","32W":"CA 32W"},"4":{"000":"AU 0","00":"AU 2","0":"AU 4","2":"AU 6","4":"AU 8","6":"AU 10","8":"AU 12","10":"AU 14","12":"AU 16","14":"AU 18","16":"AU 20","18":"AU 22","20":"AU 24","18W":"AU 22","20W":"AU 24","22W":"AU 26","24W":"AU 28","26W":"AU 30","28W":"AU 32","30W":"AU 34","32W":"AU 36"},"5":{"000":"EU 28","00":"EU 30","0":"EU 32","2":"EU 34","4":"EU 36","6":"EU 38","8":"EU 40","10":"EU 42","12":"EU 44","14":"EU 46","16":"EU 48","18":"EU 50","20":"EU 52","18W":"EU 50","20W":"EU 52","22W":"EU 54","24W":"EU 56","26W":"EU 58","28W":"EU 60","30W":"EU 62","32W":"EU 64"},"6":{"000":"XXS | US000","00":"XXS | US00","0":"XS | US0","2":"XS | US2","4":"S | US4","6":"S | US6","8":"M | US8","10":"M | US10","12":"L | US12","14":"L | US14","16":"XL | US16","18":"XL | US18","20":"XXL | US20","18W":"1X | US18W","20W":"1X | US20W","22W":"2X | US22W","24W":"2X | US24W","26W":"3X | US26W","28W":"3X | US28W","30W":"4X | US30W","32W":"4X | US32W"},"7":{"000":"NZ 0","00":"NZ 2","0":"NZ 4","2":"NZ 6","4":"NZ 8","6":"NZ 10","8":"NZ 12","10":"NZ 14","12":"NZ 16","14":"NZ 18","16":"NZ 20","18":"NZ 22","20":"NZ 24","18W":"NZ 22","20W":"NZ 24","22W":"NZ 26","24W":"NZ 28","26W":"NZ 30","28W":"NZ 32","30W":"NZ 34","32W":"NZ 36"}},"14":{"1":{"36":"EU36 | US6","37":"EU37 | US6.5","38":"EU38 | US7","39":"EU39 | US7.5","40":"EU40 | US8.5","41":"EU41 | US9","42":"EU42 | US9.5","43":"EU43 | US10","44":"EU44 | US11","45":"EU45 | US12"},"2":{"36":"EU36 | UK4","37":"EU37 | UK4.5","38":"EU38 | UK5","39":"EU39 | UK5.5","40":"EU40 | UK6.5","41":"EU41 | UK7","42":"EU42 | UK7.5","43":"EU43 | UK8","44":"EU44 | UK8.5","45":"EU45 | UK9"},"3":{"36":"EU36 | CA6","37":"EU37 | CA6.5","38":"EU38 | CA7","39":"EU39 | CA7.5","40":"EU40 | CA8.5","41":"EU41 | CA9","42":"EU42 | CA9.5","43":"EU43 | CA10","44":"EU44 | CA11","45":"EU45 | CA12"},"4":{"36":"EU36 | AU5.5","37":"EU37 | AU6.5","38":"EU38 | AU7.5","39":"EU39 | AU8.5","40":"EU40 | AU9.5","41":"EU41 | AU10.5","42":"EU42 | AU11.5","43":"EU43 | AU12.5","44":"EU44 | AU13.5","45":"EU45 | AU14.5"},"5":{"36":"36","37":"37","38":"38","39":"39","40":"40","41":"41","42":"42","43":"43","44":"44","45":"45"},"7":{"36":"EU36 | NZ5.5","37":"EU37 | NZ6.5","38":"EU38 | NZ7.5","39":"EU39 | NZ8.5","40":"EU40 | NZ9.5","41":"EU41 | NZ10.5","42":"EU42 | NZ11.5","43":"EU43 | NZ12.5","44":"EU44 | NZ13.5","45":"EU45 | NZ14.5"}},"15":{"1":{"23":"CN23 | US6","23.5":"CN23.5 | US6.5","24":"CN24 | US7","24.5":"CN24.5 | US7.5","25":"CN25 | US8.5"},"2":{"23":"CN23 | UK4","23.5":"CN23.5 | UK4.5","24":"CN24 | UK5","24.5":"CN24.5 | UK5.5","25":"CN25 | UK6.5"},"3":{"23":"CN23 | CA6","23.5":"CN23.5 | CA6.5","24":"CN24 | CA7","24.5":"CN24.5 | CA7.5","25":"CN25 | CA8.5"},"4":{"23":"CN23 | AU5.5","23.5":"CN23.5 | AU6.5","24":"CN24 | AU7.5","24.5":"CN24.5 | AU8.5","25":"CN25 | AU9.5"},"5":{"23":"CN23 | EU36","23.5":"CN23.5 | EU37","24":"CN24 | EU38","24.5":"CN24.5 | EU39","25":"CN25 | EU40"},"7":{"23":"CN23 | NZ5.5","23.5":"CN23.5 | NZ6.5","24":"CN24 | NZ7.5","24.5":"CN24.5 | NZ8.5","25":"CN25 | NZ9.5"},"8":{"23":"23","23.5":"23.5","24":"24","24.5":"24.5","25":"25"}},"16":{"1":{"S":"S | 28-30","M":"M | 32-34","L":"L | 36-38","XL":"XL | 40-42","2XL":"2XL | 44-46","3XL":"3XL | 48-50","4XL":"4XL | 52-54","5XL":"5XL | 56-58"},"2":{"S":"S | 28-30","M":"M | 32-34","L":"L | 36-38","XL":"XL | 40-42","2XL":"2XL | 44-46","3XL":"3XL | 48-50","4XL":"4XL | 52-54","5XL":"5XL | 56-58"},"3":{"S":"S | 28-30","M":"M | 32-34","L":"L | 36-38","XL":"XL | 40-42","2XL":"2XL | 44-46","3XL":"3XL | 48-50","4XL":"4XL | 52-54","5XL":"5XL | 56-58"},"4":{"S":"S | 28-30","M":"M | 32-34","L":"L | 36-38","XL":"XL | 40-42","2XL":"2XL | 44-46","3XL":"3XL | 48-50","4XL":"4XL | 52-54","5XL":"5XL | 56-58"},"5":{"S":"S | 28-30","M":"M | 32-34","L":"L | 36-38","XL":"XL | 40-42","2XL":"2XL | 44-46","3XL":"3XL | 48-50","4XL":"4XL | 52-54","5XL":"5XL | 56-58"},"6":{"S":"S | 28-30","M":"M | 32-34","L":"L | 36-38","XL":"XL | 40-42","2XL":"2XL | 44-46","3XL":"3XL | 48-50","4XL":"4XL | 52-54","5XL":"5XL | 56-58"},"7":{"S":"S | 28-30","M":"M | 32-34","L":"L | 36-38","XL":"XL | 40-42","2XL":"2XL | 44-46","3XL":"3XL | 48-50","4XL":"4XL | 52-54","5XL":"5XL | 56-58"},"8":{"S":"S | 28-30","M":"M | 32-34","L":"L | 36-38","XL":"XL | 40-42","2XL":"2XL | 44-46","3XL":"3XL | 48-50","4XL":"4XL | 52-54","5XL":"5XL | 56-58"}},"17":{"1":{"71":"28","74":"29","76":"30","79":"31","81":"32","84":"33","86":"34","89":"35","91":"36","94":"37","97":"38","99":"39","102":"40","104":"41","107":"42","109":"43","112":"44","114":"45","117":"46","119":"47","122":"48","124":"49","127":"50","130":"51","132":"52","135":"53","137":"54","140":"55","142":"56","145":"57","147":"58"},"2":{"71":"28","74":"29","76":"30","79":"31","81":"32","84":"33","86":"34","89":"35","91":"36","94":"37","97":"38","99":"39","102":"40","104":"41","107":"42","109":"43","112":"44","114":"45","117":"46","119":"47","122":"48","124":"49","127":"50","130":"51","132":"52","135":"53","137":"54","140":"55","142":"56","145":"57","147":"58"},"3":{"71":"28","74":"29","76":"30","79":"31","81":"32","84":"33","86":"34","89":"35","91":"36","94":"37","97":"38","99":"39","102":"40","104":"41","107":"42","109":"43","112":"44","114":"45","117":"46","119":"47","122":"48","124":"49","127":"50","130":"51","132":"52","135":"53","137":"54","140":"55","142":"56","145":"57","147":"58"},"4":{"71":"28","74":"29","76":"30","79":"31","81":"32","84":"33","86":"34","89":"35","91":"36","94":"37","97":"38","99":"39","102":"40","104":"41","107":"42","109":"43","112":"44","114":"45","117":"46","119":"47","122":"48","124":"49","127":"50","130":"51","132":"52","135":"53","137":"54","140":"55","142":"56","145":"57","147":"58"},"5":{"71":"28","74":"29","76":"30","79":"31","81":"32","84":"33","86":"34","89":"35","91":"36","94":"37","97":"38","99":"39","102":"40","104":"41","107":"42","109":"43","112":"44","114":"45","117":"46","119":"47","122":"48","124":"49","127":"50","130":"51","132":"52","135":"53","137":"54","140":"55","142":"56","145":"57","147":"58"},"6":{"71":"28","74":"29","76":"30","79":"31","81":"32","84":"33","86":"34","89":"35","91":"36","94":"37","97":"38","99":"39","102":"40","104":"41","107":"42","109":"43","112":"44","114":"45","117":"46","119":"47","122":"48","124":"49","127":"50","130":"51","132":"52","135":"53","137":"54","140":"55","142":"56","145":"57","147":"58"},"7":{"71":"28","74":"29","76":"30","79":"31","81":"32","84":"33","86":"34","89":"35","91":"36","94":"37","97":"38","99":"39","102":"40","104":"41","107":"42","109":"43","112":"44","114":"45","117":"46","119":"47","122":"48","124":"49","127":"50","130":"51","132":"52","135":"53","137":"54","140":"55","142":"56","145":"57","147":"58"},"8":{"71":"28","74":"29","76":"30","79":"31","81":"32","84":"33","86":"34","89":"35","91":"36","94":"37","97":"38","99":"39","102":"40","104":"41","107":"42","109":"43","112":"44","114":"45","117":"46","119":"47","122":"48","124":"49","127":"50","130":"51","132":"52","135":"53","137":"54","140":"55","142":"56","145":"57","147":"58"}}}');

var size_list1= JSON.parse('{"5":{"5":{"8":"EU 38|FR 40","10":"EU 40|FR 42","12":"EU 42|FR 44","14":"EU 44|FR 46","16":"EU 46|FR 48","18":"EU 48|FR 50","20":"EU 50|FR 52"}},"6":{"5":{"14W":"EU 44|FR 44","16W":"EU 46|FR 46","18W":"EU 48|FR 48","20W":"EU 50|FR 50","22W":"EU 52|FR 52","24W":"EU 54|FR 54"}}}');
var size_list2= JSON.parse('{"5":{"5":{"8":"EU 38|IT 44","10":"EU 40|IT 46","12":"EU 42|IT 48","14":"EU 44|IT 50","16":"EU 46|IT 52","18":"EU 48|IT 54","20":"EU 50|IT 56"}},"6":{"5":{"14W":"EU 44|IT 48","16W":"EU 46|IT 50","18W":"EU 48|IT 52","20W":"EU 50|IT 54","22W":"EU 52|IT 56","24W":"EU 54|IT 58"}}}');

var size_arr = new Array();
var size_arr1 = new Array();
var size_arr2 = new Array();

    size_arr[0] = "2";
    size_arr[1] = "3";
    size_arr[2] = "4";
    size_arr[3] = "5";
    size_arr[4] = "6";
    size_arr[5] = "7";
    size_arr[6] = "8";
    size_arr[7] = "9";
    size_arr[8] = "10";
    size_arr[9] = "11";
    size_arr[10] = "12";
    size_arr[11] = "13";
    size_arr[12] = "14";
    size_arr[13] = "15";
    size_arr[14] = "16";
    size_arr[15] = "17";

    size_arr1[0] = "2";
    size_arr1[1] = "3";
    size_arr1[2] = "4";
    size_arr1[3] = "8";
    size_arr1[4] = "9";
    size_arr1[5] = "10";
    size_arr1[6] = "11";
    size_arr1[7] = "14";
    size_arr1[8] = "15";
    size_arr1[9] = "17";

    size_arr2[0] = "9";
    size_arr2[1] = "17";

if(getCookie("size_display")==null)
{
    setCookie("size_display",default_size_display,30);
}

function setSizeDisplay(size_display)
{
    setCookie("size_display",size_display,30);
    setAllSizeDisplay(size_display);
}

function setAllSizeDisplay(size_display)
{
    var country_id = getCookie("country_id");
    if ($(".size_display").length>0) 
    {
        $(".size_display").val(size_display);
    }
    var is_filter = $('#js_cate_attr').length;
    $(".my_shop_size").each(function(){
        //获取美金价格
        var size_val=$(this).attr('sorgp');
        var size_type=$(this).attr('stype');
        var size_saus=$(this).attr('saus');
        size_saus=(typeof size_saus =='undefined')?'':size_saus;
        if (size_in_array(size_type,size_arr))
        {
            var size_dis=$(this).html();
            if (size_in_array(size_type,size_arr1)) 
            {
                size_dis=size_val;
                size_display=(size_display=='6' || (size_display=='8' && size_type!='15'))?'1':size_display;
                $(".size_display").val(size_display);
                if(size_in_array(size_type,size_arr2) && size_saus!='')
                {
                    if(typeof size_display_b !== 'undefined')
                    {
                        var str=size_type == '9'?size_variety_list[size_display]:'';
                    }
                    else
                    {
                        var str=size_type == '9'?size_val+' | '+size_variety_list[size_display]:size_val+' | ';
                    }
                    if (size_saus.indexOf("-") != -1) 
                    {
                        var attr_us_size = size_saus.split('-');
                        var us_start=attr_us_size[0] != ''?size_list[size_type][size_display][attr_us_size[0]]:'';
                        var us_end=attr_us_size[1] != ''?size_list[size_type][size_display][attr_us_size[1]]:'';
                        str+=us_start+'-'+us_end;
                    }
                    else
                    {
                        str+= size_list[size_type][size_display][size_saus];
                    }
                    size_dis = str;
                }
                else if(size_type != '9')
                {
                    if(typeof(size_list[size_type][size_display]) != 'undefined' && typeof(size_list[size_type][size_display][size_val]) != 'undefined')
                    {
                        size_dis=size_list[size_type][size_display][size_val];
                    }
                }
            }
            else
            {
                size_display = ((size_display=='8' && size_type!='15')) ? '1' : size_display;
                if(typeof(size_list[size_type][size_display]) != 'undefined' && typeof(size_list[size_type][size_display][size_val]) != 'undefined')
                {
                    size_dis=size_list[size_type][size_display][size_val];
                }
            }
            size_dis = (size_dis == undefined || size_dis == 'undefined') ? size_val : size_dis;
            if(is_filter > 0 && size_display == 6)
            {
                if(size_dis.indexOf('|') > -1)
                {
                    var str = size_dis.split('|');
                    size_dis = Utils.trim(str[1]);
                }
            }
            $(this).html(size_dis);
            if ($(this).attr('label')) 
            {
                $(this).attr('label',size_dis);
            }
            //获取US码
            if(!size_in_array(size_type,size_arr2) && typeof(size_list[size_type]['1'][size_val]) != 'undefined')
            {
                var usSizeDisplay=size_list[size_type]['1'][size_val];
                if(usSizeDisplay.indexOf('US') > -1)
                {
                    var str = usSizeDisplay.split('US');
                    var usSize = Utils.trim(str[1]);
                    if(usSize!='') $(this).attr('saus',usSize);
                }
            }
        }
    }); 
}

function initSizeDisplay()
{
    var size_display = getCookie("size_display");
    setAllSizeDisplay(size_display);
}
//检测数组中是否存在某个字符串
function size_in_array(search,array)
{
    for(var i in array)
    {
        if(array[i]==search)
        {
            return true;
        }
    }
    return false;
}
$(document).ready(function(){
    initSizeDisplay();
});var country_id = "1783";
var default_language_show="0";
var language_show_list = JSON.parse('{"0":"English","2":"Français","5":"Deutsch","6":"Español","7":"Italiano","3":"Svenska","1":"عربي","4":"Hrvatski"}');
var language_show_codes= JSON.parse('["en","ar","fr","sv","hr","de","es","it"]');
var language_googtrans= JSON.parse('{"\/en\/en":0,"\/en\/ar":1,"\/en\/fr":2,"\/en\/sv":3,"\/en\/hr":4,"\/en\/de":5,"\/en\/es":6,"\/en\/it":7}');

var googtrans = getCookie("googtrans");
googtrans = googtrans == undefined ? '' : googtrans;
if(googtrans == '')
{
    let googtrans_code=language_show_codes[default_language_show];
    googtrans=`/en/${googtrans_code}`;
    var use_language_show = "";
    if(use_language_show == 1)
    {
        setCookie("googtrans",googtrans,30);
        setCookieL("googtrans",googtrans,30);
    }
}

function googleTranslateElementInit() 
{
    new google.translate.TranslateElement({
        pageLanguage: 'en',
        includedLanguages: 'en,ar,fr,sv,hr,de,es,it',
        autoDisplay: false,
    }, 'google_translate_element');
    var googtrans = getCookie("googtrans");
    googtrans = googtrans == undefined ? '' : googtrans;

}
function initLanguageShow()
{
    let googtrans = getCookie("googtrans");
    googtrans=googtrans == undefined ? '/en/en' : googtrans;
    let lang_key=language_googtrans[googtrans];
    lang_key=lang_key == undefined ? 0 : lang_key;
    let selected_lang=language_show_list[lang_key];
    $("#language-flag").html(`<span>${selected_lang}</span>`);
    $("#footer-language-flag").html(`${selected_lang}`);

}

function setShowLanguage(lang_key) 
{
    let lang_code=language_show_codes[lang_key];
    let selected_lang=language_show_list[lang_key];
    let selectIndex = 0;
    $("#google_translate_element option").each(function(index){
        let opLangCode=$(this).attr('value');
        if(lang_code == opLangCode)
        {
            selectIndex=index;
            return false;
        }
    });
    if(selectIndex>=0)
    {
        let transSelectObj = document.querySelector("#google_translate_element select");
        transSelectObj.selectedIndex = selectIndex;
        transSelectObj.dispatchEvent(new Event('change'));
        $("#language-flag").html(`<span>${selected_lang}</span>`);
        $("#footer-language-flag").html(`${selected_lang}`);
        let googtrans=`/en/${lang_code}`;
        setCookie("googtrans",googtrans,30);
        setCookieL("googtrans",googtrans,30);
    }
}
function setCookieL(objName,objValue,expiredDays)
{
    var str = objName + "=" + escape(objValue);
    if(expiredDays > 0)
    {
        var date = new Date();
        var ms = expiredDays*24*3600*1000;
        date.setTime(date.getTime() + ms);
        str += "; expires=" + date.toGMTString();
   }
   
   str += ";path=/";
   document.cookie = str;
}
$(document).ready(function(){
    initLanguageShow();
});