fix bug with jquery and document ready