
function DJMatchModules(className){
	var maxHeight = 0;
	if ($$(className)) {
		var divs = $$(className);
		divs.each(function(element){
			maxHeight = Math.max(maxHeight, parseInt(element.getStyle('height')));
		});
		
		divs.setStyle('height', maxHeight);
	}
}
window.addEvent('domready', function(){
	if (screen.width < 1024) {
		$(document.body).addClass('lofiversion');
	}
});
window.addEvent('load', function(){
	DJMatchModules('.bottom-bg');
	if ($$('#frontpage .rowcount_2')) {
		var rows = $$('#frontpage .rowcount_2');
		rows.each(function(element){
			var maxHeight = 0;
			var modules = element.getElements('.djmod-content');
			if (modules) {
				modules.each(function(el){
					maxHeight = Math.max(maxHeight, parseInt(el.getStyle('height')));
				});
				modules.setStyle('height', maxHeight);
			}
		});
	}
});
