(function(n,t){typeof define=="function"&&define.amd?define(["jquery"],function(n){return t(n)}):typeof exports=="object"?module.exports=t(require("jquery")):t(jQuery)})(this,function(n){function h(n){this.$container;this.constraints=null;this.__$tooltip;this.__init(n)}function e(t,i){var r=!0;return n.each(t,function(n){if(i[n]===undefined||t[n]!==i[n])return r=!1,!1}),r}function r(i){var r=i.attr("id"),u=r?t.window.document.getElementById(r):null;return u?u===i[0]:n.contains(t.window.document.body,i[0])}function c(){var t;if(!i)return!1;var f=i.document.body||i.document.documentElement,r=f.style,n="transition",u=["Moz","Webkit","Khtml","O","ms"];if(typeof r[n]=="string")return!0;for(n=n.charAt(0).toUpperCase()+n.substr(1),t=0;t<u.length;t++)if(typeof r[u[t]+n]=="string")return!0;return!1}var u={animation:"fade",animationDuration:350,content:null,contentAsHTML:!1,contentCloning:!1,debug:!0,delay:300,delayTouch:[300,500],functionInit:null,functionBefore:null,functionReady:null,functionAfter:null,functionFormat:null,IEmin:6,interactive:!1,multiple:!1,parent:null,plugins:["sideTip"],repositionOnScroll:!1,restoration:"none",selfDestruction:!0,theme:[],timer:0,trackerInterval:500,trackOrigin:!1,trackTooltip:!1,trigger:"hover",triggerClose:{click:!1,mouseleave:!1,originClick:!1,scroll:!1,tap:!1,touchleave:!1},triggerOpen:{click:!1,mouseenter:!1,tap:!1,touchstart:!1},updateAnimation:"rotate",zIndex:9999999},i=typeof window!="undefined"?window:null,t={hasTouchCapability:!!(i&&("ontouchstart"in i||i.DocumentTouch&&i.document instanceof i.DocumentTouch||i.navigator.maxTouchPoints)),hasTransitions:c(),IE:!1,semVer:"4.2.5",window:i},s=function(){this.__$emitterPrivate=n({});this.__$emitterPublic=n({});this.__instancesLatestArr=[];this.__plugins={};this._env=t},f,o;return s.prototype={__bridge:function(t,i,r){var e,f;return i[r]||(e=function(){},e.prototype=t,f=new e,f.__init&&f.__init(i),n.each(t,function(n){n.indexOf("__")!=0&&(i[n]?u.debug&&console.log("The "+n+" method of the "+r+" plugin conflicts with another plugin or native methods"):(i[n]=function(){return f[n].apply(f,Array.prototype.slice.apply(arguments))},i[n].bridged=f))}),i[r]=f),this},__setWindow:function(n){return t.window=n,this},_getRuler:function(n){return new h(n)},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_plugin:function(t){var i=this,r,u;if(typeof t=="string")return r=t,u=null,r.indexOf(".")>0?u=i.__plugins[r]:n.each(i.__plugins,function(n,t){if(t.name.substring(t.name.length-r.length-1)=="."+r)return u=t,!1}),u;if(t.name.indexOf(".")<0)throw new Error("Plugins must be namespaced");return i.__plugins[t.name]=t,t.core&&i.__bridge(t.core,i,t.name),this},_trigger:function(){var n=Array.prototype.slice.apply(arguments);return typeof n[0]=="string"&&(n[0]={type:n[0]}),this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,n),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,n),this},instances:function(t){var i=[],r=t||".tooltipstered";return n(r).each(function(){var t=n(this),r=t.data("tooltipster-ns");r&&n.each(r,function(n,r){i.push(t.data(r))})}),i},instancesLatest:function(){return this.__instancesLatestArr},off:function(){return this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},origins:function(t){var i=t?t+" ":"";return n(i+".tooltipstered").toArray()},setDefaults:function(t){return n.extend(u,t),this},triggerHandler:function(){return this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},n.tooltipster=new s,n.Tooltipster=function(t,i){this.__callbacks={close:[],open:[]};this.__closingTime;this.__Content;this.__contentBcr;this.__destroyed=!1;this.__$emitterPrivate=n({});this.__$emitterPublic=n({});this.__enabled=!0;this.__garbageCollector;this.__Geometry;this.__lastPosition;this.__namespace="tooltipster-"+Math.round(Math.random()*1e6);this.__options;this.__$originParents;this.__pointerIsOverOrigin=!1;this.__previousThemes=[];this.__state="closed";this.__timeouts={close:[],open:null};this.__touchEvents=[];this.__tracker=null;this._$origin;this._$tooltip;this.__init(t,i)},n.Tooltipster.prototype={__init:function(i,r){var f=this,e,s,o;if(f._$origin=n(i),f.__options=n.extend(!0,{},u,r),f.__optionsFormat(),!t.IE||t.IE>=f.__options.IEmin){if(e=null,f._$origin.data("tooltipster-initialTitle")===undefined&&(e=f._$origin.attr("title"),e===undefined&&(e=null),f._$origin.data("tooltipster-initialTitle",e)),f.__options.content!==null?f.__contentSet(f.__options.content):(s=f._$origin.attr("data-tooltip-content"),s&&(o=n(s)),o&&o[0]?f.__contentSet(o.first()):f.__contentSet(e)),f._$origin.removeAttr("title").addClass("tooltipstered"),f.__prepareOrigin(),f.__prepareGC(),n.each(f.__options.plugins,function(n,t){f._plug(t)}),t.hasTouchCapability)n(t.window.document.body).on("touchmove."+f.__namespace+"-triggerOpen",function(n){f._touchRecordEvent(n)});f._on("created",function(){f.__prepareTooltip()})._on("repositioned",function(n){f.__lastPosition=n.position})}else f.__options.disabled=!0},__contentInsert:function(){var n=this,i=n._$tooltip.find(".tooltipster-content"),t=n.__Content,r=function(n){t=n};return n._trigger({type:"format",content:n.__Content,format:r}),n.__options.functionFormat&&(t=n.__options.functionFormat.call(n,n,{origin:n._$origin[0]},n.__Content)),typeof t!="string"||n.__options.contentAsHTML?i.empty().append(t):i.text(t),n},__contentSet:function(t){return t instanceof n&&this.__options.contentCloning&&(t=t.clone(!0)),this.__Content=t,this._trigger({type:"updated",content:t}),this},__destroyError:function(){throw new Error("This tooltip has been destroyed and cannot execute your method call.");},__geometry:function(){var e=this,c=e._$origin,y=e._$origin.is("area"),k,p,r,o,u,it;y&&(k=e._$origin.parent().attr("name"),c=n('img[usemap="#'+k+'"]'));var f=c[0].getBoundingClientRect(),d=n(t.window.document),g=n(t.window),l=c,i={available:{document:null,window:null},document:{size:{height:d.height(),width:d.width()}},window:{scroll:{left:t.window.scrollX||t.window.document.documentElement.scrollLeft,top:t.window.scrollY||t.window.document.documentElement.scrollTop},size:{height:g.height(),width:g.width()}},origin:{fixedLineage:!1,offset:{},size:{height:f.bottom-f.top,width:f.right-f.left},usemapImage:y?c[0]:null,windowOffset:{bottom:f.bottom,left:f.left,right:f.right,top:f.top}}};if(y&&(p=e._$origin.attr("shape"),r=e._$origin.attr("coords"),r&&(r=r.split(","),n.map(r,function(n,t){r[t]=parseInt(n)})),p!="default"))switch(p){case"circle":var rt=r[0],ut=r[1],w=r[2],ft=ut-w,et=rt-w;i.origin.size.height=w*2;i.origin.size.width=i.origin.size.height;i.origin.windowOffset.left+=et;i.origin.windowOffset.top+=ft;break;case"rect":var nt=r[0],tt=r[1],ot=r[2],st=r[3];i.origin.size.height=st-tt;i.origin.size.width=ot-nt;i.origin.windowOffset.left+=nt;i.origin.windowOffset.top+=tt;break;case"poly":var s=0,h=0,a=0,v=0,b="even";for(o=0;o<r.length;o++)u=r[o],b=="even"?(u>a&&(a=u,o===0&&(s=a)),u<s&&(s=u),b="odd"):(u>v&&(v=u,o==1&&(h=v)),u<h&&(h=u),b="even");i.origin.size.height=v-h;i.origin.size.width=a-s;i.origin.windowOffset.left+=s;i.origin.windowOffset.top+=h}for(it=function(n){i.origin.size.height=n.height;i.origin.windowOffset.left=n.left;i.origin.windowOffset.top=n.top;i.origin.size.width=n.width},e._trigger({type:"geometry",edit:it,geometry:{height:i.origin.size.height,left:i.origin.windowOffset.left,top:i.origin.windowOffset.top,width:i.origin.size.width}}),i.origin.windowOffset.right=i.origin.windowOffset.left+i.origin.size.width,i.origin.windowOffset.bottom=i.origin.windowOffset.top+i.origin.size.height,i.origin.offset.left=i.origin.windowOffset.left+i.window.scroll.left,i.origin.offset.top=i.origin.windowOffset.top+i.window.scroll.top,i.origin.offset.bottom=i.origin.offset.top+i.origin.size.height,i.origin.offset.right=i.origin.offset.left+i.origin.size.width,i.available.document={bottom:{height:i.document.size.height-i.origin.offset.bottom,width:i.document.size.width},left:{height:i.document.size.height,width:i.origin.offset.left},right:{height:i.document.size.height,width:i.document.size.width-i.origin.offset.right},top:{height:i.origin.offset.top,width:i.document.size.width}},i.available.window={bottom:{height:Math.max(i.window.size.height-Math.max(i.origin.windowOffset.bottom,0),0),width:i.window.size.width},left:{height:i.window.size.height,width:Math.max(i.origin.windowOffset.left,0)},right:{height:i.window.size.height,width:Math.max(i.window.size.width-Math.max(i.origin.windowOffset.right,0),0)},top:{height:Math.max(i.origin.windowOffset.top,0),width:i.window.size.width}};l[0].tagName.toLowerCase()!="html";){if(l.css("position")=="fixed"){i.origin.fixedLineage=!0;break}l=l.parent()}return i},__optionsFormat:function(){return typeof this.__options.animationDuration=="number"&&(this.__options.animationDuration=[this.__options.animationDuration,this.__options.animationDuration]),typeof this.__options.delay=="number"&&(this.__options.delay=[this.__options.delay,this.__options.delay]),typeof this.__options.delayTouch=="number"&&(this.__options.delayTouch=[this.__options.delayTouch,this.__options.delayTouch]),typeof this.__options.theme=="string"&&(this.__options.theme=[this.__options.theme]),this.__options.parent===null?this.__options.parent=n(t.window.document.body):typeof this.__options.parent=="string"&&(this.__options.parent=n(this.__options.parent)),this.__options.trigger=="hover"?(this.__options.triggerOpen={mouseenter:!0,touchstart:!0},this.__options.triggerClose={mouseleave:!0,originClick:!0,touchleave:!0}):this.__options.trigger=="click"&&(this.__options.triggerOpen={click:!0,tap:!0},this.__options.triggerClose={click:!0,tap:!0}),this._trigger("options"),this},__prepareGC:function(){var t=this;return t.__options.selfDestruction?t.__garbageCollector=setInterval(function(){var i=(new Date).getTime();t.__touchEvents=n.grep(t.__touchEvents,function(n){return i-n.time>6e4});r(t._$origin)||t.close(function(){t.destroy()})},2e4):clearInterval(t.__garbageCollector),t},__prepareOrigin:function(){var n=this,i;if(n._$origin.off("."+n.__namespace+"-triggerOpen"),t.hasTouchCapability)n._$origin.on("touchstart."+n.__namespace+"-triggerOpen touchend."+n.__namespace+"-triggerOpen touchcancel."+n.__namespace+"-triggerOpen",function(t){n._touchRecordEvent(t)});if(n.__options.triggerOpen.click||n.__options.triggerOpen.tap&&t.hasTouchCapability){i="";n.__options.triggerOpen.click&&(i+="click."+n.__namespace+"-triggerOpen ");n.__options.triggerOpen.tap&&t.hasTouchCapability&&(i+="touchend."+n.__namespace+"-triggerOpen");n._$origin.on(i,function(t){n._touchIsMeaningfulEvent(t)&&n._open(t)})}if(n.__options.triggerOpen.mouseenter||n.__options.triggerOpen.touchstart&&t.hasTouchCapability){i="";n.__options.triggerOpen.mouseenter&&(i+="mouseenter."+n.__namespace+"-triggerOpen ");n.__options.triggerOpen.touchstart&&t.hasTouchCapability&&(i+="touchstart."+n.__namespace+"-triggerOpen");n._$origin.on(i,function(t){(n._touchIsTouchEvent(t)||!n._touchIsEmulatedEvent(t))&&(n.__pointerIsOverOrigin=!0,n._openShortly(t))})}if(n.__options.triggerClose.mouseleave||n.__options.triggerClose.touchleave&&t.hasTouchCapability){i="";n.__options.triggerClose.mouseleave&&(i+="mouseleave."+n.__namespace+"-triggerOpen ");n.__options.triggerClose.touchleave&&t.hasTouchCapability&&(i+="touchend."+n.__namespace+"-triggerOpen touchcancel."+n.__namespace+"-triggerOpen");n._$origin.on(i,function(t){n._touchIsMeaningfulEvent(t)&&(n.__pointerIsOverOrigin=!1)})}return n},__prepareTooltip:function(){var t=this,i=t.__options.interactive?"auto":"";return t._$tooltip.attr("id",t.__namespace).css({"pointer-events":i,zIndex:t.__options.zIndex}),n.each(t.__previousThemes,function(n,i){t._$tooltip.removeClass(i)}),n.each(t.__options.theme,function(n,i){t._$tooltip.addClass(i)}),t.__previousThemes=n.merge([],t.__options.theme),t},__scrollHandler:function(i){var u=this,f,e,o,s;return u.__options.triggerClose.scroll?u._close(i):r(u._$origin)&&r(u._$tooltip)&&(f=null,i.target===t.window.document?u.__Geometry.origin.fixedLineage||u.__options.repositionOnScroll&&u.reposition(i):(f=u.__geometry(),e=!1,u._$origin.css("position")!="fixed"&&u.__$originParents.each(function(t,i){var u=n(i),o=u.css("overflow-x"),s=u.css("overflow-y"),r;return(o!="visible"||s!="visible")&&((r=i.getBoundingClientRect(),o!="visible"&&(f.origin.windowOffset.left<r.left||f.origin.windowOffset.right>r.right))||s!="visible"&&(f.origin.windowOffset.top<r.top||f.origin.windowOffset.bottom>r.bottom))?(e=!0,!1):u.css("position")=="fixed"?!1:void 0}),e?u._$tooltip.css("visibility","hidden"):(u._$tooltip.css("visibility","visible"),u.__options.repositionOnScroll?u.reposition(i):(o=f.origin.offset.left-u.__Geometry.origin.offset.left,s=f.origin.offset.top-u.__Geometry.origin.offset.top,u._$tooltip.css({left:u.__lastPosition.coord.left+o,top:u.__lastPosition.coord.top+s})))),u._trigger({type:"scroll",event:i,geo:f})),u},__stateSet:function(n){return this.__state=n,this._trigger({type:"state",state:n}),this},__timeoutsClear:function(){return clearTimeout(this.__timeouts.open),this.__timeouts.open=null,n.each(this.__timeouts.close,function(n,t){clearTimeout(t)}),this.__timeouts.close=[],this},__trackerStart:function(){var n=this,t=n._$tooltip.find(".tooltipster-content");return n.__options.trackTooltip&&(n.__contentBcr=t[0].getBoundingClientRect()),n.__tracker=setInterval(function(){var i,u,f;r(n._$origin)&&r(n._$tooltip)?(n.__options.trackOrigin&&(i=n.__geometry(),u=!1,e(i.origin.size,n.__Geometry.origin.size)&&(n.__Geometry.origin.fixedLineage?e(i.origin.windowOffset,n.__Geometry.origin.windowOffset)&&(u=!0):e(i.origin.offset,n.__Geometry.origin.offset)&&(u=!0)),u||(n.__options.triggerClose.mouseleave?n._close():n.reposition())),n.__options.trackTooltip&&(f=t[0].getBoundingClientRect(),(f.height!==n.__contentBcr.height||f.width!==n.__contentBcr.width)&&(n.reposition(),n.__contentBcr=f))):n._close()},n.__options.trackerInterval),n},_close:function(i,r,u){var f=this,s=!0,e,o;if(f._trigger({type:"close",event:i,stop:function(){s=!1}}),s||u)if(r&&f.__callbacks.close.push(r),f.__callbacks.open=[],f.__timeoutsClear(),e=function(){n.each(f.__callbacks.close,function(n,t){t.call(f,f,{event:i,origin:f._$origin[0]})});f.__callbacks.close=[]},f.__state!="closed"){var h=!0,l=new Date,a=l.getTime(),c=a+f.__options.animationDuration[1];f.__state=="disappearing"&&c>f.__closingTime&&f.__options.animationDuration[1]>0&&(h=!1);h&&(f.__closingTime=c,f.__state!="disappearing"&&f.__stateSet("disappearing"),o=function(){clearInterval(f.__tracker);f._trigger({type:"closing",event:i});f._$tooltip.off("."+f.__namespace+"-triggerClose").removeClass("tooltipster-dying");n(t.window).off("."+f.__namespace+"-triggerClose");f.__$originParents.each(function(t,i){n(i).off("scroll."+f.__namespace+"-triggerClose")});f.__$originParents=null;n(t.window.document.body).off("."+f.__namespace+"-triggerClose");f._$origin.off("."+f.__namespace+"-triggerClose");f._off("dismissable");f.__stateSet("closed");f._trigger({type:"after",event:i});f.__options.functionAfter&&f.__options.functionAfter.call(f,f,{event:i,origin:f._$origin[0]});e()},t.hasTransitions?(f._$tooltip.css({"-moz-animation-duration":f.__options.animationDuration[1]+"ms","-ms-animation-duration":f.__options.animationDuration[1]+"ms","-o-animation-duration":f.__options.animationDuration[1]+"ms","-webkit-animation-duration":f.__options.animationDuration[1]+"ms","animation-duration":f.__options.animationDuration[1]+"ms","transition-duration":f.__options.animationDuration[1]+"ms"}),f._$tooltip.clearQueue().removeClass("tooltipster-show").addClass("tooltipster-dying"),f.__options.animationDuration[1]>0&&f._$tooltip.delay(f.__options.animationDuration[1]),f._$tooltip.queue(o)):f._$tooltip.stop().fadeOut(f.__options.animationDuration[1],o))}else e();return f},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_open:function(i,u){var f=this,s,h,e,o;if(!f.__destroying&&r(f._$origin)&&f.__enabled&&(s=!0,f.__state=="closed"&&(f._trigger({type:"before",event:i,stop:function(){s=!1}}),s&&f.__options.functionBefore&&(s=f.__options.functionBefore.call(f,f,{event:i,origin:f._$origin[0]}))),s!==!1&&f.__Content!==null)){if(u&&f.__callbacks.open.push(u),f.__callbacks.close=[],f.__timeoutsClear(),e=function(){f.__state!="stable"&&f.__stateSet("stable");n.each(f.__callbacks.open,function(n,t){t.call(f,f,{origin:f._$origin[0],tooltip:f._$tooltip[0]})});f.__callbacks.open=[]},f.__state!=="closed")h=0,f.__state==="disappearing"?(f.__stateSet("appearing"),t.hasTransitions?(f._$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-show"),f.__options.animationDuration[0]>0&&f._$tooltip.delay(f.__options.animationDuration[0]),f._$tooltip.queue(e)):f._$tooltip.stop().fadeIn(e)):f.__state=="stable"&&e();else{f.__stateSet("appearing");h=f.__options.animationDuration[0];f.__contentInsert();f.reposition(i,!0);t.hasTransitions?(f._$tooltip.addClass("tooltipster-"+f.__options.animation).addClass("tooltipster-initial").css({"-moz-animation-duration":f.__options.animationDuration[0]+"ms","-ms-animation-duration":f.__options.animationDuration[0]+"ms","-o-animation-duration":f.__options.animationDuration[0]+"ms","-webkit-animation-duration":f.__options.animationDuration[0]+"ms","animation-duration":f.__options.animationDuration[0]+"ms","transition-duration":f.__options.animationDuration[0]+"ms"}),setTimeout(function(){f.__state!="closed"&&(f._$tooltip.addClass("tooltipster-show").removeClass("tooltipster-initial"),f.__options.animationDuration[0]>0&&f._$tooltip.delay(f.__options.animationDuration[0]),f._$tooltip.queue(e))},0)):f._$tooltip.css("display","none").fadeIn(f.__options.animationDuration[0],e);f.__trackerStart();n(t.window).on("resize."+f.__namespace+"-triggerClose",function(t){var i=n(document.activeElement);(i.is("input")||i.is("textarea"))&&n.contains(f._$tooltip[0],i[0])||f.reposition(t)}).on("scroll."+f.__namespace+"-triggerClose",function(n){f.__scrollHandler(n)});if(f.__$originParents=f._$origin.parents(),f.__$originParents.each(function(t,i){n(i).on("scroll."+f.__namespace+"-triggerClose",function(n){f.__scrollHandler(n)})}),f.__options.triggerClose.mouseleave||f.__options.triggerClose.touchleave&&t.hasTouchCapability){f._on("dismissable",function(n){n.dismissable?n.delay?(o=setTimeout(function(){f._close(n.event)},n.delay),f.__timeouts.close.push(o)):f._close(n):clearTimeout(o)});var c=f._$origin,l="",a="",o=null;f.__options.interactive&&(c=c.add(f._$tooltip));f.__options.triggerClose.mouseleave&&(l+="mouseenter."+f.__namespace+"-triggerClose ",a+="mouseleave."+f.__namespace+"-triggerClose ");f.__options.triggerClose.touchleave&&t.hasTouchCapability&&(l+="touchstart."+f.__namespace+"-triggerClose",a+="touchend."+f.__namespace+"-triggerClose touchcancel."+f.__namespace+"-triggerClose");c.on(a,function(n){if(f._touchIsTouchEvent(n)||!f._touchIsEmulatedEvent(n)){var t=n.type=="mouseleave"?f.__options.delay:f.__options.delayTouch;f._trigger({delay:t[1],dismissable:!0,event:n,type:"dismissable"})}}).on(l,function(n){(f._touchIsTouchEvent(n)||!f._touchIsEmulatedEvent(n))&&f._trigger({dismissable:!1,event:n,type:"dismissable"})})}if(f.__options.triggerClose.originClick)f._$origin.on("click."+f.__namespace+"-triggerClose",function(n){f._touchIsTouchEvent(n)||f._touchIsEmulatedEvent(n)||f._close(n)});(f.__options.triggerClose.click||f.__options.triggerClose.tap&&t.hasTouchCapability)&&setTimeout(function(){if(f.__state!="closed"){var i="",r=n(t.window.document.body);f.__options.triggerClose.click&&(i+="click."+f.__namespace+"-triggerClose ");f.__options.triggerClose.tap&&t.hasTouchCapability&&(i+="touchend."+f.__namespace+"-triggerClose");r.on(i,function(t){f._touchIsMeaningfulEvent(t)&&(f._touchRecordEvent(t),f.__options.interactive&&n.contains(f._$tooltip[0],t.target)||f._close(t))});if(f.__options.triggerClose.tap&&t.hasTouchCapability)r.on("touchstart."+f.__namespace+"-triggerClose",function(n){f._touchRecordEvent(n)})}},0);f._trigger("ready");f.__options.functionReady&&f.__options.functionReady.call(f,f,{origin:f._$origin[0],tooltip:f._$tooltip[0]})}f.__options.timer>0&&(o=setTimeout(function(){f._close()},f.__options.timer+h),f.__timeouts.close.push(o))}return f},_openShortly:function(n){var t=this,r=!0,i;return t.__state!="stable"&&t.__state!="appearing"&&(t.__timeouts.open||(t._trigger({type:"start",event:n,stop:function(){r=!1}}),r&&(i=n.type.indexOf("touch")==0?t.__options.delayTouch:t.__options.delay,i[0]?t.__timeouts.open=setTimeout(function(){t.__timeouts.open=null;t.__pointerIsOverOrigin&&t._touchIsMeaningfulEvent(n)?(t._trigger("startend"),t._open(n)):t._trigger("startcancel")},i[0]):(t._trigger("startend"),t._open(n))))),t},_optionsExtract:function(t,i){var f=this,u=n.extend(!0,{},i),r=f.__options[t];return r||(r={},n.each(i,function(n){var t=f.__options[n];t!==undefined&&(r[n]=t)})),n.each(u,function(t,i){r[t]!==undefined&&(typeof i!="object"||i instanceof Array||i==null||typeof r[t]!="object"||r[t]instanceof Array||r[t]==null?u[t]=r[t]:n.extend(u[t],r[t]))}),u},_plug:function(t){var i=n.tooltipster._plugin(t);if(i)i.instance&&n.tooltipster.__bridge(i.instance,this,i.name);else throw new Error('The "'+t+'" plugin is not defined');return this},_touchIsEmulatedEvent:function(n){for(var r=!1,u=(new Date).getTime(),i,t=this.__touchEvents.length-1;t>=0;t--)if(i=this.__touchEvents[t],u-i.time<500)i.target===n.target&&(r=!0);else break;return r},_touchIsMeaningfulEvent:function(n){return this._touchIsTouchEvent(n)&&!this._touchSwiped(n.target)||!this._touchIsTouchEvent(n)&&!this._touchIsEmulatedEvent(n)},_touchIsTouchEvent:function(n){return n.type.indexOf("touch")==0},_touchRecordEvent:function(n){return this._touchIsTouchEvent(n)&&(n.time=(new Date).getTime(),this.__touchEvents.push(n)),this},_touchSwiped:function(n){for(var r=!1,i,t=this.__touchEvents.length-1;t>=0;t--)if(i=this.__touchEvents[t],i.type=="touchmove"){r=!0;break}else if(i.type=="touchstart"&&n===i.target)break;return r},_trigger:function(){var t=Array.prototype.slice.apply(arguments);return typeof t[0]=="string"&&(t[0]={type:t[0]}),t[0].instance=this,t[0].origin=this._$origin?this._$origin[0]:null,t[0].tooltip=this._$tooltip?this._$tooltip[0]:null,this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,t),n.tooltipster._trigger.apply(n.tooltipster,t),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,t),this},_unplug:function(t){var i=this,r;return i[t]&&(r=n.tooltipster._plugin(t),r.instance&&n.each(r.instance,function(n){i[n]&&i[n].bridged===i[t]&&delete i[n]}),i[t].__destroy&&i[t].__destroy(),delete i[t]),i},close:function(n){return this.__destroyed?this.__destroyError():this._close(null,n),this},content:function(n){var i=this,r;return n===undefined?i.__Content:(i.__destroyed?i.__destroyError():(i.__contentSet(n),i.__Content!==null?i.__state!=="closed"&&(i.__contentInsert(),i.reposition(),i.__options.updateAnimation&&(t.hasTransitions?(r=i.__options.updateAnimation,i._$tooltip.addClass("tooltipster-update-"+r),setTimeout(function(){i.__state!="closed"&&i._$tooltip.removeClass("tooltipster-update-"+r)},1e3)):i._$tooltip.fadeTo(200,.5,function(){i.__state!="closed"&&i._$tooltip.fadeTo(200,1)}))):i._close()),i)},destroy:function(){var i=this,r,u;return i.__destroyed?i.__destroyError():(i.__state!="closed"?i.option("animationDuration",0)._close(null,null,!0):i.__timeoutsClear(),i._trigger("destroy"),i.__destroyed=!0,i._$origin.removeData(i.__namespace).off("."+i.__namespace+"-triggerOpen"),n(t.window.document.body).off("."+i.__namespace+"-triggerOpen"),r=i._$origin.data("tooltipster-ns"),r&&(r.length===1?(u=null,i.__options.restoration=="previous"?u=i._$origin.data("tooltipster-initialTitle"):i.__options.restoration=="current"&&(u=typeof i.__Content=="string"?i.__Content:n("<div><\/div>").append(i.__Content).html()),u&&i._$origin.attr("title",u),i._$origin.removeClass("tooltipstered"),i._$origin.removeData("tooltipster-ns").removeData("tooltipster-initialTitle")):(r=n.grep(r,function(n){return n!==i.__namespace}),i._$origin.data("tooltipster-ns",r))),i._trigger("destroyed"),i._off(),i.off(),i.__Content=null,i.__$emitterPrivate=null,i.__$emitterPublic=null,i.__options.parent=null,i._$origin=null,i._$tooltip=null,n.tooltipster.__instancesLatestArr=n.grep(n.tooltipster.__instancesLatestArr,function(n){return i!==n}),clearInterval(i.__garbageCollector)),i},disable:function(){if(this.__destroyed)this.__destroyError();else return this._close(),this.__enabled=!1,this;return this},elementOrigin:function(){if(this.__destroyed)this.__destroyError();else return this._$origin[0]},elementTooltip:function(){return this._$tooltip?this._$tooltip[0]:null},enable:function(){return this.__enabled=!0,this},hide:function(n){return this.close(n)},instance:function(){return this},off:function(){return this.__destroyed||this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},open:function(n){return this.__destroyed?this.__destroyError():this._open(null,n),this},option:function(t,i){return i===undefined?this.__options[t]:(this.__destroyed?this.__destroyError():(this.__options[t]=i,this.__optionsFormat(),n.inArray(t,["trigger","triggerClose","triggerOpen"])>=0&&this.__prepareOrigin(),t==="selfDestruction"&&this.__prepareGC()),this)},reposition:function(n,t){var i=this;return i.__destroyed?i.__destroyError():i.__state!="closed"&&r(i._$origin)&&(t||r(i._$tooltip))&&(t||i._$tooltip.detach(),i.__Geometry=i.__geometry(),i._trigger({type:"reposition",event:n,helper:{geo:i.__Geometry}})),i},show:function(n){return this.open(n)},status:function(){return{destroyed:this.__destroyed,enabled:this.__enabled,open:this.__state!=="closed",state:this.__state}},triggerHandler:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},n.fn.tooltipster=function(){var t=Array.prototype.slice.apply(arguments),f="You are using a single HTML element as content for several tooltips. You probably want to set the contentCloning option to TRUE.",i;if(this.length===0)return this;if(typeof t[0]=="string")return i="#*$~&",this.each(function(){var e=n(this).data("tooltipster-ns"),r=e?n(this).data(e[0]):null,u;if(r){if(typeof r[t[0]]=="function")this.length>1&&t[0]=="content"&&(t[1]instanceof n||typeof t[1]=="object"&&t[1]!=null&&t[1].tagName)&&!r.__options.contentCloning&&r.__options.debug&&console.log(f),u=r[t[0]](t[1],t[2]);else throw new Error('Unknown method "'+t[0]+'"');if(u!==r||t[0]==="instance")return i=u,!1}else throw new Error("You called Tooltipster's \""+t[0]+'" method on an uninitialized element');}),i!=="#*$~&"?i:this;n.tooltipster.__instancesLatestArr=[];var e=t[0]&&t[0].multiple!==undefined,l=e&&t[0].multiple||!e&&u.multiple,o=t[0]&&t[0].content!==undefined,r=o&&t[0].content||!o&&u.content,s=t[0]&&t[0].contentCloning!==undefined,a=s&&t[0].contentCloning||!s&&u.contentCloning,h=t[0]&&t[0].debug!==undefined,c=h&&t[0].debug||!h&&u.debug;return this.length>1&&(r instanceof n||typeof r=="object"&&r!=null&&r.tagName)&&!a&&c&&console.log(f),this.each(function(){var u=!1,f=n(this),r=f.data("tooltipster-ns"),i=null;r?l?u=!0:c&&(console.log("Tooltipster: one or more tooltips are already attached to the element below. Ignoring."),console.log(this)):u=!0;u&&(i=new n.Tooltipster(this,t[0]),r||(r=[]),r.push(i.__namespace),f.data("tooltipster-ns",r),f.data(i.__namespace,i),i.__options.functionInit&&i.__options.functionInit.call(i,i,{origin:this}),i._trigger("init"));n.tooltipster.__instancesLatestArr.push(i)}),this},h.prototype={__init:function(i){this.__$tooltip=i;this.__$tooltip.css({left:0,overflow:"hidden",position:"absolute",top:0}).find(".tooltipster-content").css("overflow","auto");this.$container=n('<div class="tooltipster-ruler"><\/div>').append(this.__$tooltip).appendTo(t.window.document.body)},__forceRedraw:function(){var n=this.__$tooltip.parent();this.__$tooltip.detach();this.__$tooltip.appendTo(n)},constrain:function(n,t){return this.constraints={width:n,height:t},this.__$tooltip.css({display:"block",height:"",overflow:"auto",width:n}),this},destroy:function(){this.__$tooltip.detach().find(".tooltipster-content").css({display:"",overflow:""});this.$container.remove()},free:function(){return this.constraints=null,this.__$tooltip.css({display:"",height:"",overflow:"visible",width:""}),this},measure:function(){var n,i;if(this.__forceRedraw(),n=this.__$tooltip[0].getBoundingClientRect(),i={size:{height:n.height||n.bottom-n.top,width:n.width||n.right-n.left}},this.constraints){var r=this.__$tooltip.find(".tooltipster-content"),f=this.__$tooltip.outerHeight(),e=r[0].getBoundingClientRect(),u={height:f<=this.constraints.height,width:n.width<=this.constraints.width&&e.width>=r[0].scrollWidth-1};i.fits=u.height&&u.width}return t.IE&&t.IE<=11&&i.size.width!==t.window.document.documentElement.clientWidth&&(i.size.width=Math.ceil(i.size.width)+1),i}},f=navigator.userAgent.toLowerCase(),f.indexOf("msie")!=-1?t.IE=parseInt(f.split("msie")[1]):f.toLowerCase().indexOf("trident")!==-1&&f.indexOf(" rv:11")!==-1?t.IE=11:f.toLowerCase().indexOf("edge/")!=-1&&(t.IE=parseInt(f.toLowerCase().split("edge/")[1])),o="tooltipster.sideTip",n.tooltipster._plugin({name:o,instance:{__defaults:function(){return{arrow:!0,distance:6,functionPosition:null,maxWidth:null,minIntersection:16,minWidth:0,position:null,side:"top",viewportAware:!0}},__init:function(n){var t=this;t.__instance=n;t.__namespace="tooltipster-sideTip-"+Math.round(Math.random()*1e6);t.__previousState="closed";t.__options;t.__optionsFormat();t.__instance._on("state."+t.__namespace,function(n){n.state=="closed"?t.__close():n.state=="appearing"&&t.__previousState=="closed"&&t.__create();t.__previousState=n.state});t.__instance._on("options."+t.__namespace,function(){t.__optionsFormat()});t.__instance._on("reposition."+t.__namespace,function(n){t.__reposition(n.event,n.helper)})},__close:function(){this.__instance.content()instanceof n&&this.__instance.content().detach();this.__instance._$tooltip.remove();this.__instance._$tooltip=null},__create:function(){var t=n('<div class="tooltipster-base tooltipster-sidetip"><div class="tooltipster-box"><div class="tooltipster-content"><\/div><\/div><div class="tooltipster-arrow"><div class="tooltipster-arrow-uncropped"><div class="tooltipster-arrow-border"><\/div><div class="tooltipster-arrow-background"><\/div><\/div><\/div><\/div>');this.__options.arrow||t.find(".tooltipster-box").css("margin",0).end().find(".tooltipster-arrow").hide();this.__options.minWidth&&t.css("min-width",this.__options.minWidth+"px");this.__options.maxWidth&&t.css("max-width",this.__options.maxWidth+"px");this.__instance._$tooltip=t;this.__instance._trigger("created")},__destroy:function(){this.__instance._off("."+self.__namespace)},__optionsFormat:function(){var t=this,i;t.__options=t.__instance._optionsExtract(o,t.__defaults());t.__options.position&&(t.__options.side=t.__options.position);typeof t.__options.distance!="object"&&(t.__options.distance=[t.__options.distance]);t.__options.distance.length<4&&(t.__options.distance[1]===undefined&&(t.__options.distance[1]=t.__options.distance[0]),t.__options.distance[2]===undefined&&(t.__options.distance[2]=t.__options.distance[0]),t.__options.distance[3]===undefined&&(t.__options.distance[3]=t.__options.distance[1]),t.__options.distance={top:t.__options.distance[0],right:t.__options.distance[1],bottom:t.__options.distance[2],left:t.__options.distance[3]});typeof t.__options.side=="string"&&(i={top:"bottom",right:"left",bottom:"top",left:"right"},t.__options.side=[t.__options.side,i[t.__options.side]],t.__options.side[0]=="left"||t.__options.side[0]=="right"?t.__options.side.push("top","bottom"):t.__options.side.push("right","left"));n.tooltipster._env.IE===6&&t.__options.arrow!==!0&&(t.__options.arrow=!1)},__reposition:function(t,i){var u=this,r,p=u.__targetFind(i),e=[],l,a,f,h,v;u.__instance._$tooltip.detach();var o=u.__instance._$tooltip.clone(),c=n.tooltipster._getRuler(o),s=!1,y=u.__instance.option("animation");y&&o.removeClass("tooltipster-"+y);n.each(["window","document"],function(r,f){var a=null,r,l,h;if(u.__instance._trigger({container:f,helper:i,satisfied:s,takeTest:function(n){a=n},results:e,type:"positionTest"}),a==!0||a!=!1&&s==!1&&(f!="window"||u.__options.viewportAware))for(r=0;r<u.__options.side.length;r++)l={horizontal:0,vertical:0},h=u.__options.side[r],h=="top"||h=="bottom"?l.vertical=u.__options.distance[h]:l.horizontal=u.__options.distance[h],u.__sideChange(o,h),n.each(["natural","constrained"],function(n,r){if(a=null,u.__instance._trigger({container:f,event:t,helper:i,mode:r,results:e,satisfied:s,side:h,takeTest:function(n){a=n},type:"positionTest"}),a==!0||a!=!1&&s==!1){var o={container:f,distance:l,fits:null,mode:r,outerSize:null,side:h,size:null,target:p[h],whole:null},y=r=="natural"?c.free():c.constrain(i.geo.available[f][h].width-l.horizontal,i.geo.available[f][h].height-l.vertical),v=y.measure();if(o.size=v.size,o.outerSize={height:v.size.height+l.vertical,width:v.size.width+l.horizontal},o.fits=r=="natural"?i.geo.available[f][h].width>=o.outerSize.width&&i.geo.available[f][h].height>=o.outerSize.height?!0:!1:v.fits,f=="window"&&(o.whole=o.fits?h=="top"||h=="bottom"?i.geo.origin.windowOffset.right>=u.__options.minIntersection&&i.geo.window.size.width-i.geo.origin.windowOffset.left>=u.__options.minIntersection:i.geo.origin.windowOffset.bottom>=u.__options.minIntersection&&i.geo.window.size.height-i.geo.origin.windowOffset.top>=u.__options.minIntersection:!1),e.push(o),o.whole)s=!0;else if(o.mode=="natural"&&(o.fits||o.size.width<=i.geo.available[f][h].width))return!1}})});u.__instance._trigger({edit:function(n){e=n},event:t,helper:i,results:e,type:"positionTested"});e.sort(function(n,t){var i,r;return n.whole&&!t.whole?-1:!n.whole&&t.whole?1:n.whole&&t.whole?(i=u.__options.side.indexOf(n.side),r=u.__options.side.indexOf(t.side),i<r?-1:i>r?1:n.mode=="natural"?-1:1):n.fits&&!t.fits?-1:!n.fits&&t.fits?1:n.fits&&t.fits?(i=u.__options.side.indexOf(n.side),r=u.__options.side.indexOf(t.side),i<r?-1:i>r?1:n.mode=="natural"?-1:1):n.container=="document"&&n.side=="bottom"&&n.mode=="natural"?-1:1});r=e[0];r.coord={};switch(r.side){case"left":case"right":r.coord.top=Math.floor(r.target-r.size.height/2);break;case"bottom":case"top":r.coord.left=Math.floor(r.target-r.size.width/2)}switch(r.side){case"left":r.coord.left=i.geo.origin.windowOffset.left-r.outerSize.width;break;case"right":r.coord.left=i.geo.origin.windowOffset.right+r.distance.horizontal;break;case"top":r.coord.top=i.geo.origin.windowOffset.top-r.outerSize.height;break;case"bottom":r.coord.top=i.geo.origin.windowOffset.bottom+r.distance.vertical}r.container=="window"?r.side=="top"||r.side=="bottom"?r.coord.left<0?r.coord.left=i.geo.origin.windowOffset.right-this.__options.minIntersection>=0?0:i.geo.origin.windowOffset.right-this.__options.minIntersection-1:r.coord.left>i.geo.window.size.width-r.size.width&&(r.coord.left=i.geo.origin.windowOffset.left+this.__options.minIntersection<=i.geo.window.size.width?i.geo.window.size.width-r.size.width:i.geo.origin.windowOffset.left+this.__options.minIntersection+1-r.size.width):r.coord.top<0?r.coord.top=i.geo.origin.windowOffset.bottom-this.__options.minIntersection>=0?0:i.geo.origin.windowOffset.bottom-this.__options.minIntersection-1:r.coord.top>i.geo.window.size.height-r.size.height&&(r.coord.top=i.geo.origin.windowOffset.top+this.__options.minIntersection<=i.geo.window.size.height?i.geo.window.size.height-r.size.height:i.geo.origin.windowOffset.top+this.__options.minIntersection+1-r.size.height):(r.coord.left>i.geo.window.size.width-r.size.width&&(r.coord.left=i.geo.window.size.width-r.size.width),r.coord.left<0&&(r.coord.left=0));u.__sideChange(o,r.side);i.tooltipClone=o[0];i.tooltipParent=u.__instance.option("parent").parent[0];i.mode=r.mode;i.whole=r.whole;i.origin=u.__instance._$origin[0];i.tooltip=u.__instance._$tooltip[0];delete r.container;delete r.fits;delete r.mode;delete r.outerSize;delete r.whole;r.distance=r.distance.horizontal||r.distance.vertical;l=n.extend(!0,{},r);u.__instance._trigger({edit:function(n){r=n},event:t,helper:i,position:l,type:"position"});u.__options.functionPosition&&(a=u.__options.functionPosition.call(u,u.__instance,i,l),a&&(r=a));c.destroy();r.side=="top"||r.side=="bottom"?(f={prop:"left",val:r.target-r.coord.left},h=r.size.width-this.__options.minIntersection):(f={prop:"top",val:r.target-r.coord.top},h=r.size.height-this.__options.minIntersection);f.val<this.__options.minIntersection?f.val=this.__options.minIntersection:f.val>h&&(f.val=h);v=i.geo.origin.fixedLineage?i.geo.origin.windowOffset:{left:i.geo.origin.windowOffset.left+i.geo.window.scroll.left,top:i.geo.origin.windowOffset.top+i.geo.window.scroll.top};r.coord={left:v.left+(r.coord.left-i.geo.origin.windowOffset.left),top:v.top+(r.coord.top-i.geo.origin.windowOffset.top)};u.__sideChange(u.__instance._$tooltip,r.side);i.geo.origin.fixedLineage?u.__instance._$tooltip.css("position","fixed"):u.__instance._$tooltip.css("position","");u.__instance._$tooltip.css({left:r.coord.left,top:r.coord.top,height:r.size.height,width:r.size.width}).find(".tooltipster-arrow").css({left:"",top:""}).css(f.prop,f.val);u.__instance._$tooltip.appendTo(u.__instance.option("parent"));u.__instance._trigger({type:"repositioned",event:t,position:r})},__sideChange:function(n,t){n.removeClass("tooltipster-bottom").removeClass("tooltipster-left").removeClass("tooltipster-right").removeClass("tooltipster-top").addClass("tooltipster-"+t)},__targetFind:function(n){var r={},i=this.__instance._$origin[0].getClientRects(),u,t;return i.length>1&&(u=this.__instance._$origin.css("opacity"),u==1&&(this.__instance._$origin.css("opacity",.99),i=this.__instance._$origin[0].getClientRects(),this.__instance._$origin.css("opacity",1))),i.length<2?(r.top=Math.floor(n.geo.origin.windowOffset.left+n.geo.origin.size.width/2),r.bottom=r.top,r.left=Math.floor(n.geo.origin.windowOffset.top+n.geo.origin.size.height/2),r.right=r.left):(t=i[0],r.top=Math.floor(t.left+(t.right-t.left)/2),t=i.length>2?i[Math.ceil(i.length/2)-1]:i[0],r.right=Math.floor(t.top+(t.bottom-t.top)/2),t=i[i.length-1],r.bottom=Math.floor(t.left+(t.right-t.left)/2),t=i.length>2?i[Math.ceil((i.length+1)/2)-1]:i[i.length-1],r.left=Math.floor(t.top+(t.bottom-t.top)/2)),r}}}),n});$(document).ready(function(){$("#existingUserForm","#loginArea").applyFormEvents(!0);$("#newUserForm","#loginArea").applyFormEvents(!1);$(function(){$("#forgottenPinLink").click(function(){var n=$("#email").val();$("#forgottenPinEmail").val(n);$("#forgottenPinForm").submit()})});$(".login").tooltipster({animation:"fade",delay:100,trigger:"click",side:["bottom"],maxWidth:420,contentAsHTML:!0,interactive:!0,functionPosition:function(n,t,i){return i.coord.left-=190,i}});$("html").click(function(n){$(n.target).is("html")&&$(".login").tooltipster("close")});$("#newEmail").click(function(){$(".newEmail").tooltipster("open")});$(window).keypress(function(){$(".newEmail").tooltipster("close")});$("#newMobile").click(function(){$(".newMobile").tooltipster("open")});$(window).keypress(function(){$(".newMobile").tooltipster("close")})})