function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

function redirectPath() { 
  re = /((www.)?bitartifact.smugmug.com)/; 
  tmp = window.location.href; 
  if (re.test(tmp)) { 
    tmp = tmp.replace(re, 'www.bitartifact.com'); 
    window.location.href = tmp; 
  } 
}
redirectPath(); 