code: function removeClass(element, value) {
          var class2remove = value || "",
              cur = element.nodeType === 1 && (element.className ? (" " + element.className + " ").replace(rclass, " ") : "");
          if (cur) {
              while (cur.indexOf(" " + class2remove + " ") >= 0) {
                  cur = cur.replace(" " + class2remove + " ", " ");
              }
              element.className = value ? trim(cur) : "";
          }
      }
docs: removeClass function inspired from jQuery.removeClass