$.fn.fixMissingImage=function(A){var B={missingImage:"/common/images/na_missing.jpg"};
if(A&&typeof (A)!="string"){jQuery.extend(B,A)}return this.each(function(){new ImageErrorHandler($(this),B)
})};var ImageErrorHandler=function(B,A){this.init(B,A)};ImageErrorHandler.prototype.init=function(C,A){var B=this;
this.settings=A;this.img=$(C);this.img.bind("error",function(){return B.fixError()
});this.img.attr("src",this.img.attr("src"))};ImageErrorHandler.prototype.fixError=function(){try{var A=$(this.img);
var B=A.attr("src");if(B.indexOf(this.settings.missingImage)>0){A.css("display","none");
A.unbind()}else{A.attr("src",this.settings.missingImage)}}catch(C){target.unbind()
}};$.fn.getCenter=function(){var B=$(this);var A={left:0,top:0,centerTop:0,centerLeft:0,halfHeight:0,halfWidth:0,height:0,scrollTop:0,scrollLeft:0,all:null,win:null};
A.height=B.outerHeight();A.halfHeight=(B.outerHeight()/2);A.halfWidth=(B.outerWidth()/2);
A.top=B.offset({border:true,padding:true}).top;A.left=B.offset({border:true,padding:true}).left;
A.centerTop=A.halfHeight+A.top;A.centerLeft=A.halfWidth+A.left;A.scrollTop=B.scrollTop();
A.scrollLeft=B.scrollLeft();return A};$.fn.floatImage=function(A){var B={width:300};
if(A&&typeof (A)!="string"){jQuery.extend(B,A)}return this.each(function(){new ImageFloater($(this),B)
})};var ImageFloater=function(B,A){this.init(B,A)};ImageFloater.prototype.init=function(D,A){var C=this;
this.settings=A;this.a=$(D);this.lock=null;this.img=null;this.hvr=null;var E=this.a.children("img");
if(E.length>0){this.img=$(E[0]);this.hvr=this.img.clone();this.hvr.attr("src",this.a.attr("href"));
this.hvr.css({width:this.settings.width,position:"absolute",display:"none",height:"auto",zIndex:100,top:-1000,left:-1000});
var B=$("form:first");this.hvr.appendTo(B);this.hvr.show();this.a.bind("click",function(){return false
});this.a.bind("mouseover",function(){return C.hoverOn()});this.hvr.bind("mouseout",function(){return C.hoverOff()
});this.hvr.bind("click",function(){return C.hoverOff()})}};ImageFloater.prototype.resetTimer=function(){var A=this;
if(this.lock!=null){clearTimeout(this.lock)}this.lock=setTimeout(function(){A.hoverOff()
},5000)};ImageFloater.prototype.hoverOn=function(){if(this.lock!=null){this.resetTimer();
return }this.resetTimer();jQuery.extend(this.img,this.img.getCenter());var C={t:$(window).scrollTop(),l:$(window).scrollLeft(),b:$(window).scrollTop()+$(window).height(),r:$(window).scrollLeft()+$(window).width()};
this.hvr.show();jQuery.extend(this.settings,this.hvr.getCenter());this.hvr.hide();
var D={h:this.settings.height,w:this.settings.width};var B=(this.settings.halfHeight<1)?this.img.top:this.img.centerTop-this.settings.halfHeight;
var A=(this.settings.halfWidth<1)?this.img.left:this.img.centerLeft-this.settings.halfWidth;
B=(B<0||B<C.t)?C.t:B;A=(A<0||A<C.l)?C.l:A;B=(B+D.h>C.b)?((C.b-D.h<C.t)?C.t:C.b-D.h):B;
A=(A+D.w>C.r)?((C.r-D.w<C.l)?C.l:C.r-D.w):A;this.hvr.show();this.hvr.css("zIndex","4000");
this.hvr.css("top",B);this.hvr.css("left",A)};ImageFloater.prototype.hoverOff=function(){this.hvr.fadeOut();
if(this.lock!=null){clearTimeout(this.lock);this.lock=null}}