$(document).ready(function(){
  
  counter = 1;
  $("#newsentry div:first").find(".previous").hide();
  
  $("#newsentry div:not(:first)").hide();

  $("#newsentry div .next").click(function(event){
  	counter++;
  	//$(this).parent().addClass("animate" + counter);
  	$(this).parent().hide(300);
  	$(this).parent().next().show(300);
  	if (counter == 2)
  	{
  		$(this).parent().next().find(".next").hide();
  	}
   });

  $("#newsentry div .previous").click(function(event){
  	counter = counter - 1;
  	$(this).parent().hide(10);
  	$(this).parent().prev().show(300);
  	if (counter == 1)
  	{
  		$(this).parent().prev().find(".previous").hide();
  	}
   });

/*
jQuery.preLoadImages("animation1-plastep1.gif", "/fileadmin/vorlagen/images/animation1-plastep1.gif");
jQuery.preLoadImages("animation1-plastep2.gif", "/fileadmin/vorlagen/images/animation1-plastep2.gif");
jQuery.preLoadImages("animation1-plastep3.gif", "/fileadmin/vorlagen/images/animation1-plastep3.gif");
jQuery.preLoadImages("animation1-plastep4.gif", "/fileadmin/vorlagen/images/animation1-plastep4.gif");
jQuery.preLoadImages("animation1-plastep5.gif", "/fileadmin/vorlagen/images/animation1-plastep5.gif");
*/


 });
