$(document).ready(function(){

  
      if ($.browser.msie && $.browser.version=="6.0") {
   
      alert("AIE AIE AIE, DESOLE MAIS LA VERSION DE TON NAVIGATEUR WEB EST OBSOLETE POUR CE SITE. POURQUOI NE PAS TELECHARGER GRATUITEMENT LA NOUVELLE VERSION ?");
   
      }


//SUPPRESSION DERNIERE balise HR news
$("hr:last").css("display","none")

//rollover TOP3 PAGE ACCUEIL
$(".top3Image img").hover(function(){
	$(this).animate({opacity:0.5})
	},function() { 
		$(this).animate({opacity:1})
	}
)

//rollover JACKVOTE PAGE ACCUEIL
$(".encart3").hover(function(){
	$(this).css("cursor","pointer");
	$(this).animate({opacity:0.5})
	},function() { 
		$(this).animate({opacity:1})
	}
)

//rollover MENU Haut
$(".navigation ul li").hover(function(){
	$(this).animate({opacity:0.5})
	},function() { 
		$(this).not(".linkTopOn").animate({opacity:1})
	}
)
$("li.linkTopOn").css({opacity:0.5})

//rollover MENU gauche
$(".sRubLeft").hover(function(){
	$(this).animate({left:"15px"})
	},function() { 
		$(this).not(".linkLeftOn").animate({left:"0px"})
	}
)


//rollover menu HAUT 2 (connexion, deconnexion..)
	$(".navigation2 img").hover(function(){
		$(this).animate({top:"8px"})
		},function() { 
			$(this).not(".linkLeftOn").animate({top:"0px"})
		})

//rollover image themes
$(".miniPics img").hover(function(){
		$(this).animate({opacity:0.6})
		},function() { 
			$(this).animate({opacity:1})
		})

$(".archiveMiniature img").hover(function(){
		$(this).animate({opacity:0.6})
		},function() { 
			$(this).animate({opacity:1})
		})

$(".ionfDuMoisImage img").hover(function(){
		$(this).animate({opacity:0.6})
		},function() { 
			$(this).animate({opacity:1})
		})

//rollover icones
$(".alpha img").hover(function(){
	$(this).animate({opacity:0.6});
	},function(){ $(this).animate({opacity:1})
})

//Rollover logo header
$(".logoHeader").hover(function(){
	$(this).animate({opacity:0.6});
	},function(){ $(this).animate({opacity:1})
})


//Ajout ref link spip_pass.html
$("a#spip_pass").attr("onclick","window.open('spip.php?page=spip_pass','spip_pass','menubar=no, status=no, scrollbars=no, menubar=no, width=500, height=300');return false")

//Rollover Choix thème

$(".miniPicsNB").hover(function(){
	$(this).animate({opacity:0.1});
},function(){$(this).animate({opacity:1});})


})
// Tooltip
this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 20;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};



// starting the script on page load
$(document).ready(function(){
	tooltip();
});