// FAQ page handler attachment
$(document).ready(function() 
{
	// Due to an Opera <9 bug, the display property for the list paragraphs 
	// 	can't have a default value defined in faq.css, because this default value
	//		will override any CSS values set via Javascript. So we make the paragraphs
	//		hidden via Javascript on page load.
	$("ul.faqlist li p:visible").hide();
	// Attach functionality that will show/hide FAQ sections
	$("ul.faqlist li").click(function()
	{
		var dom_this = this;
		var dom_visible = ($("ul.faqlist li[p:visible]").length>0 ? $("ul.faqlist li[p:visible]").get(0) : false);
		// If the event trigger is the same as the only visible item, then hide this item
		if (dom_this===dom_visible)
		{
			$("p",this).slideUp(); 
		}
		else 
		{
			if (dom_visible!==false) $("p",dom_visible).slideUp();
			$("p",this).slideDown(); 
		}		
	}); 
});
