// JavaScript Document

$(document).ready(function(){
	$('div.content').hide().css({opacity:0});
	$('h2,h3').
		addClass('clickable').
		click(function(){				
			toggleSection($(this).next());
			$(this).blur();
			return false;
		}).
		keypress(function(e){
			if(e.which == 13){
				toggleSection($(e.target).next());
				$(this).blur();
			}
		});
});

function toggleSection(section){
	if(section.is(':visible')){
		section.animate( {opacity:0}, 300 );
		section.slideUp(300);
	} else {
		section.slideDown(150);
		section.animate( {opacity:1}, 300);
	}	
}
