function hasPath(sPath) 
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

YE.onAvailable('categoryTitle', function() {this.innerHTML = 'Select a location'});

function AddReferralCode() {
var links = this.getElementsByTagName("A");
if (links && (links.length != 0)) {
var smugLink = links.item(0);
smugLink.href = "http://www.smugmug.com/?referrer=NsbZYBlC7Lz2E";
}
}
YE.onAvailable('footer', AddReferralCode);

function redirectPath() { 
  re = /((www.)?clubflys.smugmug.com)/; 
  tmp = window.location.href; 
  if (re.test(tmp)) { 
    tmp = tmp.replace(re, 'prints.clubflys.com'); 
    window.location.href = tmp; 
  } 
}
redirectPath();  

SM.SmugMug.config.size = 'small';
