//jQuery code for this page
$(document).ready(function(){
//add show links
$('.question').each(function() {
	var id=$(this).parent().attr('id');
	$(this).wrapInner("<a href='#"+id+"' class='show'></a>");
});
$('div.answer').each(function() {
	$(this).append("<p><a href='#' class='hide'>hide</a></p>").hide();
});
if(window.location.hash!=null && window.location.hash!="" && window.location.hash!="#"){
	$(window.location.hash).children('.answer').show();
	$(window.location.hash).children('.question').toggleClass("expanded");

}else{
	$('.frequently-asked').eq(0).children('.answer').show();
	$('.frequently-asked').eq(0).children('.question').toggleClass("expanded");
}

$('a.show').click(function(){
$('div.answer').not($(this).parent().siblings('div.answer')).hide('fast');
$(this).parent().siblings('div.answer').slideToggle('fast',function(){
$('.answer:hidden').siblings('.question').removeClass("expanded");
$('.answer:not(:hidden)').siblings('.question').addClass("expanded");
});
return false;
});
// hideLink hides the content
$('a.hide').click(function(){
$(this).parent().hide('fast').siblings('.question').toggleClass("expanded");
return false;
});

});
