﻿// JavaScript Document

$(document).ready(
	function(){
		setTimeout(_ToolTip_inner_StartUp,500);
		$("body").append("<div id=\"tip2\" style=\"position:absolute; display:none; top:0; left:0; height:14px; width:auto; height:auto; padding:2px; background-color:#ffffe1; border:1px solid #000000; color:#000000; word-break:keep-all;whiteSpace:nowrap;\"></div>");
	}
);

function _ToolTip_inner_StartUp(){
		$("a[title]").each(
			function(){
				$(this).bind("mouseenter",function(){
						$("#tip2").html($(this).attr("title"));
						$(this).attr("title","");
						$("#tip2").css("display","block");
						$("#tip2").css("left",event.x + 10);
						$("#tip2").css("top",event.y + parseInt(document.documentElement.scrollTop) + parseInt(document.body.scrollTop) + 10);						
					});
				
				$(this).bind("mouseout",function(){
						$(this).attr("title",$("#tip2").html());
						$("#tip2").css("display","none");
						$("#tip2").html("");
					});
			}
		);

		$("img[alt]").each(
			function(){
				$(this).bind("mouseenter",function(){
						$("#tip2").html($(this).attr("alt"));
						$(this).attr("alt","");
						$("#tip2").css("display","block");
						$("#tip2").css("left",event.x + 10);
						$("#tip2").css("top",event.y + parseInt(document.documentElement.scrollTop) + 10);						
					});
				
				$(this).bind("mouseout",function(){
						$(this).attr("alt",$("#tip2").html());
						$("#tip2").css("display","none");
						$("#tip2").html("");
					});
			}
		);
		
		$("img[title]").each(
			function(){
				$(this).bind("mouseenter",function(){
						$("#tip2").html($(this).attr("title"));
						$(this).attr("title","");
						$("#tip2").css("display","block");
						$("#tip2").css("left",event.x + 10);
						$("#tip2").css("top",event.y + parseInt(document.documentElement.scrollTop) + 10);						
					});
				
				$(this).bind("mouseout",function(){
						$(this).attr("title",$("#tip2").html());
						$("#tip2").css("display","none");
						$("#tip2").html("");
					});
			}
		);

}