


$(document).ready(function() {

    /** Homepage: Main-Navigation - MouseOver **/
    $('#MAINNAV li').mouseenter(function() {
        var activeEyeCatcher = $(this).attr('class');
        var oldEyeCatcher = $('.activeElement').attr('id');

        if(oldEyeCatcher != activeEyeCatcher) {
            // Aktives Element neu setzen
            $('#' + oldEyeCatcher).removeClass('activeElement');
            $('#' + activeEyeCatcher).addClass('activeElement');

            // Elemente animieren: Alt ausblenden, neu einblenden
            $('#' + oldEyeCatcher).stop().animate({opacity: 0.0}, 'slow').css('z-index','1');
            $('#' + activeEyeCatcher).css('visibility','visible').stop().animate({opacity: 1}, 'slow', function() {
                $('#' + oldEyeCatcher + '.STARTCONTEXT').css('visibility','hidden');
            }).css('z-index','300');
        }
    });
});
