(function($) {
$.fn.equalHeights = function(px) {
	$(this).each(function() {
		var currentTallest = 0;
		$(this).children().each(function(i) {
			if ($(this).height() > currentTallest) { currentTallest = $(this).height(); }
		});
		//if (!px || !Number.prototype.pxToEm) currentTallest = currentTallest.pxToEm(); //use ems unless px is specified
		// for ie6, set height since min-height isn't supported
		if ($.browser.msie && $.browser.version == 6.0) { $(this).children().css({ 'height': currentTallest +'px' }); }
		$(this).children().css({ 'min-height': currentTallest + 'px' });
	});
	return this;
};
})(jQuery);


//Implementation
$(document).ready(function(){
	if ($('img').length) {
		$('img').load(function() {
			$('#module-promote-pages ul').equalHeights();
			$('#page-list').equalHeights();
		});
	} else {
		$('#module-promote-pages ul').equalHeights();
		$('#page-list').equalHeights();
	}
});

