/**
 * Pietro Spagnoli 2011
 */

$(document).ready(function() {
	initMenu();
	/* bodyHeight();
	$(window).resize(bodyHeight); */
});


function initMenu() {
	$('#block-menu-primary-links ul ul').hide();
	$('#block-menu-primary-links ul li, #block-block-1 li').addClass('column');
	$('#block-menu-primary-links ul ul').css('position' , 'absolute').offset({
		top : $(this).parent('li').position.top + 10,
		left : $(this).parent('li').position.left
	});
	$('#block-menu-primary-links ul > li').bind('mouseenter', function() {
		$(this).children('ul').fadeIn();
	});
	$('#block-menu-primary-links ul li').bind('mouseleave', function() {
		$(this).children('ul').fadeOut();
	});
}

/* function bodyHeight() {
	windowH = $(window).height();
	headerH = $('#header').height();
	footerH = $('#footer').height();
	contentH = $('#content').height();
	bodyH = (windowH - headerH - footerH);
	bodyHMin = 600;

	h = Math.max( bodyH , contentH );
	if( h == bodyH ) {
		$('#content').height( h );
		$('#content').css({
			overflowY : 'hidden'			 
		});
	} else {
		$('#content').height( bodyH );
		$('#content').css({
			overflowY : 'auto'
		}).height(bodyHMin);
	}
} */
