$(document).ready(function() {
setBallsSize();
});
$(window).resize(function() {
setBallsSize();
})
function setBallsSize() {
setTimeout(function () {
var ballWidth = $('.ball_row1 .ball_image').width();
$('.ball_row2 img').each(function() {
$(this).css('width', ballWidth);
});
}, 200);
}
list($first_cat, $second_cat) = array_chunk($categories, ceil(count($categories)/2));