a waterfall layout by javascript