$(document).ready(function() {
	//expand all or hide all options
	$('a.expand').click(function() { $('div.reveal').slideDown('slow'); $('h2 a.show').addClass('active'); });
	$('a.hide').click(function() { $('div.reveal').slideUp('slow'); $('h2 a.show').removeClass('active'); });
	//individual header click toggle
	$('a.show').click(function(){
		//collapse and remove active class, if the div is opened it will close
		var clickedTwice = $(this).hasClass('active');
		current= $(this).parent('h2').next('div.reveal')
		$(this).removeClass('active')
		current.slideUp('slow');
		//open the div if it is closed and add the active class
		if(clickedTwice==0)
		{ $(this).addClass('active')
		current.slideDown('slow'); }
	});
}); 