moving globals into the jQuery ready callback