The shrinkList.js plugin does just that, shrinks lists.