$(document).ready(function()
{
// First we hide all exhibitis 
$("#menu ul li.section-title").nextAll().hide();
// then the active exhibit is showed
$("#menu ul").each(function()
{
$(this).find("li.active").prevAll().nextAll().show();
$("li.active").prevAll(".section-title").addClass("active-section");
});
// This is the toggle function
// first it hides all sections
$("#menu ul li.section-title").click(function()
{
$("#menu ul li.section-title").removeClass("activesection").nextAll().hide();
$(this).nextAll().slideToggle("fast").prevAll(".sectiontitle").addClass("active-section");
});
});



/*
// First we hide all exhibitis 
$("#menu ul li.section-title").nextAll().hide();

// then the active exhibit is showed
$("#menu ul").each(function()
{
$(this).find("li.active").prevAll().nextAll().show();
});

// This is the toggle function
// first it hides all sections
$("#menu ul li.section-title").click(function()
{
$("#menu ul li.section-title").nextAll().hide();
$(this).nextAll().slideToggle("fast");
});

*/

/*$(document).ready(function()
{
	// Ocultar todos
	$("#menu ul li.section-title").nextAll().hide();
	
	//mostrar activo
	$("#menu ul").each(function(){
	$(this).find("li.active").prevAll().nextAll().show();
	});
	
	//Expandir y ocultar
	$("#menu ul li.section-title").click(function(){
	$(this).nextAll().slideToggle("fast");
	});
	
});  */
