$(document).ready(function(){

  /* Remplacement titre flash */
  $.sifrSettings({path:'font/'});
  $(".frutiger").sifr({font:'frutiger'});
  $(".frutigerb").sifr({font:'frutigerb'});

	/* Comportement Rollover avec class="rollover" */
	$("img.rollover").each(function(){
		attachRollOverEvent(this);
	});

	/* Remplacement image actif avec class="actif" */
	$("img.actif").each( function(){
		attachActif(this);
	});

	/* Fancybox Propriétés */
  $("a.fancy").fancybox({ 'overlayShow': true, 'overlayOpacity': 0.70, 'hideOnContentClick': true });
  $("a#fenetre").fancybox({ 'overlayShow': true, 'zoomSpeedOut':0, 'zoomSpeedIn':0, 'overlayOpacity': 0.70, 'hideOnContentClick': true });



	$(".lebTip").hover(
	function(e){
		offset=$(this).offset();
		$("body").append('<div id="lebTipContent"></div>');
		$("#lebTipContent").html($(this).attr("title")).css({'position': 'absolute','top': (offset.top+5), 'left': (offset.left+$(this).width())});
	},
	function(){
		$("#lebTipContent").remove();
	}
	);


}); /* fin doc ready */


/* ======== Fonctions ========================================================================== */

/* 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.','.')) } );
}

/* Change image pour les "actif" */
attachActif = function(imageId){
	$(imageId).attr("src", $(imageId).attr("src").replace('.','_roll.'));
}