jQuery.fn.car3 = function(options){


	var display = 10;
	var item_height = 23;
	
	var elem = $(this);
	var all_items = elem.find('a');
	
	//console.log($(all_items).html());
	var total_items = $(all_items).length;
	
	var min_top = (total_items - display) * item_height * -1;
	var max_top = 0;
	
	var container = elem.find('.container');
	
	//console.log(total_items);
	//var item_height = int($(all_items).css('height'));
	//console.log(item_height);

	elem.find('#prev').removeClass('prev').addClass('prev_d');

	
	elem.find('.outer').css({'height': display * item_height, 'position':"relative"});
	$(container).css({ 'top':'0px', 'position':'relative'});
	
	elem.find('#next').click(function(){
		var new_top = parseInt($(container).css('top')) - 23;
		if(new_top >= min_top){
			$(container).animate({'top':new_top + "px"}, 200);
			elem.find('#prev').removeClass('prev_d').addClass('prev');
		}

		if(new_top == min_top){
			$(this).removeClass('next').addClass('next_d');
		}
	});
	
	elem.find('#prev').click(function(){
		var new_top = parseInt($(container).css('top')) + 23;
		if(new_top <= max_top){
			$(container).animate({'top':new_top + "px"}, 200);
			elem.find('#next').removeClass('next_d').addClass('next');
		}

		if(new_top == max_top){
			$(this).removeClass('prev').addClass('prev_d');
		}
	});

}
