$(document).ready(function(){ 
	
	//$('#carousel').css({opacity : 0.4});
	
	$('#carouselcontainer').css({opacity : 0.4});
	$('#carouselcontainer').css({opacity : 0.4});
	
	//Define the animation speed for the Carousel 
	var speed = 600; 
	var delay = 2000;
	var current = 0;
	var imagestotal= 3;//how many images there are total that are hidden
	var imagedisplayed = 0;
	var opaqueimage = 4;
	
	function wait()
	{
	setTimeout(slide, delay)
	
	}
	
$('#carousel').click(function() {
  
window.location.href = "http://www.beringertame.com/whatwedo/testimonials/";

});


	function slide()
	{

	 $('#carousel ul').append( $('#carousel li:first-child') );
	
	/*if (imagedisplayed==imagestotal)
	{
	current=0;
	imagedisplayed=0;
	opaqueimage =3;
	}
	else
	{
	current = current -120;
	imagedisplayed=imagedisplayed+1;
	opaqueimage=opaqueimage+1;
	
    
	}*/

	$('#carousel li:nth-child('+( opaqueimage-1)+') img').animate({ opacity: 0.4}, 600);
	$('#carousel li:nth-child('+opaqueimage+') img').animate({ opacity: 1}, 600); 
	

     wait();
	}
	
	
	
	 wait() //starts the scroller up
	
		});
