

$(document).ready(function()
{
  //$(".CD_toolboxContent").hide();

  //hide the all of the element with class CD_PressContent
  $(".CD_PressContent").hide();
  //show the clicked one
  $(".CD_PressContent_active").show();
  

  
  //toggle the componenet with class CD_PressContent
  $(".CD_PressTeaserOpen").click(
    function()
    {
    
   
        $(this).next(".CD_PressContent").slideToggle(600);
         var $this = $(this);
         if( $this.is('.CD_PressTeaserOpen') ) {
         
            $this.removeClass('CD_PressTeaserOpen');
            $this.addClass('CD_PressTeaserClose');
         }
         else{
         
            $this.removeClass('CD_PressTeaserClose');
            $this.addClass('CD_PressTeaserOpen');
         }
    }
  );

  //if link on startpage is clicked to the opposite to above  
  $(".CD_PressTeaser_active").click(
    function()
    {
     
        $(this).next(".CD_PressContent").slideToggle(600);
        var $this = $(this);
        if( $this.is('.CD_PressTeaser_active') ) {
            $this.removeClass('CD_PressTeaser_active');
            $this.addClass('CD_PressTeaserOpen');
        }
        else{
            $this.removeClass('CD_PressTeaserOpen');
            $this.addClass('CD_PressTeaser_active');
        }
    }
  );
  
  
      //toggle the componenet with class CD_PressContent
      /*
  $(".CD_toolbox").hover(
    function()
    {
        $(this).next(".CD_toolboxContent").slideDown(600);
    },
    function()
    {
    }
  );
  
   $(".CD_toolboxHolderTop").hover(
    function()
    {
        $(".CD_toolboxContent").slideUp(600);
    },
    function()
    {
        $(".CD_toolboxContent").slideUp(600);
    }
  );
  */
});


