$(document).ready(function(){

    /* magic list start --------------------------------------------------*/
    $(".magiclist>ul").children().contents().filter(function(){
        return this.nodeType == 3;
    }).wrap('<a class="ueberschrift" href="#"></a>');
    
    $('.magiclist ul li .ueberschrift').click(function(){
        $(this).next(':hidden').parent().addClass('ausgewaehlt');
        $('.magiclist ul li .ueberschrift').not(this).parent().removeClass('ausgewaehlt');
        
        $('.magiclist ul li .ueberschrift').not(this).next(':visible').toggle('slow');
        $(this).next().toggle('slow');
        return false;
    }).next().hide();
   /* magic list end    --------------------------------------------------*/
});
