Fix minor issue of jquery.flot.navigate.js.

Fix js errors on example page and fix the use variable before assign value error.