/**
Vertigo Tip by www.vertigo-project.com
Requires jQuery
*/

this.vtip = function() {
    xOffset = 5; // x distance from mouse
    yOffset = 20; // y distance from mouse       

    $(".vtip").hover(

        function(e) {
            this.t = this.title;
            this.title = ''; //stop the actual title showing

    $('body').append( '<p id="vtip">' + this.t + '</p>' );
	
            $('p#vtip').css("display", "none") //hide it
                       .css("position", "absolute").css("opacity", "0.9").css("padding", "10px") //style
                       .css("top", (e.pageY + yOffset) + "px").css("left", (e.pageX + xOffset) + "px") //position
                       .fadeIn("fast"); //show it
        },
        function() {
            this.title = this.t; // set the title back

            $("p#vtip").remove();
        }

    ).mousemove(

        function(e) {
            $("p#vtip").css("top",(e.pageY - xOffset) + "px")
                       .css("left",(e.pageX + yOffset) + "px");
        }

    );            

};

jQuery(document).ready(function($) {
    vtip();
})












/*
this.vtip = function() {    
    this.xOffset = -10; // x distance from mouse
    this.yOffset = 10; // y distance from mouse       
    
    $(".vtip").unbind().hover(    
        function(e) {
            this.t = this.title;
            this.title = ''; 
            this.top = (e.pageY + yOffset); this.left = (e.pageX + xOffset);
            
            $('body').append( '<p id="vtip"><img id="vtipArrow" />' + this.t + '</p>' );
                        
            $('p#vtip #vtipArrow').attr("src", 'images/vtip_arrow.png');
            $('p#vtip').css("top", this.top+"px").css("left", this.left+"px").fadeIn("fast");
            
        },
        function() {
            this.title = this.t;
            $("p#vtip").fadeOut("slow").remove();
        }
    ).mousemove(
        function(e) {
            this.top = (e.pageY + yOffset);
            this.left = (e.pageX + xOffset);
			this.top = (e.clientY + yOffset);
            this.left = (e.clientX + xOffset);
                         
            $("p#vtip").css("top", this.top+"px").css("left", this.left+"px");
        }
    );            
    
};

jQuery(document).ready(function($){vtip();}) */
