$(function() {
	$(".ttw").hide();
	$("body").append("<div id='tts' style='position:absolute;top:0px;left:0px;'></div>");
	$(".tt").hover(
		function(e) {
			$("form").css("display","none");
			$("#tts").hide().html($(".ttw",this).html());
			var w=$("#tts").width(),h=$("#tts").height();
			var wl=$(document).width(),wh=$(document).height();
			var x=Math.ceil(e.pageX-w/2),y=Math.ceil(e.pageY-h/2);
			if (e.pageX-Math.ceil(w/2)<10) {x=10;} else if (e.pageX+w>wl) {x=wl-30-w;}
			if (e.pageY-Math.ceil(h/2)<10) {y=10;} else if (e.pageY+h>wh) {y=wh-30-h;}
			$("#tts").css({top:(y+"px"),left:(x+"px")}).fadeIn(300);
		}
	);
	$("#tts").bind("mouseleave",function() {$(this).fadeOut(300);$("form").css("display","block");});
})
