﻿/// <reference path="jquery-1.4.1.js" />


function HideTip() {
    $("#Tip").hide(0);
    $("#Tip").fadeOut(50);
}

function addToolTip(pCtl, pMsg, pWidth, pHeight, pOffset) {

    //li with fade class
    pCtl.mouseover(function() {
        var offset = pCtl.offset();
        pCtl.css({ cursor: 'hand' });
        $("#Tip").offset({ top: 0, left: 0 });
        $("#Tip").css({ width: pWidth, height: pHeight});
        $("#Tip").css({ top: offset.top + pOffset, left: offset.left + 20 });
        $("#Tip").fadeIn(100);
        $("#TipText").text(pMsg);
        $("#TipText").css({ width: '90%', height: '90%' });
        $("#TipImage").css({ width: '100%', height: '100%' });
    });

    //add faid out handler
    pCtl.mouseout(function() {
        $("#Tip").fadeOut(500);
        $("#Tip").css({ cursor: 'normal'});
    });

    
}




