 
 signInWindow = undefined
 shows = undefined
-
-sleep = (ms) ->
-  unixtime_ms = new Date().getTime();
-  while(new Date().getTime() < unixtime_ms + ms)
-    1
-
 
 traktvRequest = (opt, success, failure) ->
   console.log "traktvRequest: opt: #{JSON.stringify opt}"

      title: 'My shows'
      icon: ICON_MENU_HOME
      id: 'myShows'
    }]
  ]

if ADVANCED_MENU
  mainMenu.state.sections[0].items.push
    title: 'Advanced'
    id: 'advanced'

mainMenu.show()


      advancedMenu = new UI.Menu
        sections: [
          items: [{
            title: 'Refresh shows'
            action: -> refreshModels()
            }, {
            title: 'Reset local data'
            action: ->
              localStorage.clear()
              initSettings()
              displaySignInWindow()

              console.log "Local storage cleared"
          }]
        ]
      advancedMenu.on 'select', (e) -> e.item.action()
