magnificpopup/lightbox only fires once
<p>I have read some similar things on stackOverflow, but I am really not getting anywhere. We use magnificpopup with lightbox to display excursion details and photos.It works fine on the first click, but fails to fire again unless the page is refreshed. Obviously, this won't work! Here are the code/calls. Can anyone assist?</p>

<p>the code that is clicked: 
blah, blah Excursion Name</p>

<p>Here is the JS settings:</p>

<pre><code>var lb_settings = {
    type: 'inline',
    fixedBgPos: true,
    closeBtnInside: true,
    preloader: false,
    removalDelay: 300,
    mainClass: 'my-mfp-zoom-in',
    callbacks: {
        close: function() {
            // need to stop cycle when its no longer in the DOM
            var $lb = $(".cc_lightbox_slideshow");
            if ($lb.length) {   
                $lb.cycle('destroy');
            }
        }
    }
};
</code></pre>

<p>And lastly the actual click function:</p>

<pre><code>$("code").click(function () {
    var href = "/trips/getOptionDetails/acct_id/" +$(this).attr("class") + "/year/" + programYear + "/program/" + program;
    lb_settings.items = {};
    lb_settings.items.src = href;
    lb_settings.items.type = 'ajax';
    $.magnificPopup.open(lb_settings);
});
</code></pre>

<p>I'd be very grateful for your help. I'm at a loss.</p>