//This function is Customizable
//This Function is used to generate the tooltip
//Customized Verision 1.0
//Author : Alipta Ballav

this.tooltip = function(){	
	/* CONFIG */		
		blocked: false,
		xOffset = 0;
		yOffset = 20;	
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	
	
	var Browser = {  Version: function() {    
	var version = 999; 
	// we assume a sane browser    
	if (navigator.appVersion.indexOf("MSIE") != -1)      
	// bah, IE again, lets downgrade version number      
	version = parseFloat(navigator.appVersion.split("MSIE")[1]);    
	return version;  }}
	
	
	
	$(".tooltip").hover(function(e){											  
		$("#tooltip").remove();
		if (this.title=="You must be 18 years or older to create & manage an account"){$(".tooltipBlocker").hide();}
		this.t = this.title;
		this.title = "";									  
		
		if (Browser.Version() < 7) 
	
		{  
	
		
			$("body").append("<div id='tooltip'><div class='position1'><div class='style1'>"+ this.t +"</div></div></div>");
	
	
		}
		
		else
		{
		
			$("body").append("<div id='tooltip'><div class='style'><div class='position'>"+ this.t +"</div></div></div>");
		
		
		}
		
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");


	},
	
	
		function(){
			this.title = this.t;
			$("#tooltip").remove();
			if (this.title=="You must be 18 years or older to create & manage an account"){$(".tooltipBlocker").show();}
		});	
	

	
	
		$(".tooltip").mousemove(function(e){
			$("#tooltip")
				.css("top",(e.pageY - xOffset) + "px")
				.css("left",(e.pageX + yOffset) + "px");
		});	
	
		$("input").keypress(function(){
			$("#tooltip").remove(); 
		});
			
	
};

//tooltip2
this.tooltip2 = function(){	
	/* CONFIG */		
		blocked: false,
		xOffset = 0;
		yOffset = 20;	
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	
	
	var Browser = {  Version: function() {    
	var version = 999; 
	// we assume a sane browser    
	if (navigator.appVersion.indexOf("MSIE") != -1)      
	// bah, IE again, lets downgrade version number      
	version = parseFloat(navigator.appVersion.split("MSIE")[1]);    
	return version;  }}
	
	
	
	$(".tooltip2").hover(function(e){											  
		$("#tooltip2").remove();
		if (this.title=="You must be 18 years or older to create & manage an account"){$(".tooltipBlocker").hide();}
		this.t = this.title;
		this.title = "";									  
		
		if (Browser.Version() < 7) 
	
		{  
	
		
			$("body").append("<div id='tooltip2'><div class='position3' style='width:250px'><div class='style3'>"+ this.t +"</div></div></div>");
	
	
		}
		
		else
		{
		
			$("body").append("<div id='tooltip2'><div class='style2'><div class='position2'>"+ this.t +"</div></div></div>");
		
		
		}
		
		$("#tooltip2")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX - 240) + "px")
			.fadeIn("fast");


	},
	
	
		function(){
			this.title = this.t;
			$("#tooltip2").remove();
			if (this.title=="You must be 18 years or older to create & manage an account"){$(".tooltipBlocker").show();}
		});	
	

	
	
		$(".tooltip2").mousemove(function(e){
			$("#tooltip2")
				.css("top",(e.pageY - xOffset) + "px")
				.css("left",(e.pageX - 240) + "px");
		});	
	
		$("input").keypress(function(){
			$("#tooltip2").remove(); 
		});
			
	
};

	

// starting the script on page load
$(document).ready(function(){
	tooltip();
	tooltip2();
	
});
