var yIndex = 0;
var moveY = true;
var exitY = false;
	
$(document).ready(function(){

	setInterval("checkCloseRailTip()", 200);
	$('.rail-tip').hide();
	//setRailListener('.rail-object');//use "rail column" to have object show up on top of the column, rail-object to have item show up only for items inside the column

	
	
	$('.rail-tip').hover(function(){
		exitY=false;
	},
	
	function(){
		exitY=true;
	});
});

function checkCloseRailTip()
{
	if (exitY && !moveY) { 
		$('.rail-tip').fadeOut("fast"); 
	}
}


function setRailListener(target)
{
	$(target).hover(function(){
		moveY=true;
		$('.rail-tip').fadeIn("fast");
		var y = $(this).position().top - 28;
		$('.rail-tip').css("top", y + "px"
		/*$().mousemove(function(e){
			if (moveY){
				yIndex = e.pageY-30;
				$('.rail-tip').css("top", yIndex + "px");
			}
		}*/);
			
	},	
	function(){
		//$('.rail-tip').hide();
		moveY=false;
		exitY=true; 
	});//end workspace rollover
}
