var Opentip,firstAdapter,i,mouseMoved,mousePosition,mousePositionObservers,position,vendors,_i,_len,_ref,__slice=[].slice,__indexOf=[].indexOf||function(n){for(var t=0,i=this.length;i>t;t++)if(t in this&&this[t]===n)return t;return-1},__hasProp={}.hasOwnProperty;for(Opentip=function(){function n(t,i,r,u){var l,w,a,v,e,s,h,c,b,k,d,y,p,f,o=this;if(this.id=++n.lastId,this.debug("Creating Opentip."),n.tips.push(this),this.adapter=n.adapter,l=this.adapter.data(t,"opentips")||[],l.push(this),this.adapter.data(t,"opentips",l),this.triggerElement=this.adapter.wrap(t),this.triggerElement.length>1)throw Error("You can't call Opentip on multiple elements.");if(1>this.triggerElement.length)throw Error("Invalid element.");for(this.loaded=!1,this.loading=!1,this.visible=!1,this.waitingToShow=!1,this.waitingToHide=!1,this.currentPosition={left:0,top:0},this.dimensions={width:100,height:50},this.content="",this.redraw=!0,this.currentObservers={showing:!1,visible:!1,hiding:!1,hidden:!1},u=this.adapter.clone(u),typeof i=="object"?(u=i,i=r=void 0):typeof r=="object"&&(u=r,r=void 0),r!=null&&(u.title=r),i!=null&&this.setContent(i),u["extends"]==null&&(u["extends"]=u.style!=null?u.style:n.defaultStyle),v=[u],f=u;f["extends"];){if(s=f["extends"],f=n.styles[s],f==null)throw Error("Invalid style: "+s);v.unshift(f);f["extends"]==null&&s!=="standard"&&(f["extends"]="standard")}for(u=(d=this.adapter).extend.apply(d,[{}].concat(__slice.call(v))),u.hideTriggers=function(){var n,r,t,i;for(t=u.hideTriggers,i=[],n=0,r=t.length;r>n;n++)w=t[n],i.push(w);return i}(),u.hideTrigger&&u.hideTriggers.length===0&&u.hideTriggers.push(u.hideTrigger),y=["tipJoint","targetJoint","stem"],h=0,b=y.length;b>h;h++)e=y[h],u[e]&&typeof u[e]=="string"&&(u[e]=new n.Joint(u[e]));for(!u.ajax||u.ajax!==!0&&u.ajax||(u.ajax=this.adapter.tagName(this.triggerElement)==="A"?this.adapter.attr(this.triggerElement,"href"):!1),u.showOn==="click"&&this.adapter.tagName(this.triggerElement)==="A"&&this.adapter.observe(this.triggerElement,"click",function(n){return n.preventDefault(),n.stopPropagation(),n.stopped=!0}),u.target&&(u.fixed=!0),u.stem===!0&&(u.stem=new n.Joint(u.tipJoint)),u.target===!0?u.target=this.triggerElement:u.target&&(u.target=this.adapter.wrap(u.target)),this.currentStem=u.stem,u.delay==null&&(u.delay=u.showOn==="mouseover"?.2:0),u.targetJoint==null&&(u.targetJoint=new n.Joint(u.tipJoint).flip()),this.showTriggers=[],this.showTriggersWhenVisible=[],this.hideTriggers=[],u.showOn&&u.showOn!=="creation"&&this.showTriggers.push({element:this.triggerElement,event:u.showOn}),u.ajaxCache!=null&&(u.cache=u.ajaxCache,delete u.ajaxCache),this.options=u,this.bound={},p=["prepareToShow","prepareToHide","show","hide","reposition"],c=0,k=p.length;k>c;c++)a=p[c],this.bound[a]=function(n){return function(){return o[n].apply(o,arguments)}}(a);this.adapter.domReady(function(){return o.activate(),o.options.showOn==="creation"?o.prepareToShow():void 0})}return n.prototype.STICKS_OUT_TOP=1,n.prototype.STICKS_OUT_BOTTOM=2,n.prototype.STICKS_OUT_LEFT=1,n.prototype.STICKS_OUT_RIGHT=2,n.prototype["class"]={container:"opentip-container",opentip:"opentip",header:"ot-header",content:"ot-content",loadingIndicator:"ot-loading-indicator",close:"ot-close",goingToHide:"ot-going-to-hide",hidden:"ot-hidden",hiding:"ot-hiding",goingToShow:"ot-going-to-show",showing:"ot-showing",visible:"ot-visible",loading:"ot-loading",ajaxError:"ot-ajax-error",fixed:"ot-fixed",showEffectPrefix:"ot-show-effect-",hideEffectPrefix:"ot-hide-effect-",stylePrefix:"style-"},n.prototype._setup=function(){var n,t,i,r,f,u,h,c,e,o,s;for(this.debug("Setting up the tooltip."),this._buildContainer(),this.hideTriggers=[],e=this.options.hideTriggers,r=f=0,h=e.length;h>f;r=++f){if(t=e[r],i=null,n=this.options.hideOn instanceof Array?this.options.hideOn[r]:this.options.hideOn,typeof t=="string")switch(t){case"trigger":n=n||"mouseout";i=this.triggerElement;break;case"tip":n=n||"mouseover";i=this.container;break;case"target":n=n||"mouseover";i=this.options.target;break;case"closeButton":break;default:throw Error("Unknown hide trigger: "+t+".");}else n=n||"mouseover",i=this.adapter.wrap(t);i&&this.hideTriggers.push({element:i,event:n,original:t})}for(o=this.hideTriggers,s=[],u=0,c=o.length;c>u;u++)t=o[u],s.push(this.showTriggersWhenVisible.push({element:t.element,event:"mouseover"}));return s},n.prototype._buildContainer=function(){return this.container=this.adapter.create('