function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

if (hasPath("galleries"))
YD.addClass(document.body, "galleries");

<!-- Hide Categories -->
function delCategory() {
 re = /\/(Portraits%20&%20Images%20A-H|Portraits%20&%20Images%20I-P|Portraits%20&%20Images%20Q-Z|Other)$/;

  var oList = YD.getElementsByClassName('miniBox', 'div', this);

  for (i = 0; i < oList.length; i++) {
    if (re.test(oList[i].getElementsByTagName('a')[0].href))
      oList[i].parentNode.removeChild(oList[i]);
  }
}
YE.onContentReady('categoriesBox', delCategory);
     <!-- End Hide Categories -->

 