$("div.chapter > div.contenu:gt(0)").hide();
$("div.chapter > h3").css("cursor","pointer");

$("div.chapter > h3").click(function()
{
//	var p = $(this).parents("div.content:eq(0)");
	var c = $(this).siblings("div.contenu");

	if ( c.is(":hidden") )
	{
//		p.find("div.contenu").slideUp("slow");
		c.slideDown("normal");
	}
	else
	{
		c.slideUp("normal");
	}
});

$("div.chapter > h3").mouseover(function(){
	$(this).css('color', '#ff0');
});

$("div.chapter > h3").mouseout(function(){
	$(this).css('color', '#fff');
});



     // On cache les sous-menus :
    $(".navigation ul.subMenu").each(function()
    {
      var item = $(this);
      var actif = item.find('a.currentpage');
      if (actif.length == 0)
      {
        item.hide();
      }
    });
    
     $(".navigation li.toggleSubMenu > a").click( function () {
        // Si le sous-menu était déjà ouvert, on le referme :
        if ($(this).next("ul.subMenu:visible").length != 0) {
            $(this).next("ul.subMenu").slideUp("normal");
        }
        // Si le sous-menu est caché, on ferme les autres et on l'affiche :
        else {
            $(".navigation ul.subMenu").slideUp("normal");
            
            $(this).next("ul.subMenu").slideDown("normal");

        }
        // On empêche le navigateur de suivre le lien :
        return false;
    });     

function activate()
{
  $(that).slideUp('normal');
}














function initAutre(listId, autreId)
{
  var span = $('<span id="autre" />');
  var list = $('#' + listId);
  var autre = $('#' + autreId);

  list.css('float', 'left');

  autre.css('width','86px');
  autre.css('margin-left','5px');
  span.html(autre);
  list.parent().append(span);
  showAutre( $('#' + listId) )
}

function showAutre(that)
{
  var value = $(that).val()
  if(value == 1 || value == 6)
  {   
    $('#autre').css('display','block');
  }
  else
  {
    $('#autre').css('display','none');
  }

}
