$(document).ready(function() {

	/* Got this code from: http://www.sebastiansulinski.co.uk/web_design_tutorials/tutorial/52/show_and_hide_div_with_jquery */
		
	if($('div.faq').length > 0) {		
		$('div.faq').click(function() {
			if ($(this).hasClass('open')) {
				$(this).removeClass('open');
				$(this).addClass('close');
				$(this).next().slideDown(100);
				/*
					We can also do this via the jquery ui additional functions, see http://docs.jquery.com/UI/Effects/Slide#options
					$(this).next().show("slide", { direction: "left" }, 1000);
				*/				
				return false;
				
			} else {
				$(this).removeClass('close');
				$(this).addClass('open');
				$(this).next().slideUp(100);
				return false;
			}			
		});
	}

	if($('div.specialsDiv').length > 0) {
		$('div.specialsDiv').click(function() {
			if ($(this).hasClass('open')) {
				$(this).removeClass('open');
				$(this).addClass('close');
				/* Via the jquery ui additional functions we slide this div open from the left to right, see http://docs.jquery.com/UI/Effects/Slide#options */
				$(this).next().show("slide", { direction: "left" }, 500);
				return false;
				
			} else {
				$(this).removeClass('close');
				$(this).addClass('open');
				/* Via the jquery ui additional functions we slide this div closed, see http://docs.jquery.com/UI/Effects/Slide#options */
				$(this).next().hide("slide", { direction: "left" }, 500);
				return false;
			}			
		});
	}
	
});
