/*
 * Script based on 'slickbox', by Karl Swedberg (learningjquery.com)
 * Adapted for TNA by Craig Anderson
 *
/* --------- COLLAPSABLE DIV BLOCKS FOR EDUCATION LANDING PAGES ---------- */

$(document).ready(function() {
	// toggles the div visible/hidden when the show/hide button is clicked
	$(".hide-button").click(function() {
		hideOrShow($(this));
	 });
	
	$(".show-button").click(function() {
		hideOrShow($(this));
	 });
	
	// next lines cancel default link behaviour (prevents jumping to the top of the page)
	$(".hide-button:a").click(function() {
		return false;
	 });
	
	$(".show-button:a").click(function() {
		return false;
	 });
})
	 
function hideOrShow(obj) {
	var hideButtonClass = "hide-button";
	var showButtonClass = "show-button";
	
	obj.toggleClass(hideButtonClass).toggleClass(showButtonClass);
	obj.prev(".hide-or-show").toggle(400);
	return false;
}
