$.fn.menu_f = function(hl){
    return this.each(function(){
        $(this).find('ul').each(function(){
            $(this).hide();
            if(hl){ //高亮菜单项
                var expandParent = function(el){
                    $(el).show();
                    var p = $(el).parent().parent();
                    if( 'UL' == $(p).attr('tagName') && 'menu' != $(p).attr('class')){
                        expandParent(p);
                    }
                };
                var box = this;
                $(this).children('li').children('a').each(function(){
                    var link = $(this).attr('href');
                    if(-1 == link.indexOf('showlist')) return;
                    link = link.substr(link.indexOf('showlist'));

                    var re = new RegExp(link, 'i');
					
                    if(document.location.href.match(re)){
                        $(this).css({color:"#0070ba",fontWeight:"bold"});
                       expandParent(box); 
                    }
                });
            }
            $(this).parent().children('a').click(function(){
				
               // $(this).parent().children('ul').slideToggle("slow"); 
                $(this).parent().children('ul').toggle();
            });
        });
    });
}




