code: function(element, className) {
          var re = new RegExp('(\\s|^)'+className+'(\\s|$)');
          if (re.test(element.className)) return;
          element.className += ' ' + className;
        }
docs: **Adding/removing classnames from elements**