(function($) {
  $.fn.hint = function(html, settings) {
    var settings = $.extend({}, $.fn.hint.defaults, settings);

    var div = $(this);
    var hint;
    var offset = div.position();

    function hideHint() {
      hint.fadeOut(function() { $(this).remove(); });
    }

    if (offset) {
      hint = $('<div>')
        .addClass('hint')
        .css({
          left: offset.left + div.width() - 10,
          top: offset.top + div.height() + 10
        })
        .html(html)
        .corner('12px')
        .hide()
        .insertAfter(div)
        .fadeIn();

      div.live('focus', hideHint);
    }
    
    return this;
  }

  $.fn.hint.defaults = {
    //
  }
})(jQuery);