$(document).ready(function() {





/* LEVEL_2 Click */
    $(".level_2_item li:not([class^='level_2_active_li'])").hover(
        function(){
            $(this).find("span:not([class^='level_2_active])").addClass('level_2_hover');
        },
        function(){
            $(this).find("span:not([class^='level_2_active])").removeClass('level_2_hover');
        }
    );

    $('.level_2_item li').live('click', function(){

        /* remove old active */

            /* remove marking */
            $('.level_2_list').find('.level_2_active_li').removeClass('level_2_active_li');
            $('.level_2_list').find('.level_2_active').removeClass('level_2_active');

            /* hide subs LEVEL_2 and Details*/
            $('.details_container').hide();
            $('.fotos_container').hide();

        /* show new active */

            /* add marking */
            $(this).addClass('level_2_active_li');
            $(this).find('span').addClass('level_2_active');

            /* show subs LEVEL_2 and Details*/
            $('#'+$(this).attr('id')+'_container').fadeIn();

            /* show Fotos*/
            $('#'+$(this).attr('id')+'_fotos').fadeIn();

    });

/* LEVEL_1*/
    $(".level_1_item div[class^='level_1_item_normal']").hover(
        function(){
            $(this).addClass('level_1_hover_item');
        },
        function(){
            $(this).removeClass('level_1_hover_item');
        }
    );

    $('.level_1_item').live('click', function(){

        /* remove old active */

            /* remove marking */
            $('.level_1_list').find('.level_1_active_item').removeClass('level_1_active_item');
            $(".level_1_item div[class^='arrow_box']").remove();

            /* hide subs LEVEL_2 and Details + Foto*/
            $('.level_2_item').hide();
            $('.details_container').hide();
            $('.fotos_container').hide();

            /* add marking */
            $(this).find('div').addClass('level_1_active_item');
            $(this).find('div').after('<div class="arrow_box"></div>');

            /* show subs LEVEL_2 and Details*/
            $('#'+$(this).attr('id')+'_container').fadeIn();

            /* do autoclick of first item in second menu */
            $('#'+$(this).attr('id')+'_container li:first').click();

    });

/* INITIALIZE */

    /* level 1 erste clicken */
    $('.level_1_item:first').click();

});
