var app = (function(){ var app = {} app.init = function(){ app.bind() } app.bind = function(){ document.addEventListener('deviceready', app.ready, false) } app.ready = function(){ app.view = null app.nav = new NavView () app.router = new SiteRouter () } app.init() })()