jQuery.noConflict();
jQuery(document).ready(function(){

    jQuery('ul#nav_main_A li:nth-child(10)').addClass('newnav1');
    jQuery('ul#nav_main_A li:nth-child(11)').addClass('newnav');
    jQuery('ul#nav_main_A li:nth-child(12)').addClass('newnav');
    
    jQuery("body").removeClass("noscript");
    jQuery("#nav").addClass("jquery");
    var mc = 0;
    jQuery("#button_10").toggle(
        function() {
            if (mc == 10) return;
            jQuery("#nav.jquery ul li ul").animate({
                height: 'hide',
                opacity: 'hide'
            }, 'slow');
            jQuery("#menu_10").animate({
                height: 'show',
                opacity: 'show'
            }, 'slow');
            mc = 10;
        },
        function() {
            if (mc == 10 ) {
                jQuery("#menu_10").animate({
                    height: 'hide',
                    opacity: 'hide'
                }, 'slow');
                mc = 0;
            } else {
                jQuery("#nav.jquery ul li ul").animate({
                    height: 'hide',
                    opacity: 'hide'
                }, 'slow');
                jQuery("#menu_10").animate({
                height: 'hide',
                opacity: 'hide'
            }, 'slow');
                mc = 10;
            }
    });
    
    
    jQuery("#button_50").toggle(
        function() {
            if (mc == 50) return;
            jQuery("#nav.jquery ul li ul").animate({
                height: 'hide',
                opacity: 'hide'
            }, 'slow');
            jQuery("#menu_50").animate({
                height: 'show',
                opacity: 'show'
            }, 'slow');
            mc = 50;           
        },
        function() {
            if (mc == 50 ) {
                jQuery("#menu_50").animate({
                    height: 'hide',
                    opacity: 'hide'
                }, 'slow');
                mc = 0; 
            } else {
                jQuery("#nav.jquery ul li ul").animate({
                    height: 'hide',
                    opacity: 'hide'
                }, 'slow');
                jQuery("#menu_50").animate({
                    height: 'show',
                    opacity: 'show'
                }, 'slow');
                mc = 50;
            }
    });
    
    jQuery("#button_51").toggle(
        function() {
            if (mc == 51) return;
            jQuery("#nav.jquery ul li ul").animate({
                height: 'hide',
                opacity: 'hide'
            }, 'slow');
            jQuery("#menu_51").animate({
                height: 'show',
                opacity: 'show'
            }, 'slow');
            mc = 51;           
        },
        function() {
            if (mc == 51 ) {
                jQuery("#menu_51").animate({
                    height: 'hide',
                    opacity: 'hide'
                }, 'slow');
                mc = 0; 
            } else {
                jQuery("#nav.jquery ul li ul").animate({
                    height: 'hide',
                    opacity: 'hide'
                }, 'slow');
                jQuery("#menu_51").animate({
                    height: 'show',
                    opacity: 'show'
                }, 'slow');
                mc = 51;
            }
    });
    
    jQuery("#button_16").toggle(
        function() {
            if (mc == 16) return;
            jQuery("#nav.jquery ul li ul").animate({
                height: 'hide',
                opacity: 'hide'
            }, 'slow');
            jQuery("#ausbildungen").animate({
                    height: 'show',
                    opacity: 'show'
                }, 'slow');
            jQuery("#ausbildungen ul").animate({
                    height: 'show',
                    opacity: 'show'
                }, 'slow');
            mc = 16;        
        },
        function(){
            if (mc == 16 ) {
                jQuery("#ausbildungen").animate({
                    height: 'hide',
                    opacity: 'hide'
                }, 'slow');
                mc = 0; 
            } else {
                jQuery("#nav.jquery ul li ul").animate({
                height: 'hide',
                opacity: 'hide'
            }, 'slow');
                jQuery("#ausbildungen").animate({
                    height: 'show',
                    opacity: 'show'
                }, 'slow');
                jQuery("#ausbildungen ul").animate({
                    height: 'show',
                    opacity: 'show'
                }, 'slow');
                mc = 16; 
            }
    });
    
    jQuery("#button_392").toggle(
        function() {
            if (mc == 392) return;
            jQuery("#nav.jquery ul li ul").animate({
                height: 'hide',
                opacity: 'hide'
            }, 'slow');
            jQuery("#menu_392").animate({
                height: 'show',
                opacity: 'show'
            }, 'slow');
            mc = 392;
        },
        function() {
            if (mc == 392 ) {
                jQuery("#menu_392").animate({
                    height: 'hide',
                    opacity: 'hide'
                }, 'slow');
                mc = 0;
            } else {
                jQuery("#nav.jquery ul li ul").animate({
                    height: 'hide',
                    opacity: 'hide'
                }, 'slow');
                jQuery("#menu_392").animate({
                    height: 'show',
                    opacity: 'show'
                }, 'slow');
                mc = 392;
            }
    });
    

    jQuery("#button_393").toggle(
        function() {
            if (mc == 393) return;
            jQuery("#nav.jquery ul li ul").animate({
                height: 'hide',
                opacity: 'hide'
            }, 'slow');
            jQuery("#menu_393").animate({
                height: 'show',
                opacity: 'show'
            }, 'slow');
            mc = 392;
        },
        function() {
            if (mc == 393) {
                jQuery("#menu_393").animate({
                    height: 'hide',
                    opacity: 'hide'
                }, 'slow');
                mc = 0;
            } else {
                jQuery("#nav.jquery ul li ul").animate({
                    height: 'hide',
                    opacity: 'hide'
                }, 'slow');
                jQuery("#menu_393").animate({
                    height: 'show',
                    opacity: 'show'
                }, 'slow');
                mc = 393;
            }
    });

    jQuery("#button_19").toggle(
        function() {
            if (mc == 19) return;
            jQuery("#nav.jquery ul li ul").hide('normal');
            jQuery("#menu_19").animate({
                    height: 'show',
                    opacity: 'show'
            }, 'slow');;
            mc = 19; 
        },
        function(){
            if (mc == 19 ) {
                jQuery("#menu_19").hide('normal');
                mc = 0; 
            } else {
                jQuery("#nav.jquery ul li ul").hide('normal');
                jQuery("#menu_19").animate({
                    height: 'show',
                    opacity: 'show'
                }, 'slow');
                mc = 19;     
            }
    });
    
});
