Uncaught Could not find Overlay: #prompt
<p>I'm trying to call the jquery overlay function from a javascript function and failing.</p>

<p>I get the error: Uncaught Could not find Overlay: #prompt </p>

<pre><code>this.mySaturdayNight = function() {
    var bark_overlay = document.createElement("div");
    bark_overlay.innerHTML="hey guy";
    bark_overlay.setAttribute('class', 'modal');
    bark_overlay.setAttribute('id', 'prompt');

    var sajT = new oblTable(1,3);

    var btn = document.createElement("button");
    btn.innerHTML = "test";
    btn.setAttribute("rel", "#prompt");
    btn.setAttribute("class", "modalInput");

    sajT.addContent(0,2,btn);

    var triggers = $(".modalInput[rel=#prompt]").overlay({
        // some mask tweaks suitable for modal dialogs
        mask: {
            color: '#ebecff',
            loadSpeed: 200,
            opacity: 0.9
        },

        closeOnClick: false
    });
}
</code></pre>

<p>Any ideas? Stackoverflow is the best!</p>

<p>Thanks!</p>
