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));})
			.focus(function(){togglePlaceholderText($(this));})
			.focusout(function(){togglePlaceholderText($(this));})
			//.blur(function(){togglePlaceholderText($(this));})
			.closest('form').submit(function(){$(this).find('input[placeholder]').each(function(){togglePlaceholderText($(this));})});
		$('textarea[placeholder]')
			.each(function(){togglePlaceholderText($(this));})
			.focus(function(){togglePlaceholderText($(this));})
			.focusout(function(){togglePlaceholderText($(this));})
			.closest('form').submit(function(){$(this).find('textarea[placeholder]').each(function(){togglePlaceholderText($(this));})});
	}
	//alert pour montrer que cela fonctionne
	/*$('form').submit(function(){
		alert($(this).serialize());
	});*/
});
