summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/index.js
blob: 5720dcf1765a72110dd13bc898f1000e2f3aab7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
var app = (function(){
  var app = {}
  
  app.init = function(){
	  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.intro = new IntroView ()

	  app.product = new ProductView ()
	  app.collection = new CollectionView ()

	  app.selector = new Selector ()

    app.bind()
  }
  
  app.bind = function(){
    if (window.location.href.match("8000")) { app.ready() }
    document.addEventListener('deviceready', app.ready, false)
  }
  
  app.ready = function(){
    app.view = null
    app.router = new SiteRouter ()
    app.router.route()
  }
  
  return app
})()

app.init()