function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

if (hasPath("galleries"))
YD.addClass(document.body, "galleries");

/* This section will change the Guestbook to read correctly */

function ModifyText ()
{
  if (YD.hasClass(document.body, "gallery_8538761"))
  {
    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);

/* Comments to Catagories */

function addCategoryDescription() {
 var categoryDescription = {
     "Family" : "Combination of many family galleries",
     "Travel" : "Pictures from several family trips",
     "Other" : "Other galleries including iPhone uploads",
     "Holidays" : "Family holidays"
 };

  if ((YD.hasClass(document.body, "category")) && (!YD.hasClass(document.body, "subcategory"))) {

    re = /category_(\S+)/i;
    re.exec(document.body.className);

    breadCrumb = YD.get("breadcrumb");
    if (breadCrumb && categoryDescription[RegExp.$1]) {
      divTag = document.createElement("div");
      divTag.className = "categoryDescription";
      divTag.appendChild(document.createTextNode(categoryDescription[RegExp.$1]));
      breadCrumb.parentNode.insertBefore(divTag, breadCrumb.nextSibling);
    }
  }
  if (YD.hasClass(document.body, "homepage")) {
    re = /\>([\w\-]+)<\/a>/i;

    divTag = YD.get("categoriesBox");
   if (divTag) {
      divTags = YD.getElementsByClassName("albumTitle", "p", divTag);

      for (i=0; i<divTags.length; i++) {
       re.exec(divTags[i].innerHTML);
        if (categoryDescription[RegExp.$1] != undefined) {
          pTag = document.createElement("p");
          pTag.className = "categoryDescription";
          pTag.appendChild(document.createTextNode(categoryDescription[RegExp.$1]));
          divTags[i].parentNode.insertBefore(pTag, divTags[i].nextSibling);
        }
      }
    }
  }
}
YE.addListener(window, "load", addCategoryDescription); 

<!--  Get rid of those pesky pipes -->

YE.onAvailable("cobrand_footer", function() {this.innerHTML = this.innerHTML.replace(/\||what are feeds\?/gi, 

'<font color=#9e793e>&#183</font>');});




