G_fichier_action='actions.php';

$('document').ready(function()
{
	if ($("#pgNewsletter").length==1)
	{
		$("#email").focus();
		
		frmSubmit($('#frm_inscription'), G_fichier_action, 'newsletter');
	}
	else
	if ($("#pgJobsSoumettre").length==1)
	{
		$("#nom").focus();
		
		inputFocusBlur($('#ddn_j, #ddn_m, #ddn_a'));
		
		frmSubmit($('#frm_soumettre'), G_fichier_action, 'soumettre');
	}
	else
	if ($("#pgContact").length==1)
	{
		$("#stores").focus();
		
		frmSubmit($('#contactForm'), G_fichier_action, 'contact');
	}
});


function affiche_erreur(input)
{
	var inp=$('#'+input);
	
	
	$(inp).removeClass().addClass('erreur');
		
	$('label', inp.parent('p')).removeClass().addClass('red');
}

function inputFocusBlur(inputs)
{//v1.5
	
	inputs.each(function()
	{
		var txt= $(this).val();
		
		$(this)
		.focus(function()
		{
			if ($(this).val().toLowerCase()==txt.toLowerCase())
				$(this).val('');
		})
		.blur(function()
		{
			if ($(this).val()=='')
				$(this).val(txt);
		})
	})
}

function inputFocusBlur2(input)
{//v1.1
	var txt= input.val();
	
	input
	.focus(function()
	{
		if ($(this).val().toLowerCase()==txt.toLowerCase())
			$(this).val('');
	})
	.blur(function()
	{
		if ($(this).val()=='')
			$(this).val(txt);
	})
}
