// JavaScript Document

 $(document).ready(function(){
	$(".info").hide();
	$('<img src="arrow-down.png" class="arrow" />').insertAfter('a h3'); 				   
	$("a h3").click(function(){
		if($(this).is(".active")) {
         $(this).toggleClass("active");
		 $('.arrow.active').attr('src','arrow-down.png'); // change the image src of the current ACTIVE image to have an INACTIVE state.
         $(this).parent().next(".info").slideToggle();
         return false;
		} else {
			$(".info:visible").slideUp("slow"); // close all visible divs with the class of .info
			$("h1.active").removeClass("active");  // remove the class active from all h1's with the class of .active
			$(this).toggleClass("active");
			$('.arrow.active').attr('src','arrow-down.png'); // change the image src of the current ACTIVE image to have an INACTIVE state.
			$(".arrow").addClass('active');
			$(this).siblings('.arrow.active').attr('src','arrow-up.png'); // change the image src of the new active image to have an active state.
			$(this).parent().next(".info").slideToggle();
			return false;
		}
	});
});