// change the link on the SmugMug Logo

YE.onAvailable('homelink', function(e) {
this.href = "http://jeremyg.smugmug.com/";
this.firstChild.alt = "Jeremy Greenidge Photography";
this.firstChild.title = "Jeremy Greenidge Photography";
});

// removes the pipes characters in the toolbar header

YE.onAvailable('toolbar', function(e) {
this.innerHTML = this.innerHTML.replace(new RegExp(/\|/g),"");
});

 function swapBoxes() {
     bodyClass = document.getElementsByTagName("body")[0].className;
     if (bodyClass.indexOf("category") != -1)
     {
        box1 = document.getElementById("subcategoriesBox");
        box2 = document.getElementById("galleriesBox");

        if (box1 && box2)
        {
           swap = box1.innerHTML;
           box1.innerHTML = box2.innerHTML;
           box2.innerHTML = swap;
        }
     }
}