 window.Loxgraph = {}
+Loxgraph.statPrefix = ''
 
 class Loxgraph.Graph
   constructor: (options) ->

      ractive.set 'loading', false # hides progress bar, shows menu

  @go: ->
    @loadFile().then(@parseHtml).then(@buildArray)

Loxgraph.Stat.go()


    $("##{@div}").width($(window).width() - $("##{@div}").css('margin').replace(/[^-\d\.]/g, '')*4)

class Loxgraph.Stat
  @loadFile: (url) ->
    $.ajax({ url: url, dataType: 'html' }).then null, ->
      Loxgraph.statPrefix = '/'
      $.ajax { url: Loxgraph.statPrefix + url, dataType: 'html' }

  @parseHtml: (htmlDoc) =>
    stats = {}
