Update JS to run on document ready - trying to resolve S3 JS issue.