Removed document ready. But "saveAsPng" seems to be broken.