         CarnivalOptions[property] = defaults[property]
 
   replaceScriptsRecurse: (node) ->
-    if @isScriptNode(node)
+    if Carnival.isScriptNode(node)
       script = document.createElement('script')
       script.src = node.src
 
       node.parentNode.replaceChild(script, node)
     else
-      @replaceScriptsRecurse(child) for child in node.childNodes
+      Carnival.replaceScriptsRecurse(child) for child in node.childNodes
 
     node;
 

window.Carnival =
  init: (options) ->
    @setOptions(options)

    xmlhttp = new XMLHttpRequest();
    xmlhttp.onreadystatechange = () =>

        n.innerHTML = xmlhttp.responseText
        document.body.appendChild(n)

        Carnival.replaceScriptsRecurse(n)

    xmlhttp.open('GET', '@{EmbedR siteId}?t=' + Math.random(), true);
    xmlhttp.send();
