(function(a,h,l){"use strict";var c=true,b=false,e=null,f,d,k,t={},g="ui-tooltip",u="ui-widget",i="ui-state-disabled",j="div.qtip."+g,v=g+"-default",m=g+"-focus",x=g+"-hover",o=g+"-fluid",E="-31000px",r="_replacedByqTip",n="oldtitle",s;function p(){p.history=p.history||[];p.history.push(arguments);if("object"===typeof console){var b=console[console.warn?"warn":"log"],a=Array.prototype.slice.call(arguments),c;if(typeof arguments[0]==="string")a[0]="qTip2: "+a[0];c=b.apply?b.apply(console,a):b(a)}}function q(c){var f;if(!c||"object"!==typeof c)return b;if(c.metadata===e||"object"!==typeof c.metadata)c.metadata={type:c.metadata};if("content"in c){if(c.content===e||"object"!==typeof c.content||c.content.jquery)c.content={text:c.content};f=c.content.text||b;if(!a.isFunction(f)&&(!f&&!f.attr||f.length<1||"object"===typeof f&&!f.jquery))c.content.text=b;if("title"in c.content){if(c.content.title===e||"object"!==typeof c.content.title)c.content.title={text:c.content.title};f=c.content.title.text||b;if(!a.isFunction(f)&&(!f&&!f.attr||f.length<1||"object"===typeof f&&!f.jquery))c.content.title.text=b}}if("position"in c)if(c.position===e||"object"!==typeof c.position)c.position={my:c.position,at:c.position};if("show"in c)if(c.show===e||"object"!==typeof c.show)if(c.show.jquery)c.show={target:c.show};else c.show={event:c.show};if("hide"in c)if(c.hide===e||"object"!==typeof c.hide)if(c.hide.jquery)c.hide={target:c.hide};else c.hide={event:c.hide};if("style"in c)if(c.style===e||"object"!==typeof c.style)c.style={classes:c.style};a.each(d,function(){this.sanitize&&this.sanitize(c)});return c}function C(B,w,E,R){var p=this,Q=document.body,F=g+"-"+E,D=0,C=0,r=a(),A=".qtip-"+E,y,z;p.id=E;p.rendered=b;p.elements=y={target:B};p.timers={img:{}};p.options=w;p.checks={};p.plugins={};p.cache=z={event:{},target:a(),disabled:b,attr:R,onTarget:b};function K(e){var d=0,c,b=w,a=e.split(".");while(b=b[a[d++]])if(d<a.length)c=b;return[c||w,a.pop()]}function O(){var a=w.style.widget;r.toggleClass(u,a).toggleClass(v,w.style["default"]&&!a);y.content.toggleClass(u+"-content",a);y.titlebar&&y.titlebar.toggleClass(u+"-header",a);y.button&&y.button.toggleClass(g+"-icon",!a)}function I(a){if(y.title){y.titlebar.remove();y.titlebar=y.title=y.button=e;a!==b&&p.reposition()}}function N(){var c=w.content.title.button,e=typeof c==="string",d=e?c:"Close tooltip";y.button&&y.button.remove();if(c.jquery)y.button=c;else y.button=a("<a />",{"class":"ui-state-default ui-tooltip-close "+(w.style.widget?"":g+"-icon"),title:d,"aria-label":d}).prepend(a("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"}));y.button.appendTo(y.titlebar).attr("role","button").click(function(a){!r.hasClass(i)&&p.hide(a);return b});p.redraw()}function H(){var b=F+"-title";y.titlebar&&I();y.titlebar=a("<div />",{"class":g+"-titlebar "+(w.style.widget?"ui-widget-header":"")}).append(y.title=a("<div />",{id:b,"class":g+"-title","aria-atomic":c})).insertBefore(y.content).delegate(".ui-tooltip-close","mousedown keydown mouseup keyup mouseout",function(b){a(this).toggleClass("ui-state-active ui-state-focus",b.type.substr(-4)==="down")}).delegate(".ui-tooltip-close","mouseover mouseout",function(b){a(this).toggleClass("ui-state-hover",b.type==="mouseover")});if(w.content.title.button)N();else p.rendered&&p.redraw()}function P(a){var d=y.button,c=y.title;if(!p.rendered)return b;if(!a)d.remove();else{!c&&H();N()}}function J(c,e){var d=y.title;if(!p.rendered||!c)return b;if(a.isFunction(c))c=c.call(B,z.event,p);if(c===b)return I(b);else if(c.jquery&&c.length>0)d.empty().append(c.css({display:"block"}));else d.html(c);p.redraw();e!==b&&p.rendered&&r.is(":visible")&&p.reposition(z.event)}function G(c,f){var d=y.content;if(!p.rendered||!c)return b;if(a.isFunction(c))c=c.call(B,z.event,p)||"";if(c.jquery&&c.length>0)d.empty().append(c.css({display:"block"}));else d.html(c);function e(h){var g,c={};function e(d){if(d){delete c[d.src];clearTimeout(p.timers.img[d.src]);a(d).unbind(A)}if(a.isEmptyObject(c)){p.redraw();f!==b&&p.reposition(z.event);h()}}if((g=d.find("img:not([height]):not([width])")).length===0)return e();g.each(function(h,b){if(c[b.src]!==l)return;var d=0,f=3;(function g(){if(b.height||b.width||d>f)return e(b);d+=1;p.timers.img[b.src]=setTimeout(g,700)})();a(b).bind("error"+A+" load"+A,function(){e(this)});c[b.src]=b})}if(p.rendered<0)r.queue("fx",e);else{C=0;e(a.noop)}return p}function M(){var e=w.position,d={show:w.show.target,hide:w.hide.target,viewport:a(e.viewport),document:a(document),body:a(document.body),window:a(h)},g={show:a.trim(""+w.show.event).split(" "),hide:a.trim(""+w.hide.event).split(" ")},q=a.browser.msie&&parseInt(a.browser.version,10)===6;function o(d){if(r.hasClass(i))return b;clearTimeout(p.timers.show);clearTimeout(p.timers.hide);var a=function(){p.toggle(c,d)};if(w.show.delay>0)p.timers.show=setTimeout(a,w.show.delay);else a()}function n(c){if(r.hasClass(i)||D||C)return b;var f=a(c.relatedTarget||c.target),g=f.closest(j)[0]===r[0],h=f[0]===d.show[0];clearTimeout(p.timers.show);clearTimeout(p.timers.hide);if(e.target==="mouse"&&g||w.hide.fixed&&(/mouse(out|leave|move)/.test(c.type)&&(g||h))){try{c.preventDefault();c.stopImmediatePropagation()}catch(k){}return}if(w.hide.delay>0)p.timers.hide=setTimeout(function(){p.hide(c)},w.hide.delay);else p.hide(c)}function m(a){if(r.hasClass(i))return b;clearTimeout(p.timers.inactive);p.timers.inactive=setTimeout(function(){p.hide(a)},w.hide.inactive)}function l(a){r.is(":visible")&&p.reposition(a)}r.bind("mouseenter"+A+" mouseleave"+A,function(a){var b=a.type==="mouseenter";b&&p.focus(a);r.toggleClass(x,b)});if(w.hide.fixed){d.hide=d.hide.add(r);r.bind("mouseover"+A,function(){!r.hasClass(i)&&clearTimeout(p.timers.hide)})}if(/mouse(out|leave)/i.test(w.hide.event))w.hide.leave==="window"&&d.window.bind("mouseout"+A+" blur"+A,function(a){/select|option/.test(a.target)&&!a.relatedTarget&&p.hide(a)});else/mouse(over|enter)/i.test(w.show.event)&&d.hide.bind("mouseleave"+A,function(){clearTimeout(p.timers.show)});(""+w.hide.event).indexOf("unfocus")>-1&&d.body.bind("mousedown"+A,function(c){var b=a(c.target),d=!r.hasClass(i)&&r.is(":visible");b[0]!==r[0]&&b.parents(j).length===0&&b.add(B).length>1&&!b.attr("disabled")&&p.hide(c)});if("number"===typeof w.hide.inactive){d.show.bind("qtip-"+E+"-inactive",m);a.each(f.inactiveEvents,function(b,a){d.hide.add(y.tooltip).bind(a+A+"-inactive",m)})}a.each(g.hide,function(f,b){var e=a.inArray(b,g.show),c=a(d.hide);if(e>-1&&c.add(d.show).length===c.length||b==="unfocus"){d.show.bind(b+A,function(a){if(r.is(":visible"))n(a);else o(a)});delete g.show[e]}else d.hide.bind(b+A,n)});a.each(g.show,function(b,a){d.show.bind(a+A,o)});"number"===typeof w.hide.distance&&d.show.add(r).bind("mousemove"+A,function(a){var b=z.origin||{},c=w.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&p.hide(a)});if(e.target==="mouse"){d.show.bind("mousemove"+A,function(a){k={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}});if(e.adjust.mouse){if(w.hide.event){r.bind("mouseleave"+A,function(a){(a.relatedTarget||a.target)!==d.show[0]&&p.hide(a)});y.target.bind("mouseenter"+A+" mouseleave"+A,function(a){z.onTarget=a.type==="mouseenter"})}d.document.bind("mousemove"+A,function(a){z.onTarget&&!r.hasClass(i)&&r.is(":visible")&&p.reposition(a||k)})}}(e.adjust.resize||d.viewport.length)&&(a.event.special.resize?d.viewport:d.window).bind("resize"+A,l);(d.viewport.length||q&&r.css("position")==="fixed")&&d.viewport.bind("scroll"+A,l)}function L(){var b=[w.show.target[0],w.hide.target[0],p.rendered&&y.tooltip[0],w.position.container[0],w.position.viewport[0],h,document];if(p.rendered)a([]).pushStack(a.grep(b,function(a){return typeof a==="object"})).unbind(A);else w.show.target.unbind(A+"-create")}p.checks.builtin={"^id$":function(i,j,h){var e=h===c?f.nextid:h,d=g+"-"+e;if(e!==b&&e.length>0&&!a("#"+d).length){r[0].id=d;y.content[0].id=d+"-content";y.title[0].id=d+"-title"}},"^content.text$":function(b,c,a){G(a)},"^content.title.text$":function(b,c,a){if(!a)return I();!y.title&&a&&H();J(a)},"^content.title.button$":function(b,c,a){P(a)},"^position.(my|at)$":function(b,c,a){if("string"===typeof a)b[c]=new d.Corner(a)},"^position.container$":function(b,c,a){p.rendered&&r.appendTo(a)},"^show.ready$":function(){if(!p.rendered)p.render(1);else p.toggle(c)},"^style.classes$":function(b,c,a){r.attr("class",g+" qtip ui-helper-reset "+a)},"^style.widget|content.title":O,"^events.(render|show|move|hide|focus|blur)$":function(d,c,b){r[(a.isFunction(b)?"":"un")+"bind"]("tooltip"+c,b)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var a=w.position;r.attr("tracking",a.target==="mouse"&&a.adjust.mouse);L();M()}};a.extend(p,{render:function(k){if(p.rendered)return p;var j=w.content.text,e=w.content.title.text,f=w.position,h=a.Event("tooltiprender");a.attr(B[0],"aria-describedby",F);r=y.tooltip=a("<div/>",{id:F,"class":g+" qtip ui-helper-reset "+v+" "+w.style.classes+" "+g+"-pos-"+w.position.my.abbrev(),width:w.style.width||"",height:w.style.height||"",tracking:f.target==="mouse"&&f.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":b,"aria-describedby":F+"-content","aria-hidden":c}).toggleClass(i,z.disabled).data("qtip",p).appendTo(w.position.container).append(y.content=a("<div />",{"class":g+"-content",id:F+"-content","aria-atomic":c}));p.rendered=-1;C=1;D=1;if(e){H();!a.isFunction(e)&&J(e,b)}!a.isFunction(j)&&G(j,b);p.rendered=c;O();a.each(w.events,function(c,b){a.isFunction(b)&&r.bind(c==="toggle"?"tooltipshow tooltiphide":"tooltip"+c,b)});a.each(d,function(){this.initialize==="render"&&this(p)});M();r.queue("fx",function(a){h.originalEvent=z.event;r.trigger(h,[p]);C=0;D=0;p.redraw();(w.show.ready||k)&&p.toggle(c,z.event,b);a()});return p},"get":function(c){var a,b;switch(c.toLowerCase()){case"dimensions":a={height:r.outerHeight(),width:r.outerWidth()};break;case"offset":a=d.offset(r,w.position.container);break;default:b=K(c.toLowerCase());a=b[0][b[1]];a=a.precedance?a.string():a}return a},"set":function(d,m){var l=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,k=/^content\.(title|attr)|style/i,f=b,h=b,g=p.checks,i;function j(e,d){var a,b,c;for(a in g)for(b in g[a])if(c=(new RegExp(b,"i")).exec(e)){d.push(c);g[a][b].apply(p,d)}}if("string"===typeof d){i=d;d={};d[i]=m}else d=a.extend(c,{},d);a.each(d,function(e,c){var b=K(e.toLowerCase()),g;g=b[0][b[1]];b[0][b[1]]="object"===typeof c&&c.nodeType?a(c):c;d[e]=[b[0],b[1],c,g];f=l.test(e)||f;h=k.test(e)||h});q(w);D=C=1;a.each(d,j);D=C=0;if(r.is(":visible")&&p.rendered){f&&p.reposition(w.position.target==="mouse"?e:z.event);h&&p.redraw()}return p},toggle:function(f,d){if(!p.rendered)return f?p.render(1):p;var l=f?"show":"hide",g=w[l],q=r.is(":visible"),o=!d||w[l].target.length<2||z.target[0]===d.target,n=w.position,i=w.content,t,h;if((typeof f).search("boolean|number"))f=!q;if(!r.is(":animated")&&q===f&&o)return p;if(d){if(/over|enter/.test(d.type)&&/out|leave/.test(z.event.type)&&d.target===w.show.target[0]&&r.has(d.relatedTarget).length)return p;z.event=a.extend({},d)}h=a.Event("tooltip"+l);h.originalEvent=d?z.event:e;r.trigger(h,[p,90]);if(h.isDefaultPrevented())return p;a.attr(r[0],"aria-hidden",!!!f);if(f){z.origin=a.extend({},k);p.focus(d);a.isFunction(i.text)&&G(i.text,b);a.isFunction(i.title.text)&&J(i.title.text,b);if(!s&&n.target==="mouse"&&n.adjust.mouse){a(document).bind("mousemove.qtip",function(a){k={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}});s=c}p.reposition(d,arguments[2]);(h.solo=!!g.solo)&&a(j,g.solo).not(r).qtip("hide",h)}else{clearTimeout(p.timers.show);delete z.origin;if(s&&!a(j+'[tracking="true"]:visible',g.solo).not(r).length){a(document).unbind("mousemove.qtip");s=b}p.blur(d)}function m(){if(f){a.browser.msie&&r[0].style.removeAttribute("filter");r.css("overflow","");"string"===typeof g.autofocus&&a(g.autofocus,r).focus();h=a.Event("tooltipvisible");h.originalEvent=d?z.event:e;r.trigger(h,[p]);g.target.trigger("qtip-"+E+"-inactive")}else r.css({display:"",visibility:"",opacity:"",left:"",top:""})}o&&r.stop(0,1);if(g.effect===b){r[l]();m.call(r)}else if(a.isFunction(g.effect)){g.effect.call(r,p);r.queue("fx",function(a){m();a()})}else r.fadeTo(90,f?1:0,m);f&&g.target.trigger("qtip-"+E+"-inactive");return p},show:function(a){return p.toggle(c,a)},hide:function(a){return p.toggle(b,a)},focus:function(h){if(!p.rendered)return p;var d=a(j),g=parseInt(r[0].style.zIndex,10),c=f.zindex+d.length,e=a.extend({},h),i,b;if(!r.hasClass(m)){b=a.Event("tooltipfocus");b.originalEvent=e;r.trigger(b,[p,c]);if(!b.isDefaultPrevented()){if(g!==c){d.each(function(){if(this.style.zIndex>g)this.style.zIndex=this.style.zIndex-1});d.filter("."+m).qtip("blur",e)}r.addClass(m)[0].style.zIndex=c}}return p},blur:function(d){var c=a.extend({},d),b;r.removeClass(m);b=a.Event("tooltipblur");b.originalEvent=c;r.trigger(b,[p]);return p},reposition:function(j,G){if(!p.rendered||D)return p;D=1;var e=w.position.target,s=w.position,i=s.my,n=s.at,u=s.adjust,B=u.method.split(" "),x=r.outerWidth(),v=r.outerHeight(),q=0,o=0,E=a.Event("tooltipmove"),C=r.css("position")==="fixed",f=s.viewport,c={left:0,top:0},m=s.container,A=b,l=p.plugins.tip,t={horizontal:B[0],vertical:B[1]=B[1]||B[0],enabled:f.jquery&&e[0]!==h&&e[0]!==Q&&u.method!=="none",left:function(a){var o=t.horizontal==="shift",h=-m.offset.left+f.offset.left+f.scrollLeft,p=i.x==="left"?x:i.x==="right"?-x:-x/2,r=n.x==="left"?q:n.x==="right"?-q:-q/2,k=l&&l.size?l.size.width||0:0,e=l&&l.corner&&l.corner.precedance==="x"&&!o?k:0,g=h-a+e,d=a+x-f.width-h+e,b=p-(i.precedance==="x"||i.x===i.y?r:0),j=i.x==="center";if(o){e=l&&l.corner&&l.corner.precedance==="y"?k:0;b=(i.x==="left"?1:-1)*p-e;c.left+=g>0?g:d>0?-d:0;c.left=Math.max(-m.offset.left+f.offset.left+(e&&l.corner.x==="center"?l.offset:0),a-b,Math.min(Math.max(-m.offset.left+f.offset.left+f.width,a+b),c.left))}else{if(g>0&&(i.x!=="left"||d>0))c.left-=b;else if(d>0&&(i.x!=="right"||g>0))c.left-=j?-b:b;if(c.left!==a&&j)c.left-=u.x;if(c.left<h&&-c.left>d)c.left=a}return c.left-a},top:function(a){var q=t.vertical==="shift",h=-m.offset.top+f.offset.top+f.scrollTop,p=i.y==="top"?v:i.y==="bottom"?-v:-v/2,r=n.y==="top"?o:n.y==="bottom"?-o:-o/2,j=l&&l.size?l.size.height||0:0,e=l&&l.corner&&l.corner.precedance==="y"&&!q?j:0,g=h-a+e,d=a+v-f.height-h+e,b=p-(i.precedance==="y"||i.x===i.y?r:0),k=i.y==="center";if(q){e=l&&l.corner&&l.corner.precedance==="x"?j:0;b=(i.y==="top"?1:-1)*p-e;c.top+=g>0?g:d>0?-d:0;c.top=Math.max(-m.offset.top+f.offset.top+(e&&l.corner.x==="center"?l.offset:0),a-b,Math.min(Math.max(-m.offset.top+f.offset.top+f.height,a+b),c.top))}else{if(g>0&&(i.y!=="top"||d>0))c.top-=b;else if(d>0&&(i.y!=="bottom"||g>0))c.top-=k?-b:b;if(c.top!==a&&k)c.top-=u.y;if(c.top<0&&-c.top>d)c.top=a}return c.top-a}},F;if(a.isArray(e)&&e.length===2){n={x:"left",y:"top"};c={left:e[0],top:e[1]}}else if(e==="mouse"&&(j&&j.pageX||z.event.pageX)){n={x:"left",y:"top"};j=(j&&(j.type==="resize"||j.type==="scroll")?z.event:j&&j.pageX&&j.type==="mousemove"?j:k&&k.pageX&&(u.mouse||!j||!j.pageX)?{pageX:k.pageX,pageY:k.pageY}:!u.mouse&&z.origin&&z.origin.pageX?z.origin:j)||j||z.event||k||{};c={top:j.pageY,left:j.pageX}}else{if(e==="event")if(j&&j.target&&j.type!=="scroll"&&j.type!=="resize")e=z.target=a(j.target);else e=z.target;else e=z.target=a(e.nodeType?e:y.target);e=a(e).eq(0);if(e.length===0)return p;else if(e[0]===document||e[0]===h){q=d.iOS?h.innerWidth:e.width();o=d.iOS?h.innerHeight:e.height();if(e[0]===h)c={top:C||d.iOS?(f||e).scrollTop():0,left:C||d.iOS?(f||e).scrollLeft():0}}else if(e.is("area")&&d.imagemap)c=d.imagemap(e,n,t.enabled?B:b);else if(e[0].namespaceURI==="http://www.w3.org/2000/svg"&&d.svg)c=d.svg(e,n);else{q=e.outerWidth();o=e.outerHeight();c=d.offset(e,m)}if(c.offset){q=c.width;o=c.height;A=c.flipoffset;c=c.offset}if(d.iOS<4.1&&d.iOS>3.1||d.iOS==4.3||!d.iOS&&C){F=a(h);c.left-=F.scrollLeft();c.top-=F.scrollTop()}c.left+=n.x==="right"?q:n.x==="center"?q/2:0;c.top+=n.y==="bottom"?o:n.y==="center"?o/2:0}c.left+=u.x+(i.x==="right"?-x:i.x==="center"?-x/2:0);c.top+=u.y+(i.y==="bottom"?-v:i.y==="center"?-v/2:0);if(t.enabled){f={elem:f,height:f[(f[0]===h?"h":"outerH")+"eight"](),width:f[(f[0]===h?"w":"outerW")+"idth"](),scrollLeft:C?0:f.scrollLeft(),scrollTop:C?0:f.scrollTop(),offset:f.offset()||{left:0,top:0}};m={elem:m,scrollLeft:m.scrollLeft(),scrollTop:m.scrollTop(),offset:m.offset()||{left:0,top:0}};c.adjusted={left:t.horizontal!=="none"?t.left(c.left):0,top:t.vertical!=="none"?t.top(c.top):0};c.adjusted.left+c.adjusted.top&&r.attr("class",r[0].className.replace(/ui-tooltip-pos-\w+/i,g+"-pos-"+i.abbrev()));if(A&&c.adjusted.left)c.left+=A.left;if(A&&c.adjusted.top)c.top+=A.top}else c.adjusted={left:0,top:0};E.originalEvent=a.extend({},j);r.trigger(E,[p,c,f.elem||f]);if(E.isDefaultPrevented())return p;delete c.adjusted;if(G===b||isNaN(c.left)||isNaN(c.top)||e==="mouse"||!a.isFunction(s.effect))r.css(c);else if(a.isFunction(s.effect)){s.effect.call(r,p,a.extend({},c));r.queue(function(b){a(this).css({opacity:"",height:""});a.browser.msie&&this.style.removeAttribute("filter");b()})}D=0;return p},redraw:function(){if(p.rendered<1||C)return p;var e=w.position.container,d,c,a,b;C=1;w.style.height&&r.css("height",w.style.height);if(w.style.width)r.css("width",w.style.width);else{r.css("width","").addClass(o);c=r.width()+1;a=r.css("max-width")||"";b=r.css("min-width")||"";d=(a+b).indexOf("%")>-1?e.width()/100:0;a=(a.indexOf("%")>-1?d:1)*parseInt(a,10)||c;b=(b.indexOf("%")>-1?d:1)*parseInt(b,10)||0;c=a+b?Math.min(Math.max(c,b),a):c;r.css("width",Math.round(c)).removeClass(o)}C=0;return p},disable:function(b){if("boolean"!==typeof b)b=!(r.hasClass(i)||z.disabled);if(p.rendered){r.toggleClass(i,b);a.attr(r[0],"aria-disabled",b)}else z.disabled=!!b;return p},enable:function(){return p.disable(b)},destroy:function(){var b=B[0],d=a.attr(b,n),c=B.data("qtip");if(p.rendered){r.remove();a.each(p.plugins,function(){this.destroy&&this.destroy()})}clearTimeout(p.timers.show);clearTimeout(p.timers.hide);L();if(!c||p===c){a.removeData(b,"qtip");if(w.suppress&&d){a.attr(b,"title",d);B.removeAttr(n)}B.removeAttr("aria-describedby")}B.unbind(".qtip-"+E);delete t[p.id];return B}})}function B(t,k){var m,h,l,g,u,i=a(this),s=a(document.body),o=this===document?s:i,r=i.metadata?i.metadata(k.metadata):e,v=k.metadata.type==="html5"&&r?r[k.metadata.name]:e,j=i.data(k.metadata.name||"qtipopts");try{j=typeof j==="string"?new Function("return "+j)():j}catch(w){p("Unable to parse HTML5 attribute data: "+j)}g=a.extend(c,{},f.defaults,k,typeof j==="object"?q(j):e,q(v||r));h=g.position;g.id=t;if("boolean"===typeof g.content.text){l=i.attr(g.content.attr);if(g.content.attr!==b&&l)g.content.text=l;else{p("Unable to locate content for tooltip! Aborting render of tooltip on element: ",i);return b}}if(!h.container.length)h.container=s;if(h.target===b)h.target=o;if(g.show.target===b)g.show.target=o;if(g.show.solo===c)g.show.solo=s;if(g.hide.target===b)g.hide.target=o;if(g.position.viewport===c)g.position.viewport=h.container;h.at=new d.Corner(h.at);h.my=new d.Corner(h.my);if(a.data(this,"qtip"))if(g.overwrite)i.qtip("destroy");else if(g.overwrite===b)return b;g.suppress&&(u=a.attr(this,"title"))&&a(this).removeAttr("title").attr(n,u);m=new C(i,g,t,!!l);a.data(this,"qtip",m);i.bind("remove.qtip-"+t,function(){m.destroy()});return m}f=a.fn.qtip=function(h,g,n){var d=(""+h).toLowerCase(),k=e,m=a.makeArray(arguments).slice(1),i=m[m.length-1],j=this[0]?a.data(this[0],"qtip"):e;if(!arguments.length&&j||d==="api")return j;else if("string"===typeof h){this.each(function(){var e=a.data(this,"qtip");if(!e)return c;if(i&&i.timeStamp)e.cache.event=i;if((d==="option"||d==="options")&&g)if(a.isPlainObject(g)||n!==l)e.set(g,n);else{k=e.get(g);return b}else e[d]&&e[d].apply(e[d],m)});return k!==e?k:this}else if("object"===typeof h||!arguments.length){j=q(a.extend(c,{},h));return f.bind.call(this,j,i)}};f.bind=function(e,g){return this.each(function(q){var i,o,n,m,h,j;j=a.isArray(e.id)?e.id[q]:e.id;j=!j||j===b||j.length<1||t[j]?f.nextid++:(t[j]=j);m=".qtip-"+j+"-create";h=B.call(this,j,e);if(h===b)return c;i=h.options;a.each(d,function(){this.initialize==="initialize"&&this(h)});o={show:i.show.target,hide:i.hide.target};n={show:a.trim(""+i.show.event).replace(/ /g,m+" ")+m,hide:a.trim(""+i.hide.event).replace(/ /g,m+" ")+m};if(/mouse(over|enter)/i.test(n.show)&&!/mouse(out|leave)/i.test(n.hide))n.hide+=" mouseleave"+m;o.show.bind("mousemove"+m,function(a){k={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}});function p(c){function d(){h.render(typeof c==="object"||i.show.ready);o.show.add(o.hide).unbind(m)}if(h.cache.disabled)return b;h.cache.event=a.extend({},c);h.cache.target=c?a(c.target):[l];if(i.show.delay>0){clearTimeout(h.timers.show);h.timers.show=setTimeout(d,i.show.delay);n.show!==n.hide&&o.hide.bind(n.hide,function(){clearTimeout(h.timers.show)})}else d()}o.show.bind(n.show,p);(i.show.ready||i.prerender)&&p(g)})};d=f.plugins={Corner:function(a){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase();this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase();this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();var b=a.charAt(0);this.precedance=b==="t"||b==="b"?"y":"x";this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y};this.abbrev=function(){var a=this.x.substr(0,1),b=this.y.substr(0,1);return a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b};this.clone=function(){return{x:this.x,y:this.y,precedance:this.precedance,string:this.string,abbrev:this.abbrev,clone:this.clone}}},offset:function(i,c){var b=i.offset(),a=c,g=0,f=document.body,e,d;function h(a,c){b.left+=c*a.scrollLeft();b.top+=c*a.scrollTop()}if(a){do{if(a.css("position")!=="static"){e=a[0]===f?{left:parseInt(a.css("left"),10)||0,top:parseInt(a.css("top"),10)||0}:a.position();b.left-=e.left+(parseInt(a.css("borderLeftWidth"),10)||0)+(parseInt(a.css("marginLeft"),10)||0);b.top-=e.top+(parseInt(a.css("borderTopWidth"),10)||0);d=a.css("overflow");if(d==="scroll"||d==="auto")g++}if(a[0]===f)break}while(a=a.offsetParent());c[0]!==f&&g&&h(c,1)}return b},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_","."))||b,fn:{attr:function(f,e){if(this.length){var d=this[0],c="title",b=a.data(d,"qtip");if(f===c&&b&&"object"===typeof b&&b.options.suppress)if(arguments.length<2)return a.attr(d,n);else{b&&b.options.content.attr===c&&b.cache.attr&&b.set("content.text",e);return this.attr(n,e)}}return a.fn["attr"+r].apply(this,arguments)},clone:function(c){var d=a([]),e="title",b=a.fn["clone"+r].apply(this,arguments);!c&&b.filter("["+n+"]").attr("title",function(){return a.attr(this,n)}).removeAttr(n);return b},remove:a.ui?e:function(b,c){if(a.ui)return;a(this).each(function(){if(!c)(!b||a.filter(b,[this]).length)&&a("*",this).add(this).each(function(){a(this).triggerHandler("remove")})})}}};a.each(d.fn,function(b,d){if(!d||a.fn[b+r])return c;var e=a.fn[b+r]=a.fn[b];a.fn[b]=function(){return d.apply(this,arguments)||e.apply(this,arguments)}});f.version="2.0.0pre";f.nextid=0;f.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" ");f.zindex=15000;f.defaults={prerender:b,id:b,overwrite:c,suppress:c,content:{text:c,attr:"title",title:{text:b,button:b}},position:{my:"top left",at:"bottom right",target:b,container:b,viewport:b,adjust:{x:0,y:0,mouse:c,resize:c,method:"flip flip"},effect:function(e,c){a(this).animate(c,{duration:200,queue:b})}},show:{target:b,event:"mouseenter",effect:c,delay:90,solo:b,ready:b,autofocus:b},hide:{target:b,event:"mouseleave",effect:c,delay:0,fixed:b,inactive:b,leave:"window",distance:b},style:{classes:"",widget:b,width:b,height:b,"default":c},events:{render:e,move:e,show:e,hide:e,toggle:e,visible:e,focus:e,blur:e}};function A(f){var e=this,h=f.elements.tooltip,d=f.options.content.ajax,g=".qtip-ajax",i=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,j=c;f.checks.ajax={"^content.ajax":function(c,a,b){if(a==="ajax")d=b;if(a==="once")e.init();else if(d&&d.url)e.load();else h.unbind(g)}};a.extend(e,{init:function(){d&&d.url&&h.unbind(g)[d.once?"one":"bind"]("tooltipshow"+g,e.load);return e},load:function(c,l){var h=d.url.indexOf(" "),g=d.url,j,k=d.once&&!d.loading&&l;if(k)try{c.preventDefault()}catch(p){}else if(c&&c.isDefaultPrevented())return e;if(h>-1){j=g.substr(h);g=g.substr(0,h)}function o(){if(k){f.show(c.originalEvent);l=b}a.isFunction(d.complete)&&d.complete.apply(this,arguments)}function m(b){if(j)b=a("<div/>").append(b.replace(i,"")).find(j);f.set("content.text",b)}function n(c,a,b){if(c.status===0)return;f.set("content.text",a+": "+b)}a.ajax(a.extend({success:m,error:n,context:f},d,{url:g,complete:o}))}});e.init()}d.ajax=function(a){var b=a.plugins.ajax;return"object"===typeof b?b:(a.plugins.ajax=new A(a))};d.ajax.initialize="render";d.ajax.sanitize=function(c){var b=c.content,a;if(b&&"ajax"in b){a=b.ajax;if(typeof a!=="object")a=c.content.ajax={url:a};if("boolean"!==typeof a.once&&a.once)a.once=!!a.once}};a.extend(c,f.defaults,{content:{ajax:{loading:c,once:c}}});function y(d){var e=this,b=d.elements,c=b.tooltip,f=".bgiframe-"+d.id;a.extend(e,{init:function(){b.bgiframe=a('<iframe class="ui-tooltip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';"  style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";"></iframe>');b.bgiframe.appendTo(c);c.bind("tooltipmove"+f,e.adjust)},adjust:function(){var h=d.get("dimensions"),f=d.plugins.tip,g=b.tip,e,a;a=parseInt(c.css("border-left-width"),10)||0;a={left:-a,top:-a};if(f&&g){e=f.corner.precedance==="x"?["width","left"]:["height","top"];a[e[1]]-=g[e[0]]()}b.bgiframe.css(a).css(h)},destroy:function(){b.bgiframe.remove();c.unbind(f)}});e.init()}d.bgiframe=function(c){var d=a.browser,e=c.plugins.bgiframe;return a("select, object").length<1||!(d.msie&&(""+d.version).charAt(0)==="6")?b:"object"===typeof e?e:(c.plugins.bgiframe=new y(c))};d.bgiframe.initialize="render";d.imagemap=function(e,f,k){if(!e.jquery)e=a(e);var m=(e[0].shape||e.attr("shape")).toLowerCase(),i=(e[0].coords||e.attr("coords")).split(","),c=[],g=a('img[usemap="#'+e.parent("map").attr("name")+'"]'),h=g.offset(),b={width:0,height:0,offset:{top:1e10,right:0,bottom:0,left:1e10}},j=0,d=0,n;function l(d,e,a){var j=0,b=1,c=1,h=0,i=0,g=d.width,f=d.height;while(g>0&&f>0&&b>0&&c>0){g=Math.floor(g/2);f=Math.floor(f/2);if(a.x==="left")b=g;else if(a.x==="right")b=d.width-g;else b+=Math.floor(g/2);if(a.y==="top")c=f;else if(a.y==="bottom")c=d.height-f;else c+=Math.floor(f/2);j=e.length;while(j--){if(e.length<2)break;h=e[j][0]-d.offset.left;i=e[j][1]-d.offset.top;(a.x==="left"&&h>=b||a.x==="right"&&h<=b||a.x==="center"&&(h<b||h>d.width-b)||a.y==="top"&&i>=c||a.y==="bottom"&&i<=c||a.y==="center"&&(i<c||i>d.height-c))&&e.splice(j,1)}}return{left:e[0][0],top:e[0][1]}}h.left+=Math.ceil((g.outerWidth()-g.width())/2);h.top+=Math.ceil((g.outerHeight()-g.height())/2);if(m==="poly"){j=i.length;while(j--){d=[parseInt(i[--j],10),parseInt(i[j+1],10)];if(d[0]>b.offset.right)b.offset.right=d[0];if(d[0]<b.offset.left)b.offset.left=d[0];if(d[1]>b.offset.bottom)b.offset.bottom=d[1];if(d[1]<b.offset.top)b.offset.top=d[1];c.push(d)}}else c=a.map(i,function(a){return parseInt(a,10)});switch(m){case"rect":b={width:Math.abs(c[2]-c[0]),height:Math.abs(c[3]-c[1]),offset:{left:Math.min(c[0],c[2]),top:Math.min(c[1],c[3])}};break;case"circle":b={width:c[2]+2,height:c[2]+2,offset:{left:c[0],top:c[1]}};break;case"poly":a.extend(b,{width:Math.abs(b.offset.right-b.offset.left),height:Math.abs(b.offset.bottom-b.offset.top)});if(f.string()==="centercenter")b.offset={left:b.offset.left+b.width/2,top:b.offset.top+b.height/2};else{b.offset=l(b,c.slice(),f);if(k&&(k[0]==="flip"||k[1]==="flip")){b.flipoffset=l(b,c.slice(),{x:f.x==="left"?"right":f.x==="right"?"left":"center",y:f.y==="top"?"bottom":f.y==="bottom"?"top":"center"});b.flipoffset.left-=b.offset.left;b.flipoffset.top-=b.offset.top}}b.width=b.height=0}b.offset.left+=h.left;b.offset.top+=h.top;return b};function z(o){var g=this,p=o.options.show.modal,l=o.elements,f=l.tooltip,r="#qtip-overlay",i=".qtipmodal",k=i+o.id,n="is-modal-qtip",q=a(document.body),e;o.checks.modal={"^show.modal.(on|blur)$":function(){g.init();l.overlay.toggle(f.is(":visible"))}};a.extend(g,{init:function(){if(!p.on)return g;e=g.create();f.attr(n,c).css("z-index",d.modal.zindex+a(j+"["+n+"]").length).unbind(i).unbind(k).bind("tooltipshow"+i+" tooltiphide"+i,function(c,f,d){var b=c.originalEvent;if(b&&c.type==="tooltiphide"&&/mouse(leave|enter)/.test(b.type)&&a(b.relatedTarget).closest(e[0]).length)try{c.preventDefault()}catch(h){}else(!b||b&&!b.solo)&&g[c.type.replace("tooltip","")](c,d)}).bind("tooltipfocus"+i,function(b){if(b.isDefaultPrevented())return;var c=a(j).filter("["+n+"]"),g=d.modal.zindex+c.length,h=parseInt(f[0].style.zIndex,10);e[0].style.zIndex=g-1;c.each(function(){if(this.style.zIndex>h)this.style.zIndex-=1});c.end().filter("."+m).qtip("blur",b.originalEvent);f.addClass(m)[0].style.zIndex=g;try{b.preventDefault()}catch(i){}}).bind("tooltiphide"+i,function(b){a("["+n+"]").filter(":visible").not(f).last().qtip("focus",b)});p.escape&&a(h).unbind(k).bind("keydown"+k,function(a){a.keyCode===27&&f.hasClass(m)&&o.hide(a)});p.blur&&l.overlay.unbind(k).bind("click"+k,function(a){f.hasClass(m)&&o.hide(a)});return g},create:function(){var d=a(r);if(d.length)return l.overlay=d.insertAfter(a(j).last());e=l.overlay=a("<div />",{id:r.substr(1),html:"<div></div>",mousedown:function(){return b}}).insertAfter(a(j).last());function c(){e.css({height:a(h).height(),width:a(h).width()})}a(h).unbind(i).bind("resize"+i,c);c();return e},toggle:function(i,d,l){if(i&&i.isDefaultPrevented())return g;var h=p.effect,r=d?"show":"hide",m=e.is(":visible"),o=a("["+n+"]").filter(":visible").not(f),s;if(!e)e=g.create();if(e.is(":animated")&&m===d||!d&&o.length)return g;if(d){e.css({left:0,top:0});e.toggleClass("blurs",p.blur);q.bind("focusin"+k,function(d){var g=a(d.target),c=g.closest(".qtip"),e=c.length<1?b:parseInt(c[0].style.zIndex,10)>parseInt(f[0].style.zIndex,10);!e&&a(d.target).closest(j)[0]!==f[0]&&f.find("input:visible").filter(":first").focus()})}else q.undelegate("*","focusin"+k);e.stop(c,b);if(a.isFunction(h))h.call(e,d);else if(h===b)e[r]();else e.fadeTo(parseInt(l,10)||90,d?1:0,function(){!d&&a(this).hide()});!d&&e.queue(function(a){e.css({left:"",top:""});a()});return g},show:function(b,a){return g.toggle(b,c,a)},hide:function(c,a){return g.toggle(c,b,a)},destroy:function(){var b=e;if(b){b=a("["+n+"]").not(f).length<1;if(b){l.overlay.remove();a(h).unbind(i)}else l.overlay.unbind(i+o.id);q.undelegate("*","focusin"+k)}return f.removeAttr(n).unbind(i)}});g.init()}d.modal=function(a){var b=a.plugins.modal;return"object"===typeof b?b:(a.plugins.modal=new z(a))};d.modal.initialize="render";d.modal.sanitize=function(a){if(a.show)if(typeof a.show.modal!=="object")a.show.modal={on:!!a.show.modal};else if(typeof a.show.modal.on==="undefined")a.show.modal.on=c};d.modal.zindex=f.zindex+1e3;a.extend(c,f.defaults,{show:{modal:{on:b,effect:c,blur:c,escape:c}}});d.svg=function(j){var i=a(document),e=j[0],b={width:0,height:0,offset:{top:1e10,left:1e10}},f,h,g,c,d;if(e.getBBox&&e.parentNode){f=e.getBBox();h=e.getScreenCTM();g=e.farthestViewportElement||e;if(!g.createSVGPoint)return b;c=g.createSVGPoint();c.x=f.x;c.y=f.y;d=c.matrixTransform(h);b.offset.left=d.x;b.offset.top=d.y;c.x+=f.width;c.y+=f.height;d=c.matrixTransform(h);b.width=d.x-b.offset.left;b.height=d.y-b.offset.top;b.offset.left+=i.scrollLeft();b.offset.top+=i.scrollTop()}return b};function w(f,b,a){var e=Math.ceil(b/2),d=Math.ceil(a/2),c={bottomright:[[0,0],[b,a],[b,0]],bottomleft:[[0,0],[b,0],[0,a]],topright:[[0,a],[b,0],[b,a]],topleft:[[0,0],[0,a],[b,a]],topcenter:[[0,a],[e,0],[b,a]],bottomcenter:[[0,0],[b,0],[e,a]],rightcenter:[[0,0],[b,d],[0,a]],leftcenter:[[b,0],[b,a],[0,d]]};c.lefttop=c.bottomright;c.righttop=c.bottomleft;c.leftbottom=c.topright;c.rightbottom=c.topleft;return c[f.string()]}function D(p){var f=this,j=p.options.style.tip,g=p.elements,k=g.tooltip,n={top:0,left:0},m={width:j.width,height:j.height},i={},h=j.border||0,s=".qtip-tip",r=!!(a("<canvas />")[0]||{}).getContext;f.corner=e;f.mimic=e;f.border=h;f.offset=j.offset;f.size=m;p.checks.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){!f.init()&&f.destroy();p.reposition()},"^style.tip.(height|width)$":function(){m={width:j.width,height:j.height};f.create();f.update();p.reposition()},"^content.title.text|style.(classes|widget)$":function(){g.tip&&f.update()}};function v(t,u,m){if(!g.tip)return;var d=f.corner.clone(),e=m.adjusted,r=p.options.position.adjust.method.split(" "),o=r[0],q=r[1]||r[0],h={left:b,top:b,x:0,y:0},a,k={},i;if(f.corner.fixed!==c){if(o==="shift"&&d.precedance==="x"&&e.left&&d.y!=="center")d.precedance=d.precedance==="x"?"y":"x";else if(o==="flip"&&e.left)d.x=d.x==="center"?e.left>0?"left":"right":d.x==="left"?"right":"left";if(q==="shift"&&d.precedance==="y"&&e.top&&d.x!=="center")d.precedance=d.precedance==="y"?"x":"y";else if(q==="flip"&&e.top)d.y=d.y==="center"?e.top>0?"top":"bottom":d.y==="top"?"bottom":"top";d.string()!==n.corner.string()&&(n.top!==e.top||n.left!==e.left)&&f.update(d,b)}a=f.position(d,e);if(a.right!==l)a.left=-a.right;if(a.bottom!==l)a.top=-a.bottom;a.user=Math.max(0,j.offset);if(h.left=o==="shift"&&!!e.left)if(d.x==="center")k["margin-left"]=h.x=a["margin-left"]-e.left;else{i=a.right!==l?[e.left,-a.left]:[-e.left,a.left];if((h.x=Math.max(i[0],i[1]))>i[0]){m.left-=e.left;h.left=b}k[a.right!==l?"right":"left"]=h.x}if(h.top=q==="shift"&&!!e.top)if(d.y==="center")k["margin-top"]=h.y=a["margin-top"]-e.top;else{i=a.bottom!==l?[e.top,-a.top]:[-e.top,a.top];if((h.y=Math.max(i[0],i[1]))>i[0]){m.top-=e.top;h.top=b}k[a.bottom!==l?"bottom":"top"]=h.y}g.tip.css(k).toggle(!(h.x&&h.y||d.x==="center"&&h.y||d.y==="center"&&h.x));m.left-=a.left.charAt?a.user:o!=="shift"||h.top||!h.left&&!h.top?a.left:0;m.top-=a.top.charAt?a.user:q!=="shift"||h.left||!h.left&&!h.top?a.top:0;n.left=e.left;n.top=e.top;n.corner=d.clone()}function q(c,b,h){b=!b?c[c.precedance]:b;var f=k.hasClass(o),e=g.titlebar&&c.y==="top",i=e?g.titlebar:g.content,d="border-"+b+"-width",a;k.addClass(o);a=parseInt(i.css(d),10);a=(h?a||parseInt(k.css(d),10):a)||0;k.toggleClass(o,f);return a}function u(b){var f=g.titlebar&&b.y==="top",i=f?g.titlebar:g.content,c=a.browser.mozilla,h=c?"-moz-":a.browser.webkit?"-webkit-":"",d=b.y+(c?"":"-")+b.x,e=h+(c?"border-radius-"+d:"border-"+d+"-radius");return parseInt(i.css(e),10)||parseInt(k.css(e),10)||0}function t(k){var d=k.precedance==="y",n=m[d?"width":"height"],e=m[d?"height":"width"],i=k.string().indexOf("center")>-1,o=n*(i?.5:1),b=Math.pow,l=Math.round,j,g,f,c=Math.sqrt(b(o,2)+b(e,2)),a=[h/o*c,h/e*c];a[2]=Math.sqrt(b(a[0],2)-b(h,2));a[3]=Math.sqrt(b(a[1],2)-b(h,2));j=c+a[2]+a[3]+(i?0:a[0]);g=j/c;f=[l(g*e),l(g*n)];return{height:f[d?0:1],width:f[d?1:0]}}a.extend(f,{init:function(){var b=f.detectCorner()&&(r||a.browser.msie);if(b){f.create();f.update();k.unbind(s).bind("tooltipmove"+s,v)}return b},detectCorner:function(){var e=j.corner,a=p.options.position,h=a.at,g=a.my.string?a.my.string():a.my;if(e===b||g===b&&h===b)return b;else if(e===c)f.corner=new d.Corner(g);else if(!e.string){f.corner=new d.Corner(e);f.corner.fixed=c}n.corner=new d.Corner(f.corner.string());return f.corner.string()!=="centercenter"},detectColours:function(x){var z,l,c,b=g.tip.css("cssText",""),h=x||f.corner,r=h[h.precedance],q="border-"+r+"-color",u="border"+r.charAt(0)+r.substr(1)+"Color",e=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,d="background-color",n="transparent",t=" !important",v=a(document.body).css("color"),y=p.elements.content.css("color"),w=g.titlebar&&(h.y==="top"||h.y==="center"&&b.position().top+m.height/2+j.offset<g.titlebar.outerHeight(1)),s=w?g.titlebar:g.content;k.addClass(o);i.fill=l=b.css(d);i.border=c=b[0].style[u]||b.css(q)||k.css(q);if(!l||e.test(l)){i.fill=s.css(d)||n;if(e.test(i.fill))i.fill=k.css(d)||l}if(!c||e.test(c)||c===v){i.border=s.css(q)||n;if(e.test(i.border))i.border=c}a("*",b).add(b).css("cssText",d+":"+n+t+";border:0"+t+";");k.removeClass(o)},create:function(){var d=m.width,c=m.height,b;g.tip&&g.tip.remove();g.tip=a("<div />",{"class":"ui-tooltip-tip"}).css({width:d,height:c}).prependTo(k);if(r)a("<canvas />").appendTo(g.tip)[0].getContext("2d").save();else{b='<vml:shape coordorigin="0,0" style="display:inline-block; position:absolute; behavior:url(#default#VML);"></vml:shape>';g.tip.html(b+b);a("*",g.tip).bind("click mousedown",function(a){a.stopPropagation()})}},update:function(p,C){var B=g.tip,A=B.children(),x=m.width,v=m.height,E="px solid ",D="px dashed transparent",k=j.mimic,y=Math.round,z,l,o,s,u;if(!p)p=n.corner||f.corner;if(k===b)k=p;else{k=new d.Corner(k);k.precedance=p.precedance;if(k.x==="inherit")k.x=p.x;else if(k.y==="inherit")k.y=p.y;else if(k.x===k.y)k[p.precedance]=p[p.precedance]}z=k.precedance;f.detectColours(p);if(i.border!=="transparent"&&i.border!=="#123456"){h=q(p,e,c);if(j.border===0&&h>0)i.fill=i.border;f.border=h=j.border!==c?j.border:h}else f.border=h=0;o=w(k,x,v);f.size=u=t(p);B.css(u);if(p.precedance==="y")s=[y(k.x==="left"?h:k.x==="right"?u.width-x-h:(u.width-x)/2),y(k.y==="top"?u.height-v:0)];else s=[y(k.x==="left"?u.width-x:0),y(k.y==="top"?h:k.y==="bottom"?u.height-v-h:(u.height-v)/2)];if(r){A.attr(u);l=A[0].getContext("2d");l.restore();l.save();l.clearRect(0,0,3e3,3e3);l.translate(s[0],s[1]);l.beginPath();l.moveTo(o[0][0],o[0][1]);l.lineTo(o[1][0],o[1][1]);l.lineTo(o[2][0],o[2][1]);l.closePath();l.fillStyle=i.fill;l.strokeStyle=i.border;l.lineWidth=h*2;l.lineJoin="miter";l.miterLimit=100;h&&l.stroke();l.fill()}else{o="m"+o[0][0]+","+o[0][1]+" l"+o[1][0]+","+o[1][1]+" "+o[2][0]+","+o[2][1]+" xe";s[2]=h&&/^(r|b)/i.test(p.string())?parseFloat(a.browser.version,10)===8?2:1:0;A.css({antialias:""+(k.string().indexOf("center")>-1),left:s[0]-s[2]*Number(z==="x"),top:s[1]-s[2]*Number(z==="y"),width:x+h,height:v+h}).each(function(c){var b=a(this);b[b.prop?"prop":"attr"]({coordsize:x+h+" "+(v+h),path:o,fillcolor:i.fill,filled:!!c,stroked:!!!c}).css({display:h||c?"block":"none"});!c&&b.html()===""&&b.html('<vml:stroke weight="'+h*2+'px" color="'+i.border+'" miterlimit="1000" joinstyle="miter"  style="behavior:url(#default#VML); display:inline-block;" />')})}C!==b&&f.position(p)},position:function(d){var n=g.tip,i={},m=Math.max(0,j.offset),e,k,l;if(j.corner===b||!n)return b;d=d||f.corner;e=d.precedance;k=t(d);l=[d.x,d.y];e==="x"&&l.reverse();a.each(l,function(g,b){var a,f;if(b==="center"){a=e==="y"?"left":"top";i[a]="50%";i["margin-"+a]=-Math.round(k[e==="y"?"width":"height"]/2)+m}else{a=q(d,b,c);f=u(d);i[b]=g?h?q(d,b):0:m+(f>a?f:0)}});i[d[e]]-=k[e==="x"?"width":"height"];n.css({top:"",bottom:"",left:"",right:"",margin:""}).css(i);return i},destroy:function(){g.tip&&g.tip.remove();k.unbind(s)}});f.init()}d.tip=function(a){var b=a.plugins.tip;return"object"===typeof b?b:(a.plugins.tip=new D(a))};d.tip.initialize="render";d.tip.sanitize=function(b){var d=b.style,a;if(d&&"tip"in d){a=b.style.tip;if(typeof a!=="object")b.style.tip={corner:a};if(!/string|boolean/i.test(typeof a.corner))a.corner=c;if(typeof a.width!=="number")delete a.width;if(typeof a.height!=="number")delete a.height;if(typeof a.border!=="number"&&a.border!==c)delete a.border;if(typeof a.offset!=="number")delete a.offset}};a.extend(c,f.defaults,{style:{tip:{corner:c,mimic:b,width:6,height:6,border:c,offset:0}}})})(jQuery,window)
