$(document).ready(function()
{

   function reset(){
	  $('.mehr1').css("display","block");
      $('.button').css( { zIndex : 0 } );
   	  $('.button .padd').css( { width: 181,	height: 178, marginLeft: 4});
   	  $('.mehr').html("...mehr");
   	  $('.last').html("...mehr");
   	  $('.b5').css({marginLeft: 290});
   }
   
   $('.mehr').toggle(
   function()
   {	
   	  reset();
   	  $(this).html("...weniger");
   	  $(this).parent().css( { zIndex : 1 } );
 		  
   	  
   	  	$(this).parent().children(".padd").animate({
    		height: "370", 
      		width: "380"
		}, 500);
		
		if($(this).hasClass('.mehr2')){
			$('.b2 .mehr1').css("display","none");
		}
   },
   function()
   {
   	  $(this).html("...mehr");
   	  
      $(this).parent().children(".padd").animate({
      	height: "178", 
     	 width: "181"
      }, 500);
	  
      if($(this).hasClass('.mehr2')){
			$('.b2 .mehr1').css("display","block");
		}
   });
   
   
   

  
 
   
   
   
   
	
 $('.last').toggle(
   function()
   {	
   	  $(this).html("weniger");
   	  
   	  $('.button').css( { zIndex : 0 } );
   	 
   	  $('.button .padd').css( { width: 181,	height: 178});
   	 
   	  $(this).parent().css( { zIndex : 1 } );
 
   	  
   	    
   	  $(this).parent().animate({
   	  	marginLeft: "90"
	  }, 500);


   	  $(this).parent().children(".padd").animate({
      	height: "370", 
      	width: "380"
	  }, 500);
   },
   function()
   {
   	   $(this).html("mehr");
   	   
   	   $(this).parent().animate({marginLeft: "290"}, 500);
      
      $(this).parent().children(".padd").animate({
     	 height: "178", 
     	 width: "181",
    	 marginLeft: "4"
      }, 500);
   });
});

//$(this).parent().slideUp();mehrLast
