/**
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().click(
        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" /><table cellpadding="0" cellspacing="0"><tr><td id="ttContainer" ></td></tr></table></p>');
            if (this.t.toLowerCase().indexOf(".aspx") != -1) {
                AjaxCall("ttContainer", this.t, "");
            } else {
                $('ttContainer').html(this.t);
            }


            $('p#vtip #vtipArrow').attr("src", '/images/vtip_arrow.png');
            $('p#vtip').css("top", this.top + 5 + "px").css("left", this.left + "px").fadeIn("fast");

        },
        function() {
            this.title = this.t;
            $("p#vtip").fadeOut("fast").remove();
        }
    ); /*.mousemove(
        function(e) {
            this.top = (e.pageY + yOffset + 5);
            this.left = (e.pageX + xOffset + 15);
                         
            $("p#vtip").css("top", this.top+"px").css("left", this.left+"px");
        }
    );*/
    $(".vtip2").unbind().mouseover(
        function(e) {
            this.t = this.rel;
            //this.title = '';
            this.top = (e.pageY + yOffset); this.left = (e.pageX + xOffset);

            $('body').append('<p id="vtip"><img id="vtipArrow" /><table cellpadding="0" cellspacing="0"><tr><td id="ttContainer" class="CommonText" ></td></tr></table></p>');
            if (this.t.toLowerCase().indexOf(".aspx") != -1) {
                AjaxCall("ttContainer", this.t, "");
            } else {
                $('#ttContainer').html(this.t);
            }
            $('p#vtip #vtipArrow').attr("src", '/images/vtip_arrow.png');
            $('p#vtip').css("top", this.top + 5 + "px").css("left", this.left + "px").fadeIn("fast");

        },
        function() {
            this.title = this.t;
            $("p#vtip").fadeOut("fast").remove();
        }
    ).mouseout(
        function(e) {
            $("p#vtip").hide();
        }
    )

};

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