Partial version meanwhile fixing some failures, putting <script src="phonegap.js"></script> in index.html