jQuery(function($){
	var isPlaceholderSupported = function () { 
		var o = document.createElement('input'); 
		return "placeholder" in o; 
	};
	if (!isPlaceholderSupported()) {
		var togglePlaceholderText = function (el) {	
			var color = '#999';
			var v = $.trim(el.val());
			var p = el.attr('placeholder'); 
			if (v == '') { 
				el.val(p); 
				el.css({'color':color}); 
			} else if (v == p) {
				el.val(''); 
				el.css({'color':''});
			} 
		};
		$('input[placeholder]')
			.each(function(){togglePlaceholderText($(this));})
			.click(function(){togglePlaceholderText($(this));})
			.blur(function(){togglePlaceholderText($(this));})
			.closest('form').submit(function(){$(this).find('input[placeholder]').each(function(){togglePlaceholderText($(this));})});
	}
});

