$(document).ready(function(){
	disclosureBoxes();
});

// Disclosure Boxes - toggle opn/closed a div with class .disclosure content
function disclosureBoxes(){
	prepDisclosureBoxes(); // get interface ready
	
	$('a.toggle').click(function(){
		$(this).parent().next('.disclosure-content').slideToggle("slow");
		$(this).toggleClass('active');
		return false;
	});
}

// Close all disclosure boxes by default (progressive enhancement)
// Wrap all disclosure titles with an anchor tag trigger interaction
function prepDisclosureBoxes(){
	$('.disclosure-content').css({'display':'none'});
	$('.disclosure-title').wrapInner('<a href="#" class="toggle" title="click to open"></a>');
}
