$(document).ready(function(){
	
	$("#s").focus(function()
	{
		if ($(this).val()=="Rechercher..")
		{
			$(this).val("");
		}
	});
	$("#s").blur(function()
	{
		if ($(this).val()==0)
		{
			$(this).val("Rechercher..");
		}
	});
	
	
	$("#comment").focus(function()
	{
		if ($(this).val()=="Votre message...")
		{
			$(this).val("");
		}
	});
	$("#comment").blur(function()
	{
		if ($(this).val()==0)
		{
			$(this).val("Votre message...");
		}
	});
	
	$("#author").focus(function()
	{
		if ($(this).val()=="Votre nom")
		{
			$(this).val("");
		}
	});
	$("#author").blur(function()
	{
		if ($(this).val()==0)
		{
			$(this).val("Votre nom");
		}
	});
	
	$("#email").focus(function()
	{
		if ($(this).val()=="Votre email")
		{
			$(this).val("");
		}
	});
	$("#email").blur(function()
	{
		if ($(this).val()==0)
		{
			$(this).val("Votre email");
		}
	});
	
	
	
	
	// VALIDATION DE FORMULAIRE
	
	
	// validate signup form on keyup and submit
	jQuery.validator.addMethod("notEqualTo",
                             function(value, element, param) {
                                  return this.optional(element) || value != param;
                             }, "This has to be different...");

	$("#commentform").validate({
		rules: {
				email: {
				required: true,
				email: true
				},
			comment:{ required:true,notEqualTo:'Votre message...' },
			author:{ required:true,notEqualTo:'Votre nom' }		
	
			
		},
		messages: {
				email:{
				required:"Votre Email ?",
				email:"Email incorrect"},
				comment: "Rien &agrave; dire ?",
				author:"Votre nom ?"}
	});
	


});