	$(function() {	
	
		var step = 1; 
		var current = 0; 
		var maximum = $('#team ul li').size(); 
		var visible = 1; 
		var speed = 750; 
		var liSize = 275;
		var meetTheTeam_height = 200;
		var infinite = true;


		var ulSize = liSize * maximum;   
		var divSize = liSize * visible;  
 
		$('#team ul').css("width", ulSize+"px").css("left", -(current * liSize)).css("position", "absolute");
		
		$('#team').css("width", divSize+"px").css("height", meetTheTeam_height+"px").css("visibility", "visible").css("overflow", "hidden").css("position", "relative"); 
 
		$('.btnnext').click(function() { 
			if(current + step < 0 || current + step > maximum - visible) {
			
			if (infinite)
			{
			$('#team ul').animate({left: 0}, speed, null);
			current=0;
			}
			else
			return;
			}
			else {
				current = current + step;
				$('#team ul').animate({left: -(liSize * current)}, speed, null);
			}
			return false;
		});
 
		$('.btnprev').click(function() { 
			if(current - step < 0 || current - step > maximum - visible) {
			if (infinite)
			{
			$('#team ul').animate({left: -(liSize * (maximum - 1))}, speed, null);
			current=maximum-1;
			}
			else
			return;
			}
			else {
				current = current - step;
				$('#team ul').animate({left: -(liSize * current)}, speed, null);
			}
			return false;
		});

	});
