$.fn.setAllToMaxHeight = function() {
return this.height(Math.max.apply(this, $.map(this.children(), function(e) {
return $(e).height();
})));
};
$('.item').setAllToMaxHeight()
$(window).on("load resize", function () {
var maxHeight = 0;
$(".equal-group").find(".equal-item").height("auto").each(function () {
if ($(this).height() > maxHeight) {
maxHeight = $(this).height();
}
}).height(maxHeight);
});