$.fn.tagName = function() {
    return this.get(0).tagName.toLowerCase();
};
String.prototype.capitalize = function(){
   return this.toLowerCase().replace( /(^|\s)([a-z])/g , function(m,p1,p2){ return p1+p2.toUpperCase(); } );
};

