function pageOverlay() {

	var container = document.body;
	if (null == (this.container = $(container))) throw("container is not valid");
	this.overlay = new Element('div', { 'class': 'overlay', id: 'overlayCloud' }).hide();
//	Event.observe(this.overlay, 'click', this.hide.bindAsEventListener(this));
	this.container.insert(this.overlay);
}

pageOverlay.prototype.show = function() {
var sectionElement  = Builder.node('div', {id: 'galleryTitle'});
var closeGallery  = Builder.node('div', {id: 'galleryClose'});


sectionElement.innerHTML = "<h1>Gallery</h1>";
this.overlay.appendChild(sectionElement);
this.overlay.appendChild(closeGallery);
new Effect.Appear(this.overlay, { duration: 0.5,  to: 0.8, queue: 'front' });
Event.observe(closeGallery, 'click', function(){overlay.hide()});

	return this;
};
pageOverlay.prototype.hide = function(event) {	
	resetSearch();
	$('galleryTitle').remove();
	$('galleryClose').remove();
	new Effect.Fade(this.overlay, { duration: 0.5, queue: 'front' });
	return this;
};