How to turn this static init into a dynamic one
<p>I have this fancybox plugin wich is great, but I don't think there is enough examples on the <a href="http://fancyapps.com/fancybox/" rel="nofollow">documentation</a></p>

<pre><code>$(document).ready(function(){   
    $('nav.main a#gallery').live('click',function() {
        $.fancybox([
            {href : 'img/galeria/fondo1.jpg', title : 'Title1','nextEffect' : 'fade',   'prevEffect'    : 'fade'}, 
            {href : 'img/galeria/fondo2.jpg', title : 'Title2','nextEffect' : 'fade',   'prevEffect'    : 'fade'},
            {href : 'img/galeria/fondo3.jpg', title : 'Title3','nextEffect' : 'fade',   'prevEffect'    : 'fade'}, 
            {href : 'img/galeria/fondo4.jpg', title : 'Title4','nextEffect' : 'fade',   'prevEffect'    : 'fade'}  
        ]);
    });
});
</code></pre>

<p>Well as you can see this loads a few images in the fancybox.</p>

<p>I would like to be able to do it by passing a javascript object to it so I don't need to know which, or how many images there are (in the init) and manage that updating the object, but I just don't see how to do this.</p>

<p>Can anyone help.</p>
