Added jQuery trim function