function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

if (hasPath("galleries"))
YD.addClass(document.body, "galleries");

function ModifyText ()
{
 if (YD.hasClass(document.body, "gallery_7877139"))
 {
   var objElement = YD.get("comment")
   if (objElement != null)
   {
     var str = new String(objElement.innerHTML);
     str = str.replace(/\gallery/gi, 'Guestbook');
     objElement.innerHTML = str;
   }
 }
}

YE.onAvailable("comment", ModifyText);

function AddReferralCode() {
var links = this.getElementsByTagName("A");
if (links && (links.length != 0)) {
var smugLink = links.item(0);
smugLink.href = "http://www.smugmug.com/?referrer=0qe56B469lbvz";
}
}
YE.onAvailable('footer', AddReferralCode);

rightClickWarning = "All photos are property of Robinson Greig Photography. All rights reserved. Unauthorized use is prohibited.";
