move hide function above document.ready