
 $(document).ready(function(){
 
	$('#news .newspost').each(function(i) {
    $(this).children('.newsbody').hide();
    $(this).removeClass('show');
    $(this).addClass('hide');
  });
  
  $('#news .newspost:first').find('.newsbody').show();
  $('#news .newspost:first').addClass('show');
  $('#news .newspost:first').removeClass('hide');
  
  $('#news .newspost:first').next().find('.newsbody').show();
  $('#news .newspost:first').next().addClass('show');
  $('#news .newspost:first').next().removeClass('hide');
  
  /*$('#news .newspost:first').next().next().find('.newsbody').show();
  $('#news .newspost:first').next().next().addClass('show');
  $('#news .newspost:first').next().next().removeClass('hide');*/
  
  $('#news .newspost').find('.newshead').click(function(){
      $(this).parent().find('.newsbody').slideToggle();
      $(this).parent().not("show").toggleClass("hide");
      $(this).parent().not("hide").toggleClass("show");
  });
  
  $('#col2_content p').after("<a id=\"newszu\">Alle zuklappen</a>");
  $('#col2_content p').after("<a id=\"newsauf\">Alle aufklappen</a>");
 
  $('#newszu').click(function(){
      $('#news .newspost').each(function(i) {
          $(this).children('.newsbody').hide();
          $(this).removeClass('show');
          $(this).not("hide").addClass('hide');
      });    
  });
  
  $('#newsauf').click(function(){
      $('#news .newspost').each(function(i) {
          $(this).children('.newsbody').show();
          $(this).removeClass('hide');
          $(this).not("show").addClass('show');
      });    
  });

  $('div').find('.newshead').mouseover(function(){
     $(this).css("background-color", "#ddd");
  });

  $('div').find('.newshead').mouseout(function(){
     $(this).css("background-color", "#fff");
  });
  
  $('#newsauf').mouseover(function(){
     $(this).css("background-color", "#f29400");
  });
  
  $('#newsauf').mouseout(function(){
     $(this).css("background-color", "#ddd");
  });
  
  $('#newszu').mouseover(function(){
     $(this).css("background-color", "#f29400");
  });
  
  $('#newszu').mouseout(function(){
     $(this).css("background-color", "#ddd");
  });
  
});












