function initHover(id, text) {
			   $("#link_" + id).click(function(event) {				 
					return false;
			   });
			   $("#link_" + id).hover(function(event) {				 
				  var div = $('#' + id);				  
				  if (!div.length) {				  				
					div = $("body").append('<div style="z-index: 5000;width: 250px; text-align: left; line-height: 1.5em; position: absolute; display: none; border: solid; border-width: 1px; padding: 5px; background-color: #fff199" id="' + id + '">' + text + '</div>');					
				  }
				  $('#' + id).css("top", event.pageY + 10);
				  $('#' + id).css("left", event.pageX + 10);
				  $('#' + id).animate({opacity: "show"}, "slow");			  
				}, function() {
				  $('#' + id).animate({opacity: "hide"}, "fast");
				});
			}
			
function initTooltip () {
	$(".bxToolTip").each(function(index) {                       
          $(this).find("ins").each(function(index) {
			var indexOfFirstBlank = this.innerHTML.indexOf(" ");			
			var keyword = this.innerHTML.substr(0,indexOfFirstBlank);									
			var explain = this.innerHTML.substr(indexOfFirstBlank+1, this.innerHTML.lenght);						
			var newText = "<a class='hint' style='cursor: default;' id='link_explain_"+keyword.replace("&nbsp;","").replace(" ","")+"' href='#'>" + keyword + "</a>";			
			this.innerHTML = newText;
			$(this).addClass("active");
			initHover("explain_" + keyword.replace("&nbsp;","").replace(" ",""),explain);
			
			document.getElementById("printkeyword").innerHTML = document.getElementById("printkeyword").innerHTML + "<b style='color:#BA0C15'>"+keyword+"</b><p>"+explain+"</p>";
			
		  });     
		  
    });     
}

$(function() {initTooltip();})

