('click', function(e) {
          e.preventDefault();

          var img = e.target;
          if (e.target.tagName == 'A') {
            img = e.target.children[0];
          }

          // beautify
          var tmpImg = new Image();
          tmpImg.src = img.src;
          imageDisplay.style.height     = 'auto';
          imageDisplay.style.width     = 'auto';
          if (window.innerHeight < tmpImg.height) {
            imageDisplay.style.height = document.documentElement.clientHeight+'px';
        