var j$ = jQuery;
j$(function(){
    var c = 0;
    var cr = 'sub_' + $('#menu_no').val();
    j$(".menu_list").each(function(){
        j$("p", this).each(function(index){
            var $this = j$(this);
            c++;
            if ($this.next('ul').attr('id') != cr) $this.next().hide();
            $this.click(function(){
                j$(this).next().toggle().parent().siblings()
                    .children("ul:visible").hide();
                return false;
            });
        });
    });
});

