Responsive masonry grid layout with javascript only