$(document).ready(function() {
	//$('div#accordion>div').hide();
	//Listen for a click on the accordion headers
	$('div#accordion>h3').click(function() {
		//Get the section of the accordion to affect
		var nextSection = $(this).next('div');
		//Check if this section is currently being displayed
		if(nextSection.hasClass('current')) {
			//section is already displayed, so hide it and remove the
			//current mark up
			nextSection.slideUp('slow', function() {
				nextSection.removeClass('current');
			});
		} else {
			//section is not already displayed. Hide the currently displayed one,
			//if any...
			$('div#accordion div.current').slideUp('slow', function() {
				$(this).removeClass('current');
			});
			//And then display the new section clicked on and mark it current
			nextSection.slideToggle('slow', function() {
				nextSection.toggleClass('current');
			});
		}
	});
});
