function tooltip(target_items, name) {
$(target_items).each(function (i) {
$("body").append("<div class='" + name + "' id='" + name + i + "'><p>" + $(this).attr('title') + "</p></div>");
var tt = $("#" + name + i);
$(this).removeAttr("title").mouseover(function () {
tt.css({opacity: 0.9, display: "none"}).fadeIn(300);
}).mousemove(function (kmouse) {
tt.css({left: kmouse.pageX + 15, top: kmouse.pageY + 15});
}).mouseout(function () {
tt.fadeOut(400);
});
});
}
tooltip(".tip", "tooltip");