(function($) {
  $.fn.momoAnnounce = function(options) {
    return this.each(function() {
      var announceDiv = $(this);
      
      announceDiv
      .children('div:last')
      .prepend('<span class="close">X</span>')
      .children('.close')
      .css({
        'cursor' : 'pointer',
        'display' : 'none'
      })
      .end().end()

      .hover(function() {
        // over
        $(this)
        .find('.close')
        .show()
        .click(function() {
          announceDiv.slideUp(250, function() {
            $(this).remove();
          });
        });
      }, function() {
        $('.close').hide();
      });
      
      var timer = setTimeout(function() {
        announceDiv.slideUp(250, function() {
          $(this).remove();
        });
        clearTimeout(timer);
      }, 8000);
    }); // end each
  };
})(jQuery);