/**
 * jQuery ClickClear plugin dynamicly removes and resets inputs default values.
 * @author Patryk Kozłowski - Toxic Software, patryk@toxic-software.pl
 * 
 * usage: $('your inputs').clickclear();
 */

(function($){
	$.fn.clickclear = function() {
		return this.each(function() {
			var $this = $(this);
			var defaultValue = $this.val();
			
			$this
				.focus(function() { if($this.val() == defaultValue) $this.val(''); })
				.blur(function() { if($this.val() == '') $this.val(defaultValue); });
		});
	}
})(jQuery);
