wrap js in $(function () {}) and add related comments