(function($){

	var methods = {
	
		init : function(args){	

			var scroll_width = $(this).width();

			var message_width = $('#message').width();
			
			$('#message P').toggle();
			
			$('#message').attr('style','left:'+ scroll_width +'px');	
			
			scroll();
			
			function scroll()
			{
				$('#message').animate({
					left:'-' + message_width + 'px'
				},15000,'linear',function(){
				
					$('#message').attr('style','left:'+ scroll_width +'px');
			
					scroll();
				});
			}		

			return this;	
		}
	}

	$.fn.scroller = function(method) {
		if (methods[method]){
			return methods[method].apply(this, Array.prototype.slice.call(arguments,1));
		}else if (typeof method === 'object' || ! method){
			return methods.init.apply(this,arguments)
		}else{
			$.error('Method ' + method + ' does not exist on jQuery.scroller');
		}
	};
 
})( jQuery );
