calling chain method in javascript
<p>I am using the following code but it is constantly giving me errors :</p>

<blockquote>
  <p>TypeError: container("accounts").atPosition("#left-top") is undefined</p>
</blockquote>

<p>the code is :</p>

<pre><code>function container(name, position) {
    return {
        pos: null,
        atPosition: function(position) {

            $(position).html(this.newContainer());
            //$(position+" .main").html("yes");
            this.pos = position;
        },
        populateData: function(rdata) {
            $("#left-top .main").html(rdata);
        },
        newContainer: function() {
            //alert(this.pos);
            return '&lt;h3&gt;' + name.toTitleCase() + '&lt;/h3&gt;\
                &lt;div class="main"&gt;\
                &lt;/div&gt;';
        }
    };
}

container('accounts').atPosition('#left-top').populateData("yahoo!!!!");​
</code></pre>

<p>Why am I receiving this error and how can I fix it?  </p>
