(function($){  
	$.fn.equalSize = function(options) {  

		var defaults = {
			equalHeight : true,
			equalWidth	: true,
			timeClass	: new Date().getTime(),
			maxHeight	: 0,
			maxWidth	: 0
		};
		var options = $.extend(defaults, options);


		return this.each(function() { 

			$(this).addClass('equalsize_' + options.timeClass);

			if( $(this).height() > options.maxHeight ) {
				options.maxHeight=$(this).height();
			}
			if( $(this).width() > options.maxWidth ) {
				options.maxWidth=$(this).width();
			}

			$('.equalsize_' + options.timeClass).each(function() {
				if( options.equalHeight == true ) { 
					$(this).css('height', options.maxHeight);
				}
				if( options.equalWidth == true ) { 
					$(this).css('width', options.maxWidth);
				}
			});

		});


	};
})(jQuery); 
