/*
 * Url preview script 
 * powered by jQuery (http://www.jquery.com)
 */
 
this.screenshotPreview = function(){	
	/* CONFIG */
		
		xOffset = 50;
		yOffset = -5;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
	J$("a.price-tooltip").hover(function(e){
										 
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		J$("body").append("<div id='price-tooltip' style='border:#999999 thin solid;min-height:80px;padding:5px;background-color:#FFFFCC'>Price range is simply an average indication of cost.<br>&pound; = Cheap<br> &pound;&pound; = Average<br> &pound;&pound;&pound; = Costly<br> &pound;&pound;&pound;&pound; = High End"+ c +"</div>");								 
		J$("#price-tooltip")
			.css("top",(e.pageY - 110) + "px")
			.css("left",(e.pageX - 5) + "px")
			.fadeIn("slow");						
    },
	function(){
		this.title = this.t;	
		J$("#price-tooltip").remove();
    });	
	J$("a.price-tooltip").mousemove(function(e){
		J$("#price-tooltip")
			.css("top",(e.pageY - 100) + "px")
			.css("left",(e.pageX - 5) + "px");
	});		
	//*************************************************************************
	J$("#book").hover(
	function(e){
	J$("body").append("<div id='book-tooltip' style='max-width:200px;border:#999999 1px solid;min-height:80px;padding:5px;position:absolute;background-color:#FFFFCC'><h3>Bookmarks</h3><br/>A user can use this link to bookmark your business for future reference.</div>");								 
		J$("#book-tooltip")
			.css("top",(e.pageY - 100) + "px")
			.css("left",(e.pageX - 5) + "px")
			.fadeIn("slow");						 
    },
	function(){
		J$("#book-tooltip").remove();
    });	
	J$("#book").mousemove(function(e){
		J$("#book-tooltip")
			.css("top",(e.pageY - 100) + "px")
			.css("left",(e.pageX - 5) + "px");
	});	
	//**************************************************************************
	J$("#friend").hover(
	function(e){
	J$("body").append("<div id='friend-tooltip' style='max-width:200px;border:#999999 1px solid;min-height:80px;padding:5px;position:absolute;background-color:#FFFFCC'><h3>Send to a friend</h3><br/>A user can use this link to pass on your details to a friend (or somebody needing your services).</div>");								 
		J$("#friend-tooltip")
			.css("top",(e.pageY - 100) + "px")
			.css("left",(e.pageX - 5) + "px")
			.fadeIn("slow");						 
    },
	function(){
		J$("#friend-tooltip").remove();
    });	
	J$("#friend").mousemove(function(e){
		J$("#friend-tooltip")
			.css("top",(e.pageY - 100) + "px")
			.css("left",(e.pageX - 5) + "px");
	});	
  //**********************************************************************************
  	J$("#mobilet").hover(
	function(e){
	J$("body").append("<div id='mobilet-tooltip' style='max-width:200px;border:#999999 1px solid;min-height:80px;padding:5px;position:absolute;background-color:#FFFFCC'><h3>Send to a mobile</h3><br/>Users can send your details directly to a mobile (GoMy provides this as a free service).</div>");								 
		J$("#mobilet-tooltip")
			.css("top",(e.pageY - 100) + "px")
			.css("left",(e.pageX - 5) + "px")
			.fadeIn("slow");						 
    },
	function(){
		J$("#mobilet-tooltip").remove();
    });	
	J$("#mobilet").mousemove(function(e){
		J$("#mobilet-tooltip")
			.css("top",(e.pageY - 100) + "px")
			.css("left",(e.pageX - 5) + "px");
     });
	//*************************************************************************************
	J$("#email").hover(
	function(e){
	J$("body").append("<div id='email-tooltip' style='max-width:200px;border:#999999 1px solid;min-height:80px;padding:5px;position:absolute;background-color:#FFFFCC'><h3>Email Us</h3><br/>Your customers can use this link to send you a direct email. (We do not display your email address)</div>");								 
		J$("#email-tooltip")
			.css("top",(e.pageY - 100) + "px")
			.css("left",(e.pageX - 5) + "px")
			.fadeIn("slow");						 
    },
	function(){
		J$("#email-tooltip").remove();
    });	
	J$("#email").mousemove(function(e){
		J$("#email-tooltip")
			.css("top",(e.pageY - 100) + "px")
			.css("left",(e.pageX - 5) + "px");
     });
};
// starting the script on page load
J$(document).ready(function(){
	screenshotPreview();
});