Function definitions outside of document ready