(function ($) {
$(document).ready(function () {
    var refAttr = 'href',
      thumbLinks = 'a.thumbnail',
      destination = '#enlarge';

    // setup enlarge src-swap on mouse-enter
    $(thumbLinks).mouseenter(function () {
        $(destination).attr('src', $(this).attr(refAttr));
    }).click(function () {
        return false;
    });

    // setup class-swap for thumbnails
    $(thumbLinks).find('img').hover(
    function () {
        $(this).removeClass('dark').addClass('light');
    },
    function () {
        $(this).removeClass('light').addClass('dark');
    }
  );
});
})(jQuery);