(function($) {

    $.fn.tooltip = function(options) {

        this.each(function() {

            var tooltip = null;
            
            $(this).mouseenter(function() {
                tooltip = $('#' + options.id)
                tooltip.show();
            }).mouseleave(function() {
                if (tooltip) tooltip.hide();
                tooltip = null;
            });
        });
    }

})(jQuery);
