(function($)
{
	$.fn.scroller = function(options) 
	{ 
		var methods =
		{
			scroll: function()
			{
				$(this).animate({"top": settings['container-height'] + "px"}, {duration: 0, queue: true});
				$(this).animate({"top": ($(this).height() * -1) - settings['container-height'] + "px"}, settings['duration'], 'linear', function() {
					methods['scroll'].apply(this, Array.prototype.slice.call(arguments, 1));
				});	
			}
		};
	
		var settings = 
		{
			'duration' : 10000,
			'container-height' : 200
		};
		
		return this.each(function() 
		{        
			if (options) 
			{ 
				$.extend(settings, options);
			}
			var x = 0;
			
			methods['scroll'].apply(this, Array.prototype.slice.call(arguments, 1));
			
		});

	};
})(jQuery);

