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

this.vtip = function() {    
    this.xOffset = -130; // x distance from mouse
    this.yOffset = -10; // y distance from mouse       
    
    $(".features li a[href=#]").unbind().hover(    
        function(e) {
            $(this).attr('t', $(this).attr('title'));
            var header = $(this).html();
            this.title = ''; 
            /* var top = (e.pageY + yOffset);
            var left = (e.pageX + xOffset); */

			var offset = $(this).offset();

			$('p#vtip').remove();
            $('body').append( '<p id="vtip"><span>' + header + '</span>' + $(this).attr('t') + '</p>' );

			var width = $(this).attr('rel');
			if (width > 0) {
				$('p#vtip').css("width", width+"px");
			}

			var top = parseInt(offset.top);
			var left = parseInt(offset.left) - $('p#vtip').width() - 24;
                        
            //$('p#vtip #vtipArrow').attr("src", 'images/vtip_arrow.png');
            $('p#vtip')
				.css("top", top+"px")
				.css("left", left+"px")
				.fadeIn("slow");
        },
        function() {
			if ($(this).attr('t') != undefined)
			{
            	$(this).attr('title', $(this).attr('t'));
			}
            $("p#vtip").stop().fadeOut("slow", function() {
				$(this).remove();
			});
        }
    ).mousemove(
        function(e) {
            /* var top = (e.pageY + yOffset);
            var left = (e.pageX + xOffset);
                         
            $("p#vtip").css("top", top+"px").css("left", left+"px"); */
        }
    ).click(
		function(e) {
			return false;	
		}
	);            
    
};

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