var contentPane = new Class ({
	
	
	initialize: function(pane) {
		
		this.pane = pane;
		this.fillingWidth = 500;
		this.firstLoad = true;
		
		$(this.pane).style.overflow = "hidden";
		
		this.fillWidth();
		
		
		return this;
	},
	
	
	fillWidth: function() {
		
		
		var screenWidth = Window.getWidth();
		if(screenWidth <= 0) {
			screenWidth = document.body.clientWidth; //For some reason, mootools' getWidth() doesn't work in IE6.
		}
		
		
		
		
		if(screenWidth <= '890'){
			$('subMenu').setStyle('clear', 'both');
			$('contentWingBefore').setStyle('display', 'none');
			$('contentWingAfter').setStyle('display', 'none');
			$('contentPane').setStyle('position', 'absolute');
			
			var fillingWidth = screenWidth-300;
		}
		
		
		else{
			$('subMenu').setStyle('clear', 'none');
			$('contentWingBefore').setStyle('display', 'block');
			$('contentWingAfter').setStyle('display', 'block');
			$('contentPane').setStyle('position', 'relative');
			
			var fillingWidth = screenWidth-500;
		}
		
		
		
		
		//Just in case some crazy person, like me, sizes the window down to almost nothing...
		if(fillingWidth <= 0) {
			fillingWidth = 0;
		}
		
		
		
		
		//First time on the page?  Good, then fade and stretch regardless.
		if(this.firstLoad == true){
			this.firstLoad = false;
				
			width = new fx.Style('contentPane', 'width', {duration:1000, transition:fx.Transitions.quintInOut, fps:24});
			width.custom(this.fillingWidth, fillingWidth);
		}
			
		//So, you're telling me that... that... I've already done that?
		else{
			
			//If IE
			if(window.attachEvent){
				$('contentPane').setStyle('width', fillingWidth + 'px');
			}
			
			//Anything Else
			else{
				width = new fx.Style('contentPane', 'width', {duration:1000, transition:fx.Transitions.quintInOut, fps:24});
				width.custom(this.fillingWidth, fillingWidth);
			}
		}
		
		this.fillingWidth = fillingWidth;

	}

	
});



var cp = new contentPane('contentPane');


setTimeout("window.addEvent('resize', cp.fillWidth)", 1000);




var siteMenu = new fx.Style('siteMenu', 'opacity', {duration:1000, transition:fx.Transitions.quadIn, fps:24});
siteMenu.custom(0, 1);