function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
} 

if (hasPath("galleries"))
YD.addClass(document.body, "galleries");


function AddReferralCode() {
var links = this.getElementsByTagName("A");
if (links && (links.length != 0)) {
var smugLink = links.item(0);
smugLink.href = "http://www.smugmug.com/?referrer=rHRPz9GLklwnk";
}
}
YE.onAvailable('footer', AddReferralCode);

function writeEMail(pLinkText, pSubject)
{
 var v2="ZSW4IPXNEBFGD2UEB46Q2PJ5VPIAPKM2";
 var v7=unescape("3%3D1%5B%09%23%2C+3%27*%22%25@%25--@Y6@1%3A%5D/%7E*.%3De%2CG");
 var v5=v2.length;var v1="";
 for(var v4=0;v4<v5;v4++)
 {
  v1+=String.fromCharCode(v2.charCodeAt(v4)^v7.charCodeAt(v4));
 }
 document.write('<a href="javascript:void(0)" onclick="window.location=\'mail\u0074o\u003a'+v1+'?subject='+escape(pSubject)+'\'">'+pLinkText+'</a>');
}
