code: function(searchClass, node) {
      var matches = [];
      node = node || document;
  
      if (node.getElementsByClassName) {
        matches = node.getElementsByClassName(searchClass);
      } else {
        var i, l, 
            els = node.getElementsByTagName("*"),
            pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
  
        for (i = 0, l = els.length; i < l; i++) {
          if (pattern.test(els[i].className)) {
            matches.push(els[i]);
          }
        }
      }
      return matches.length > 1 ? matches : matches[0];
    }
docs: **getElementsByClassName** Having to rely on `getElementsByTagName` is pretty inflexible internally, so a modified version of Dustin Diaz's `getElementsByClassName` has been included. This version cleans things up and prefers the native DOM method if it's available.