Skip to content

Instantly share code, notes, and snippets.

@conraddecker
Created March 21, 2012 23:12
Show Gist options
  • Save conraddecker/2154025 to your computer and use it in GitHub Desktop.
Save conraddecker/2154025 to your computer and use it in GitHub Desktop.
var countryCode = "bo";
var subdomains = {
es: [ "bo", "mx", "es" ],
zh: [ "cn", "tw" ],
fr: [ "be", "fr", "ht" ],
de: [ "de", "at" ],
ru: [ "ru", "kz" ]
}
$.each(subdomains, function(idx, val){
if( $.inArray( countryCode, val ) != -1){
redirect = "http://"+idx+".coolsculpting.com";
return false;
}
});
document.location.href=redirect;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment