function aero_carousel(left_arrow, right_arrow, content, step, total_count, visible_count)
{
	var min_left = - (total_count - visible_count) * step;
	var max_left = 0;

	function intval(string)
	{
		var result = parseInt(string);
		if (isNaN(result))
			return 0;
		else
			return result;
	}

	var show_hide_arrows = function()
	{
		if (intval(content.css('left'))<=min_left)
			right_arrow.css({'visibility':'hidden'});
		else
			right_arrow.css({'visibility':'visible'});

		if (intval(content.css('left'))>=max_left)
			left_arrow.css({'visibility':'hidden'});
		else
			left_arrow.css({'visibility':'visible'});
	}

	right_arrow.click(function(){
		if (intval(content.css('left'))>min_left)
			content.animate({'left': (intval(content.css('left'))-step)+'px'},'slow',false,show_hide_arrows);
		return false;
	});

	left_arrow.click(function(){
		if (intval(content.css('left'))<max_left)
			content.animate({'left': (intval(content.css('left'))+step)+'px'},'slow',false,show_hide_arrows);
		return false;
	});

	show_hide_arrows();
}
