// execute your scripts when DOM is ready. this is a good habit
$(function() {		
	$("a.lienNote").click( function(e) {
		e.preventDefault(); // annule l'effet du lien

		var parent = $(this).parents("p.note");
			$.ajax({
				type: "POST",
				url: "php/note.php",
				data: "id="+$(this).attr("rel"),
				beforeSend: function() {
					
					},
				success: function(msg){
					if(msg=="merci !")
					{
						parent.html(msg);
					}
					else
					{
						parent.html(msg);	
					}
					$(this).delay(3000,function(){
							parent.slideUp(300,function() {
								parent.remove();
							});
						});
				}
			});
	});

});