function removeMessager()
{
	$('.kermit_messager.autohide').each(function(){
		$(this).wait(3000).fadeOut('slow');
	});
	
	$('.kermit_messager').not('.autohide').each(function(){
		$(this).append('<span id="close_messager">Masquer</span>');
		$('#close_messager').click(function(){
			$(this).parent().fadeOut('slow');
		});
	});
}

$.fn.wait = function(time, type) {
    time = time || 1000;
    type = type || "fx";
    return this.queue(type, function() {
        var self = this;
        setTimeout(function() {
            $(self).dequeue();
        }, time);
    });
};


$(removeMessager);
