Isotope layout in js