window.onload = function () {
    var cols = $(".widget");
    var length = 0;
    $(cols).each(function (index, elem) {
        var element = $(this).find(".group-columns").first().find(".text-align");

        $(element).each(function (index, elem) {
            if ($(this).hasClass('x1')) {
                length++;
            }
            else if ($(this).hasClass('x2')) {
                length = length + 2;
            }
        });

        if (length > 5) {
            $(this).find('.left-column-t').css('width', '100%');
            $(this).find('.responsive-hidden').show();
            $(this).find('.x1 .table-header-cell').addClass('visible-responsive');
            $(this).find('.x2 .table-header-cell').addClass('visible-responsive');
            $(this).find('.inner-row').addClass('visible-responsive-inner');
            $(this).find('.x1').addClass('flex-none visible-responsive-width-x1');
            $(this).find('.x2').addClass('flex-none visible-responsive-width-x2');
        }

        length = 0;
    });
};


