Create brick-wall effects with this JavaScript