var AjaxRequest="";var popupTimer="";$.fn.popupTip=function(a){var b={top:0,left:0,height:"auto",width:"auto",floatLeft:false,local:false,title:true};$.extend(b,a);$("*").hover(function(){$("DIV.popupTip").hide()});return this.each(function(a){$(this).find("*").mousemove(function(){$("#popupTip"+a).show()});$(this).mousemove(function(){$("#popupTip"+a).show()});$(this).hover(function(){if(AjaxRequest!="")AjaxRequest.abort();if(popupTimer!="")clearTimeout(popupTimer);$("DIV.popupTip").remove();var c=$(this);var d=c.offset().top+b.top;var e=0;var f=$('<div id="popupTip'+a+'" class="popupTip"></div>');f.css({position:"absolute",top:d,height:b.height,width:b.width});if(b.title)f.append('<div class="popupTipTitle">'+$(this).attr("title")+"</div>");if(b.local){if($(c.attr("rel")).length){f.append($(c.attr("rel")).html());f.hover(function(){$(this).show()},function(){$(this).remove()});$("DIV.popupTip").remove();$("BODY").append(f);if(b.floatLeft)e=c.offset().left-f.width()-b.left;else e=c.offset().left+c.width()+b.left;f.css({left:e})}}else AjaxRequest=$.ajax({type:"POST",url:$(this).attr("rel"),cache:true,success:function(a){f.append(a);f.hover(function(){$(this).show()},function(){$(this).remove()});f.find("#kosarba").click(function(){kosarbatesz(f.find("INPUT[name=termekid]").val(),f.find("INPUT#termekdb").val());if(typeof RefreshDb=="function")setTimeout('RefreshDb("'+f.find("INPUT[name=termekid]").val()+'")',1e3);return false});$("DIV.popupTip").remove();$("BODY").append(f);if(b.floatLeft)e=c.offset().left-f.width()-b.left;else e=c.offset().left+c.width()+b.left;f.css({left:e});c.find("*").hover(function(){f.show()});f.show()}})},function(){$("DIV#popupTip"+a).hide()})})}
