$(function() {
	// font replacement for headers
	Cufon.replace('h1, h2', { fontFamily: 'Interstate Bold' });
	
	// adding the 200px top above the torso for work page
	$('.torso').before('<div class="torso-top fixed-top"></div>');
	
	
	// clone copyright
	$('.copyright').after($('.copyright').clone());
	$('.copyright:last').hide();
	
	
	$('body')
		.width(980)
		.height($(document).height())
	
	headerType();

	$(window).resize(headerType);
	
	function headerType() {
		if ($(window).width() < 980) {
			$('.header').css({
				position: 'relative',
				left: 750
			})
			$('.copyright:first').hide();

			$('.copyright:last')
				.show()
				.css({
					position: 'relative',
					marginTop: parseInt($('.footer').css('top')) - $('.header').height(),
					marginLeft: 825
				})
			
		} else {
			$('.header').css({
				position: 'fixed',
				left: 'auto'
			})

			$('.copyright:first').show();
			$('.copyright:last').hide();
			
			if ($.browser.msie && $.browser.version == 6) {
				$('.header').css({
					position: 'absolute',
					right: 0,
					left: 'auto'
				})
			}
		}
	}
	
})
