/*-------------------------------------------------------------------- 
 * JQuery Plugin: "EqualSize"
 * by:	Cristian Merli
 *
 * Copyright (c) 2010 Tangle Media
 *
 * Description: Compares the heights or widths of a set of elements 
 		and sets their min-height to the tallest height (or width to widest width).						  
 * Usage Example: $(element).setEqualHeight();
 * Version: 1.0, 16.03.2010
--------------------------------------------------------------------*/

//HEIGHT
$.fn.setEqualHeight = function(o) {
	var highest = 0;
	
	$(this).each(function() {
		highest = Math.max(highest, $(this).height());
	});
	
	$(this).each(function() {
		$(this).height(highest);
	});
}


//WIDTH
$.fn.setEqualWidth = function(o) {
	var widest = 0;
	
	$(this).each(function() {
		widest = Math.max(widest, $(this).width());
	});
	
	$(this).each(function() {
		$(this).width(widest);
	});
}
