function initFAQ(containerName) {
	var container = jQuery(containerName);
	
	// hide all answers
	jQuery('.faqanswer', container).css('display','none');
	
	// register click handler on questions
	jQuery('.faqquestion', container).click(function(){
		// get answer div for this question
    var answer = jQuery(this).next('.faqanswer');
    
    // hide all previously visible answers
		jQuery('.faqanswer', container).slideUp();
		
		// toggle current answer
		if (answer.css('display') != 'block') {
			answer.slideToggle();
		}
	});
}



function initMain() {
	initFAQ('div.faqcontainer');
}

jQuery().ready(initMain);
