maggot.ready(function(){
  maggot('div.tourlogp').map(function(div){
    var img = maggot('img',div)[0];
    maggot.attach(img.parentNode,'onclick',function(e){
      e = maggot.event(e);
      window.open('/webgear/lib/image.asp?' + encodeURIComponent(e.target.href),'wndp','width=100px,height=100px,resizable,status').focus();
      return e.stop();
    });
    maggot('ul a',div).map(function(a){
      a.onmouseover = a.onfocus = function(e){
        img.src = img.parentNode.href = a.href;
      };
      a.onclick = function(e){
        window.open('/webgear/lib/image.asp?' + encodeURIComponent(a.href),'wndp','width=100px,height=100px,resizable,status').focus();
        return maggot.event(e).stop();
      };
    });
  });
});