﻿(function($) {

	$.fn.resizeBoxes = function(options) {

		var settings = { selector: '.resizeBox' };

		return this.each(function() {

			if (options) {
				$.extend(settings, options);
			}

			var $Control = $(this);

			var maxHeight = 0;
			$Control.find(settings.selector).each(function() {
				if ($(this).height() > maxHeight)
					maxHeight = $(this).height();
			});

			$Control.find(settings.selector).each(function() {
				$(this).css('height', maxHeight + 'px');
			});

		});
	};

})(jQuery);
