Use jQuery's trim

Some browsers do not have a native String.trim() function