var app = (function(){ var app = {} app.init = function(){ app.bind() app.build() sdk.init({ env: "test" }) app.iscroll_options = { mouseWheel: true, scrollbars: true, } if (window.cordova) { document.addEventListener('deviceready', app.ready, false) } else { app.ready() } } app.bind = function(){ document.addEventListener('touchmove', function(e){ e.preventDefault() }) FastClick.attach(document.body) } app.build = function(){ app.blog = new BlogView () app.archive = new ArchiveView () app.hub = new HubView () app.story = new StoryView () app.cart = new CartView () app.header = new HeaderView () app.footer = new FooterView () app.curtain = new CurtainView () app.nav = new NavView () app.login = new LoginView () app.logout = new LogoutView () app.signup = new SignupView () app.profile = new ProfileView () app.payment = new PaymentView () app.shipping = new ShippingView () app.intro = new IntroView () app.faq = new FaqView () app.search = new SearchView () app.product = new ProductView () app.collection = new CollectionView () app.selector = new Selector () } app.ready = function(){ if (window.cordova) { // cordova.plugins.Keyboard.disableScroll(true) } app.view = null app.router = new SiteRouter () app.router.route() } return app })() app.init()