!function(a,b,c,d){a.fn.popup=function(e){var f,g=a(this),h=a.isPlainObject(e)?a.extend(!0,{},a.fn.popup.settings,e):a.fn.popup.settings,i=("."+h.namespace,"module-"+h.namespace,g.selector||""),j=(g.size(),(new Date).getTime()),k=[],l=h.selector,m=h.className,n=h.error,o=h.metadata,p=h.namespace,q=arguments[0],r="string"==typeof q,s=[].slice.call(arguments,1);return g.each(function(){var e,g=a(this),t=a(b),u=g.offsetParent(),v=h.inline?g.next(l.popup):t.children(l.popup).last(),w=0,x=this,y=g.data("module-"+h.namespace);e={initialize:function(){e.debug("Initializing module",g),"hover"==h.on?g.on("mouseenter."+p,e.event.mouseenter).on("mouseleave."+p,e.event.mouseleave):g.on(h.on+"."+p,e.event[h.on]),t.on("resize."+p,e.event.resize),e.instantiate()},instantiate:function(){e.verbose("Storing instance of module"),y=e,g.data("module-"+p,y)},refresh:function(){v=h.inline?g.next(l.popup):t.children(l.popup).last(),u=g.offsetParent()},destroy:function(){e.debug("Destroying existing popups"),g.off("."+p)},event:{mouseenter:function(b){var c=this;e.timer=setTimeout(function(){a.proxy(e.toggle,c)(),a(c).hasClass(m.visible)&&b.stopPropagation()},h.delay)},mouseleave:function(){clearTimeout(e.timer),g.is(":visible")&&e.hide()},click:function(b){a.proxy(e.toggle,this)(),a(this).hasClass(m.visible)&&b.stopPropagation()},resize:function(){v.is(":visible")&&e.position()}},create:function(){e.debug("Creating pop-up html");var b=g.data(o.html)||h.html,c=g.data(o.variation)||h.variation,d=g.data(o.title)||h.title,f=g.data(o.content)||g.attr("title")||h.content;b||f||d?(b||(b=h.template({title:d,content:f})),v=a("
").addClass(m.popup).addClass(c).html(b),h.inline?v.insertAfter(g):v.appendTo(a("body")),a.proxy(h.onInit,v)()):e.error(n.content)},remove:function(){v.remove()},get:{offstagePosition:function(){var c={top:a(b).scrollTop(),bottom:a(b).scrollTop()+a(b).height(),left:0,right:a(b).width()},d={width:v.width(),height:v.outerHeight(),position:v.offset()},e={},f=[];return d.position&&(e={top:d.position.topc.bottom,right:d.position.left+d.width>c.right,left:d.position.left0?f.join(" "):!1},nextPosition:function(a){switch(a){case"top left":a="bottom left";break;case"bottom left":a="top right";break;case"top right":a="bottom right";break;case"bottom right":a="top center";break;case"top center":a="bottom center";break;case"bottom center":a="right center";break;case"right center":a="left center";break;case"left center":a="top center"}return a}},toggle:function(){g=a(this),e.debug("Toggling pop-up"),e.refresh(),g.hasClass(m.visible)?e.hide():(e.hideAll(),e.show())},position:function(c,d){var f,i,j=(a(b).width(),a(b).height(),g.outerWidth()),k=g.outerHeight(),l=v.width(),p=v.outerHeight(),q=h.inline?g.position():g.offset(),r=h.inline?u.outerWidth():t.outerWidth(),s=h.inline?u.outerHeight():t.outerHeight();switch(c=c||g.data(o.position)||h.position,d=d||g.data(o.arrowOffset)||h.arrowOffset,e.debug("Calculating offset for position",c),c){case"top left":f={top:"auto",bottom:s-q.top+h.distanceAway,left:q.left+d};break;case"top center":f={bottom:s-q.top+h.distanceAway,left:q.left+j/2-l/2+d,top:"auto",right:"auto"};break;case"top right":f={bottom:s-q.top+h.distanceAway,right:r-q.left-j-d,top:"auto",left:"auto"};break;case"left center":f={top:q.top+k/2-p/2,right:r-q.left+h.distanceAway-d,left:"auto",bottom:"auto"};break;case"right center":f={top:q.top+k/2-p/2,left:q.left+j+h.distanceAway+d,bottom:"auto",right:"auto"};break;case"bottom left":f={top:q.top+k+h.distanceAway,left:q.left+d,bottom:"auto",right:"auto"};break;case"bottom center":f={top:q.top+k+h.distanceAway,left:q.left+j/2-l/2+d,bottom:"auto",right:"auto"};break;case"bottom right":f={top:q.top+k+h.distanceAway,right:r-q.left-j-d,left:"auto",bottom:"auto"}}return a.extend(f,{width:v.width()+1}),v.removeAttr("style").removeClass("top right bottom left center").css(f).addClass(c).addClass(m.loading),i=e.get.offstagePosition(),i?(e.debug("Element is outside boundaries ",i),w0&&(console.groupCollapsed(b),console.table?console.table(k):a.each(k,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),k=[]}},invoke:function(b,c,f){var g,h;return c=c||s,f=x||f,"string"==typeof b&&y!==d&&(b=b.split("."),g=b.length-1,a.each(b,function(b,c){a.isPlainObject(y[c])&&b!=g?y=y[c]:y[c]!==d?h=y[c]:e.error(n.method)})),a.isFunction(h)?(y.verbose("Executing invoked function",h),h.apply(f,c)):h||!1}},r?(y===d&&e.initialize(),f=e.invoke(q)):(y===d&&e.destroy(),e.initialize())}),f?f:this},a.fn.popup.settings={moduleName:"Popup",debug:!0,verbose:!0,performance:!0,namespace:"popup",onInit:function(){},onShow:function(){},onHide:function(){},variation:"",content:!1,html:!1,title:!1,on:"hover",clicktoClose:!0,position:"top center",delay:150,inline:!0,duration:250,easing:"easeOutQuint",animation:"pop",distanceAway:0,arrowOffset:0,maxSearchDepth:10,error:{content:"Your popup has no content specified",method:"The method you called is not defined.",recursion:"Popup attempted to reposition element to fit, but could not find an adequate position."},metadata:{arrowOffset:"arrowOffset",content:"content",html:"html",position:"position",title:"title",variation:"variation"},className:{popup:"ui popup",visible:"visible",loading:"loading"},selector:{popup:".ui.popup"},template:function(a){var b="";return typeof a!==d&&(typeof a.title!==d&&a.title&&(b+=''),typeof a.content!==d&&a.content&&(b+=''+a.content+"
")),b}}}(jQuery,window,document);