BUG FIX - resolve variable scope issue

Naming my variables in document ready wasn't allowing my functions to access them. Made the variables global. Thinking there is a better way to do this. Will refactor once figured out.