
this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 10;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$(".tooltip-icon").hover(function(e){											  
		var hoveredId = $(this).attr("id");
		var tooltipHtml = $("#"+hoveredId+"_div").html();
		if(tooltipHtml!=null && tooltipHtml!=''){
			$("body").append("<div id='current-tooltip'><div class='text-container'>"+ tooltipHtml +"</div></div>");
			$("#current-tooltip")
				.css("top",(e.pageY - xOffset) + "px")
				.css("left",(e.pageX + yOffset) + "px")
				.fadeIn("fast");		
		}
	},
	function(){
		//this.title = this.t;		
		$("#current-tooltip").fadeOut(50);
		setTimeout('$("#current-tooltip").remove();',50);
    });	
	$(".tooltip-icon").mousemove(function(e){
		$("#current-tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};


this.tooltipHint = function(){	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 30;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$(".net-shops-tooltip").hover(function(e){											  
		var hoveredId = $(this).attr("id");
		var tooltipHtml = $("#"+hoveredId+"_div").html();
		if(tooltipHtml!=null && tooltipHtml!=""){
			$("#"+hoveredId+"_div").css("top",(e.pageY - xOffset) + "px").css("left",(e.pageX + yOffset) + "px").fadeIn(50);		
		}
	},
	function(){
		//this.title = this.t;		
		$(".net-shops-tooltip-content").fadeOut(250);
    });	
	$(".net-shops-tooltip").mousemove(function(e){
		var hoveredId = $(this).attr("id");
		$("#"+hoveredId+"_div").css("top",(e.pageY - xOffset) + "px").css("left",(e.pageX + yOffset) + "px");
	});			
};


// starting the script on page load
$(document).ready(function(){
	tooltip();
	tooltipHint();
});
