/*
 * Tooltip 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.tooltip = function(){	
	/* CONFIG */		
		xOffset = jQuery("#tooltip").height();
		yOffset = 0;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	jQuery(".help").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		jQuery("body").append("<div id='tooltip' style='position:absolute;top:0px;left:0px;'><table style='padding:0px;margin:0px;border:0px solid black;border-collapse: collapse; ' border='0'><tr><td style='background:url(/skin/frontend/default/fashion/images/a_s.png) no-repeat;width:12px;height:6px;'></td><td style='background:url(/skin/frontend/default/fashion/images/a.png)'></td><td style='background:url(/skin/frontend/default/fashion/images/a_d.png) no-repeat;width:12px;height:6px;'></td></tr><tr><td style='background:url(/skin/frontend/default/fashion/images/dx.png);width:12px;'></td><td  style='background:#121212;color:white;'>"+ this.t +"</td><td style='background:url(/skin/frontend/default/fashion/images/sx.png)'></td></tr><tr><td style='background:url(/skin/frontend/default/fashion/images/b_s.png) no-repeat;width:12px;height:32px;'></td><td style='background:url(/skin/frontend/default/fashion/images/b_p.png);height:15px;overflow:hidden;'><img src='/skin/frontend/default/fashion/images/b.png' style='height:20px;'></td><td style='background:url(/skin/frontend/default/fashion/images/b_d.png) no-repeat;width:12px;height:32px;'></td></tr></table></div>");		
//jQuery("body").append("<div id='tooltip' style='float:left'><div style='backgournd:#f00;float:left;clear:right;width:80px;height:10px;'>		</div><div style='backgournd:#0f0;float:left;clear:right;width:80px;height:40px;'>					"+ this.t +"				</div>		<div style='backgournd:#00f;float:left;clear:right;width:80px;height:10px;'>				</div>		</div>");
xOffset = jQuery("#tooltip").height()+10;
		jQuery("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",((e.pageX) - ((jQuery("#tooltip").width())/2)) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		jQuery("#tooltip").remove();
    });	
	jQuery(".help").mousemove(function(e){
		jQuery("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",((e.pageX) - ((jQuery("#tooltip").width())/2)) + "px");
	});			
};

