/*
	multi-single page controls
	(c) Jeremiah Boyd <http://workworkplay.com>
	updated 2010.03.11
	some ideas borrowed from John Einselen <http://iaian7.com>
*/
(function() {
	wwp.callbacks._resize = function(){
		// grab our current dimensions
		wwp.page = window.getSize();
		// set our pages to be the matching size
		$$('#about, #projects').setStyle('height', wwp.page.y);

		// deal with the footer that i've hacked
		$('contact').setStyle('z-index',2);
		var f = $('footer');
		f.setStyles({
			'top': $('contact').getPosition().y,
			'min-height': $('contact').getSize().y+60,
			'width'	:	'100%',
			'background': '#fff',
			'position': 'absolute',
			'z-index': 1
		});

		/* update the position of the current screen */
		var offset = (wwp.current.id == 'about') ? -60 : 0;
		wwp.controls.scroller.set(0, wwp.current.getPosition().y + offset)
	};
	window.addEvent('domready', wwp.callbacks._resize );
	window.addEvent('resize', wwp.callbacks._resize );
})()
