Creating a Pinterest like grid using JQuery, pure javascript or YUI