javascript calling init function after setup
<p>I am trying to create a js object, I want either the user passes in some json data or the objects properties are set by default as shown below. After that is all set, I finally want to call an init function that runs and does the work. Thanks for any help. I am not trying to create a jQuery plugin.</p>

<pre><code>var PictureDialog = function (settings) {
    settings = {
        allowShortKey: true,
        prevID: null,
        prevCounterNumber: null,
        startValue: 0,
        nextValue: 1,
        init: function() {
            //Do work
           //Show dialog
        }
    },settings;

}
</code></pre>

<p>Would the call look something like this</p>

<pre><code>PictureDialog({prevID:1}).init();
</code></pre>
