From a suggestion by Diego, moved the jQuery.ready() call outside of the try{}catch...