var toolTip = {
    fade : 0,
    x : 0,
    y : 0,
    lastId : '',
    tooltipObj : null,
    tooltipBoxObj : null,

    init : function() {
        this.tooltipObj = $('#tooltip');
        this.tooltipBoxObj = $('#tooltip_box');
    },

    show : function(id, content) {

        if (id != this.lastId) {
            this.lastId = id;
            this.tooltipObj.show(this.fade);
            $('#tooltip_box').html(content);
        }
        else {
            this.tooltipObj.css('left',this.x+20);
            this.tooltipObj.css('top',this.y-50);

        }
    },

    hide : function() {
        this.lastId = '';
        this.tooltipObj.hide(this.fade);
    }
}

jQuery(document).ready(function(){
   toolTip.init();
   jQuery(document).mousemove(function(e){
       toolTip.x = e.pageX;
       toolTip.y = e.pageY;
   });
})

