/**
Vertigo Tip by www.vertigo-project.com
Requires jQuery
*/
this.vtip=function(){this.xOffset=-10;this.yOffset=10;$(".vtip").unbind().hover(function(a){this.t=this.title;this.title="";this.top=(a.pageY+yOffset);this.left=(a.pageX+xOffset);$("body").append('<p id="vtip"><img id="vtipArrow" />'+this.t+"</p>");$("p#vtip #vtipArrow").attr("src","/images/myaccount/vtip_arrow.png");$("p#vtip").css("top",this.top+"px").css("left",this.left+"px").fadeIn("slow")},function(){this.title=this.t;$("p#vtip").fadeOut("slow").remove()}).mousemove(function(a){this.top=(a.pageY+yOffset);this.left=(a.pageX+xOffset);$("p#vtip").css("top",this.top+"px").css("left",this.left+"px")})};jQuery(document).ready(function(a){vtip()});



/*
 * Url preview script 
 * powered by jQuery (http://www.jquery.com)
 * 
 * written by Alen Grakalic (http://cssglobe.com)
 * 
 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
 *
 */
 
this.screenshotPreview = 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 */
	$("a.fromHere").live("click", function(e){
		$("#tooltip").remove();
	   	this.t = this.title;
	   	this.title = ""; 
	   	var c = (this.t != "") ? "<br/>" + this.t : "";
	   	//$("body").append("<p id='tooltip'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");         
	   $("body").append("<p id='tooltip'><span></span><a href='javascript:removeTooltip();' class='close'></a><iframe src='"+ this.rel +"' width='262' height='172' frameborder='0' scrolling='no' topmargin='0' leftmargin='0' marginwidth='0' marginheight='0'></iframe>"+ c +"</p>");
	   $("#tooltip")
	    .css("top",(e.pageY - xOffset - 214) + "px")
	    .css("left",(e.pageX - yOffset -30) + "px")
	    .fadeIn("fast");  
	});				
};


// starting the script on page load
$(document).ready(function(){
	screenshotPreview();
});

function removeTooltip(){
	$("#tooltip").remove();
}
