Someone else will have to review this functionality, but at least use the same style of document ready as in the code right above it.