function toggle_text(id){
    textitem=jQuery("#text_"+id+" .txtwrapper p:gt(0)");
    if(textitem.is(':visible')){
        textitem.hide("slow");
        jQuery("#text_toggle_button_"+id+"_hide").hide();
        jQuery("#text_toggle_button_"+id+"_show").show();
    }else{
        textitem.show("slow");
        jQuery("#text_toggle_button_"+id+"_hide").show();
        jQuery("#text_toggle_button_"+id+"_show").hide();        
    }
}

jQuery(function() {

    jQuery("#categories div.menu ul ul").css({ display: 'none' });
    jQuery("#categories div.menu ul li").hover(function() {
        jQuery(this).find('ul.children')
            .stop(true, true).delay(50).animate({ "height": "show", "opacity": "show" }, 500 );
    }, function(){
        jQuery(this).find('ul.children')
            .stop(true, true).delay(50).animate({ "height": "hide", "opacity": "hide" }, 500 );
    });

});
