function affiche_projet(id,i,nombre_total_images) { // affiche le contenu d'un projet
	
	$("#blocks").fadeOut(300, function () {
		$("#retour").fadeIn(300, function () {});
		$("#cache_nav").fadeIn(300, function () {});
	});
	
	$.ajax({ 
	url: "page.php?id="+id, // une page
	cache: false, //pas de cache
		success: function(html){ //si la fonction se charge bien
		
			$("#results").fadeIn(300, function () {
				$("#results").empty(); // on vide avt de remplir
				$("#results").append(html); // on rempli #results
				page = "projet";
				image(id,i,nombre_total_images); //on lance la fonction image
				$(".titre_projet").sifr(); 			
				
			});
			
			$("#retour").click(function (){//fonction au clic de "#retour"
				retour_accueil(); // on retourne a l'accueil
			});
		}
	});
}

function affiche_projet_viapermalink(id,i,nombre_total_images) // affiche le contenu d'un projet lorsqu'il est declaré en permalien
{	
	$("#retour").show(); // le bouton de retour apparait			  
	$("#cache_nav").show();	 // on desactive la nav avec un cache
	
	$("#nav").animate({ 
		opacity: 0.1				
	}, 0 );
	
	$.ajax({ 
	url: "page.php?id="+id, // une page
	cache: false, //pas de cache
		success: function(html){ //si la fonction se charge bien
		
			$("#results").fadeIn(0, function () {
				$("#results").empty(); // on vide avt de remplir
				$("#results").append(html); // on rempli #results
				page = "projet";
				image(id,i,nombre_total_images); //on lance la fonction image
				$(".titre_projet").sifr(); //applique sifr au titre
			});
			
			$("#retour").click(function (){//fonction au clic de "#retour"
				retour_accueil_permalink();
			});
		}
	});
}
