/**
* Define parameters to set 'where' and what 'element' will have same height.
*
* @author Filipe Seabra
* @param where element's father
* @param element selector of the elements that must have same height
*/
jQuery(window).load(function(){
function sameHeight(where, element){
var height = [];
var maxHeight = 0;
jQuery(where).find(element).each(function(index){
height[index] = jQuery(this).outerHeight();
if(height[index] > maxHeight){
maxHeight = height[index];
}
}).css('min-height', maxHeight);
}
sameHeight('.where', 'div.element'); // Just an example
});