$(document).ready(function(){
	$('#header li a').mouseenter(onMouseOver);
	$('#header li a').mouseleave(onMouseOut);
	
	$('#photo_groupe img').mouseenter(onMouseOverGroup)
	$('#photo_groupe img').mouseleave(onMouseLeaveGroup);
	
	var timer = setTimeout('initPointer()', 100);
});

function onMouseOver()
{
	if($(this).hasClass('disable') == false){
		var newX = $(this).position().left + $(this).width() / 2 + 35;
		$('#pointer').stop().animate({left: newX}, 200);
	}
}

function onMouseOut()
{
	var newX = $(".current_page").position().left + $(".current_page").width() / 2 + 35;
	$('#pointer').stop().animate({left: newX}, 200);
}

function initPointer()
{
	var newX = $(".current_page").position().left + $(".current_page").width() / 2 + 35;
	$('#pointer').css('left', newX);
}

function onMouseOverGroup()
{
	$(this).stop().animate({opacity: 1}, 150);
}

function onMouseLeaveGroup()
{
	$(this).stop().animate({opacity: 0}, 100);
}