$(document).ready(function()
{
	// hide all answers
	$('#spr_faq dl dd').hide();
	
	// attach click handler to links: to show corresponding answers
	$('#spr_faq dl dt a').click(function(){
		$('#spr_faq dl dd#a_'+$(this).attr("name")).toggle();
	});
	
	// check if there's an anchor in the URL
	// if so, we'll want to display that FAQ item
	var url = document.location.toString();
	if (url.match('#'))
	{
		// find the item
		var target = '#spr_faq dl dt a[name='+url.split('#')[1]+']';
		
		// click the appropriate question to display its answer
		$(target).click();
		// scroll to the question
		$(target).focus();
		// get rid of the outline
		$(target).blur();
	}
});
