jQuery.fn.extend({
	hasEvent:function(ev)
	{
	 if($(this).data('events') != 'undefined' && $(this).data('events') != null)
	 {
		 if($(this).data('events')[ev] != 'undefined'){return true;}
		 return false;
	 }
	 return false;
	}
});

var defaultInput = {
	init : function(selector)
	{
		$(selector).each(function()
		{
			if(!$(this).hasEvent('focus'))
			{
				var defaultText = $(this).val();
				$(this).focus(function()
				{
					if($(this).val() == defaultText)
						$(this).val("");
				});
				$(this).blur(function()
				{
					if($.trim($(this).val()) == "")
						$(this).val(defaultText);
				});
			}
			//else
			//	$.trace("already has event");
			
		});
	}
};

