$(function() {
	var step = 2; 
	var current = 0; 
	var maximum = $('#jqcarousel ul.carousel-wrapper li.carousel-item').size(); 
	var visible = 2; 
	var speed = 200; 
	var liSize = 373;
	var carousel_height = 260;
	var ulSize = liSize * maximum;
	var divSize = liSize * visible;  
	$('#jqcarousel ul.carousel-wrapper').css("width", ulSize+"px").css("left", -(current * liSize)).css("position", "absolute");
	$('#jqcarousel').css("width", divSize+"px").css("height", carousel_height+"px").css("visibility", "visible").css("overflow", "hidden").css("position", "relative"); 
	$('.btnnext').click(function() { 
		if(current + step < 0 || current + step > maximum - visible) {return; }
		else {
			current = current + step;
			$('#jqcarousel ul.carousel-wrapper').animate({left: -(liSize * current)}, speed, null);
		}
		return false;
	});
	$('.btnprev').click(function() { 
		if(current - step < 0 || current - step > maximum - visible) {return; }
		else {
			current = current - step;
			$('#jqcarousel ul.carousel-wrapper').animate({left: -(liSize * current)}, speed, null);
		}
		return false;
	});
});
