Move this variable into the `.ready(function() {...})` scope. The rule is, avoid global variable.