/* CONSTANTS */

var timer = 500;

/* ERIN SHOULD NOT CHANGE BELOW THIS LINE! */

$(document).ready(function() { 
	$(".section").next(".content").hide();
	$(".section").click(function() {
								 	var others = $(".section");
									for (var i = 0; i < others.length; i++)
									{
										if (others[i] === this)
										{
											if ($(this).is(".open"))
												$(this).removeClass("open");
											else
												$(this).addClass("open");
											$(this).next(".content").slideToggle(timer);
										}
										else
										{	
											$(others[i]).removeClass("open");
											$(others[i]).next(".content").hide();	
										}
									}
									
									for (var j = 0; j < others.length; j++)
									{
										if ($(others[j]).is(".open"))
										{
											$(others[j]).children("span").html("Hide Info");
										}
										else
										{
											$(others[j]).children("span").html("Show Info");											
										}	
									}
									
	});
});


