﻿//$(function () {
//	var oToolTip = $("<div id='myToolTip'>");
//	$("body").append(oToolTip);

//	SetToolTip();
//});

function SetToolTip() {
	$("#myToolTip").hide();

	$("a[title]").each(function () {
		$(this).mouseenter(function (eventArgs) {
			var strTitle = $(this).attr("title");

			$(this).removeAttr("title");
			$(this).attr("Temp", strTitle);

			$("#myToolTip").css("left", eventArgs.pageX - 120).css("top", eventArgs.pageY + 20);

			$("#myToolTip").text("");
			$("#myToolTip").fadeIn(300, function () {
				$("#myToolTip").text(strTitle);
			});
		})

		$(this).mouseout(function (eventArgs) {
			var strTitle = $(this).attr("Temp");

			$(this).removeAttr("Temp");
			$(this).attr("title", strTitle);

			$("#myToolTip").fadeOut(100);
		})
	});
}
