fix issue where errors occur if data('index') is NaN

Ran into this issue while implementing a top nav in a single page application that loads the nav bar dynamically. I couldn't isolate exactly why data('index') ended up as NaN but i suspect that it had to do with the coming and going of the nav DOM (via backbone render function)

because this only occurred when the menu was toggling open after having been previously closed resetting data('index') to zero made sense.