I would move this into the function. Let's not expose/override a global js variable.