function initializePage() {
  var gallery = {
    'Mill': { filename: 'shop.jpg', position: 0,
      blurb: 'Our mill is located on East Highway 41.' }, 
    'Olives': { filename: 'tour8.jpg', position: 1,
      blurb: 'Olives, of varying ripeness, are collected into a bin. ' +
        'Green olives give a more pungent, bitter, and robust flavor to the oil, and ripe olives add fruity or buttery qualities. ' +
        'The proportion of ripe olives to green olives varies with the farm, and the farmer\'s taste.' }, 
    'Hopper': { filename: 'tour4.jpg', position: 2,
      blurb: 'The bin of freshly picked olives is loaded into the hopper.'},
    'Conveyer': { filename: 'tour1.jpg', position: 3,
      blurb: 'From the hopper, a conveyor takes the olives to the deleafer.'},
    'Deleafer': { filename: 'tour2.jpg', position: 4,
      blurb: 'The deleafer is driven by a powerful motor, and acts like a vacuum cleaner, whisking away stems, twigs, and leaves.'},
    'Washer': { filename: 'tour6.jpg', position: 5,
      blurb: 'From the deleafer, the olives go to the washer'},
    'Hammermill': { filename: 'tour5.jpg', position: 6,
      blurb: 'The washed olives travel by conveyor to the hammermill, where they are crushed.'},
    'Malaxor': { filename: 'tour3.jpg', position: 7,
      blurb: 'From the hammermill, the olives go to the malaxor, where they are heated and mixed into a thick paste.' +
        'This is where the oil and water begin to separate from the solids.'},
    'Paste': { filename: 'tour7.jpg', position: 8,
      blurb: 'Olive paste on the malaxor blades.'},
    'Decanter': { filename: 'tour11.jpg', position: 9,
      blurb: 'From the malaxor, the paste goes to the decanter, which separates the solids from the liquid oil and water.'},
    'Decanter_Closeup': { filename: 'tour9.jpg', position: 10,
      blurb: 'Closeup of the decanter.'},
    'Separator': { filename: 'tour10.jpg', position: 11, 
      blurb: 'From the decanter, the liquid oil and water enter the separator, which captures the finished oil for bottling.'}
  }

  var thumbnails = document.getElementById('gallery-thumbnails');
  var viewport_image = document.getElementById('viewport-image');
  var viewport_text = document.getElementById('viewport-text');
  for ( row in thumbnails.rows ) {
    for ( cell in thumbnails.rows[row].cells ) {
      thumbnails.rows[row].cells[cell].onmouseover = function() {
        viewport_image.src = '/img/' + gallery[this.title].filename;
        viewport_image.title = gallery[this.title].blurb;
        viewport_text.innerHTML = gallery[this.title].blurb;
      }
    }
  }
}
window.onload = initializePage

/*
   var gallery = document.getElementById('gallery-thumbnails');
   var viewport = document.getElementById('gallery-viewport');
   for ( row in gallery.rows ) {
   for ( cell in gallery.rows[row].cells ) {
   gallery.rows[row].cells[cell].onmouseover = function() {
   var source = this.innerHTML.trim();
   viewport.src = source.substr(10, source.length - 12 );
   }
   }
   }
   */

