/** TESTIMONIAUX **/

$(function(){

	$('#testi h2 span').each(function(){
			$(this).hide();
	});
	
	$('#testi p').each(function(){
			$(this).hide();
	});
	
	$('#testi div.bloc span').each(function(){
			$(this).hide();
	});
	
	if(GetCookie("secteur")!=null)
	{
		sec = GetCookie("secteur");
		
		switch(sec){
			case "com":
				id = "d";
			break;
			
			case "IT":
				id = "it";
			break;
			
			case "services":
				id = "ser";
			break;
		}
		
	}
	else id="d";

	$('.off').click(function(){
	
		$('#testi h2 span').each(function(){
			$(this).hide();
		});
		
		$('#testi p').each(function(){
			$(this).hide();
		});

		$('.float').each(function(){
			$(this).removeClass("on").addClass("off");
		});
		
		$(this).removeClass("off").addClass("on");
		
		ident = $(this).attr("id");
		num = ident.substring(1,2);
		
		$('#testi h2 span#titre_'+id+num).show();
		$('#testi h2 span#sstitre_'+id+num).show();
		$('#testi p#info_'+id+num).show();

	});
	
	if(GetCookie("secteur")!=null)
	{
		sec = GetCookie("secteur");
		var id="d";
		
		switch(sec){
			case "com":
				id = "d";
			break;
			
			case "IT":
				id = "it";
			break;
			
			case "services":
				id = "ser";
			break;
		}
		$('.off:first').removeClass("off").addClass("on");
		
		$('#testi div.bloc span').each(function(){
			var ide = $(this).attr("id");
			if(ide.match(id))
				$(this).show();
		});
		
		$('#testi h2 span#titre_'+id+'0').show();
		$('#testi h2 span#sstitre_'+id+'0').show();
		$('#testi p#info_'+id+'0').show();
	}
	else{
		$('.off:first').removeClass("off").addClass("on");
		$('#testi h2 span#titre_d0').show();
		$('#testi h2 span#sstitre_d0').show();
		$('#testi p#info_d0').show();
	}

});