Jquery $.trim() function instead of javascript equivalent for IE8 support