/*
	Define the page overlay class
*/
tfoPageOverlay = function(){

	this.element = null;
	
	// Overlay resize function
	this.resize = function(){
		if (this.element){
			this.element.width(THEFOOT.sysinfo.viewport.width + 'px');
			this.element.height(THEFOOT.sysinfo.viewport.height + 'px');				
		}
		return this.element;
	} // this.resize()
	
	// Show the overlay
	this.show = function(){
		this.element.show();this.resize();
	} // this.show()
	
	// Hide the overlay
	this.hide = function(o_oncomplete){
		this.element.fadeOut(1200, o_oncomplete);
	} // this.hide()
	
	// Construction code
	
		// Create the DOM element
		this.element = $('#page-overlay');
	
		// Attach resize handler
		$(document).ready(this.resize);
		$(window).resize(this.resize);
		
	return this;
} // tfoPageOverlay()
