function hasPath(sPath)
{
  re = new RegExp("\/" + sPath + "(\/|$)"); 
  return re.test(window.location)
}


// Fix the Pesky Pipes

YE.onAvailable("cobrand_footer", function() {this.innerHTML = this.innerHTML.replace(/\||what are feeds\?/gi, '');});

// Right Click Message

rightClickWarning = "All photos are © Terry Turner Photography. All rights reserved. Unauthorized use is prohibited."

// Popular Box Title
YE.onContentReady('popularTitle', function() {this.innerHTML = 'Terry Turner Photography - Popular Photos'});

// Keyword Box Title
YE.onContentReady('keywordsTitle', function() {this.innerHTML = 'Browse by Keywords'});

// Search Box Title
YE.onAvailable('headerBoxTop2', function() {this.innerHTML = 'Search Terry Turner Photography'});

// Map Box Title 
YE.onContentReady('mapTitle', function() {this.innerHTML = 'Mapped Photos'});

// Date Box Title
YE.onContentReady('datesTitle', function() {this.innerHTML = 'Browse by Date'});



// Secure Email

function norobotmail(aUser, aDomain) { document.location = "mailto:" + aUser + "@" + aDomain; }


// Referral Code

function AddReferralCode()  {
   var footerDiv = YD.get("footer");
   if (footerDiv)  {
     var links = footerDiv.getElementsByTagName("A");
     if (links && (links.length != 0)) {
       var smugLink = links.item(0);
       smugLink.href = "http://www.smugmug.com/?referrer=8yeYtkWJiGr5Q";
     }
  }
}
YE.onAvailable('footer', AddReferralCode);