$(document).ready(function(){var e=140,b=80,d=$("DIV#fullSizeImageContainer"),m=$("DIV#imageContainer",d).hasClass("guest");if(m)e=192;d.css("width",e+"px").css("height",e+"px");var k=$("DIV#fullSizeImageContainer DIV#imageContainer IMG#fullSizeImage"),f=$("DIV#mouseOverArea"),p=$("a",f).get(0);i();var j=$("DIV#loadingIconContainer"),c,a={minX:0,minY:0,maxX:0,maxY:0};function o(){if(parent.frames.search_display){var b=$("#containerMiddleCentre",top.document),c=$("#search_display",top.document).outerHeight();a.minX=b.scrollLeft();a.minX=a.minX>10?a.minX-10:a.minX;a.maxX=b.outerWidth()+a.minX-25;a.maxY=parent.document.body.clientHeight-$("#search_display",top.document).offset().top-25;if(a.maxY>c)a.maxY=c;var d=b.scrollTop();if(d<=0)a.minY=2;else a.minY=d-70}else{var e=$("#containerMiddleCentre");a.minX=e.offset().left;a.minY=$("#containerTop").outerHeight();a.maxX=document.body.clientWidth;a.maxY=document.body.clientHeight}}function i(){f.css("top",-100).css("left",-100)}function n(c){var e=b;if(c.left+b>=a.maxX)e=b-(c.left+b-a.maxX);var d=b;if(c.top+b>=a.maxY)d=b-(c.top+b-a.maxY);f.css("width",e+"px").css("height",d+"px").css("top",c.top).css("left",c.left)}function h(h){var i=f.offset(),c={x:0,y:0};d.css("width",h.width+"px").css("height",h.height+"px");var g=d.outerWidth(),e=d.outerHeight();c.x=i.left-Math.floor((g-b)/2);if(c.x+g>=a.maxX)c.x=c.x-(c.x+g-a.maxX);else if(a.minX>c.x)c.x=a.minX;else if(c.x<0)c.x=a.minX;c.y=i.top-Math.floor((e-b)/2);if(c.y+e>=a.maxY)c.y=c.y-(c.y+e-a.maxY);else if(c.y<a.minY)c.y=a.minY-2;d.css("left",c.x).css("top",c.y)}function g(){var a,b,i=1,f=322,d=f,e=f,g=140;if(c.complete){d=c.width;e=c.height}var i=c.width/c.height;if(i>1)if(d>f){a=f;b=e*(f/d)}else if(d<g){a=g;b=e*(g/d)}else{a=d;b=e*(a/d)}else if(e>f){b=f;a=d*(f/e)}else if(e<g){b=g;a=d*(g/e)}else{b=e;a=d}a=Math.floor(a);b=Math.floor(b);j.hide();k.attr("src",c.src).css("height",b+"px").css("width",a+"px").show();h({width:a,height:b})}$("IMG.mouseOverEnabled").mouseover(function(){var a=$(this),b=a.offset();o();n(b);h({width:e,height:e},{width:80,height:80},b);p.onclick=a.parent().get(0).onclick;j.show();d.show();if(!m){c=new Image;c.src=$("span",a.parent()).html();if(c.complete)g();else c.onload=g}});function l(){i();d.hide();k.hide()}d.mouseout(function(){l()});f.mouseleave(function(){l()})});
