;(function($) {

	$.inputclear = {
	}

	$.fn.extend({
	
		inputclear: function(options) {
		
			var options = $.extend($.inputclear, options);
		
		
	        return this.each(function() {
				var obj = $(this);
				
				if (obj.is('input:text, textarea')) {
					obj.focus(function() {
						if (!$(this).hasClass('activated')) {
							$(this).addClass('activated');
							$(this).data("initVal", $(this).val());
							$(this).val('');	
						}		
					});
					obj.blur(function() {
						if (jQuery.trim($(this).val()) == '') {
							$(this).val($(this).data('initVal'));
							$(this).removeClass('activated');
						}
					})
				}
	        }); // end return
		} // end function
    }); // end extend
})(jQuery);
