$(function(){
    $("#navi>ul>li").each(function () {
        $(this).hoverIntent({
            over: function () {
                $(this).addClass("hover");
            },
            timeout: 300,
            out: function () {
                $(this).removeClass("hover");
            }
        });
    });

    // FAQ
    //Hide (Collapse) the toggle containers on load
    $(".toggle_container").hide(); 

    //Switch the "Open" and "Close" state per click
    $(".trigger").toggle(function(){
        $(this).addClass("active");
        }, function () {
        $(this).removeClass("active");
    });

    //Slide up and down on click
    $(".trigger").click(function(){
        $(this).next(".toggle_container").slideToggle("fast");
    });
    
    //show/hide all answers
    $("a.showall").toggle(function(e){
      e.preventDefault();
      $("a.showall").html("Alle Fragen schließen");
      $(".toggle_container").show();    
    }, function(e) {
      e.preventDefault();
      $("a.showall").html("Alle Fragen öffnen");
      $(".toggle_container").hide();
    });
});


