use phonegap device ready instead of jquery ready event to initialize everything