nitromeTooltip = {
    init:function(){
    },
    timeout:false,
    //Display Name of game
    data:false,
    //item of tooltip
    item:false,
    id:false,
    hovBool:false,
    //tooltip type: left icon = 1, right icon = 2
    toolType:false,
    getCoords:function(e,t,obj){
	if(parseInt(t,10) == 1){
	    document.getElementById('nitrome-tooltip').style.top = (pos.top-28)+'px';
	    document.getElementById('nitrome-tooltip').style.left = (pos.left)+'px';
	     document.getElementById('tooltip-gfc').style.backgroundPosition = '0 0';
	     document.getElementById('tooltip-bg-2').style.left = '8px';
	}
	else if(parseInt(t,10) == 2){
	    document.getElementById('nitrome-tooltip').style.top = (pos.top-28)+'px';
	    document.getElementById('nitrome-tooltip').style.left = (pos.left-97)+'px';
	    document.getElementById('tooltip-gfc').style.backgroundPosition = '0 -34px';
	    document.getElementById('tooltip-bg-2').style.left = '145px';
	}
    },
    displayTimeout:function(data,item,toolType,id){
	pos = $('#'+item.id).position();
	var $hg = getHeartedGames();
	this.getCoords(pos,toolType,item);
        document.getElementById('t-title').innerHTML=data;
	$('div#nitrome-tooltip').stop(1,1);
	$('div#nitrome-tooltip').fadeIn(200);
	
	for(i=0;i<$hg.length;i++){
	    if(id==$hg[i]){
		$('div#t-heart_icon').fadeIn(200);
	    }
	}
	//console.log(this.data);
	//console.log(this.item);
	//console.log(this.toolType);
	
	
	
	if(data){
	    //addHeart();
	}
    },
    displayGameData:function(data,item,toolType,id){
	this.data = data;
	this.item = item;
	this.id = id;
	this.toolType = toolType;
	this.hovBool = true;
	this.timeout = window.setTimeout('nitromeTooltip.displayTimeout(nitromeTooltip.data,nitromeTooltip.item,nitromeTooltip.toolType,nitromeTooltip.id);',500);
    },
    moveTooltip:function(x,y){
        if(this.tooltipOn){
	    var offsetX=0;
	    var offsetY=25;
	    document.getElementById('nitrome-tooltip').style.top=(y+offsetY)+"px";
	    document.getElementById('nitrome-tooltip').style.left=(x+offsetX)+"px";
	}else{
	    this.tooltipOn = true;}
    },
    hideTooltip:function(){
	
	if(this.timeout){
	    window.clearTimeout(this.timeout);
	}
	$('div#nitrome-tooltip').stop(1,1);
	//$('div#nitrome-tooltip').animate({height:'0px',width: '0px',opacity: '0'},{duration:120},{easing:'easeOutElastic'},{complete:function(){
	$('div#t-heart_icon').fadeOut(200);
	$('div#nitrome-tooltip').fadeOut(200);
	//document.getElementById('nitrome-tooltip').style.display='none';}});
	this.tooltipOn = false;
    }
}
$('body').mousemove(function(){
	window.clearTimeout(this.timeout);

    });
