/*
	These JS functions require jQuery, and are used by the "Take Action" 
	sidebar as seen in the Cascadia and Coronado pages. - SV
*/
$(function(){
	// hide drawer contents on page load
	$('.drawercontents').hide();
	// when we click on a drawer link:
	$('.drawer a.show').click(function(event){
		$('.drawercontents').slideUp();				// close all open drawers
		$('.drawer a.show').removeClass('open');	// remove all open styles
		$(this).next('div').slideDown();			// open this drawer
		$(this).addClass('open');					// set open style here
		event.preventDefault();						// don't follow the link
	});
	// when we click on a close link:
	$('.drawer .hide a').click(function(event){
		$('.drawercontents').slideUp();				// close all open drawers
		$('.drawer a.show').removeClass('open');	// remove all open styles
		event.preventDefault();						// don't follow the link
	});
});
