function initAccordion(parentSelector, noaccordion, collapsible) {
    
	jQuery(parentSelector + ' ul ul').hide();
    
	jQuery.each(jQuery(parentSelector + ' ul li ul li a'), function () {
		if (jQuery(this).attr('href') == window.location.pathname) {
			jQuery(this).parent().parent().show();
		}
    });
	
    jQuery(parentSelector + ' ul li a').click( function () {
        var checkElement = jQuery(this).next();
        if (noaccordion) {
			checkElement.slideToggle('normal');
        }
        if (checkElement.is('ul') && checkElement.is(':visible') && collapsible) {
            checkElement.slideUp('normal');
            return false;
        }
        if ((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
			jQuery.each(jQuery(parentSelector + ' ul ul:visible'), function () {
				jQuery(this).slideUp('normal');
			});
            checkElement.slideDown('normal');
            return false;
        }
    });
}

