Problem calling Fancybox using .live() and dynamic links

Problem calling Fancybox using .live() and dynamic links

I have a function that dynamically creates links for a photo gallery. The function also produces a larger image as a background image of a div when and thumbnail is clicked on. What I want to do is have a third event, where if the user clicks the enlarged image in the div, the jQuery Fancybox loads an even bigger version of the image being displayed in the div. The problem is that the link for the anchor tag I'm using is created dynamically, and I know that Fancybox parses the HTML when the DOM is ready...unfortunately my function changes the DOM by appending the anchor tag for the full sized image. The help I need is using the Fancybox's options to specify the href attribute for the plugin. I'm sorry that was so long-winded...here's the code.
     
      jQuery:
  1. function gallery(picid, picnum){
        var ext = 'jpg';
        var fullSize = 'imgs/'+picid+'_full.'+ext;
        $('#photolarge').css("background", 'url(imgs/'+picid+'_large.'+ext+') no-repeat');
        $('#lightboxlink').attr(
            {    href: fullSize
                 //rel: 'lightbox',    
            }
            );
       
           
        $("#lightboxlink").live('click', function(){
        $(this).filter(':not(.fb)').fancybox({
            'autoDimensions' : false,
            'width' : 'auto',
            'height' : 'auto',
            'href' : fullSize
         }).addClass('fb');
         $(this).triggerHandler('click');
         e.preventDefault();
    });
               
        return false;
    }






















      HTML:
  1.       <div id="photolarge"><a id="lightboxlink" href="#"></a></div>
                <div id="phototable">
                    <ul id="photorow1">
                        <li><a onclick="gallery('bigsun',1)"><img id="sun" src="imgs/bigsun.jpg" /></a></li>
                    </ul>
                </div>   





Any help would be greatly appreciated!!