/*
 * jQuery JavaScript Library v1.3.2
 */
 $(document).ready(function(){
   // Your code here
  //$("a").addClass("test");
  
	//DD_belatedPNG.fix('#header');  
	//DD_belatedPNG.fix('#main_content');  
	//DD_belatedPNG.fix('#footer'); 
	
	//	$("#content_a .container_prev").css("opacity", ".5");
		//$("#content_b").css("opacity", "0");
		
//		$("#container_a").fadeOut("fast");	
		var currentposition = 0;
		var references = $('.references > div').size();

		var moveheight = 185;
		var max_height = -1*(moveheight*references);
		
		
		$("#next_reference").click(function()
  		{
			
			if(currentposition - moveheight > max_height+moveheight){
				currentposition -= moveheight;
			
			}else{
				currentposition = 0;
			}
			
			$(".references").animate({marginTop: currentposition+"px"});
			return false;

		});
		
		
		$("#prev_reference").click(function()
  		{
			//alert('currentposition: '+currentposition+' max_height: '+max_height)					
			if(currentposition +moveheight > 0){
				currentposition = max_height+(2*moveheight);
			}else{
				currentposition += moveheight;
			}
			$(".references").animate({marginTop: currentposition+"px"});
			return false;

		});
		
				
		$(".references").fadeIn("slow");
		 /*
		$(this).animate
	    ({left: "400px"}, 3000);
	   });

		 */	
	
	

 });
 
 


