     $("##{@div}").width($(window).width() - $("##{@div}").css('margin').replace(/[^-\d\.]/g, '')*4)
 
 class Loxgraph.Stat
-  @loadFile: -> $.ajax { url: '/stats', dataType: 'html' }
+  @loadFile: (url) ->
+    $.ajax({ url: url, dataType: 'html' }).then null, ->
+      Loxgraph.statPrefix = '/'
+      $.ajax { url: Loxgraph.statPrefix + url, dataType: 'html' }
 
   @parseHtml: (htmlDoc) =>
     stats = {}

      ractive.add 'current'
      $.ajax(
        dataType: 'xml'
        url: "/stats/#{queue[0].url}"
      ).done (data) =>
        @parseXML queue[0].sourceId, data
        @processQueue queue.slice(1), callback

window.Loxgraph = {}
Loxgraph.statPrefix = ''

class Loxgraph.Graph
  constructor: (options) ->
