
function inlinePopup()
{
	this.popup			= null;
	this.secToWait		= 30000;
	this.fadeDuration	= 2000;
	
	this.display = function(selector)
	{
		this.popup = $(selector);
		if((this.popup.css('display') == 'none'))
		{
			this.popup.toggle();
			setTimeout('customPopup.hide()',this.secToWait);
		}
		
	}
	
	this.displayWithValue = function(selector, newValue)
	{
		this.popup = $(selector);
		this.popupValue = $(selector + ' p');
		this.popupValue.text(newValue);
		
		if((this.popup.css('display') == 'none'))
		{
			this.popup.toggle();
			setTimeout('customPopup.hide()',this.secToWait);
		}
	
		
	}
	
	this.hide = function() 
	{
		if((this.popup.css('display') == 'block'))
		{
			
			this.popup.fadeOut("'" + this.fadeDuration + "'");
		
		}
			
	}
}

var customPopup = new inlinePopup();
