/*! qTip2 v2.0.0 | http://craigsworks.com/projects/qtip2/ | Licensed MIT, GPL */
(function(e,t,n){(function(e){"use strict";typeof define=="function"&&define.amd?define(["jquery"],e):jQuery&&!jQuery.fn.qtip&&e(jQuery)})(function(r){function P(e){var t=function(e){return e===o||"object"!=typeof e},n=function(e){return!r.isFunction(e)&&(!e&&!e.attr||e.length<1||"object"==typeof e&&!e.jquery)};if(!e||"object"!=typeof e)return s;t(e.metadata)&&(e.metadata={type:e.metadata});if("content"in e){if(t(e.content)||e.content.jquery)e.content={text:e.content};n(e.content.text||s)&&(e.content.text=s),"title"in e.content&&(t(e.content.title)&&(e.content.title={text:e.content.title}),n(e.content.title.text||s)&&(e.content.title.text=s))}return"position"in e&&t(e.position)&&(e.position={my:e.position,at:e.position}),"show"in e&&t(e.show)&&(e.show=e.show.jquery?{target:e.show}:{event:e.show}),"hide"in e&&t(e.hide)&&(e.hide=e.hide.jquery?{target:e.hide}:{event:e.hide}),"style"in e&&t(e.style)&&(e.style={classes:e.style}),r.each(w,function(){this.sanitize&&this.sanitize(e)}),e}function H(u,a,m,g){function U(e){var t=0,n,r=a,i=e.split(".");while(r=r[i[t++]])t",{"class":"ui-state-default ui-tooltip-close "+(a.style.widget?"":x+"-icon"),title:n,"aria-label":n}).prepend(r("",{"class":"ui-icon ui-icon-close",html:"×"})),q.button.appendTo(q.titlebar).attr("role","button").click(function(e){return F.hasClass(N)||y.hide(e),s}),y.redraw()}function J(){var e=H+"-title";q.titlebar&&X(),q.titlebar=r("
",{"class":x+"-titlebar "+(a.style.widget?"ui-widget-header":"")}).append(q.title=r("",{id:e,"class":x+"-title","aria-atomic":i})).insertBefore(q.content).delegate(".ui-tooltip-close","mousedown keydown mouseup keyup mouseout",function(e){r(this).toggleClass("ui-state-active ui-state-focus",e.type.substr(-4)==="down")}).delegate(".ui-tooltip-close","mouseover mouseout",function(e){r(this).toggleClass("ui-state-hover",e.type==="mouseover")}),a.content.title.button?V():y.rendered&&y.redraw()}function K(e){var t=q.button,n=q.title;if(!y.rendered)return s;e?(n||J(),V()):t.remove()}function Q(e,t){var n=q.title;if(!y.rendered||!e)return s;r.isFunction(e)&&(e=e.call(u,R.event,y));if(e===s||!e&&e!=="")return X(s);e.jquery&&e.length>0?n.empty().append(e.css({display:"block"})):n.html(e),y.redraw(),t!==s&&y.rendered&&F[0].offsetWidth>0&&y.reposition(R.event)}function G(e,t){function o(e){function a(n){n&&(delete u[n.src],clearTimeout(y.timers.img[n.src]),r(n).unbind(I)),r.isEmptyObject(u)&&(y.redraw(),t!==s&&y.reposition(R.event),e())}var o,u={};if((o=i.find("img[src]:not([height]):not([width])")).length===0)return a();o.each(function(e,t){if(u[t.src]!==n)return;var i=0,s=3;(function o(){if(t.height||t.width||i>s)return a(t);i+=1,y.timers.img[t.src]=setTimeout(o,700)})(),r(t).bind("error"+I+" load"+I,function(){a(this)}),u[t.src]=t})}var i=q.content;return!y.rendered||!e?s:(r.isFunction(e)&&(e=e.call(u,R.event,y)||""),e.jquery&&e.length>0?i.empty().append(e.css({display:"block"})):i.html(e),y.rendered<0?F.queue("fx",o):(j=0,o(r.noop)),y)}function Y(){function c(e){if(F.hasClass(N))return s;clearTimeout(y.timers.show),clearTimeout(y.timers.hide);var t=function(){y.toggle(i,e)};a.show.delay>0?y.timers.show=setTimeout(t,a.show.delay):t()}function h(e){if(F.hasClass(N)||B||j)return s;var t=r(e.relatedTarget||e.target),i=t.closest(C)[0]===F[0],u=t[0]===o.show[0];clearTimeout(y.timers.show),clearTimeout(y.timers.hide);if(n.target==="mouse"&&i||a.hide.fixed&&/mouse(out|leave|move)/.test(e.type)&&(i||u)){try{e.preventDefault(),e.stopImmediatePropagation()}catch(f){}return}a.hide.delay>0?y.timers.hide=setTimeout(function(){y.hide(e)},a.hide.delay):y.hide(e)}function p(e){if(F.hasClass(N))return s;clearTimeout(y.timers.inactive),y.timers.inactive=setTimeout(function(){y.hide(e)},a.hide.inactive)}function d(e){y.rendered&&F[0].offsetWidth>0&&y.reposition(e)}var n=a.position,o={show:a.show.target,hide:a.hide.target,viewport:r(n.viewport),document:r(t),body:r(t.body),window:r(e)},f={show:r.trim(""+a.show.event).split(" "),hide:r.trim(""+a.hide.event).split(" ")},l=r.browser.msie&&parseInt(r.browser.version,10)===6;F.bind("mouseenter"+I+" mouseleave"+I,function(e){var t=e.type==="mouseenter";t&&y.focus(e),F.toggleClass(A,t)}),/mouse(out|leave)/i.test(a.hide.event)&&a.hide.leave==="window"&&o.window.bind("mouseout"+I+" blur"+I,function(e){!/select|option/.test(e.target.nodeName)&&!e.relatedTarget&&y.hide(e)}),a.hide.fixed?(o.hide=o.hide.add(F),F.bind("mouseover"+I,function(){F.hasClass(N)||clearTimeout(y.timers.hide)})):/mouse(over|enter)/i.test(a.show.event)&&o.hide.bind("mouseleave"+I,function(e){clearTimeout(y.timers.show)}),(""+a.hide.event).indexOf("unfocus")>-1&&n.container.closest("html").bind("mousedown"+I+" touchstart"+I,function(e){var t=r(e.target),n=y.rendered&&!F.hasClass(N)&&F[0].offsetWidth>0,i=t.parents(C).filter(F[0]).length>0;t[0]!==u[0]&&t[0]!==F[0]&&!i&&!u.has(t[0]).length&&!t.attr("disabled")&&y.hide(e)}),"number"==typeof a.hide.inactive&&(o.show.bind("qtip-"+m+"-inactive",p),r.each(b.inactiveEvents,function(e,t){o.hide.add(q.tooltip).bind(t+I+"-inactive",p)})),r.each(f.hide,function(e,t){var n=r.inArray(t,f.show),i=r(o.hide);n>-1&&i.add(o.show).length===i.length||t==="unfocus"?(o.show.bind(t+I,function(e){F[0].offsetWidth>0?h(e):c(e)}),delete f.show[n]):o.hide.bind(t+I,h)}),r.each(f.show,function(e,t){o.show.bind(t+I,c)}),"number"==typeof a.hide.distance&&o.show.add(F).bind("mousemove"+I,function(e){var t=R.origin||{},n=a.hide.distance,r=Math.abs;(r(e.pageX-t.pageX)>=n||r(e.pageY-t.pageY)>=n)&&y.hide(e)}),n.target==="mouse"&&(o.show.bind("mousemove"+I,function(e){E={pageX:e.pageX,pageY:e.pageY,type:"mousemove"}}),n.adjust.mouse&&(a.hide.event&&(F.bind("mouseleave"+I,function(e){(e.relatedTarget||e.target)!==o.show[0]&&y.hide(e)}),q.target.bind("mouseenter"+I+" mouseleave"+I,function(e){R.onTarget=e.type==="mouseenter"})),o.document.bind("mousemove"+I,function(e){y.rendered&&R.onTarget&&!F.hasClass(N)&&F[0].offsetWidth>0&&y.reposition(e||E)}))),(n.adjust.resize||o.viewport.length)&&(r.event.special.resize?o.viewport:o.window).bind("resize"+I,d),(o.viewport.length||l&&F.css("position")==="fixed")&&o.viewport.bind("scroll"+I,d)}function Z(){var n=[a.show.target[0],a.hide.target[0],y.rendered&&q.tooltip[0],a.position.container[0],a.position.viewport[0],a.position.container.closest("html")[0],e,t];y.rendered?r([]).pushStack(r.grep(n,function(e){return typeof e=="object"})).unbind(I):a.show.target.unbind(I+"-create")}var y=this,O=t.body,H=x+"-"+m,B=0,j=0,F=r(),I=".qtip-"+m,q,R;y.id=m,y.rendered=s,y.destroyed=s,y.elements=q={target:u},y.timers={img:{}},y.options=a,y.checks={},y.plugins={},y.cache=R={event:{},target:r(),disabled:s,attr:g,onTarget:s,lastClass:""},y.checks.builtin={"^id$":function(e,t,n){var o=n===i?b.nextid:n,u=x+"-"+o;o!==s&&o.length>0&&!r("#"+u).length&&(F[0].id=u,q.content[0].id=u+"-content",q.title[0].id=u+"-title")},"^content.text$":function(e,t,n){G(n)},"^content.title.text$":function(e,t,n){if(!n)return X();!q.title&&n&&J(),Q(n)},"^content.title.button$":function(e,t,n){K(n)},"^position.(my|at)$":function(e,t,n){"string"==typeof n&&(e[t]=new w.Corner(n))},"^position.container$":function(e,t,n){y.rendered&&F.appendTo(n)},"^show.ready$":function(){y.rendered?y.toggle(i):y.render(1)},"^style.classes$":function(e,t,n){F.attr("class",x+" qtip "+n)},"^style.widget|content.title":W,"^events.(render|show|move|hide|focus|blur)$":function(e,t,n){F[(r.isFunction(n)?"":"un")+"bind"]("tooltip"+t,n)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var e=a.position;F.attr("tracking",e.target==="mouse"&&e.adjust.mouse),Z(),Y()}},r.extend(y,{render:function(e){if(y.rendered)return y;var t=a.content.text,n=a.content.title.text,o=a.position;return r.attr(u[0],"aria-describedby",H),F=q.tooltip=r("",{id:H,"class":x+" qtip "+k+" "+a.style.classes+" "+x+"-pos-"+a.position.my.abbrev(),width:a.style.width||"",height:a.style.height||"",tracking:o.target==="mouse"&&o.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":s,"aria-describedby":H+"-content","aria-hidden":i}).toggleClass(N,R.disabled).data("qtip",y).appendTo(a.position.container).append(q.content=r("",{"class":x+"-content",id:H+"-content","aria-atomic":i})),y.rendered=-1,j=1,B=1,n&&(J(),r.isFunction(n)||Q(n,s)),r.isFunction(t)||G(t,s),y.rendered=i,W(),r.each(a.events,function(e,t){r.isFunction(t)&&F.bind(e==="toggle"?"tooltipshow tooltiphide":"tooltip"+e,t)}),r.each(w,function(){this.initialize==="render"&&this(y)}),Y(),F.queue("fx",function(t){z("render"),j=0,B=0,y.redraw(),(a.show.ready||e)&&y.toggle(i,R.event,s),t()}),y},get:function(e){var t,n;switch(e.toLowerCase()){case"dimensions":t={height:F.outerHeight(s),width:F.outerWidth(s)};break;case"offset":t=w.offset(F,a.position.container);break;default:n=U(e.toLowerCase()),t=n[0][n[1]],t=t.precedance?t.string():t}return t},set:function(e,t){function p(e,t){var n,r,i;for(n in c)for(r in c[n])if(i=(new RegExp(r,"i")).exec(e))t.push(i),c[n][r].apply(y,t)}var n=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,u=/^content\.(title|attr)|style/i,f=s,l=s,c=y.checks,h;return"string"==typeof e?(h=e,e={},e[h]=t):e=r.extend(i,{},e),r.each(e,function(t,i){var s=U(t.toLowerCase()),o;o=s[0][s[1]],s[0][s[1]]="object"==typeof i&&i.nodeType?r(i):i,e[t]=[s[0],s[1],i,o],f=n.test(t)||f,l=u.test(t)||l}),P(a),B=j=1,r.each(e,p),B=j=0,y.rendered&&F[0].offsetWidth>0&&(f&&y.reposition(a.position.target==="mouse"?o:R.event),l&&y.redraw()),y},toggle:function(e,n){function b(){e?(r.browser.msie&&F[0].style.removeAttribute("filter"),F.css("overflow",""),"string"==typeof u.autofocus&&r(u.autofocus,F).focus(),u.target.trigger("qtip-"+m+"-inactive")):F.css({display:"",visibility:"",opacity:"",left:"",top:""}),z(e?"visible":"hidden")}if(n){if(/over|enter/.test(n.type)&&/out|leave/.test(R.event.type)&&a.show.target.add(n.target).length===a.show.target.length&&F.has(n.relatedTarget).length)return y;R.event=r.extend({},n)}if(!y.rendered)return e?y.render(1):y;var o=e?"show":"hide",u=a[o],f=a[e?"hide":"show"],l=a.position,c=a.content,h=F[0].offsetWidth>0,p=e||u.target.length===1,d=!n||u.target.length<2||R.target[0]===n.target,v,g;return(typeof e).search("boolean|number")&&(e=!h),!F.is(":animated")&&h===e&&d?y:z(o,[90])?(r.attr(F[0],"aria-hidden",!e),e?(R.origin=r.extend({},E),y.focus(n),r.isFunction(c.text)&&G(c.text,s),r.isFunction(c.title.text)&&Q(c.title.text,s),!_&&l.target==="mouse"&&l.adjust.mouse&&(r(t).bind("mousemove.qtip",function(e){E={pageX:e.pageX,pageY:e.pageY,type:"mousemove"}}),_=i),y.reposition(n,arguments[2]),!u.solo||r(C,u.solo).not(F).qtip("hide",r.Event("tooltipsolo"))):(clearTimeout(y.timers.show),delete R.origin,_&&!r(C+'[tracking="true"]:visible',u.solo).not(F).length&&(r(t).unbind("mousemove.qtip"),_=s),y.blur(n)),u.effect===s||p===s?(F[o](),b.call(F)):r.isFunction(u.effect)?(F.stop(1,1),u.effect.call(F,y),F.queue("fx",function(e){b(),e()})):F.fadeTo(90,e?1:0,b),e&&u.target.trigger("qtip-"+m+"-inactive"),y):y},show:function(e){return y.toggle(i,e)},hide:function(e){return y.toggle(s,e)},focus:function(e){if(!y.rendered)return y;var t=r(C),n=parseInt(F[0].style.zIndex,10),i=b.zindex+t.length,s=r.extend({},e),o;return F.hasClass(L)||z("focus",[i],s)&&(n!==i&&(t.each(function(){this.style.zIndex>n&&(this.style.zIndex=this.style.zIndex-1)}),t.filter("."+L).qtip("blur",s)),F.addClass(L)[0].style.zIndex=i),y},blur:function(e){return F.removeClass(L),z("blur",[F.css("zIndex")],e),y},reposition:function(n,i){if(!y.rendered||B)return y;B=1;var o=a.position.target,u=a.position,f=u.my,l=u.at,m=u.adjust,g=m.method.split(" "),b=F.outerWidth(s),S=F.outerHeight(s),x=0,T=0,N=F.css("position")==="fixed",C=u.viewport,k={left:0,top:0},L=u.container,A=F[0].offsetWidth>0,O,M,_;if(r.isArray(o)&&o.length===2)l={x:h,y:c},k={left:o[0],top:o[1]};else if(o==="mouse"&&(n&&n.pageX||R.event.pageX))l={x:h,y:c},n=E&&E.pageX&&(m.mouse||!n||!n.pageX)?{pageX:E.pageX,pageY:E.pageY}:(!n||n.type!=="resize"&&n.type!=="scroll"?n&&n.pageX&&n.type==="mousemove"?n:!m.mouse&&R.origin&&R.origin.pageX&&a.show.distance?R.origin:n:R.event)||n||R.event||E||{},k={top:n.pageY,left:n.pageX};else{o==="event"&&n&&n.target&&n.type!=="scroll"&&n.type!=="resize"?R.target=r(n.target):o!=="event"&&(R.target=r(o.jquery?o:q.target)),o=R.target,o=r(o).eq(0);if(o.length===0)return y;o[0]===t||o[0]===e?(x=w.iOS?e.innerWidth:o.width(),T=w.iOS?e.innerHeight:o.height(),o[0]===e&&(k={top:(C||o).scrollTop(),left:(C||o).scrollLeft()})):w.imagemap&&o.is("area")?O=w.imagemap(y,o,l,w.viewport?g:s):w.svg&&typeof o[0].xmlbase=="string"?O=w.svg(y,o,l,w.viewport?g:s):(x=o.outerWidth(s),T=o.outerHeight(s),k=w.offset(o,L)),O&&(x=O.width,T=O.height,M=O.offset,k=O.position);if(w.iOS>3.1&&w.iOS<4.1||w.iOS>=4.3&&w.iOS<4.33||!w.iOS&&N)_=r(e),k.left-=_.scrollLeft(),k.top-=_.scrollTop();k.left+=l.x===d?x:l.x===v?x/2:0,k.top+=l.y===p?T:l.y===v?T/2:0}return k.left+=m.x+(f.x===d?-b:f.x===v?-b/2:0),k.top+=m.y+(f.y===p?-S:f.y===v?-S/2:0),w.viewport?(k.adjusted=w.viewport(y,k,u,x,T,b,S),M&&k.adjusted.left&&(k.left+=M.left),M&&k.adjusted.top&&(k.top+=M.top)):k.adjusted={left:0,top:0},z("move",[k,C.elem||C],n)?(delete k.adjusted,i===s||!A||isNaN(k.left)||isNaN(k.top)||o==="mouse"||!r.isFunction(u.effect)?F.css(k):r.isFunction(u.effect)&&(u.effect.call(F,y,r.extend({},k)),F.queue(function(e){r(this).css({opacity:"",height:""}),r.browser.msie&&this.style.removeAttribute("filter"),e()})),B=0,y):y},redraw:function(){if(y.rendered<1||j)return y;var e=a.style,t=a.position.container,n,r,i,s;return j=1,z("redraw"),e.height&&F.css(l,e.height),e.width?F.css(f,e.width):(F.css(f,"").appendTo(D),r=F.width(),r%2<1&&(r+=1),i=F.css("max-width")||"",s=F.css("min-width")||"",n=(i+s).indexOf("%")>-1?t.width()/100:0,i=(i.indexOf("%")>-1?n:1)*parseInt(i,10)||r,s=(s.indexOf("%")>-1?n:1)*parseInt(s,10)||0,r=i+s?Math.min(Math.max(r,s),i):r,F.css(f,Math.round(r)).appendTo(t)),z("redrawn"),j=0,y},disable:function(e){return"boolean"!=typeof e&&(e=!F.hasClass(N)&&!R.disabled),y.rendered?(F.toggleClass(N,e),r.attr(F[0],"aria-disabled",e)):R.disabled=!!e,y},enable:function(){return y.disable(s)},destroy:function(){var e=u[0],t=r.attr(e,M),n=u.data("qtip");y.destroyed=i,y.rendered&&(F.stop(1,0).remove(),r.each(y.plugins,function(){this.destroy&&this.destroy()})),clearTimeout(y.timers.show),clearTimeout(y.timers.hide),Z();if(!n||y===n)r.removeData(e,"qtip"),a.suppress&&t&&(r.attr(e,"title",t),u.removeAttr(M)),u.removeAttr("aria-describedby");return u.unbind(".qtip-"+m),delete S[y.id],u}})}function B(e,n){var u,a,f,l,c,h=r(this),p=r(t.body),d=this===t?p:h,v=h.metadata?h.metadata(n.metadata):o,m=n.metadata.type==="html5"&&v?v[n.metadata.name]:o,g=h.data(n.metadata.name||"qtipopts");try{g=typeof g=="string"?r.parseJSON(g):g}catch(y){}l=r.extend(i,{},b.defaults,n,typeof g=="object"?P(g):o,P(m||v)),a=l.position,l.id=e;if("boolean"==typeof l.content.text){f=h.attr(l.content.attr);if(l.content.attr===s||!f)return s;l.content.text=f}a.container.length||(a.container=p),a.target===s&&(a.target=d),l.show.target===s&&(l.show.target=d),l.show.solo===i&&(l.show.solo=a.container.closest("body")),l.hide.target===s&&(l.hide.target=d),l.position.viewport===i&&(l.position.viewport=a.container),a.container=a.container.eq(0),a.at=new w.Corner(a.at),a.my=new w.Corner(a.my);if(r.data(this,"qtip"))if(l.overwrite)h.qtip("destroy");else if(l.overwrite===s)return s;return l.suppress&&(c=r.attr(this,"title"))&&r(this).removeAttr("title").attr(M,c).attr("title",""),u=new H(h,l,e,!!f),r.data(this,"qtip",u),h.bind("remove.qtip-"+e+" removeqtip.qtip-"+e,function(){u.destroy()}),u}function j(e){var t=this,n=e.elements.tooltip,o=e.options.content.ajax,u=b.defaults.content.ajax,a=".qtip-ajax",f=/