jQuery.fn.initMenu = function() {  
    return this.each(function(){
        var theMenu = $(this).get(0);
        $('.acitem', this).hide();
        $('li.expand > .acitem', this).show();
        $('li.expand > .acitem', this).prev().addClass('active');
        $('li a', this).click(
            function(e) {
                e.stopImmediatePropagation();
                var theElement = $(this).next();
                var parent = this.parentNode.parentNode;
                if($(parent).hasClass('noaccordion')) {
                    if(theElement[0] === undefined) {
                        window.location.href = this.href;
                    }
                    $(theElement).slideToggle('normal', function() {
                        if ($(this).is(':visible')) {
                            $(this).prev().addClass('active');
                        }
                        else {
                            $(this).prev().removeClass('active');
                        }    
                    });
                    return false;
                }
                else 
				{
					var AllowClicks = true;
					var MenuItemID = $(this.parentNode).attr('id');
					if(MenuItemID != null)
					{
						if(MenuItemID == "menu-item-60" || MenuItemID == "menu-item-61")
						{
							AllowClicks = false;	
						}
					}
					if(AllowClicks)
					{
						if(theElement.hasClass('sub-menu') && theElement.is(':visible')) 
						{                        
							$('.sub-menu:visible', parent).first().slideUp('normal', 
								function() {
									$(this).prev().removeClass('active');
								}
							);
							
							return false;
						}
					
						if(theElement.hasClass('sub-menu') && !theElement.is(':visible')) 
						{        
							
							$('.sub-menu:visible', parent).first().slideUp('normal', 
								function() {
									$(this).prev().removeClass('active');
								}
							);
							
							theElement.slideDown('normal', function() {
								$(this).prev().addClass('active');
							});
							return false;
						}
					}//end allow clicks
            	}// end else no accoridon
	        }// end e function
    	);
	});
};
