$(document).ready(function() {
	
	$('#sec').hide();
	$('a.sec').click(function() {
	  var id = $(this).attr('id');
	  $('#sec' + id).toggle(500);
	  toggleImage(id);
	  //alert(id);	
	  return false;
	});

	$('#desc').hide();
	$('a.desc').click(function() {
	  var id = $(this).attr('id');
	  $('#desc' + id).toggle(500);
	  //alert(id);
	  return false;
	});

	$('#more').hide();
	$('a.more').click(function() {
	  var id = $(this).attr('id');
	  $('#more' + id).toggle(500);
	  //alert(id);
	  return false;
	});

	$('#more').hide();
	$('a.mor').click(function() {
	  var id = $(this).attr('id');
	  $('#mor' + id).toggle(500);
	  //alert(id);
	  return false;
	});

});

/*
 *  tourne l'image.  // id est l'id du lien qui fait le clic. Il est du genre: t4
 */
toggleImage = function(id){
	var image = $('#img'+id).attr('src'); // obtient le nom de l'image: section-orange-open.gif ou section-orange.gif
	if (image == '../images/section-orange-open.gif') {  // si le triangle est en bas... le change
		$('#img'+id).attr('src','../images/section-orange.gif');
	}else{
		$('#img'+id).attr('src','../images/section-orange-open.gif');
	}
}