// JavaScript Document

var strategieStatus = 0;
var graphiqueStatus = 0;
var interactiveStatus = 0;

function fermerPoints(){
	//alert("Sith");
	
	$("#details").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
	$("#resume").css("font-weight", "bold").css("text-decoration", "none").css("cursor", "default");
	
	if($("#strategique").children("ul").css("display") != "none"){
		$("#strategique > ul > li").children("div").slideUp("slow");
		$("#strategique > ul > li").children("span").css("font-weight", "normal");
		$("#strategique > ul > li > span").children("span.puce").css("display","inline");
		
		strategieStatus = 0;
	}
	if($("#graphique").children("ul").css("display") != "none"){
		$("#graphique > ul > li").children("div").slideUp("slow");
		$("#graphique > ul > li").children("span").css("font-weight", "normal");
		$("#graphique > ul > li > span").children("span.puce").css("display","inline");
		graphiqueStatus = 0;
	}
	if($("#interactive").children("ul").css("display") != "none"){
		$("#interactive > ul > li").children("div").slideUp("slow");
		$("#interactive > ul > li").children("span").css("font-weight", "normal");
		$("#interactive > ul > li > span").children("span.puce").css("display","inline");
		interactiveStatus = 0;
	}
	
}
function ouvrirPoints(){
	//alert("Jedi");
	//$("#strategique > ul:visible").children("div").slideDown("slow");
	
	$("#resume").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
	$("#details").css("font-weight", "bold").css("text-decoration", "none").css("cursor", "default");
	
	if($("#strategique").children("ul").css("display") != "none"){
		$("#strategique > ul > li").children("div").slideDown("slow");
		$("#strategique > ul > li").children("div").removeClass("furtif");
		
		if($("#strategique > ul > li").children("div").css("display") == "none"){
			$("#strategique > ul > li").children("span").css("font-weight", "normal");
		}else{
			$("#strategique > ul > li").children("span").css("font-weight", "bold");
			$("#strategique > ul > li > span").children("span.puce").css("display","none");
		}
		strategieStatus = 2;
	}
	if($("#graphique").children("ul").css("display") != "none"){
		$("#graphique > ul > li").children("div").slideDown("slow");
		$("#graphique > ul > li").children("div").removeClass("furtif");
		
		if($("#graphique > ul > li").children("div").css("display") == "none"){
			$("#graphique > ul > li").children("span").css("font-weight", "normal");
		}else{
			$("#graphique > ul > li").children("span").css("font-weight", "bold");
			$("#graphique > ul > li > span").children("span.puce").css("display","none");
		}
		graphiqueStatus = 2;
	}
	if($("#interactive").children("ul").css("display") != "none"){
		$("#interactive > ul > li").children("div").slideDown("slow");
		$("#interactive > ul > li").children("div").removeClass("furtif");
		
		if($("#interactive > ul > li").children("div").css("display") == "none"){
			$("#interactive > ul > li").children("span").css("font-weight", "normal");
		}else{
			$("#interactive > ul > li").children("span").css("font-weight", "bold");
			$("#interactive > ul > li > span").children("span.puce").css("display","none");
		}
		interactiveStatus = 2;
	}
}

$(document).ready(function() {
		
		
	$("#strategique > ul > li").click(function() {				  
		$(this).children("div").slideToggle("slow");
		$(this).children("div").removeClass("furtif");	
		
		if($(this).children("div").height()>1){
			$(this).children("span").css("font-weight", "normal");
			$(this).children("span").children("span.puce").css("display","inline");
		}else{
			$(this).children("span").css("font-weight", "bold");
			$(this).children("span").children("span.puce").css("display","none");
		}
		strategieStatus = 1;
		$("#resume").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
		$("#details").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
	});
	$("#graphique > ul > li").click(function() {				  
		$(this).children("div").slideToggle("slow");
		$(this).children("div").removeClass("furtif");	
		
		if($(this).children("div").height()>1){
			$(this).children("span").css("font-weight", "normal");
			$(this).children("span").children("span.puce").css("display","inline");
		}else{
			$(this).children("span").css("font-weight", "bold");
			$(this).children("span").children("span.puce").css("display","none");
		}
		graphiqueStatus = 1;
		$("#resume").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
		$("#details").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
	});
	$("#interactive > ul > li").click(function() {				  
		$(this).children("div").slideToggle("slow");
		$(this).children("div").removeClass("furtif");	
		
		if($(this).children("div").height()>1){
			$(this).children("span").css("font-weight", "normal");
			$(this).children("span").children("span.puce").css("display","inline");
		}else{
			$(this).children("span").css("font-weight", "bold");
			$(this).children("span").children("span.puce").css("display","none");
		}
		interactiveStatus = 1;
		$("#resume").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
		$("#details").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
	});
		
		
	$("#strategique > h3").click(function() {	
		
		$("#controles").fadeIn(900);
		if($("#strategique").children("ul").css("display") != "none"){
			$("#controles").fadeOut(900);
		}
		if(strategieStatus == 0){
			$("#resume").css("font-weight", "bold").css("text-decoration", "none").css("cursor", "default");
			$("#details").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
		}else if(strategieStatus == 1){
			$("#resume").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
			$("#details").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
		}else{
			$("#resume").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
			$("#details").css("font-weight", "bold").css("text-decoration", "none").css("cursor", "default");
		}
		
		$("h3").addClass("off");
		$(this).removeClass("off");
		
		$("#strategique > ul:visible").fadeOut(900);
		$("#strategique > ul:hidden").fadeIn(900);
		$("#graphique > ul").fadeOut(9);
		$("#interactive > ul").fadeOut(9);
		
		$("#strategique > ul").removeClass("furtif");
		
		$("#corp > li").children("div").slideUp("slow");
		$("#corp > li").children("span").css("font-weight", "normal");
	});
	$("#graphique > h3").click(function() {	
										
		$("#controles").fadeIn(900);
		if($("#graphique").children("ul").css("display") != "none"){
			$("#controles").fadeOut(900);
		}
		if(graphiqueStatus == 0){
			$("#resume").css("font-weight", "bold").css("text-decoration", "none").css("cursor", "default");
			$("#details").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
		}else if(graphiqueStatus == 1){
			$("#resume").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
			$("#details").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
		}else{
			$("#resume").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
			$("#details").css("font-weight", "bold").css("text-decoration", "none").css("cursor", "default");
		}
		
		$("h3").addClass("off");
		$(this).removeClass("off");
		
		$("#graphique > ul:visible").fadeOut(900);
		$("#graphique > ul:hidden").fadeIn(900);
		$("#strategique > ul").fadeOut(9);
		$("#interactive > ul").fadeOut(9);
		
		$("#graphique > ul").removeClass("furtif");
		
		$("#corp > li").children("div").slideUp("slow");
		$("#corp > li").children("span").css("font-weight", "normal");
	});
	$("#interactive > h3").click(function() {	
										  
		$("#controles").fadeIn(900);
		if($("#interactive").children("ul").css("display") != "none"){
			$("#controles").fadeOut(900);
		}
		if(interactiveStatus == 0){
			$("#resume").css("font-weight", "bold").css("text-decoration", "none").css("cursor", "default");
			$("#details").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
		}else if(interactiveStatus == 1){
			$("#resume").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
			$("#details").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
		}else{
			$("#resume").css("font-weight", "normal").css("text-decoration", "underline").css("cursor", "pointer");
			$("#details").css("font-weight", "bold").css("text-decoration", "none").css("cursor", "default");
		}
		
		$("h3").addClass("off");
		$(this).removeClass("off");
		
		$("#interactive > ul:visible").fadeOut(900);
		$("#interactive > ul:hidden").fadeIn(900);
		$("#strategique > ul").fadeOut(9);
		$("#graphique > ul").fadeOut(9);
		
		$("#interactive > ul").removeClass("furtif");
		
		$("#corp > li").children("div").slideUp("slow");
		$("#corp > li").children("span").css("font-weight", "normal");
	});
	
	/**************************************************/
	
	$("#honneurs > h3").click(function() {	
		$("h3").addClass("off");
		$(this).removeClass("off");
		
		/*$("#strategique > ul").slideDown("slow");
		$("#graphique > ul").slideUp("slow");
		$("#interactive > ul").slideUp("slow");*/
		$("#honneurs > ul:visible").fadeOut(900);
		$("#honneurs > ul:hidden").fadeIn(900);
		$("#temoignages > ul").fadeOut(9);
		
		$("#honneurs > ul").removeClass("furtif");
		
		$("#corp > li").children("div").slideUp("slow");
		$("#corp > li").children("span").css("font-weight", "normal");
	});
	$("#temoignages > h3").click(function() {	
		$("h3").addClass("off");
		$(this).removeClass("off");
		
		/*$("#strategique > ul").slideDown("slow");
		$("#graphique > ul").slideUp("slow");
		$("#interactive > ul").slideUp("slow");*/
		$("#temoignages > ul:visible").fadeOut(900);
		$("#temoignages > ul:hidden").fadeIn(900);
		$("#honneurs > ul").fadeOut(9);
		
		$("#temoignages > ul").removeClass("furtif");
		
		$("#corp > li").children("div").slideUp("slow");
		$("#corp > li").children("span").css("font-weight", "normal");
	});
	
	
	
	///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	
	$("#evolution > h3").click(function() {	
		$("h3").addClass("off");
		$(this).removeClass("off");
		
		/*$("#strategique > ul").slideDown("slow");
		$("#graphique > ul").slideUp("slow");
		$("#interactive > ul").slideUp("slow");*/
		$("#evolution > ul:visible").fadeOut(900);
		$("#evolution > ul:hidden").fadeIn(900);
		$("#expertise > ul").fadeOut(9);
		$("#collectivite > ul").fadeOut(9);
		
		$("#evolution > ul").removeClass("furtif");
		
		$("#corp > li").children("div").slideUp("slow");
		$("#corp > li").children("span").css("font-weight", "normal");
	});
	$("#expertise > h3").click(function() {	
		$("h3").addClass("off");
		$(this).removeClass("off");
		
		/*$("#graphique  > ul").slideDown("slow");
		$("#strategique> ul").slideUp("slow");
		$("#interactive > ul").slideUp("slow");*/
		$("#expertise > ul:visible").fadeOut(900);
		$("#expertise > ul:hidden").fadeIn(900);
		$("#evolution > ul").fadeOut(9);
		$("#collectivite > ul").fadeOut(9);
		
		$("#expertise > ul").removeClass("furtif");
		
		$("#corp > li").children("div").slideUp("slow");
		$("#corp > li").children("span").css("font-weight", "normal");
	});
	$("#collectivite > h3").click(function() {	
		$("h3").addClass("off");
		$(this).removeClass("off");
		
		/*$("#interactive > ul").slideDown("slow");
		$("#graphique > ul").slideUp("slow");
		$("#strategique > ul").slideUp("slow");*/
		$("#collectivite > ul:visible").fadeOut(900);
		$("#collectivite > ul:hidden").fadeIn(900);
		$("#evolution > ul").fadeOut(9);
		$("#expertise > ul").fadeOut(9);
		
		$("#collectivite > ul").removeClass("furtif");
		
		$("#corp > li").children("div").slideUp("slow");
		$("#corp > li").children("span").css("font-weight", "normal");
	});
	
	///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	 
  
   
   
   
   
   	$("li").hover(function(){
		/*if($(this).children("div").height()>1){
			
		}else{*/
			$(this).children("span").css("font-weight", "bold");
		/*}*/
	},function(){
		//alert($(this).children("div").css("display"));
		if($(this).children("div").css("display") == "none"){
			$(this).children("span").css("font-weight", "normal");
		}else{
			
		}
	});

	/*$("#pied").click(function() {
		   
	});	*/
   $("#pied").hover(function(){
     $("#contenupied").slideDown("slow");
	 $("#contenupied").removeClass("furtif");
   },function(){
     $("#contenupied").slideUp("slow");
   });


	
});