// Cufon Stuff
// Cufon.replace("#headline h1", {textShadow: '#fff 0px -1px, rgba(0, 0, 0, 0.5) 0px 1px'});
Cufon.replace("#headline h1", {fontFamily: "Myriad Pro", textShadow: 'rgba(0, 0, 0, 0.5) 0px 1px' });

// Mootools stuff
document.addEvent('domready', function() {
	
	function toggleFooter() {
		
		var contentHeight = $("container").getSize().y;
		var windowHeight = window.getHeight();
		var footer_wrap = $("footer-wrap");
		var footer_height = footer_wrap.getSize().y;
		
		//var original_bg_color = document.body.getStyle("background-color");
		
		if ($("footer-wrap").hasClass("bottom")) {
		
			if ((contentHeight + footer_height) > windowHeight) {
				
				document.body.className = null;
				$("footer-wrap").removeClass("bottom");
			
			}
			
		} else {
			
			if (contentHeight < windowHeight) {

				document.body.className = "bottom";
				$("footer-wrap").addClass("bottom");
			
			}
		
		}
		
	}
	
	toggleFooter(); // init, for page load.
	
	window.addEvent('resize', function() {
		
		toggleFooter();
	
	});
	
	
	// flash focal area
	if ($("focus-flash")) {
		
		var flash_container = $("focus-flash");
		var focus_area = new Swiff("/swf/focus_area.swf",{
			
			width: flash_container.getSize().x,
			height: flash_container.getSize().y,
			container: flash_container,
			vars: {
				xmldata: "/xmldata/data.xml"
			}
			
		});
		
	}
	
	
});