
(function(){var ns=rx.namespace('stream.message');var msgbanner=$('.msgbanner');ns.create=function(html,cl){msgbanner.addClass('visible');var jq=$('<div>').html(html).addClass('msg').hide().appendTo(msgbanner);ns.init(jq);cl&&jq.addClass(cl);jq.show('fast');return jq;};ns.init=function(jq){jq.setlifetime=function(seconds){jq.attr('lifetime',seconds);jq.i=setTimeout(function(){rx.stream.message.remove(jq);},parseInt(parseInt(seconds)*1000));};jq.addClass('hot').click(function(){ns.remove(jq);}).hover(function(){jq.i&&clearTimeout(jq.i);jq.addClass('hover');jq.next().length||jq.addClass('last');},function(){jq.removeClass('hover last');jq.attr('lifetime')&&jq.setlifetime(jq.attr('lifetime'));});if(jq.attr('lifetime'))
jq.setlifetime(jq.attr('lifetime'));};ns.remove=function(jq){jq.stop(true).animate({opacity:0},function(){jq.hide('fast',function(){$(this).remove();msgbanner.children().length||msgbanner.removeClass('visible');})});};$(window).bind('scroll',function(){var y=typeof(window.pageYOffset)=='number'?window.pageYOffset:document.documentElement.scrollTop;if($.browser.msie&&$.browser.version=='6.0')
msgbanner.css('top',y);});})();(function(){$('.msgbanner .msg').each(function(){var $this=$(this);rx.stream.message.init($this);});})();