jQuery + .before() + var = not working?
<p>I have no idea what's going on. The links just won't show up:</p>

<pre><code>var se_buttons = {
    'b': {
        'tag' : 'b'
    },
    'i': {
        'tag' : 'i'
    },
    'url': {
        'tag' : 'url'
    },
    'size': {
        'tag' : 'size'
    },
    'spoiler': {
        'tag' : 'spoiler'
    },
    'align': {
        'tag' : 'align'
    }
};

function se_make_button(button, text) {
    return '&lt;a href="#" class="button se_button se_button_'+button+'"&gt;'+text+'&lt;/a&gt;';
}

function se_create ( obj, toolbar ) {
    var se_toolbar = '';
    for (var button in se_buttons) {
        se_toolbar = se_toolbar + se_make_button(se_buttons[button].tag, se_buttons[button].tag);
    }
    $(obj).before(se_toolbar);
}
</code></pre>

<p><code>toolbar</code> is a simple object with properties. When alerting out each thing individually, they all work and all the info shows correctly. When doing the same <code>.before()</code> command from the console, it works too. But in the code -- it doesn't! What can I do further? :/
I spent about 2 hours trying to work this around, but I can't figure what's going on >&lt; I also tried <code>.replaceWith()</code> or other similar but it just won't work from the inside code. Explicitly running the code manually from the console works though D:</p>

<hr>

<p><strong>Edit:</strong> The weird thing is that if I put an alert with the exact variable inside the <code>before()</code> part, the string is fine. If I manipulate <code>$(obj)</code> in any other way, it works. The conjunction of the variables and the object doesn't wanna fiddle.</p>
