$(document).ready(function(){


    var $shuffle_rows = $('.shuffle-this');
    var divs = [];
    //console.log('$shuffle_rows = ' + $shuffle_rows);
    _.each($shuffle_rows, function(elem, index){
        var parent = $(elem);
        _.each($(parent).children(), function(child){
            divs.push($(child));
        });

    });

    if(divs.length) {
        while (divs.length) {
            _.each($shuffle_rows, function(elem, index){
                var parent = $(elem);
                var cnt = 0;
                while(cnt < 5 && divs.length) {
                    parent.append(divs.splice(Math.floor(Math.random() * divs.length), 1)[0]);
                    cnt += 1;
                }
            });
        }
    }



});