move nhit javascript to nhit.js