
cash.fn.extend({

  addClass: function(className){ // TODO: tear out into module for IE9
    this.each(function(v){
      if(v.classList) {
        v.classList.add(className);
      } else {
        v.className += " " + className;
      }
    });
    return this;
  },

  attr: function(attr,value) {
    if(!value){
      return this[0].getAttribute(attr);
    } else {
      this.each(function(v){
        v.setAttribute(attr,value);
      });
      return this;
    }
  },

  hasClass: function(className){ // TODO: tear out into module for IE9
    if(this[0].classList) {
      return this[0].classList.contains(className);
    } else {
      return this[0].className.indexOf(className) !== -1;
    }
  },

  prop: function(prop){
    return this[0][prop];
  },

  removeAttr: function(attr){
    this.each(function(v){
      v.removeAttribute(attr);
    });
    return this;
  },

  removeClass: function(className){ // TODO: tear out into module for IE9
    this.each(function(v){
      if(v.classList) {
        v.classList.remove(className);
      } else {
        v.className = v.className.replace(className,"");
      }
    });
    return this;
  }

});

@@ -1051,32 +1051,101 @@
 %0A      %7D else %7B%0A
+        className = new RegExp(%22((%5C%5Cb)%22+className+%22((?!%5C%5CW)%7C%5C%5Cs))%22);%0A
         v.classN
@@ -1180,16 +1180,46 @@
 assName,
+%22%22).replace(/(%5E%5Cs+)%7C(%5Cs+$)/g, 
 %22%22);%0A   

make .removeClass() more robust for IE9