(function(a){a.fn.tipTip=function(d){var f={maxWidth:"250px",edgeOffset:3,delay:500,fadeIn:200,fadeOut:200,enter:function(){},exit:function(){}};var e=a.extend(f,d);var c=a("#tiptip_holder");var b=false;return this.each(function(){var h=a(this);var i=h.attr("title");if(a(this).next("input:hidden").length>0){h.removeAttr("title");var g=false;h.hover(function(){var p=a.evalJSON(a(this).next("input:hidden").val());c.find("h4").html(p.title);c.find("span.reldate").html(p.date);c.find("p").html(p.desc);c.find("span.view_no").html(p.view+" nézés");c.find(".movtype").html(p.group_title);c.find("iframe").attr("src","http://www.facebook.com/plugins/like.php?href="+p.url+"&amp;layout=button_count&amp;show_faces=true&amp;width=150&amp;action=like&amp;colorscheme=light&amp;height=18");e.enter.call(this);c.hide();a("#tiptip_holder_dropShadow").hide();var u=parseInt(h.offset()["top"]);var m=parseInt(h.offset()["left"]);var r=parseInt(h.outerWidth());var v=parseInt(h.outerHeight());var t=c.outerWidth();var n=c.outerHeight();var s=Math.round((r-t)/2);var l=Math.round((v-n)/2);var k=Math.round(m+s);var j=Math.round(u+v+e.edgeOffset);var o="";var w="";var q=Math.round(t-12)/2;if(s<0){if((s+m)<parseInt(a(window).scrollLeft())){o="_right";w=Math.round(n-13)/2;q=-12;k=Math.round(m+r+e.edgeOffset);j=Math.round(u+l)}else{if((t+m)>parseInt(a(window).width())){o="_left";w=Math.round(n-13)/2;q=Math.round(t);k=Math.round(m-(t+e.edgeOffset+5));j=Math.round(u+l)}}}if((m+r+e.edgeOffset+t+8)>parseInt(a(window).width()+a(window).scrollLeft())){arrow_class="tip_left";j=u-30;k=Math.round(m-(t+10+e.edgeOffset))}else{if(((m+r)-(e.edgeOffset+t))<0||o==""){arrow_class="tip_right";j=u-30;k=Math.round(m+r+e.edgeOffset+7)}}c.css({"margin-left":k+"px","margin-top":j+"px"}).attr("class","nfo "+arrow_class);a("#tiptip_holder_dropShadow").css({"margin-left":k+"px","margin-top":j+"px",left:"-10px",top:"-10px",display:"none"});c.css({"padding-left":"15px",width:"217px"});if(g){clearTimeout(g)}if(b){clearTimeout(b)}g=setTimeout(function(){c.stop(true,true).fadeIn(e.fadeIn);a("#tiptip_holder_dropShadow").stop(true,true).fadeIn(e.fadeIn)},e.delay)},function(){e.exit.call(this);if(g){clearTimeout(g)}b=setTimeout(function(){c.fadeOut(e.fadeOut,function(){a("#tiptip_holder_dropShadow").hide()})},1000)});c.hover(function(){if(b){clearTimeout(b)}},function(){c.fadeOut(e.fadeOut,function(){a("#tiptip_holder_dropShadow").hide()})})}})}})(jQuery);
