numberSelectBox = function()
{
	this.menuContener = $('#numberSelect');
	this.timeoutHide = null;
	this.timeoutShow = null;
	
	this.showItReal = function()
	{
		this.menuContener.fadeIn('fast');
		if (document.body.clientWidth > 1200)
		{
			this.menuContener.css('margin-left', (document.body.clientWidth - 1200)/2 );
		}
	}
	
	this.showIt = function()
	{
		this.cancelHideIt();
		this.timeoutShow = setTimeout("numberSelectBoxInstance.showItReal();", 200);
	}
	
	this.hideItReal = function()
	{
		this.menuContener.fadeOut('fast');
	}
	
	this.hideIt = function()
	{
		this.cancelShowIt();
		this.timeoutHide = setTimeout("numberSelectBoxInstance.hideItReal();", 500);
	}
	
	this.cancelHideIt = function()
	{
		if (this.timeoutHide)
		{
			clearTimeout(this.timeoutHide);
		}
	}
	
	this.cancelShowIt = function()
	{
		if (this.timeoutShow)
		{
			clearTimeout(this.timeoutShow);
		}
	}
}

numberSelectBoxInstance = null;
$(document).ready(function(){numberSelectBoxInstance = new numberSelectBox();});

