//Google Anaytics

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

try {
var pageTracker = _gat._getTracker("UA-8427043-1");
pageTracker._trackPageview();
} catch(err) {}


//


function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}
if (hasPath("galleries"))
YD.addClass(document.body, "galleries");



// fix the pesky pipes

YE.onAvailable("cobrand_footer", function() {this.innerHTML = this.innerHTML.replace(/\||what are feeds\?/gi, '');});

function AddReferralCode()  {
  var links = this.getElementsByTagName("A");
  if (links && (links.length != 0)) {
    var smugLink = links.item(0);
    smugLink.href = "http://www.smugmug.com/?referrer=hX4hM5k69ix6g";
  }
}
YE.onAvailable('footer', AddReferralCode);



