
	// slide toggle v2.0
	
	jQuery(document).ready(function()
	{
		/*alert("Starting ID:" + jQuery("ul#slideToggleArea").children('li:first').attr("id"));*/
		jQuery("ul#slideToggleArea div.textwidget").each(
			function()
			{
				if (jQuery(this).parent().attr("id") == jQuery("ul#slideToggleArea").children('li:first').attr("id"))
				{
					jQuery(this).css("display", "block");
				}
				jQuery(this).attr("id", "box-" + jQuery(this).parent().attr("id")); // set the box's ID
			}
		),
		// give each H2 the ID a reference to the open box
		jQuery("#slideToggleArea h2").each(
			function()
			{
				jQuery(this).attr("title", "box-" + jQuery("ul#slideToggleArea").children('li:first').attr("id")); // store the reference to the open box in each clickable h2
			}
		), 
		
		jQuery("#slideToggleArea h2").click(
			function()
			{
				var itemToBeClosed	= jQuery(this).attr("title");		// reference to the item that needs to be closed
				var itemToBeOpened	= jQuery(this).next().attr("id");	// reference to the item that needs to be opened
				
				jQuery("#" + itemToBeOpened).slideToggle("slow"); 		// open the immediate sibling of the clicked element
				
				
				jQuery("#" + itemToBeClosed).slideToggle("slow", 
					function()
					{
						jQuery("#slideToggleArea h2").each(
							function()
							{
								jQuery(this).attr("title", itemToBeOpened); // store the reference to the open box in each clickable h2
							}
						);
					}
				);		// close the open element
				return false;
			}
		)
	});