/* Human Message pour jQuery par Tommy Bergeron Inspiré de: http://code.google.com/p/humanmsg/ http://humanized.com/weblog/2006/09/11/monolog_boxes_and_transparent_messages/ */ //Opacité de les messages var msgOpacity = .9; //Délai après mouvement var delai_mouvement = 2000; //Délai sans mouvement var delai_sans_mouvement = 5000; function bindEvents() { $('body').click(removeMsg) .keypress(removeMsg); } function removeMsg() { $('body').unbind('click', removeMsg) .unbind('keypress', removeMsg); if ($('#humanMsg').css('opacity') == msgOpacity) { $('#humanMsg').animate({ opacity: 0 }, 500, function() { $(this).hide() }); } } function afficher_message (msg, class_name) { var t1 = ''; var t2 = ''; if (msg == '') return false; clearTimeout(t2); $("body").append('