$(function(){
    // diese zeile muss ganz als erstes in die scripts.js
    // mit etwas glück gibt es dann kein flackern mehr
    $("body").addClass("jsEnabled");

    $("ul.navi>li>ul").parent().hoverIntent({
        over: function(){
            $(this).children("a").addClass("hover").siblings("ul").show();
        },
        timeout: 300,
        out: function(){
            $(this).children("a").removeClass("hover").siblings("ul").hide();
        }
    });
      
    $("#eventBox p.linkEventDetails a").click(function () {
  if ($(this).parent().hasClass("active")) {
    $("p.linkEventDetails").removeClass("active");
    $("td.itemDescription div").hide();
    return false;
  }
  $("p.linkEventDetails").removeClass("active");
  $(this).parent().addClass("active");
  var descId = $(this).attr("href");
  $("td.itemDescription div").hide();
  $(descId).slideDown();
  return false;
});

// bestimmte veranstaltung/faq wählen ermöglichen
if (location.hash && location.hash.match(/^#(event)/)) {
  $("a[href='" + location.hash + "']").click();
  var elementOffset = $(location.hash).offset().top;
  $("html, body").animate({scrollTop: elementOffset}, 500);
}
    
/*  
$("#kalenderKategorie")

        .mouseover(function(){
            $(this)
                .data("origWidth", $(this).css("width"))
                .css("width", "auto");
        })

        .mouseout(function(){
            $(this).css("width", $(this).data("origWidth"));
        });   
*/                
});

