$(document).ready(function(){
	
	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	
 	$("#couleur").hide("fade", {}, 2000);

	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	
	countTitles = 0;
	
	$('.superTitre').each(function(i) {
		countTitles ++;	
	});
	
	//alert(countTitles);
	
	
	 	$('.superTitre').each(function(i) {
	 		
	 		$('#superContent_'+i).hide();
	 		
	 		$('#superTitre_'+i).click( function(){
	    		//alert(i + ': ' + $(this).text());
	    		$('#superContent_'+i).slideToggle('fast');
	 		});
	 		
	 		$('#superTitre_'+i).mouseover( function(){
	 			$(this).stop();
	    		$(this).animate({color:'#FA3A3B',borderTopColor:'#FA3A3B'});
	 		});
	 		$('#superTitre_'+i).mouseleave( function(){
	 			$(this).stop();
	    		$(this).animate({color:'#000000',borderTopColor:'#BBB'});
	 		});
	 		
	 		
	 		
	  	});
	  	
  	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  	
  	
	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	
	countTitlesB = 0;
	
	$('.superTitred').each(function(i) {
		countTitlesB ++;	
	});
	
	//alert(countTitles);
	
	if(countTitlesB > 8){
	 	$('.superTitred').each(function(i) {
	 		
	 		$('#superContent_'+i).hide();
	 		
	 		$('#superTitre_d'+i).click( function(){
	    		//alert(i + ': ' + $(this).text());
	    		$('#superContent_d'+i).slideToggle('fast');
	 		});
	 		
	 		$('#superTitre_d'+i).mouseover( function(){
	 			$(this).stop();
	    		$(this).animate({color:'#FA3A3B',borderTopColor:'#FA3A3B'});
	 		});
	 		$('#superTitre_d'+i).mouseleave( function(){
	 			$(this).stop();
	    		$(this).animate({color:'#000000',borderTopColor:'#BBB'});
	 		});
	 		
	 		$('#superTitre_d'+i).click( function(){
	 			$('#superTitre_d'+i+" .superIcone").slideToggle('fast');
	 		});
	 		
	  	});
	}else{
		$('.superTitred').each(function(i) {
			
			$('#superTitre_d'+i+" .superIcone").hide();
	 		
	 		$('#superTitre_d'+i).click( function(){
	    		//alert(i + ': ' + $(this).text());
	    		$('#superContent_d'+i).slideToggle('fast');
	 		});
	 		
	 		$('#superTitre_d'+i).mouseover( function(){
	 			$(this).stop();
	    		$(this).animate({color:'#FA3A3B',borderTopColor:'#FA3A3B'});
	 		});
	 		$('#superTitre_d'+i).mouseleave( function(){
	 			$(this).stop();
	    		$(this).animate({color:'#000000',borderTopColor:'#BBB'});
	 		});
	 		
	 		$('#superTitre_d'+i).click( function(){
	 			$('#superTitre_d'+i+" .superIcone").slideToggle('fast');
	 		});
	 		
	  	});
		
		
	}
  	
  	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  	
 	/*$('.homeBloc').tooltip({ 
		track: true, 
		delay: 100, 
		showURL: false, 
		showBody: " - ", 
		fade: 250 
	});*/
  	
  	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
  /*$('.homeBloc').each(function(i) {
  		$(this).mouseover( function(){
 			$(this).stop();
    		$(this).animate({color:'#FA3A3B',borderTopColor:'#FA3A3B'});
 		});
 		$(this).mouseleave( function(){
 			$(this).stop();
    		$(this).animate({color:'#000000',borderTopColor:'#BBB'});
 		});
  	});*/

	
 		
 		
});

