var hauteur = 25;
var vitesse = 1000;
var pause 	= 2000;

$(document).ready(function(){

	$('#news').append(
				$('<div></div>').attr('id','newsWin').append(
					$('<div></div>').attr('id','newsDefil')
									.css('top','0px')
									.css('height',hauteur*(numNews+1) + 'px')));

	/* On mets les une à la suite des autres chaque news */
	News.push(News[0]);
	Lien.push(Lien[0]);
	$(News).each(function(index,value){
		$('#newsDefil').append(
							$('<div></div>').attr('class','newsPetit').css('top',hauteur*index +'px').append(
								$('<a></a>').attr('href',Lien[index]).html(value)));
	});
	
	/* On Lance la boucle */
	actualNews = 0;
	rol();
});

	
function rol() {
	actualNews++;
	if (actualNews > numNews){
		actualNews = 0;
		$('#newsDefil').animate({top:0},0);
	}else $('#newsDefil').delay(pause).animate({top:'-='+hauteur},vitesse);
	rol();
}
