Isotope is a jQuery-Plugin for filtering and sorting HTML Block Elements which magically moves the elements according to sortorder or filter. It is an excellent and easy to use library. You can have look at it here.