(function($) {                                          // Compliant with jquery.noConflict()
$.fn.clearDefault = function(o) {
    return this.each(function() {                           // Returns the element collection. Chainable.

		var default_value = $(this).val();
		var password = ($(this).is(':password')) ? true : false;
		$(this).focus(function(){
			if ($(this).val() == default_value) {
				if (!password)
					$(this).val("");
				else
					$(this).addClass("focused");
			}
		});
		$(this).blur(function(){
			if ($(this).val() == "") {
				if (!password)
					$(this).val(default_value);
				else
					$(this).removeClass("focused");
			}					
		});
    });
};
})(jQuery);
