function initMenus() {
	
	$('ul.faq p').hide();
	$.each($('ul.faq'), function(){
		$('#' + this.id + '.expandfirst ul:first').show();
	});
	$('ul.faq li a').click(
		function() {
			var checkElement = $(this).next();
			var parent = this.parentNode.parentNode.id;
			var temp = this.parentNode;
			
//			alert(temp);

			if($('#' + parent).hasClass('noaccordion')) {
				$(this).next().slideToggle('normal');
				return false;
			}
			if((checkElement.is('p')) && (checkElement.is(':visible'))) {
				if($('#' + parent).hasClass('collapsible')) {
					$('#' + parent + ' p:visible').slideUp('normal');
					$(temp).toggleClass('open');

				}
				return false;
			}
			if((checkElement.is('p')) && (!checkElement.is(':visible'))) {
				$('#' + parent + ' p:visible').slideUp('normal');
				$('#' + parent + ' li').removeClass('open');
				checkElement.slideDown('normal');
				$(temp).toggleClass('open');

				return false;
			}
		}
	);

}
$(document).ready(function() {initMenus();});

