//each menu MUST have an ID set. It doesn't matter what this ID is as long as it's there.
//each menu MUST have a class 'concertina' set. If the menu doesn't have this, the JS won't make it dynamic

function initfaqs() {

$('ul.concertina ul').hide(); // subs hide
$('ul.concertina ul ul').show(); //sub subs show
$('ul.concertina li a').click(
function() {
var checkElement = $(this).next();
var parent = this.parentNode.parentNode.id;

	if( (checkElement.is('ul:visible'))) {
					$('#' + parent + ' ul:visible').slideUp('fast');
					$('ul.concertina ul  ul').show(); 
				return false;
			}
if( (checkElement.is('ul:hidden')) ) {
					 $('#' + parent + ' ul:visible').slideUp('fast');
					 $('ul.concertina  ul ul').show(); 
					 checkElement.slideDown('normal');
				return false;
			}
 });	
}
$(function() {initfaqs();});
