/**
 * @author Wim La Haye
 * @copyright Techtwo Webdevelopment
 */
$.fn.equalHeight = function(options) {
	
	var settings = $.extend({}, $.fn.equalHeight.defaults, options);
	
	return this.each(function(){
		
		$(this).each(function(){
			
			var tallest = 0,
			    $columns = settings.childSelector ? $(settings.childSelector, this) : $(this).children();
			
			    
			    
		    $columns.each(function(i){
		    	var height = $(this).height();
				if (tallest < height) { 
					tallest = height; 
				}
			});
			
		    $columns.css({'height': tallest});
		});
		
	});
};

$.fn.equalHeight.defaults = {
	childSelector: false, // Specify a childSelector if you do not want to use children()
}
