move document ready listener on top file