$(document).ready(function() {

  $('body.seefracht #content_dynamic div.csc-header.csc-header-n2 h1').click(function() {
    $(this).parents('#content_dynamic').children('form.no-print').slideToggle();
  });
  
  $('body.luftfracht #content_dynamic div.csc-header.csc-header-n2 h1').click(function() {
    $(this).parents('#content_dynamic').children('form.no-print').slideToggle();
  });
  
  $('body.landverkehr #content_dynamic div.csc-header.csc-header-n2 h1').click(function() {
    $(this).parents('#content_dynamic').children('form.no-print').slideToggle();
  });
  
  $('body.logistik #content_dynamic div.csc-header.csc-header-n2 h1').click(function() {
    $(this).parents('#content_dynamic').children('form.no-print').slideToggle();
  });
  

  //li.item-sub-color-active
  $('#leftcol li a.main-item, #leftcol li a.item-sub-active-border').mouseover(function(event) {

      event.preventDefault();

      $('.sub-lvl-1-border').each(function(id, item){
      
         //console.log($(item) +"-"+ $(this))
         if($(item) != $(this).parent().children('.sub-lvl-1-border'))
         {
            $(item).hide();
            $(item).parent().children('a.main-item').parent('li').removeClass('item-sub-active');
            $(this).parent().children('a.main-item').removeClass('item-sub-active-border');
         }
      });
      
      $(this).parent().children('a.main-item').parent('li').addClass('item-sub-active');
      $(this).parent().children('a.main-item').addClass('item-sub-active-border');
      
      $(this).parent().children('.sub-lvl-1-border').show();

  });
  
  
  $('.sub-lvl-1-border').mouseenter(function(event) {
    $(this).mouseleave(function(event) {


        $(this).oneTime(500, function() {
            $(this).hide();
            $(this).parent('li').removeClass('item-sub-active');
        });

  
    });
  });
  

});
