/*
function mainmenu(){
}
$(" #nav ul ").css({display: "none"}); // Opera Fix
$(" #nav li").hover(function(){
		$(this).find('ul:first:hidden').css({visibility: "visible",display: "none"}).show(400);
		},function(){
		$(this).find('ul:first').css({visibility: "hidden"});
		});
}

 $(document).ready(function(){
	mainmenu();
});
*/
function rappel(exactScriptUrl) {
	if ( jQuery('#telRap').val().match(/[\d+][\s\.-]?/) ) {
    var tel = jQuery('#telRap').val();
    jQuery.post(exactScriptUrl,
        {rappel: "" + tel},
        function(r){
            if (r['code'] == 1) {
                alert("Votre demande a bien été enregistrée.\n Vous serez bientôt contacté par Abris-et-Jardin !");
                tel = 'n° de téléphone'; 
            }
            else {
                 alert("Une erreur s'est produite.");
            }
                
        },
        "json");  
	}
	else {
		alert("Vous devez entrer un numéro de téléphone valide");
	}
}
