(function($) {

	$.fn.easySlider2 = function(options){
	  
		// default configuration properties
		var defaults = {
			prevId: 'prevBtn',
			nextId: 'nextBtn',
			visibleCnt: 3,
			step: 3,
			speed:	800
		}; 
		
		var options = $.extend(defaults, options);  
		
		return this.each(function() {  
			obj = $(this);
			
      var maxLiH = 0;
      $("li", obj).each(function() {
        maxLiH = $(this).height() > maxLiH ? $(this).height() : maxLiH;
      });

      $("li", obj).each(function() {
        $(this).css('height', maxLiH);
      });
      
      obj.css('height',maxLiH*options.visibleCnt);
			
			var s = $("li", obj).length;
			var w = obj.width(); 
			var h = obj.height(); 
			var ts = s-1;
			var t = 0;

			
			$("#"+options.nextId).click(function(){		
				animate("next");
			});
			$("#"+options.prevId).click(function(){		
				animate("prev");
			});
			function animate(dir){
				if(dir == "next"){
				  t = t+options.step;
				} else {
					t = t-options.step;
				};
				t = t <= 0 ? 0 : t;
				t = t >=ts-options.visibleCnt+1 ? ts-options.visibleCnt+1 : t;
				p = (t*maxLiH*-1);
				$("ul",obj).animate(
					{ marginTop: p }, 
					options.speed
				);					
			};
		});
	  
	};

})(jQuery);