jQuery function which limits text length by word or character, and adds a link to the end