function equalHeightNext(group) {
	group.each(function() {
		thisHeight = $(this).next().height();
		$(this).height(thisHeight);
		
	});
}	
function equalHeightPrev(group) {
	group.each(function() {
		thisHeight = $(this).prev().height();
		$(this).height(thisHeight);
		
	});
}

function vAlign(algn) {
	$(algn).each(function() {
		inset = $(this).parent().outerHeight()-$(this).parent().height();
		top = ( $(this).parent().height() - inset - $(this).height() );
		
		
		$(this).siblings().each(function() {
			top -= $(this).height();
		});
		$(this).css('margin-top', top);
	});		
}

$(window).bind('load', function(){ 

	equalHeightPrev($('.equalprev'));
	equalHeightNext($('.equalnext'));
	vAlign('.vbottom');
});