What's the correct usage of $.extend(deep, target, obj)? My code won't work
<p>I'm having trouble with the $.extend function, see the code below...</p>

<pre><code>//Function to merge the opts with the defaultOpts

var foo = function(opts){
    var opts = opts ? opts : {};

    console.log('BEFORE: ');
    console.log(JSON.stringify(opts));

    var defaultOpts = {
        className  : 'defaultClass',
        selectable : false,
        ID         : null,
        buttons    : []
    }   

    $.extend(true, opts, defaultOpts);

    console.log('AFTER: ');
    console.log(JSON.stringify(opts));
}

//Run the function and pass in a few options

foo({
    className : 'realClassName',
    buttons   : [
        {
            something : 'nothing'
        },
        {
            something : 'nothing'
        }
    ]
});
</code></pre>

<p>The problem with the output is that the "className" property is being replaced by the default value, but for some reason the "buttons" property works as expected.</p>
