(function(jQuery){
	jQuery.fn.easyticker = function(options) {
			var settings = {
				dureeAffichage: 5000,
				speed: 'slow'
			};
			if(options) {
				jQuery.extend(settings, options);
			}			
			return this.each(function () {
				var prochain;
				var current;
				$(this).everyTime(settings.dureeAffichage, function(i) {
					if(i == 1) {
						current = $(this).children('li:first');		
					}else {			
						current = prochain;			
					}
					prochain = $(current).next('li');
					if(!$(prochain).html()) {
						prochain = $(this).children('li:first');
					}
					$(current).fadeOut(settings.speed);
					$(prochain).fadeIn(settings.speed);
				});
			});
	};
})(jQuery);
