function removeMiniBoxes(arr) {
  oBoxes = YD.getElementsByClassName('miniBox', 'div', YD.get('categoriesBox'));

  for (i=0; i < oBoxes.length; i++) {
    oLinks = YD.getElementsByClassName('nav', 'a', oBoxes[i]);

    if (arr.exists(oLinks[0].innerHTML)) continue;

    oBoxes[i].parentNode.removeChild(oBoxes[i]);
  }
}

function hasPath(sPath) {
  var re = new RegExp("\/" + sPath + "(\/|$)");
  return re.test(window.location)
}

Array.prototype.exists = function (x) {
    for (var i = 0; i < this.length; i++) {
        if (this[i] == x) return true;
    }
    return false;
}