$(document).ready(
	function()	{	
	
		/* Comportement Rollover avec class="rollover" */
		attachRollOverEvent("img.rollover");
		
		/* Comportement imagebox */
		$.ImageBox.init(
			{
				/*loaderSRC: 'js/ajax-loader.gif',*/
				closeHTML: '<img src="images/standard/interface/close.gif" height="15" width="15" />'
			}
		);	
		
		
		/* Chargements page TRACABILITE */
		
		$("#tracabiliteLinks a").bind("click",function(event){
			newurl=$(this).attr("href");
			$("#tracabiliteImage").fadeOut("slow",function(event){
				$("#tracabiliteImage").attr("src",newurl);
				$("#tracabiliteImage").fadeIn("slow");
			});
			event.preventDefault();
		});	
		
		
		/* Chargements page QUALITE */
		
		$("#qualite-cadran a").bind("click",function(event){
			newurl=$(this).attr("href");
			$("div.cadran2").fadeOut("slow",function(event){
				//$("#tracabiliteImage").attr("src",newurl);
				$("div.cadran2").load(newurl,function(event){
					$("div.cadran2").fadeIn("slow");
				});
			});
			event.preventDefault();
		});
		
		
		
		
	});

/* Comportement Rollover avec class="rollover" */
attachRollOverEvent = function(imageId){
	$(imageId).mouseover( function(){ $(this).attr("src", $(this).attr("src").replace('.','_roll.')) } );
	$(imageId).mouseout( function(){ $(this).attr("src", $(this).attr("src").replace('_roll','')) } );
}
