/**
 * Equal Heights Plugin
 * Copyright (c) 2008 Rob Glazebrook (cssnewbie.com) 
 */

(function($) {
	$.fn.equalHeights = function(minHeight, maxHeight) {

		tallest = (minHeight) ? minHeight : 0;
		this.each(function() {
      
      var padding = eval( $(this).css('padding-top').replace('px', '') );
      padding += eval( $(this).css('padding-bottom').replace('px', '') );
      
			if($(this).height() + padding  > tallest) {
				tallest = $(this).height() + padding;
			}
		});
		if((maxHeight) && tallest > maxHeight) tallest = maxHeight;
		return this.each(function() {
      
      var padding = eval( $(this).css('padding-top').replace('px', '') );
      padding += eval( $(this).css('padding-bottom').replace('px', '') );
      
			$(this).height(tallest-padding).css("overflow","auto");
		});
	}
})(jQuery);

$(document).ready(function(){
    
   if($('.equalize').length)
   $('.equalize').equalHeights();
  
});
