$(function() {

	$("table.sm_calendar td").hover( function () {
		$(this).children("div.events_today").fadeIn("fast");
		}, 
		function () {
		$(this).children("div.events_today").fadeOut("fast");
		}
	);
	
	if($("div.home_article").length == 0) {
		$("div.aside").height() > $("div.article").height() ? $("div.article,div.aside").height($("div.aside").height()) : $("div.aside,div.article").height($("div.article").height());	
	}
	else {
		var mainHeight = $("div.article").height() + 325;
		if($("div.aside").height() < mainHeight) {
			$("div.aside").height(mainHeight);
		}	
	}
	
$("div.article_top label").hide();
	// if placeholder isn't supported:
    if (!Modernizr.input.placeholder){
    	$("input#search").labelify();
    }
	

	$('#home_banners').cycle({ 
		delay:  6000, 
		speed:  800
	});


	function equalHeights(domcollection) {
		var maxHeight = 0;
		domcollection.each(function() {
			if( $(this).height() > maxHeight ) {
				maxHeight = $(this).height();
			}
		});
		domcollection.height(maxHeight);
	}
	equalHeights($("ul.zerowaste_info > li p"));


});

Cufon.replace('h1');
Cufon.replace('h2'); 
Cufon.replace('h3');
Cufon.replace('p.news_title');
Cufon.replace('ul#home_banners a');
Cufon.replace('div.header ul.nav li a');
Cufon.replace('div.aside > ul.subnav > li > a');
