
var isPageProjet;

$(document).ready(
 	function(){
 		isPageProjet = (projetId != '0');
 		bindDetailAnnonce();
 	}
);

bindDetailAnnonce = function() {

	if (isPageProjet == true) {
 		$("a.linkDetail").click(
 			function() {
 				$.post('/framework/atrealis.functions.php', 
					{ fonction: "detailProjet", id: $(this).attr("rel") },
					function(html) {
						$("#contentColB").empty(); 
						$("#contentColB").append(html);
					}
				);
 				return false;
 			}
 		);
 	}
 	
}

afficheAnnonce = function(id, apercu) {

	$.post('/framework/atrealis.functions.php', 
		{ fonction: "apercuProjet", id: id },
		function(html) {
			$("#" + apercu).empty(); 
			$("#" + apercu).append(html); 
			bindDetailAnnonce();
			$("a.linkDetail").click();
		}
	); 
	
}
