$(function(){
	var strtext = $("#headline span").html().length;
	var speed = (strtext/5 > 15)?strtext/5:15;
	$("#headline").css("overflow","hidden").css("position","relative");
	$("#headline span").css("width",strtext*12).css("float","left").css("position","relative").css("left",$("#headline").width()+5);

	jQuery.fn.extend({
		slideAnime:function(t){
			var that = this;
			var thatt = t;
			this.animate({
				left: -1 * this.width() - 5
			},t*1000,"linear",function(){
				that.css("left",that.parent().width());
				that.slideAnime(thatt);
			});

		    return this;
		}
	});

	$("#headline span").slideAnime(speed);
});

