$(function () {
	/**
	* hide elements with class hideMe
	*/
	$(".hideMe").hide(), $(".showMe").show(),

	/**
	* register the sliding behaviour with the tools toolBox
	*/
	$("#moreInfo").find("li").find("span.slidyToolsBigTitle").wrap('<a href="#" class="clickHere"></a>'),
	$("#moreInfo").find("li").find("a.clickHere").each (function () {
		var whatsTheHref=$(this).attr('href');
	
			$(this).click( function () {
				
				obj=$(this);
				
				$("#moreInfo").find("span.current").each ( function () {
					//get rid of the "current" class
					$(this).removeClass("current");
				});
				
				$("#moreInfo").find("div.hideMe").each ( function () {
					// hide all open sections
					if ($(this).is(":visible"))
					{
						$(this).slideUp("500");
					}
				});

				// open this section if it's hidden
				if ($(this).next().is(":hidden"))
				{
					$(this).next().slideDown("500");

					obj.find("span").each ( function () {
						$(this).addClass("current")
					});
				}
				
				return false;
			});
			
	})
	
});