var FG = FG || {};

FG.Gallery = (function(window, document, $) {
  
  var _private = {
    registerEventListeners: function() {
      $('#gallery').delegate('a', 'click', function(e){
        e.preventDefault();
        $thumb = $(this);
        _public.showcase($thumb.attr('href'), $thumb.attr('title'));
      });
    }
  };

  var _public = {
    init: function() {
      _private.registerEventListeners();
    },
    showcase: function(imgSrc, desc) {
      $showcase = $('#showcase');
      $showcase.find('.image img').attr('src', imgSrc);
      $showcase.find('.description p').text(desc);
    }
  };

  return _public;

})(window, document, jQuery);

jQuery(function(){
  FG.Gallery.init();
});

