/*
* Input field labelizer.
* Makes form elements' value attribute act as a label 
* Ronnie Miller (me@ronniemlr.com)
* http://ronniemlr.com/
*/
(function($) {
$.fn.labelize = function() {
	return this.each(function() {
		elements = $(this).is('form') ? $(this).find('input, textarea') : $(this);
		elements.each(function() {
			$(this)
				.data('default', $(this).val())
				.focus(function() { if($(this).val() == $(this).data('default')) $(this).val(''); })
				.blur(function()  { if($(this).val() == '') $(this).val($(this).data('default')); });
		});
	});
}
})(jQuery);
