this.tooltip = function() {
    /* CONFIG */
    xOffset = -20;
    yOffset = -50;
    // these 2 variable determine popup's distance from the cursor
    // you might want to adjust to get the right result		
    /* END CONFIG */
    jQuery(".tooltip").hover(function(e) {
        this.t = this.title;
        this.title = "";



        var day = jQuery(this).text();
        var monthyear = jQuery(".dateTitle tbody tr").find('td').eq(1).text();

        jQuery.get("dayevents.aspx?day=" + day + " " + monthyear, function(data) {
            jQuery("#tooltip").html(data).fadeIn("fast");
        });



       
        jQuery("#tooltip").css("top", (e.pageY - xOffset) + "px");
        jQuery("#tooltip").css("left", (e.pageX + yOffset) + "px")

    },
	function() {
	    this.title = this.t;
	   // jQuery("#tooltip").fadeOut("fast");
	});
    jQuery(".tooltip").mousemove(function(e) {
        jQuery("#tooltip").css("top", (e.pageY - xOffset) + "px")
        jQuery("#tooltip").css("left", (e.pageX + yOffset) + "px");
    });
};

// This is to stop MooTools and jQuery having conflict problems. 
// By calling this function, instead of using the '$' operator, you must now use 'jQuery'.
jQuery.noConflict();

       // starting the script on page load
       jQuery(document).ready(function() {
           tooltip();
         
       });