function simple_tooltip(target_items, name) {
    if ($.browser.msie) {
        name = name + "ie";
    }
    $(target_items).each(function(i) {
        if ($(this).attr("title") != "") {
            $("body").append("<div class='" + name + "' id='" + name + i + "'><p>" + $(this).attr('title') + "</p></div>");
            var my_tooltip = $("#" + name + i);
            var position = $(this).position();
            var hh = (my_tooltip.width() - $(this).width()) / 2;
            $(this).removeAttr("title").mouseover(function() {
                my_tooltip.css({
                    opacity: 0.8,
                    display: "none"
                }).fadeIn(500);
                my_tooltip.css({
                    left: position.left - hh,
                    top: position.top - 95
                });
            }).mouseout(function() {
                my_tooltip.fadeOut(200);
            });
        }
    });
}
$(document).ready(function() {
    simple_tooltip("a", "tooltip");
});