(function($) {
	$.fn.news = function() {
				
		return this.each(function(){
		
		var $this = jQuery(this);
		var pos = parseInt($this.css('marginLeft'));
		var lng = parseInt($this.css('width'));
				
		
				
		function defil(){
			
			if (pos >(-1*lng)+5){
			$this.animate({"marginLeft": "-=1px"},10);
			$this.css({"color":'red'});
			}
			else{
			$this.css({"color":'white'});
			$this.css({"display":'none'});
			$this.animate({"marginLeft": "+500px"},5);
			$this.css({"display":'block'});
			}				
			
		}
		
		defil();
		
		});
	};	
})(jQuery);

