$(document).ready(function() {
    
   $(".fit_box").each(function(index){
        var trh = $(this).height(); 
        $(this).css("height", trh);
    });

    var max = 0;
    $(".fit").each(function(index){
        var trh = $(this).height(); 
        var pos = $(this).position();
        var endpos = trh + pos.top;
        if(max < endpos){
            max = endpos;
        }
    });
    $(".fit").each(function(index){
        var trh = $(this).height(); 
        var pos = $(this).position();
        var endpos = trh + pos.top;
        if(max > endpos){
            $(this).css("height", max-pos.top);
        }
    });             
});



$(document).ready(function() {
    
   $(".fit_bottom_box").each(function(index){
        var trh = $(this).height(); 
        $(this).css("height", trh);
    });

    var max = 0;
    $(".fit_bottom").each(function(index){
        var trh = $(this).height(); 
        var pos = $(this).position();
        var endpos = trh + pos.top;
        if(max < endpos){
            max = endpos;
        }
    });
    $(".fit_bottom").each(function(index){
        var trh = $(this).height(); 
        var pos = $(this).position();
        var endpos = trh + pos.top;
        if(max > endpos){
            $(this).css("height", max-pos.top);
        }
    });             
});   

