 /**
 * Loader - For presenting a loading screen on events that may take a while.
 * @author Scott Murphy
 * 
 * Copyright (c) 2008 Pictage Inc.
 * ALL RIGHTS RESERVED
 */
 
var Loader = new Class({
    initialize: function(options) {
		this.options = options;

		window.scrollTo(0,0);

		var windowSize = window.getSize();
		var scroll = window.getScroll();
		
		this.cover = new Element('div', {
			styles : {
				'position': 'absolute',
				'left': '0px',
				'top': '0px',
				'width': '100%',
				'background-color' : '#000', /*242424*/
				'opacity': '0',
				'z-index': '10'
			}			
		});

		this.resizeCover = function() {
			this.cover.setStyle( 'height', window.getScrollSize().y + 'px');
		}.bind(this);
		this.resizeCover();

		this.cover.inject( document.body );
		this.cover.fade('.9'); 
		window.addEvent('resize', this.resizeCover);
		
		this.container = new Element('div', { 'id':'slideshowContainer', 'class':'loading', 
			'styles': {
				'width':  windowSize.x+ 'px',
				'height': windowSize.y+ 'px'
			}
		}).inject( document.body );
	},
	dispose: function() {
		this.container.dispose();
		this.cover.dispose();
	}
});	