A jquery function which shortens the contents of a div without breaking its html.