       @preloadImage(@getURL(graph))
 
   preloadImage: (url) ->
+    @loadStart = new Date()
     @graph = new Image()
     $(@graph).bind('load', =>
       @graphLoaded = true

    $('h1#title').html(graphConf.title)
    @currentGraph = (@currentGraph + 1) % @config.graphs.length
    @graphLoaded = false
    console.log(@config.settings.dwellTime)
    setTimeout(@displayGraph, @config.settings.dwellTime)
    @preloadGraph(@config.graphs[@currentGraph])


    @graphLoaded = true

  displayGraph: =>
    # Wait for our image to load, but not more than 2 minutes
    if not @graphLoaded and ((new Date()) - @loadStart) < 120000
      setTimeout(@displayGraph, 1000)
      return
    graphConf = @config.graphs[@currentGraph]
