$(document).ready(function() {
	$(".nav").find("li[class!=active]").hover(function() {
		$("span.flower"+$(this).attr("id")).stop(true,true).animate({top: "-27px"},200);
	}, function(){
		$("span.flower"+$(this).attr("id")).stop(true,false).animate({top: 0},500);
	});
});


function Login() {
	var Login = $("input[name=Login]").val();
	var Password = $("input[name=Password]").val();
	if(Login=="") {
		$("input[name=Login]").blink();
	} else if(Password=="") {
		$("input[name=Password]").blink();
	} else {
		$.ajax({
			type: "POST",
			url: SITE_PATH+"content/ajax/Ajax_Inscription.php",
			data: "Action=Login&Login="+Login+"&Password="+Password,
			success: function(data) {
				if(data==1) {
					document.location = "restaurant-groupe-terrasse.html";
				} else alert("Votre identifiant ou votre mot de passe est incorrect. Veuillez réessayer...");
			}
		});
	}
}

function Logout() {
	$.ajax({
		type: "POST",
		url: SITE_PATH+"content/ajax/Ajax_Inscription.php",
		data: "Action=Logout",
		success: function(data) {
			document.location = "index.html";
		}
	});
}
