// opentip v2.4.6 // copyright (c) 2009-2012 // www.opentip.org // mit licensed var opentip,firstadapter,i,mousemoved,mouseposition,mousepositionobservers,position,vendors,_i,_len,_ref,__slice=[].slice,__indexof=[].indexof||function(t){for(var e=0,i=this.length;i>e;e++)if(e in this&&this[e]===t)return e;return-1},__hasprop={}.hasownproperty;for(opentip=function(){function t(e,i,o,s){var n,r,a,h,p,d,l,u,c,g,f,m,v,b,w=this;if(this.id=++t.lastid,this.debug("creating opentip."),t.tips.push(this),this.adapter=t.adapter,n=this.adapter.data(e,"opentips")||[],n.push(this),this.adapter.data(e,"opentips",n),this.triggerelement=this.adapter.wrap(e),this.triggerelement.length>1)throw error("you can't call opentip on multiple elements.");if(1>this.triggerelement.length)throw error("invalid element.");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},s=this.adapter.clone(s),typeof i=="object"?(s=i,i=o=void 0):typeof o=="object"&&(s=o,o=void 0),o!=null&&(s.title=o),i!=null&&this.setcontent(i),s["extends"]==null&&(s["extends"]=s.style!=null?s.style:t.defaultstyle),h=[s],b=s;while(b["extends"]){if(d=b["extends"],b=t.styles[d],b==null)throw error("invalid style: "+d);h.unshift(b),b["extends"]==null&&d!=="standard"&&(b["extends"]="standard")}for(s=(f=this.adapter).extend.apply(f,[{}].concat(__slice.call(h))),s.hidetriggers=function(){var t,e,i,o;for(i=s.hidetriggers,o=[],t=0,e=i.length;e>t;t++)r=i[t],o.push(r);return o}(),s.hidetrigger&&s.hidetriggers.length===0&&s.hidetriggers.push(s.hidetrigger),m=["tipjoint","targetjoint","stem"],l=0,c=m.length;c>l;l++)p=m[l],s[p]&&typeof s[p]=="string"&&(s[p]=new t.joint(s[p]));for(!s.ajax||s.ajax!==!0&&s.ajax||(s.ajax=this.adapter.tagname(this.triggerelement)==="a"?this.adapter.attr(this.triggerelement,"href"):!1),s.showon==="click"&&this.adapter.tagname(this.triggerelement)==="a"&&this.adapter.observe(this.triggerelement,"click",function(t){return t.preventdefault(),t.stoppropagation(),t.stopped=!0}),s.target&&(s.fixed=!0),s.stem===!0&&(s.stem=new t.joint(s.tipjoint)),s.target===!0?s.target=this.triggerelement:s.target&&(s.target=this.adapter.wrap(s.target)),this.currentstem=s.stem,s.delay==null&&(s.delay=s.showon==="mouseover"?.2:0),s.targetjoint==null&&(s.targetjoint=new t.joint(s.tipjoint).flip()),this.showtriggers=[],this.showtriggerswhenvisible=[],this.hidetriggers=[],s.showon&&s.showon!=="creation"&&this.showtriggers.push({element:this.triggerelement,event:s.showon}),s.ajaxcache!=null&&(s.cache=s.ajaxcache,delete s.ajaxcache),this.options=s,this.bound={},v=["preparetoshow","preparetohide","show","hide","reposition"],u=0,g=v.length;g>u;u++)a=v[u],this.bound[a]=function(t){return function(){return w[t].apply(w,arguments)}}(a);this.adapter.domready(function(){return w.activate(),w.options.showon==="creation"?w.preparetoshow():void 0})}return t.prototype.sticks_out_top=1,t.prototype.sticks_out_bottom=2,t.prototype.sticks_out_left=1,t.prototype.sticks_out_right=2,t.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-"},t.prototype._setup=function(){var t,e,i,o,s,n,r,a,h,p,d;for(this.debug("setting up the tooltip."),this._buildcontainer(),this.hidetriggers=[],h=this.options.hidetriggers,o=s=0,r=h.length;r>s;o=++s){if(e=h[o],i=null,t=this.options.hideon instanceof array?this.options.hideon[o]:this.options.hideon,typeof e=="string")switch(e){case"trigger":t=t||"mouseout",i=this.triggerelement;break;case"tip":t=t||"mouseover",i=this.container;break;case"target":t=t||"mouseover",i=this.options.target;break;case"closebutton":break;default:throw error("unknown hide trigger: "+e+".")}else t=t||"mouseover",i=this.adapter.wrap(e);i&&this.hidetriggers.push({element:i,event:t,original:e})}for(p=this.hidetriggers,d=[],n=0,a=p.length;a>n;n++)e=p[n],d.push(this.showtriggerswhenvisible.push({element:e.element,event:"mouseover"}));return d},t.prototype._buildcontainer=function(){return this.container=this.adapter.create('
'),this.adapter.css(this.container,{position:"absolute"}),this.options.ajax&&this.adapter.addclass(this.container,this["class"].loading),this.options.fixed&&this.adapter.addclass(this.container,this["class"].fixed),this.options.showeffect&&this.adapter.addclass(this.container,""+this["class"].showeffectprefix+this.options.showeffect),this.options.hideeffect?this.adapter.addclass(this.container,""+this["class"].hideeffectprefix+this.options.hideeffect):void 0},t.prototype._buildelements=function(){var t,e;return this.tooltipelement=this.adapter.create('
'),this.backgroundcanvas=this.adapter.wrap(document.createelement("canvas")),this.adapter.css(this.backgroundcanvas,{position:"absolute"}),typeof g_vmlcanvasmanager!="undefined"&&g_vmlcanvasmanager!==null&&g_vmlcanvasmanager.initelement(this.adapter.unwrap(this.backgroundcanvas)),t=this.adapter.find(this.tooltipelement,"."+this["class"].header),this.options.title&&(e=this.adapter.create("

"),this.adapter.update(e,this.options.title,this.options.escapetitle),this.adapter.append(t,e)),this.options.ajax&&!this.loaded&&this.adapter.append(this.tooltipelement,this.adapter.create('
')),__indexof.call(this.options.hidetriggers,"closebutton")>=0&&(this.closebuttonelement=this.adapter.create('close'),this.adapter.append(t,this.closebuttonelement)),this.adapter.append(this.container,this.backgroundcanvas),this.adapter.append(this.container,this.tooltipelement),this.adapter.append(document.body,this.container),this._newcontent=!0,this.redraw=!0},t.prototype.setcontent=function(t){return this.content=t,this._newcontent=!0,typeof this.content=="function"?(this._contentfunction=this.content,this.content=""):this._contentfunction=null,this.visible?this._updateelementcontent():void 0},t.prototype._updateelementcontent=function(){var t;return(this._newcontent||!this.options.cache&&this._contentfunction)&&(t=this.adapter.find(this.container,"."+this["class"].content),t!=null&&(this._contentfunction&&(this.debug("executing content function."),this.content=this._contentfunction(this)),this.adapter.update(t,this.content,this.options.escapecontent)),this._newcontent=!1),this._storeandlockdimensions(),this.reposition()},t.prototype._storeandlockdimensions=function(){var t;if(this.container)return t=this.dimensions,this.adapter.css(this.container,{width:"auto",left:"0px",top:"0px"}),this.dimensions=this.adapter.dimensions(this.container),this.dimensions.width+=1,this.adapter.css(this.container,{width:""+this.dimensions.width+"px",top:""+this.currentposition.top+"px",left:""+this.currentposition.left+"px"}),this._dimensionsequal(this.dimensions,t)?void 0:(this.redraw=!0,this._draw())},t.prototype.activate=function(){return this._setupobservers("hidden","hiding")},t.prototype.deactivate=function(){return this.debug("deactivating tooltip."),this.hide(),this._setupobservers("-showing","-visible","-hidden","-hiding")},t.prototype._setupobservers=function(){var t,e,i,o,s,n,r,a,h,p,d,l,u,c,g,f,m=this;for(o=arguments.length>=1?__slice.call(arguments,0):[],n=0,p=o.length;p>n;n++)if(i=o[n],e=!1,i.charat(0)==="-"&&(e=!0,i=i.substr(1)),this.currentobservers[i]!==!e)switch(this.currentobservers[i]=!e,t=function(){var t,i,o;return t=arguments.length>=1?__slice.call(arguments,0):[],e?(i=m.adapter).stopobserving.apply(i,t):(o=m.adapter).observe.apply(o,t)},i){case"showing":for(c=this.hidetriggers,r=0,d=c.length;d>r;r++)s=c[r],t(s.element,s.event,this.bound.preparetohide);t(document.onresize!=null?document:window,"resize",this.bound.reposition),t(window,"scroll",this.bound.reposition);break;case"visible":for(g=this.showtriggerswhenvisible,a=0,l=g.length;l>a;a++)s=g[a],t(s.element,s.event,this.bound.preparetoshow);break;case"hiding":for(f=this.showtriggers,h=0,u=f.length;u>h;h++)s=f[h],t(s.element,s.event,this.bound.preparetoshow);break;case"hidden":break;default:throw error("unknown state: "+i)}return null},t.prototype.preparetoshow=function(){return this._aborthiding(),this._abortshowing(),this.visible?void 0:(this.debug("showing in "+this.options.delay+"s."),this.container==null&&this._setup(),this.options.group&&t._abortshowinggroup(this.options.group,this),this.preparingtoshow=!0,this._setupobservers("-hidden","-hiding","showing"),this._followmouseposition(),this.options.fixed&&!this.options.target&&(this.initialmouseposition=mouseposition),this.reposition(),this._showtimeoutid=this.settimeout(this.bound.show,this.options.delay||0))},t.prototype.show=function(){var e=this;return this._aborthiding(),this.visible?void 0:(this._cleartimeouts(),this._triggerelementexists()?(this.debug("showing now."),this.container==null&&this._setup(),this.options.group&&t._hidegroup(this.options.group,this),this.visible=!0,this.preparingtoshow=!1,this.tooltipelement==null&&this._buildelements(),this._updateelementcontent(),!this.options.ajax||this.loaded&&this.options.cache||this._loadajax(),this._searchandactivateclosebuttons(),this._startensuretriggerelement(),this.adapter.css(this.container,{zindex:t.lastzindex++}),this._setupobservers("-hidden","-hiding","-showing","-visible","showing","visible"),this.options.fixed&&!this.options.target&&(this.initialmouseposition=mouseposition),this.reposition(),this.adapter.removeclass(this.container,this["class"].hiding),this.adapter.removeclass(this.container,this["class"].hidden),this.adapter.addclass(this.container,this["class"].goingtoshow),this.setcss3style(this.container,{transitionduration:"0s"}),this.defer(function(){var t;if(e.visible&&!e.preparingtohide)return e.adapter.removeclass(e.container,e["class"].goingtoshow),e.adapter.addclass(e.container,e["class"].showing),t=0,e.options.showeffect&&e.options.showeffectduration&&(t=e.options.showeffectduration),e.setcss3style(e.container,{transitionduration:""+t+"s"}),e._visibilitystatetimeoutid=e.settimeout(function(){return e.adapter.removeclass(e.container,e["class"].showing),e.adapter.addclass(e.container,e["class"].visible)},t),e._activatefirstinput()}),this._draw()):this.deactivate())},t.prototype._abortshowing=function(){return this.preparingtoshow?(this.debug("aborting showing."),this._cleartimeouts(),this._stopfollowingmouseposition(),this.preparingtoshow=!1,this._setupobservers("-showing","-visible","hiding","hidden")):void 0},t.prototype.preparetohide=function(){return this._abortshowing(),this._aborthiding(),this.visible?(this.debug("hiding in "+this.options.hidedelay+"s"),this.preparingtohide=!0,this._setupobservers("-showing","visible","-hidden","hiding"),this._hidetimeoutid=this.settimeout(this.bound.hide,this.options.hidedelay)):void 0},t.prototype.hide=function(){var t=this;return this._abortshowing(),this.visible&&(this._cleartimeouts(),this.debug("hiding!"),this.visible=!1,this.preparingtohide=!1,this._stopensuretriggerelement(),this._setupobservers("-showing","-visible","-hiding","-hidden","hiding","hidden"),this.options.fixed||this._stopfollowingmouseposition(),this.container)?(this.adapter.removeclass(this.container,this["class"].visible),this.adapter.removeclass(this.container,this["class"].showing),this.adapter.addclass(this.container,this["class"].goingtohide),this.setcss3style(this.container,{transitionduration:"0s"}),this.defer(function(){var e;return t.adapter.removeclass(t.container,t["class"].goingtohide),t.adapter.addclass(t.container,t["class"].hiding),e=0,t.options.hideeffect&&t.options.hideeffectduration&&(e=t.options.hideeffectduration),t.setcss3style(t.container,{transitionduration:""+e+"s"}),t._visibilitystatetimeoutid=t.settimeout(function(){return t.adapter.removeclass(t.container,t["class"].hiding),t.adapter.addclass(t.container,t["class"].hidden),t.setcss3style(t.container,{transitionduration:"0s"}),t.options.removeelementsonhide?(t.debug("removing html elements."),t.adapter.remove(t.container),delete t.container,delete t.tooltipelement):void 0},e)})):void 0},t.prototype._aborthiding=function(){return this.preparingtohide?(this.debug("aborting hiding."),this._cleartimeouts(),this.preparingtohide=!1,this._setupobservers("-hiding","showing","visible")):void 0},t.prototype.reposition=function(){var t,e,i,o=this;return t=this.getposition(),t==null||(e=this.options.stem,this.options.containinviewport&&(i=this._ensureviewportcontainment(t),t=i.position,e=i.stem),this._positionsequal(t,this.currentposition))?void 0:(this.options.stem&&!e.eql(this.currentstem)&&(this.redraw=!0),this.currentposition=t,this.currentstem=e,this._draw(),this.adapter.css(this.container,{left:""+t.left+"px",top:""+t.top+"px"}),this.defer(function(){var t,e;return t=o.adapter.unwrap(o.container),t.style.visibility="hidden",e=t.offsetheight,t.style.visibility="visible"}))},t.prototype.getposition=function(t,e,i){var o,s,n,r,a,h,p,d,l;if(this.container)return t==null&&(t=this.options.tipjoint),e==null&&(e=this.options.targetjoint),r={},this.options.target?(p=this.adapter.offset(this.options.target),h=this.adapter.dimensions(this.options.target),r=p,e.right?(d=this.adapter.unwrap(this.options.target),d.getboundingclientrect!=null?r.left=d.getboundingclientrect().right+((l=window.pagexoffset)!=null?l:document.body.scrollleft):r.left+=h.width):e.center&&(r.left+=math.round(h.width/2)),e.bottom?r.top+=h.height:e.middle&&(r.top+=math.round(h.height/2)),this.options.borderwidth&&(this.options.tipjoint.left&&(r.left+=this.options.borderwidth),this.options.tipjoint.right&&(r.left-=this.options.borderwidth),this.options.tipjoint.top?r.top+=this.options.borderwidth:this.options.tipjoint.bottom&&(r.top-=this.options.borderwidth))):r=this.initialmouseposition?{top:this.initialmouseposition.y,left:this.initialmouseposition.x}:{top:mouseposition.y,left:mouseposition.x},this.options.autooffset&&(a=this.options.stem?this.options.stemlength:0,n=a&&this.options.fixed?2:10,o=t.middle&&!this.options.fixed?15:0,s=t.center&&!this.options.fixed?15:0,t.right?r.left-=n+o:t.left&&(r.left+=n+o),t.bottom?r.top-=n+s:t.top&&(r.top+=n+s),a&&(i==null&&(i=this.options.stem),i.right?r.left-=a:i.left&&(r.left+=a),i.bottom?r.top-=a:i.top&&(r.top+=a))),r.left+=this.options.offset[0],r.top+=this.options.offset[1],t.right?r.left-=this.dimensions.width:t.center&&(r.left-=math.round(this.dimensions.width/2)),t.bottom?r.top-=this.dimensions.height:t.middle&&(r.top-=math.round(this.dimensions.height/2)),r},t.prototype._ensureviewportcontainment=function(e){var i,o,s,n,r,a,h,p,d,l,u,c;if(h=this.options.stem,s={position:e,stem:h},!this.visible||!e)return s;if(p=this._sticksout(e),!p[0]&&!p[1])return s;if(l=new t.joint(this.options.tipjoint),this.options.targetjoint&&(d=new t.joint(this.options.targetjoint)),a=this.adapter.scrolloffset(),u=this.adapter.viewportdimensions(),c=[e.left-a[0],e.top-a[1]],i=!1,u.width>=this.dimensions.width&&p[0])switch(i=!0,p[0]){case this.sticks_out_left:l.sethorizontal("left"),this.options.targetjoint&&d.sethorizontal("right");break;case this.sticks_out_right:l.sethorizontal("right"),this.options.targetjoint&&d.sethorizontal("left")}if(u.height>=this.dimensions.height&&p[1])switch(i=!0,p[1]){case this.sticks_out_top:l.setvertical("top"),this.options.targetjoint&&d.setvertical("bottom");break;case this.sticks_out_bottom:l.setvertical("bottom"),this.options.targetjoint&&d.setvertical("top")}return i?(this.options.stem&&(h=l),e=this.getposition(l,d,h),o=this._sticksout(e),n=!1,r=!1,o[0]&&o[0]!==p[0]&&(n=!0,l.sethorizontal(this.options.tipjoint.horizontal),this.options.targetjoint&&d.sethorizontal(this.options.targetjoint.horizontal)),o[1]&&o[1]!==p[1]&&(r=!0,l.setvertical(this.options.tipjoint.vertical),this.options.targetjoint&&d.setvertical(this.options.targetjoint.vertical)),n&&r?s:((n||r)&&(this.options.stem&&(h=l),e=this.getposition(l,d,h)),{position:e,stem:h})):s},t.prototype._sticksout=function(t){var e,i,o,s;return i=this.adapter.scrolloffset(),s=this.adapter.viewportdimensions(),e=[t.left-i[0],t.top-i[1]],o=[!1,!1],0>e[0]?o[0]=this.sticks_out_left:e[0]+this.dimensions.width>s.width&&(o[0]=this.sticks_out_right),0>e[1]?o[1]=this.sticks_out_top:e[1]+this.dimensions.height>s.height&&(o[1]=this.sticks_out_bottom),o},t.prototype._draw=function(){var e,i,o,s,n,r,a,h,p,d,l,u,c,g,f,m,v,b,w,_=this;if(this.backgroundcanvas&&this.redraw){if(this.debug("drawing background."),this.redraw=!1,this.currentstem){for(v=["top","right","bottom","left"],f=0,m=v.length;m>f;f++)u=v[f],this.adapter.removeclass(this.container,"stem-"+u);this.adapter.addclass(this.container,"stem-"+this.currentstem.horizontal),this.adapter.addclass(this.container,"stem-"+this.currentstem.vertical)}return r=[0,0],a=[0,0],__indexof.call(this.options.hidetriggers,"closebutton")>=0&&(n=new t.joint(((b=this.currentstem)!=null?b+"":void 0)==="top right"?"top left":"top right"),r=[this.options.closebuttonradius+this.options.closebuttonoffset[0],this.options.closebuttonradius+this.options.closebuttonoffset[1]],a=[this.options.closebuttonradius-this.options.closebuttonoffset[0],this.options.closebuttonradius-this.options.closebuttonoffset[1]]),o=this.adapter.clone(this.dimensions),s=[0,0],this.options.borderwidth&&(o.width+=this.options.borderwidth*2,o.height+=this.options.borderwidth*2,s[0]-=this.options.borderwidth,s[1]-=this.options.borderwidth),this.options.shadow&&(o.width+=this.options.shadowblur*2,o.width+=math.max(0,this.options.shadowoffset[0]-this.options.shadowblur*2),o.height+=this.options.shadowblur*2,o.height+=math.max(0,this.options.shadowoffset[1]-this.options.shadowblur*2),s[0]-=math.max(0,this.options.shadowblur-this.options.shadowoffset[0]),s[1]-=math.max(0,this.options.shadowblur-this.options.shadowoffset[1])),i={left:0,right:0,top:0,bottom:0},this.currentstem&&(this.currentstem.left?i.left=this.options.stemlength:this.currentstem.right&&(i.right=this.options.stemlength),this.currentstem.top?i.top=this.options.stemlength:this.currentstem.bottom&&(i.bottom=this.options.stemlength)),n&&(n.left?i.left=math.max(i.left,a[0]):n.right&&(i.right=math.max(i.right,a[0])),n.top?i.top=math.max(i.top,a[1]):n.bottom&&(i.bottom=math.max(i.bottom,a[1]))),o.width+=i.left+i.right,o.height+=i.top+i.bottom,s[0]-=i.left,s[1]-=i.top,this.currentstem&&this.options.borderwidth&&(w=this._getpathstemmeasures(this.options.stembase,this.options.stemlength,this.options.borderwidth),g=w.stemlength,c=w.stembase),e=this.adapter.unwrap(this.backgroundcanvas),e.width=o.width,e.height=o.height,this.adapter.css(this.backgroundcanvas,{width:""+e.width+"px",height:""+e.height+"px",left:""+s[0]+"px",top:""+s[1]+"px"}),h=e.getcontext("2d"),h.settransform(1,0,0,1,0,0),h.clearrect(0,0,e.width,e.height),h.beginpath(),h.fillstyle=this._getcolor(h,this.dimensions,this.options.background,this.options.backgroundgradienthorizontal),h.linejoin="miter",h.miterlimit=500,l=this.options.borderwidth/2,this.options.borderwidth?(h.strokestyle=this.options.bordercolor,h.linewidth=this.options.borderwidth):(g=this.options.stemlength,c=this.options.stembase),c==null&&(c=0),d=function(t,e,i){return i&&h.moveto(math.max(c,_.options.borderradius,r[0])+1-l,-l),e?(h.lineto(t/2-c/2,-l),h.lineto(t/2,-g-l),h.lineto(t/2+c/2,-l)):void 0},p=function(t,e,i){var o,s,n,a;return t?(h.lineto(-c+l,0-l),h.lineto(g+l,-g-l),h.lineto(l,c-l)):e?(a=_.options.closebuttonoffset,n=r[0],i%2!==0&&(a=[a[1],a[0]],n=r[1]),o=math.acos(a[1]/_.options.closebuttonradius),s=math.acos(a[0]/_.options.closebuttonradius),h.lineto(-n+l,-l),h.arc(l-a[0],-l+a[1],_.options.closebuttonradius,-(math.pi/2+o),s,!1)):(h.lineto(-_.options.borderradius+l,-l),h.quadraticcurveto(l,-l,l,_.options.borderradius-l))},h.translate(-s[0],-s[1]),h.save(),function(){var e,i,o,s,r,a,l,u,c,g,f;for(f=[],i=c=0,g=t.positions.length/2;g>=0?g>c:c>g;i=g>=0?++c:--c)r=i*2,a=i===0||i===3?0:_.dimensions.width,l=2>i?0:_.dimensions.height,u=math.pi/2*i,o=i%2===0?_.dimensions.width:_.dimensions.height,s=new t.joint(t.positions[r]),e=new t.joint(t.positions[r+1]),h.save(),h.translate(a,l),h.rotate(u),d(o,s.eql(_.currentstem),i===0),h.translate(o,0),p(e.eql(_.currentstem),e.eql(n),i),f.push(h.restore());return f}(),h.closepath(),h.save(),this.options.shadow&&(h.shadowcolor=this.options.shadowcolor,h.shadowblur=this.options.shadowblur,h.shadowoffsetx=this.options.shadowoffset[0],h.shadowoffsety=this.options.shadowoffset[1]),h.fill(),h.restore(),this.options.borderwidth&&h.stroke(),h.restore(),n?function(){var t,e,i,o,s;return i=e=_.options.closebuttonradius*2,n+""=="top right"?(s=[_.dimensions.width-_.options.closebuttonoffset[0],_.options.closebuttonoffset[1]],t=[s[0]+l,s[1]-l]):(s=[_.options.closebuttonoffset[0],_.options.closebuttonoffset[1]],t=[s[0]-l,s[1]-l]),h.translate(t[0],t[1]),o=_.options.closebuttoncrosssize/2,h.save(),h.beginpath(),h.strokestyle=_.options.closebuttoncrosscolor,h.linewidth=_.options.closebuttoncrosslinewidth,h.linecap="round",h.moveto(-o,-o),h.lineto(o,o),h.stroke(),h.beginpath(),h.moveto(o,-o),h.lineto(-o,o),h.stroke(),h.restore(),_.adapter.css(_.closebuttonelement,{left:""+(s[0]-o-_.options.closebuttonlinkoverscan)+"px",top:""+(s[1]-o-_.options.closebuttonlinkoverscan)+"px",width:""+(_.options.closebuttoncrosssize+_.options.closebuttonlinkoverscan*2)+"px",height:""+(_.options.closebuttoncrosssize+_.options.closebuttonlinkoverscan*2)+"px"})}():void 0}},t.prototype._getpathstemmeasures=function(t,e,i){var o,s,n,r,a,h,p;if(r=i/2,n=math.atan(t/2/e),o=n*2,a=r/math.sin(o),s=2*a*math.cos(n),p=r+e-s,0>p)throw error("sorry but your stemlength / stembase ratio is strange.");return h=math.tan(n)*p*2,{stemlength:p,stembase:h}},t.prototype._getcolor=function(t,e,i,o){var s,n,r,a,h;if(o==null&&(o=!1),typeof i=="string")return i;for(n=o?t.createlineargradient(0,0,e.width,0):t.createlineargradient(0,0,0,e.height),r=a=0,h=i.length;h>a;r=++a)s=i[r],n.addcolorstop(s[0],s[1]);return n},t.prototype._searchandactivateclosebuttons=function(){var t,e,i,o;for(o=this.adapter.findall(this.container,"."+this["class"].close),e=0,i=o.length;i>e;e++)t=o[e],this.hidetriggers.push({element:this.adapter.wrap(t),event:"click"});return this.currentobservers.showing&&this._setupobservers("-showing","showing"),this.currentobservers.visible?this._setupobservers("-visible","visible"):void 0},t.prototype._activatefirstinput=function(){var t;return t=this.adapter.unwrap(this.adapter.find(this.container,"input, textarea")),t!=null?typeof t.focus=="function"?t.focus():void 0:void 0},t.prototype._followmouseposition=function(){return this.options.fixed?void 0:t._observemouseposition(this.bound.reposition)},t.prototype._stopfollowingmouseposition=function(){return this.options.fixed?void 0:t._stopobservingmouseposition(this.bound.reposition)},t.prototype._clearshowtimeout=function(){return cleartimeout(this._showtimeoutid)},t.prototype._clearhidetimeout=function(){return cleartimeout(this._hidetimeoutid)},t.prototype._cleartimeouts=function(){return cleartimeout(this._visibilitystatetimeoutid),this._clearshowtimeout(),this._clearhidetimeout()},t.prototype._triggerelementexists=function(){var t;t=this.adapter.unwrap(this.triggerelement);while(t.parentnode){if(t.parentnode.tagname==="body")return!0;t=t.parentnode}return!1},t.prototype._loadajax=function(){var t=this;if(!this.loading)return this.loaded=!1,this.loading=!0,this.adapter.addclass(this.container,this["class"].loading),this.setcontent(""),this.debug("loading content from "+this.options.ajax),this.adapter.ajax({url:this.options.ajax,method:this.options.ajaxmethod,onsuccess:function(e){return t.debug("loading successful."),t.adapter.removeclass(t.container,t["class"].loading),t.setcontent(e)},onerror:function(e){var i;return i=t.options.ajaxerrormessage,t.debug(i,e),t.setcontent(i),t.adapter.addclass(t.container,t["class"].ajaxerror)},oncomplete:function(){return t.adapter.removeclass(t.container,t["class"].loading),t.loading=!1,t.loaded=!0,t._searchandactivateclosebuttons(),t._activatefirstinput(),t.reposition()}})},t.prototype._ensuretriggerelement=function(){return this._triggerelementexists()?void 0:(this.deactivate(),this._stopensuretriggerelement())},t.prototype._ensuretriggerelementinterval=1e3,t.prototype._startensuretriggerelement=function(){var t=this;return this._ensuretriggerelementtimeoutid=setinterval(function(){return t._ensuretriggerelement()},this._ensuretriggerelementinterval)},t.prototype._stopensuretriggerelement=function(){return clearinterval(this._ensuretriggerelementtimeoutid)},t}(),vendors=["khtml","ms","o","moz","webkit"],opentip.prototype.setcss3style=function(t,e){var i,o,s,n,r;t=this.adapter.unwrap(t),r=[];for(i in e)__hasprop.call(e,i)&&(o=e[i],t.style[i]!=null?r.push(t.style[i]=o):r.push(function(){var e,r,a;for(a=[],e=0,r=vendors.length;r>e;e++)s=vendors[e],n=""+this.ucfirst(s)+this.ucfirst(i),t.style[n]!=null?a.push(t.style[n]=o):a.push(void 0);return a}.call(this)));return r},opentip.prototype.defer=function(t){return settimeout(t,0)},opentip.prototype.settimeout=function(t,e){return settimeout(t,e?e*1e3:0)},opentip.prototype.ucfirst=function(t){return t==null?"":t.charat(0).touppercase()+t.slice(1)},opentip.prototype.dasherize=function(t){return t.replace(/([a-z])/g,function(t,e){return"-"+e.tolowercase()})},mousepositionobservers=[],mouseposition={x:0,y:0},mousemoved=function(t){var e,i,o,s;for(mouseposition=opentip.adapter.mouseposition(t),s=[],i=0,o=mousepositionobservers.length;o>i;i++)e=mousepositionobservers[i],s.push(e());return s},opentip.followmouseposition=function(){return opentip.adapter.observe(document.body,"mousemove",mousemoved)},opentip._observemouseposition=function(t){return mousepositionobservers.push(t)},opentip._stopobservingmouseposition=function(t){var e;return mousepositionobservers=function(){var i,o,s;for(s=[],i=0,o=mousepositionobservers.length;o>i;i++)e=mousepositionobservers[i],e!==t&&s.push(e);return s}()},opentip.joint=function(){function t(t){t!=null&&(t instanceof opentip.joint&&(t+=""),this.set(t))}return t.prototype.set=function(t){return t=t.tolowercase(),this.sethorizontal(t),this.setvertical(t),this},t.prototype.sethorizontal=function(t){var e,i,o,s,n,r,a;for(i=["left","center","right"],o=0,n=i.length;n>o;o++)e=i[o],~t.indexof(e)&&(this.horizontal=e.tolowercase());for(this.horizontal==null&&(this.horizontal="center"),a=[],s=0,r=i.length;r>s;s++)e=i[s],a.push(this[e]=this.horizontal===e?e:void 0);return a},t.prototype.setvertical=function(t){var e,i,o,s,n,r,a;for(i=["top","middle","bottom"],o=0,n=i.length;n>o;o++)e=i[o],~t.indexof(e)&&(this.vertical=e.tolowercase());for(this.vertical==null&&(this.vertical="middle"),a=[],s=0,r=i.length;r>s;s++)e=i[s],a.push(this[e]=this.vertical===e?e:void 0);return a},t.prototype.eql=function(t){return t!=null&&this.horizontal===t.horizontal&&this.vertical===t.vertical},t.prototype.flip=function(){var t,e;return e=opentip.position[this.tostring(!0)],t=(e+4)%8,this.set(opentip.positions[t]),this},t.prototype.tostring=function(t){var e,i;return t==null&&(t=!1),i=this.vertical==="middle"?"":this.vertical,e=this.horizontal==="center"?"":this.horizontal,i&&e&&(e=t?opentip.prototype.ucfirst(e):" "+e),""+i+e},t}(),opentip.prototype._positionsequal=function(t,e){return t!=null&&e!=null&&t.left===e.left&&t.top===e.top},opentip.prototype._dimensionsequal=function(t,e){return t!=null&&e!=null&&t.width===e.width&&t.height===e.height},opentip.prototype.debug=function(){var t;return t=arguments.length>=1?__slice.call(arguments,0):[],opentip.debug&&(typeof console!="undefined"&&console!==null?console.debug:void 0)!=null?(t.unshift("#"+this.id+" |"),console.debug.apply(console,t)):void 0},opentip.findelements=function(){var t,e,i,o,s,n,r,a,h,p;for(t=opentip.adapter,h=t.findall(document.body,"[data-ot]"),p=[],r=0,a=h.length;a>r;r++){i=h[r],n={},e=t.data(i,"ot"),(e===""||e==="true"||e==="yes")&&(e=t.attr(i,"title"),t.attr(i,"title","")),e=e||"";for(o in opentip.styles.standard)s=t.data(i,"ot"+opentip.prototype.ucfirst(o)),s!=null&&(s==="yes"||s==="true"||s==="on"?s=!0:(s==="no"||s==="false"||s==="off")&&(s=!1),n[o]=s);p.push(new opentip(i,e,n))}return p},opentip.version="2.4.6",opentip.debug=!1,opentip.lastid=0,opentip.lastzindex=100,opentip.tips=[],opentip._abortshowinggroup=function(t,e){var i,o,s,n,r;for(n=opentip.tips,r=[],o=0,s=n.length;s>o;o++)i=n[o],i!==e&&i.options.group===t?r.push(i._abortshowing()):r.push(void 0);return r},opentip._hidegroup=function(t,e){var i,o,s,n,r;for(n=opentip.tips,r=[],o=0,s=n.length;s>o;o++)i=n[o],i!==e&&i.options.group===t?r.push(i.hide()):r.push(void 0);return r},opentip.adapters={},opentip.adapter=null,firstadapter=!0,opentip.addadapter=function(t){return opentip.adapters[t.name]=t,firstadapter?(opentip.adapter=t,t.domready(opentip.findelements),t.domready(opentip.followmouseposition),firstadapter=!1):void 0},opentip.positions=["top","topright","right","bottomright","bottom","bottomleft","left","topleft"],opentip.position={},_ref=opentip.positions,i=_i=0,_len=_ref.length;_len>_i;i=++_i)position=_ref[i],opentip.position[position]=i;opentip.styles={standard:{"extends":null,title:void 0,escapetitle:!0,escapecontent:!1,classname:"standard",stem:!0,delay:null,hidedelay:.1,fixed:!1,showon:"mouseover",hidetrigger:"trigger",hidetriggers:[],hideon:null,removeelementsonhide:!1,offset:[0,0],containinviewport:!0,autooffset:!0,showeffect:"appear",hideeffect:"fade",showeffectduration:.3,hideeffectduration:.2,stemlength:5,stembase:8,tipjoint:"top left",target:null,targetjoint:null,cache:!0,ajax:!1,ajaxmethod:"get",ajaxerrormessage:"there was a problem downloading the content.",group:null,style:null,background:"#fff18f",backgroundgradienthorizontal:!1,closebuttonoffset:[5,5],closebuttonradius:7,closebuttoncrosssize:4,closebuttoncrosscolor:"#d2c35b",closebuttoncrosslinewidth:1.5,closebuttonlinkoverscan:6,borderradius:5,borderwidth:1,bordercolor:"#f2e37b",shadow:!0,shadowblur:10,shadowoffset:[3,3],shadowcolor:"rgba(0, 0, 0, 0.1)"},glass:{"extends":"standard",classname:"glass",background:[[0,"rgba(252, 252, 252, 0.8)"],[.5,"rgba(255, 255, 255, 0.8)"],[.5,"rgba(250, 250, 250, 0.9)"],[1,"rgba(245, 245, 245, 0.9)"]],bordercolor:"#eee",closebuttoncrosscolor:"rgba(0, 0, 0, 0.2)",borderradius:15,closebuttonradius:10,closebuttonoffset:[8,8]},dark:{"extends":"standard",classname:"dark",borderradius:13,bordercolor:"#444",closebuttoncrosscolor:"rgba(240, 240, 240, 1)",shadowcolor:"rgba(0, 0, 0, 0.3)",shadowoffset:[2,2],background:[[0,"rgba(30, 30, 30, 0.7)"],[.5,"rgba(30, 30, 30, 0.8)"],[.5,"rgba(10, 10, 10, 0.8)"],[1,"rgba(10, 10, 10, 0.9)"]]},alert:{"extends":"standard",classname:"alert",borderradius:1,bordercolor:"#ae0d11",closebuttoncrosscolor:"rgba(255, 255, 255, 1)",shadowcolor:"rgba(0, 0, 0, 0.3)",shadowoffset:[2,2],background:[[0,"rgba(203, 15, 19, 0.7)"],[.5,"rgba(203, 15, 19, 0.8)"],[.5,"rgba(189, 14, 18, 0.8)"],[1,"rgba(179, 14, 17, 0.9)"]]}},opentip.defaultstyle="standard",typeof module!="undefined"&&module!==null?module.exports=opentip:window.opentip=opentip;var __slice=[].slice;(function(t){var e;return t.fn.opentip=function(t,e,i){return new opentip(this,t,e,i)},e=function(){function e(){}return e.prototype.name="jquery",e.prototype.domready=function(e){return t(e)},e.prototype.create=function(e){return t(e)},e.prototype.wrap=function(e){if(e=t(e),e.length>1)throw error("multiple elements provided.");return e},e.prototype.unwrap=function(e){return t(e)[0] },e.prototype.tagname=function(t){return this.unwrap(t).tagname},e.prototype.attr=function(){var e,i,o;return i=arguments[0],e=arguments.length>=2?__slice.call(arguments,1):[],(o=t(i)).attr.apply(o,e)},e.prototype.data=function(){var e,i,o;return i=arguments[0],e=arguments.length>=2?__slice.call(arguments,1):[],(o=t(i)).data.apply(o,e)},e.prototype.find=function(e,i){return t(e).find(i).get(0)},e.prototype.findall=function(e,i){return t(e).find(i)},e.prototype.update=function(e,i,o){return e=t(e),o?e.text(i):e.html(i)},e.prototype.append=function(e,i){return t(e).append(i)},e.prototype.remove=function(e){return t(e).remove()},e.prototype.addclass=function(e,i){return t(e).addclass(i)},e.prototype.removeclass=function(e,i){return t(e).removeclass(i)},e.prototype.css=function(e,i){return t(e).css(i)},e.prototype.dimensions=function(e){return{width:t(e).outerwidth(),height:t(e).outerheight()}},e.prototype.scrolloffset=function(){return[window.pagexoffset||document.documentelement.scrollleft||document.body.scrollleft,window.pageyoffset||document.documentelement.scrolltop||document.body.scrolltop]},e.prototype.viewportdimensions=function(){return{width:document.documentelement.clientwidth,height:document.documentelement.clientheight}},e.prototype.mouseposition=function(t){return t==null?null:{x:t.pagex,y:t.pagey}},e.prototype.offset=function(e){var i;return i=t(e).offset(),{left:i.left,top:i.top}},e.prototype.observe=function(e,i,o){return t(e).bind(i,o)},e.prototype.stopobserving=function(e,i,o){return t(e).unbind(i,o)},e.prototype.ajax=function(e){var i,o;if(e.url==null)throw error("no url provided");return t.ajax({url:e.url,type:(i=(o=e.method)!=null?o.touppercase():void 0)!=null?i:"get"}).done(function(t){return typeof e.onsuccess=="function"?e.onsuccess(t):void 0}).fail(function(t){return typeof e.onerror=="function"?e.onerror("server responded with status "+t.status):void 0}).always(function(){return typeof e.oncomplete=="function"?e.oncomplete():void 0})},e.prototype.clone=function(e){return t.extend({},e)},e.prototype.extend=function(){var e,i;return i=arguments[0],e=arguments.length>=2?__slice.call(arguments,1):[],t.extend.apply(t,[i].concat(__slice.call(e)))},e}(),opentip.addadapter(new e)})(jquery)