jQuery(document).ready(function($) {
	$('div#wrapper').css({
		'top': '2000px',
		'display': 'block'
	});
	function centerWrapper( checkFirst ) {
		var centerOffset = ( $(window).height() - $('div#wrapper').height() ) / 2;
		if ( checkFirst == 'first_time' && centerOffset > 0 && $('body.home').length > 0 ) {
			$('div#wrapper')
				.stop()
				.animate({
					top: centerOffset
				}, 2000);
				
		} else if (centerOffset > 0 ) {
			$('div#wrapper')
				.stop()
				.css({
					top: centerOffset
				});
		} else {
			$('div#wrapper').css('top', '0');
		}
	}
	centerWrapper('first_time');
	
	$(window).bind('resize', function() {
		centerWrapper();
	});
});

