var next_photo_id=0;
var photo_urls={};
var imgLoading=new Image();
imgLoading.src='/wp-content/uploads/2007/12/photo_loading.jpg';
function createPhotoTip(elem,url) {
 if (!yh_tt || !elem || elem.tt_div ) return ; // already initialized or not ready to initialize yet.
 var photo_id=photo_urls[url];
 if (!photo_id) {
  photo_id=++next_photo_id;
  photo_urls[url]=photo_id;
 }
 if ( !Dom.get('photo_tooltip_for_'+photo_id)) {
  var d=document.createElement ( 'div' );
  d.className='tooltip';
 d.id='photo_tooltip_for_'+photo_id;
 var img=document.createElement ( 'img' );
 img.id='photo_for_'+photo_id;
  img.src=imgLoading.src;
  d.appendChild(img);
 document.body.appendChild(d);
   var i=new Image();
   Event.on ( i, 'load', function(e) {
    img.src=i.src;
    img.width=i.width;
    img.height=i.height;
   } );
   i.src=url;
 }
 createTip ( elem, 'photo_tooltip_for_'+photo_id, false );
}
