fixing ajax by adding document ready js function, preventing set interva...

...l running before page is loaded