$(document).ready(
				function()		{

					//Appel des realisations
					$(".linkreal").click( function() {
						var reqdata = $(this).attr("title");
						$.ajax({
							data: "&jquery=yes&idrequest="+reqdata,
							url: "_ress/accueil/realisations/realisations.php",
							cache:false,
							success:function(html){
								afficher(html);
							},
							error:function(XMLHttpRequest,textStatus, errorThrown){
								alert("(085) Erreur de chargement...");
							}
						})
						return false;				
					})

					//Appel des news
					$(".linknews").click( function() {
						var reqdata = $(this).attr("title");
						$.ajax({
							data: "&jquery=yes&idrequest="+reqdata,
							url: "_ress/accueil/news/news.php",
							cache:false,
							success:function(html){
								affichera(html);
							},
							error:function(XMLHttpRequest,textStatus, errorThrown){
								alert("(086) Erreur de chargement...");
							}
						})
						return false;				
					})					
					
					
					//Fonctions pour overlay
					$("#mentionslegales").click(function () { loaddataaa("_modules/mentions-legales/index.php"); return false; })
					$("#plandusite").click(function () { loaddataaa("_modules/plan-du-site/index.php"); return false; })
					
					//Closeoverlay
					$("#closeoverlay, #overlay").click(function () {		closeoverlay();		return false;		})
				});
				
				
				//Affichage du contenu des realisations
				function afficher(data) {
					$("#blocrealisationsaccueil").fadeOut(400, function() {  
							$("#blocrealisationsaccueil").empty();
							$("#blocrealisationsaccueil").append(data);
							$("#blocrealisationsaccueil").fadeIn(500);
					});
				}				
	
	
				//Affichage du contenu des news
				function affichera(data) {
					$("#blocnewsaccueil").fadeOut(400, function() {  
							$("#blocnewsaccueil").empty();
							$("#blocnewsaccueil").append(data);
							$("#blocnewsaccueil").fadeIn(500);
					});
				}	
				
				
				//FONCTION LOADOVERLAY
				//FONCTION LOADDATA
				function loaddataaa(url) {
						$.ajax({
							data: "&jquery=yes",
							url: url,
							cache:false,
							success:function(html){
								loadoverlay(html);
							},
							error:function(XMLHttpRequest,textStatus, errorThrown){
								alert("(003) Erreur de chargement...");
							}
						})
						return false;				
				}	
				
				function loadoverlay(data) {
						var height = $(window).height();
						$("#overlay").fadeTo("slow", 0.8, function(){  
							$("body").css("overflow","hidden");
							$("#overlay").animate({ 
								width: "100%",
								height: "1217px"
							}, {duration:120} );
								$("#overc, #overcc").css("height",(height - 140) + "px");
								$("#containeroverlay").animate({
									marginLeft: ( ($(window).width()/2) - 300 ) +"px"
								}, {duration:120} );
								$("#containeroverlay").fadeIn("fast", function() { $("#overcc").fadeIn("fast", function() {loaddataaaa(data);} ); } );
								
								$("#closeoverlay").fadeIn("fast");
						});
				}

				//FONCTION LOADDATAAAA
				function loaddataaaa(data) {
					$("#overcc").empty();
					$("#overcc").append(data);
				}	
				
				//FONCTION CLOSEOVERLAY
				function closeoverlay() {
						$("#overcc").fadeOut("fast", function() { $("#containeroverlay").fadeOut("fast", function() {$("#overlay").fadeOut("slow", function(){ $("body").css("overflow","auto") ;});}  );} );
						$("#overcc").empty();
				}				
				