/*
 * formtip for jQuery
 * by Daniel Sentker
 * @version 0.21
 * 19.01.2010
 * http://www.shiftedwork.de
 *
 * Copyright (c) 2011 Daniel Sentker
 * Dual licensed under the MIT and GPL licenses.
 *
 */
(function($){
    $.fn.formtip = function() {
        return this.each(function() {
            var t = $(this);
            if(t.attr('title')) {
                t.focusin(function() {
                    $(this).after('<div class="formtip-holder">'+t.attr('title')+'<div class="chat-bubble-arrow-border"></div><div class="chat-bubble-arrow"></div></div>');
                    $('.formtip-holder').fadeIn();
                }).focusout(function() {
                    $('.formtip-holder').fadeOut('fast', function() {
                        $(this).remove();
                    });
                });
            }
        });
    };
})(jQuery);
