var countryReg,countryCode,areaCode,countryName,rest_countries=[];function popupRestGeo(e){var r="."+e.toLowerCase()+"_rest",t=function(){jQuery(".restricted_country").fadeOut("slow"),jQuery(".form_wrapper").fadeIn("slow")};jQuery(".inner div").hide(),jQuery(r).length?jQuery(r).show():jQuery(".new_rest_countries").show(),jQuery(".pnlRestrButtons").show(),jQuery(".rest").html(e),jQuery(".restricted_country").fadeIn("slow"),jQuery(".restricted_country").click(function(){t()}),jQuery("#btnCancel").click(function(){t()})}("mtm"==brand||"generic"==brand)&&(rest_countries=["AF","AI","AT","BE","BG","CD","CY","CZ","DE","DK","DZ","EE","ES","FI","FR","GB","GR","HR","HU","IE","IL","IQ","IR","KP","LB","LR","LT","LU","LV","LY","MS","MT","NE","NG","NL","NZ","PL","PS","PT","RO","SD","SE","SI","SK","SO","SY","UM","US","VI","YE","IS","LI","NO","AG","BD","KH","MN","NI"]),"mtm-15"!=brand&&"mtm-6"!=brand&&"mtm-7"!=brand||(rest_countries=["AF","DZ","AI","CG","IR","IQ","IL","LB","LR","LY","MS","MM","NE","NG","KR","PO","PK","SO","SD","SY","US","UN","VI"]),jQuery(document).ready(function(e){setTimeout(function(){e.getJSON("/geoip",function(r){r&&0!=r.length&&(countryCode=r.iso2,countryName=r.name,areaCode=r.phone_prefix,rest_countries.indexOf(countryCode)>-1?popupRestGeo(countryCode):(e(".form_elem_countryCode").val(areaCode),e(".form_elem_countryId").val(countryCode)))})},2500)});