$(document).ready(function(){

//Set default open/close settings
$('p.reposta').hide(); //Hide/close all containers
$('span.pergunta').addClass('active').next(); //Add "active" class to first trigger, then show/open the immediate next container

//On Click
$('span.pergunta').click(function(){
	if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
		$('span.pergunta').removeClass('active').next().slideUp(); //Remove all "active" state and slide up the immediate next container
		$(this).toggleClass('active').next().slideToggle("normal"); //Add "active" state to clicked trigger and slide down the immediate next container        
	}
	return false; //Prevent the browser jump to the link anchor
});

});

