Added a fix to support IE8. Added comments and documentation to select the appropriate version of jQuery. Also, the string.trim() function isn't available in IE8 so it was replaced with a regular expression.