CodePen

HTML

            
              <a id="profile-images-gallery-link" class="">
  <img class="thumbnail avatar large" id="image-carousel-link" src="http://upload.wikimedia.org/wikipedia/en/thumb/e/ed/Nyan_cat_250px_frame.PNG/220px-Nyan_cat_250px_frame.PNG">
</a>

<div class="" id="profile-images-gallery">
  <a class="fancybox-profile-images hidden fancybox.image" data-title-id="profileimage-form-1" href="http://upload.wikimedia.org/wikipedia/en/thumb/e/ed/Nyan_cat_250px_frame.PNG/220px-Nyan_cat_250px_frame.PNG"><img src="http://upload.wikimedia.org/wikipedia/en/thumb/e/ed/Nyan_cat_250px_frame.PNG/220px-Nyan_cat_250px_frame.PNG"></a>
  
  <a class="fancybox-profile-images hidden fancybox.image" data-title-id="profileimage-form-2" href="https://graph.facebook.com/648845765/picture?type=large"><img src="https://graph.facebook.com/648845765/picture?type=large"></a>
  
  <a class="fancybox-profile-images hidden fancybox.image" data-title-id="profileimage-form-3" href="https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash4/371305_648845765_1960948885_n.jpg"><img src="https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash4/371305_648845765_1960948885_n.jpg"></a>
  
</div>
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              .hidden {
  display: none;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              $("#profile-images-gallery-link").click(
  function () {
    $.fancybox.open(
      $(".fancybox-profile-images"), {
        padding: 2,
        beforeShow: function() {
          console.info(arguments);
        },
        afterShow: function() {
          console.info(arguments);
        },
        beforeLoad: function () {
            var el, id = $(this.element).data('title-id');
            if (id) {
                el = $('#' + id);

                if (el.length) {
                    this.title = el.html();
                }}
        },
        afterLoad: function(current, previous) {
          console.info( 'Current: ' + current.href );        
          console.info( 'Previous: ' + (previous ? previous.href : '-') );
        }
    });
});
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................