/**
Vertigo Tip by www.vertigo-project.com
Requires jQuery
*/

     

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 = '';
	    var offset=$(this).offset();
            this.top = (offset.top + yOffset);
	    this.left = (offset.left + xOffset);
            
            $('body').append( '<p class="vtiphandler"><img class="vtiphandlerArrow" />' + this.t + '</p>' );
                        
            $('p.vtiphandler .vtiphandlerArrow').attr("src", 'imgs/vtip_arrow.png');
            $('p.vtiphandler').css("top", this.top+"px").css("left", this.left+"px").fadeIn("slow");
            
        },
        function() {
            this.title = this.t;
            $("p.vtiphandler").fadeOut("slow").remove();
        }
    ).mousemove(
        function(e) {
            var offset=$(this).offset();
            this.top = (offset.top + yOffset);
	    this.left = (offset.left + xOffset);
                         
            $("p.vtiphandler").css("top", this.top+"px").css("left", this.left+"px");
        }
    );            
    
};





this.vtipHelp = function() {    
    this.xOffset = -10; // x distance from mouse
    this.yOffset = 10; // y distance from mouse       
   
    $(".vtipHelp").each(
    		 
        function() {
             
            this.t = this.title;
            
	    this.title = '';
	    var offset=$(this).offset();
            
	    this.top = offset.top;
	    this.left = offset.left;
            
	    //alert(this.top);
	    
            $('body').append( '<p id="vtip"><img id="vtipArrow" />' + this.t + '</p>' );
                        
            $('p#vtip #vtipArrow').attr("src", 'imgs/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(e) {
            this.top = (e.pageY + yOffset);
            this.left = (e.pageX + xOffset);
                         
            $("p#vtip").css("top", this.top+"px").css("left", this.left+"px").remove();
        }
    );            
    
};





  

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