// redirect for all incoming smugmug traffic
function redirectPath() { 
  re = /((www.)?james-hill-photography.smugmug.com)/; 
  tmp = window.location.href; 
  if (re.test(tmp)) { 
    tmp = tmp.replace(re, 'www.jmhphoto.com'); 
    window.location.href = tmp; 
  } 
}
redirectPath();  


// change the link on the SmugMug Logo
 
YE.onAvailable('homelink', function(e) {
    this.href = "http://jmhphoto.com/";
    this.firstChild.alt = "James Hill Photography";
    this.firstChild.title = "James Hill Photography";
});
 
// removes the pipes characters in the toolbar header
 
YE.onAvailable('toolbar', function(e) {
this.innerHTML = this.innerHTML.replace(new RegExp(/\|/g),"");
});
 
// ****************************************************************
// MarkSpecialHomepage
//
// If we're on the homepage and there's a single piece of pathname after 
// the domain, then add that as a classname to the body so we can
// have automatic versions of the homepage.
//
// Example:
// http://jfriend.smugmug.com/galleries
//    Adds "homepage_galleries" class to the body tag
//
// http://jfriend.smugmug.com/find
//    Adds "homepage_find" class to the body tag
// 
// http://jfriend.smugmug.com/featured
//    Adds "homepage_featured" class to the body tag
// ****************************************************************
function MarkSpecialHomepage()
{
    if (YD.hasClass(document.body, "homepage"))
    {
        var re = new RegExp(/^\/([a-zA-Z][^\/ ]*)[\/]?$/)
        var matches = re.exec(window.location.pathname);
        if (matches && (matches.length > 1))
        {
            YD.addClass(document.body, "homepage_" + matches[1]);
        }
        else
        {
            YD.addClass(document.body, "homepage_only");
        }
    }
}
// End MarkSpecial Homepage
//*****************************************************************

