
// JS for FLOW3 website, requires jQuery
// @author christian jul jensen, http://mocsystems.com
// @author Karsten Dambekalns <karsten@typo3.org>

equalHeightCols = {
	selectors: '#content_1, #content_col_2, #content_col_3',

	colHeight: null,

	resize: function() {
		$(equalHeightCols.selectors)
		.each(
			function(){
				equalHeightCols.colHeight = Math.max($(this).height(),equalHeightCols.colHeight);
			}
		).each(
			function(){
				$(this).height(equalHeightCols.colHeight);
			}
		);
			// set back to auto, so that the copyright footer is not in the content on pages with images
		$('#content_1').height('auto');
	}
}

menu = {
	trigger: 	'#nav > li',
	sub:	'ul',

	init: function() {
		$(menu.trigger).hover(menu.showSub,menu.hideSub);
	},

	showSub: function() {
		$(menu.sub,this).show();
	},

	hideSub: function() {
		$(menu.sub,this).hide();
	}
}

doc = {
	load : function() {
		menu.init();

		$(document).resize(doc.resize);
		doc.resize();
	},

	resize : function() {
		equalHeightCols.resize();
	}
}

$(doc.load);
	
	
