$.fn.extend({
    benbtooltip: function () {
	return this.each(function() {
	    new $.BenbTooltip(this);
	});
    }
});

$.BenbTooltip = function (tag) {
    var $tag = $(tag);
    var opened = false;

    $tag.hover(
	function () {
	    if (!opened) {
		$('body').append('<div id="tooltip">'+$tag.find(".text").html()+'</div>');
		$('#tooltip').css('left', $tag.offset().left+$tag.width()+'px');
		$('#tooltip').css('top', $tag.offset().top+$tag.height()+'px');
		opened = true;
	    }
	},
	function () {
	    $('#tooltip').remove();
	    opened = false;
	}
	);
}