title: Magnific popup facebook share button works just on second click
body: <p>I have a gallery with magnific popup with a share button as titleSrc. 
  This is called on button click:</p>
  
  <pre><code>function callFacebook(item){
    console.log(item);
    FB.ui({
      method: 'feed',
      link: item,
      caption: 'Die besten Party-Pics bei party-news.de',
    }, function(response){
      console.log(response);
    });
  }
  </code></pre>
  
  <p>This is the magnific popup call:</p>
  
  <pre><code>$('.gallery').magnificPopup({
    delegate: 'a', // child items selector, by clicking on it popup will open
    type: 'image',
    gallery: {
      enabled:true,
      tCounter: '%curr% von %total%',
      preload:false
    },
    image: {
      verticalFit:false,
      titleSrc:function(item){
          var image = item.el.attr("href");
          return '&lt;a class="shareFacebook" onclick="callFacebook(\''+image+'\')" target="_blank"&gt;&lt;i class="fa fa-facebook-official"&gt;&lt;/i&gt;&amp;nbsp;Foto teilen&lt;/a&gt;';
      }
    },
      tClose: 'Schliessen',
      tLoading: 'Lade Bild...',
    // other options
  });
  </code></pre>
  
  <p>I´m getting the href of the clicked image and pass it to the callFacebook function. The first time I click the share button it just shows the standard og:tags. When I close this window and click the share button again – it works. The image shows up at the share dialog.  Any ideas why?</p>