Moved app JS to a separate file

Removed $.(function(){}); to use only ‘deviceready’
Merge pull request #1 from tonytlwu/master

Moved app JS to a separate file