//Help menu accordion
  $(document).ready(function(){
	$(".subject-items").hide();
	$('<img src="' + static_url +  '/images/arrow-down.png" class="help-arrow" />').insertAfter('a h5.help-page');
	$("a h5.help-page").click(function(){
		slide_help($(this));
	});
});

function slide_help(help_object){
	if(help_object.is(".highlight")) {
     help_object.toggleClass("highlight");
	 $('.help-arrow.highlight').attr('src',static_url + '/images/arrow-down.png'); // change the image src of the current highlight image to have an INhighlight state.
     help_object.parent().next(".subject-items").slideToggle();
     return false;
	} 
	else {
		$(".subject-items:visible").slideUp("slow"); // close all visible divs with the class of .content
		$("h5.help-page.highlight").removeClass("highlight");  // remove the class highlight from all h1's with the class of .highlight
		help_object.toggleClass("highlight");
		$('.help-arrow.highlight').attr('src', static_url + '/images/arrow-down.png'); // change the image src of the current highlight image to have an INhighlight state.
		$(".help-arrow").addClass('highlight');
		help_object.siblings('.help-arrow.highlight').attr('src', static_url + '/images/arrow-up.png'); // change the image src of the new highlight image to have an highlight state.
		help_object.parent().next(".subject-items").slideToggle();
		return false;
	}

}