Javascript objects and syntax
<p>I have an array called gallery_list:</p>

<pre><code>var gallery_list = ["profile.cfm", "explore.cfm", "list.cfm", "lesson.cfm", "class.cfm", "deploy_to_class.cfm"];
</code></pre>

<p>When I write the following, it works:</p>

<pre><code>$.fancybox([
            { 'href' : gallery_list[0],
            'type' : 'iframe' },
            { 'href' : gallery_list[1],
            'type' : 'iframe' },
            { 'href' : gallery_list[2],
            'type' : 'iframe' },
            { 'href' : gallery_list[3],
            'type' : 'iframe' },
            { 'href' : gallery_list[4],
            'type' : 'iframe' },
            { 'href' : gallery_list[5],
            'type' : 'iframe' },

        ]);
</code></pre>

<p>But if I try to do something like below, it does not work:</p>

<pre><code>var data = new Array();
        for (i = 0; i &lt; gallery_list.length, i++) {
                var obj = {
                    'href' : gallery_list[i],
                    'type' : 'iframe'   
                }
                data.push(obj);
        }

$.fancybox([
            data
        ]); 
</code></pre>

<p>Can anyone provide any insight? Clearly I am getting something wrong with my data structures but I'm not sure what it is...</p>
