/**
Original Author: Vertigo Tip by www.vertigo-project.com
- Modified by The SocialCork
*/

this.scTooltip = function() {
    this.xOffset = -10; // x distance from mouse
    this.yOffset = 20; // y distance from mouse       
    
    $(".scTooltip").live('mouseover',    
        function(e) {
            this.t = this.title;
            this.title = ''; 
            this.top = (e.pageY + yOffset); 
			this.left = (e.pageX + xOffset);
            $('body').append( '<p id="scTooltip"><img id="scTooltipArrow" />' + this.t + '</p>' );
                        
            $('p#scTooltip #scTooltipArrow').attr("src", 'images/global/tooltip_arrow.png');
            $('p#scTooltip').css("top", this.top+"px").css("left", this.left+"px").fadeIn();
            
    });
    
	$(".scTooltip").live('mouseout',function() {
        this.title = this.t;
        $("p#scTooltip").fadeOut().remove();
    });
    
	$(".scTooltip").live('mousemove',function(e) {
           	this.top = (e.pageY + yOffset);
           	this.left = (e.pageX + xOffset);
                         
			$("p#scTooltip").css("top", this.top+"px").css("left", this.left+"px");
        }
    );            
    
};

jQuery(document).ready(function($){scTooltip();}) 
