$(document).ready(function(){
	$('#contact,#metier,#connex,#reference').hide();
	//$('#contact,#metier,#connex,#reference').css('opacity',0.5);
	//$('#contact h1,#metier h1,#connex h1,#reference h1').css('opacity',1);
	$('#triggerContact').mouseenter(function(){
		$('#contact p').hide();
		$('#contact').show().animate({top:"-148px"},500);
		$('#contact').height(0);
		$('#contact').queue(function(){
			$(this).children('p').slideDown('slow');
			$(this).dequeue();
		});
		$('#metier,#connex,#reference').css({'display':'none'}).slideUp().animate({top:"0px"});
	});
	$('#contact h1,#triggerContact').click(function(){
		$('#contact').css({'display':'none'}).animate({top:"0px"});
	});
	$('#triggerMetier').mouseenter(function(){
		$('#metier p').hide();
		$('#metier').show().animate({top:"-95px"},500);
		$('#metier').height(0);
		$('#metier').queue(function(){
			$(this).children('p').slideDown('slow');
			$(this).dequeue();
		});
		$('#contact,#connex,#reference').slideUp().css({'display':'none'}).animate({top:"0px"});
	});
	$('#metier h1,#triggerMetier').click(function(){
		$('#metier').css({'display':'none'}).animate({top:"0px"});
	});
	$('#triggerConnex').mouseenter(function(){
		$('#connex ul').hide();
		$('#connex').show().animate({top:"-138px"},500);
		$('#connex').height(0);
		$('#connex').queue(function(){
			$(this).children('ul').slideDown('slow');
			$(this).dequeue();
		});
		$('#metier,#contact,#reference').slideUp().css({'display':'none'}).animate({top:"0px"});
	});
	$('#connex h1,#triggerConnex').click(function(){
		$('#connex').css({'display':'none'}).animate({top:"0px"});
	});
	$('#triggerReference').mouseenter(function(){
		$('#reference ul').hide();
		$('#reference').show().animate({top:"-308px"},500);
		$('#reference').height(0);
		$('#reference').queue(function(){
			$(this).children('ul').slideDown('slow');
			$(this).dequeue();
		});
		$('#metier,#connex,#contact').slideUp().css({'display':'none'}).animate({top:"0px"});
	});
	$('#reference h1,#triggerReference').click(function(){
		$('#reference').css({'display':'none'}).animate({top:"0px"});
	});
});

