Updated the document.ready function in custom js