assigned variable names to javascript functions and called in document.ready