added document.ready for the various functions