!function(o){"function"==typeof define&&define.amd?define(["jquery"],o):"undefined"!=typeof exports?module.exports=o(require("jquery")):o(jQuery)}(function(r){var e={init:function(o){var p=r.extend({},{html:"",fade:!1,x:20,y:20,zIndex:9999,afterEnter:function(o){},onMove:function(o){},beforeOut:function(o){}},o);return this.each(function(){var n=r(this),o=p.html,e=p.fade,i=p.x,l=p.y,t=p.zIndex,u=p.afterEnter,f=p.onMove,s=p.beforeOut;r(".js-followPopup").length<1&&r("body").append('<div class="js-followPopup" style="display: none; position: fixed; top: 100%; z-index: '+t+'"></div>'),n.on("mouseenter",function(){r(".js-followPopup").html(o),e?r(".js-followPopup").fadeIn(e):r(".js-followPopup").show(),u&&u.call(this,n)}),n.on("mousemove",function(o){var e=(o=o||window.e).clientX,t=o.clientY;setTimeout(function(){e+i+r(".js-followPopup").width()<r(window).width()?r(".js-followPopup").css({left:e+i,right:"auto"}):r(".js-followPopup").css({left:"auto",right:r(window).width()-e+i-10}),t+l+r(".js-followPopup").height()<r(window).height()?r(".js-followPopup").css({top:t+l,bottom:"auto"}):r(".js-followPopup").css({top:"auto",bottom:r(window).height()-t+l-20})},0),f&&f.call(this,n)}),n.on("mouseleave",function(){s&&s.call(this,n),r(".js-followPopup").hide()})})},destroy:function(){return r(this).each(function(){var o=r(this);r(".js-followPopup").remove(),o.off("mouseenter mousemove mouseleave")})}};r.fn.followPopup=function(o){return e[o]?e[o].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof o&&o?void r.error("method "+o+" does not exist on jquery.followPopup.js"):e.init.apply(this,arguments)}});