/*
* qTip2 - Pretty powerful tooltips
* http://craigsworks.com/projects/qtip2/
*
* Version: 2.0.0pre
* Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com
*
* Dual licensed under MIT or GPLv2 licenses
*   http://en.wikipedia.org/wiki/MIT_License
*   http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Fri Jan 21 00:10:48 2011 +0000
*/

"use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
/*global window: false, jQuery: false */

(function(a,O,T){function V(e){var b;if(!e||"object"!==typeof e)return n;if("object"!==typeof e.metadata)e.metadata={type:e.metadata};if("content"in e){if("object"!==typeof e.content||e.content.jquery)e.content={text:e.content};b=e.content.text||n;if(!a.isFunction(b)&&(!b&&!b.attr||b.length<1||"object"===typeof b&&!b.jquery))e.content.text=n;if("title"in e.content){if("object"!==typeof e.content.title)e.content.title={text:e.content.title};b=e.content.title.text||n;if(!a.isFunction(b)&&(!b&&!b.attr||
b.length<1||"object"===typeof b&&!b.jquery))e.content.title.text=n}}if("position"in e)if("object"!==typeof e.position)e.position={my:e.position,at:e.position};if("show"in e)if("object"!==typeof e.show)e.show=e.show.jquery?{target:e.show}:{event:e.show};if("hide"in e)if("object"!==typeof e.hide)e.hide=e.hide.jquery?{target:e.hide}:{event:e.hide};if("style"in e)if("object"!==typeof e.style)e.style={classes:e.style};a.each(a.fn.qtip.plugins,function(){this.sanitize&&this.sanitize(e)});return e}function $(e,
b,m,j){function q(d){var f,i=d.split("."),p=b[i[0]];for(d=1;d<i.length;d+=1){f=p[i[d]];if(typeof f==="object"&&!f.jquery&&!f.precedance)p=p[i[d]];else break}return i[d]!==T?[p,i[d]]:[b,i[0]]}function k(d,f){var i={left:0,top:0},p,r=!a.fn.qtip.plugins.iOS,t,D;if(f){p=a.css(f,"position");if(p!=="static"){i=k(f);i.left*=-1;i.top*=-1}else if(a.css(f,"overflow")!=="visible"){i.left-=f.scrollLeft;i.top-=f.scrollTop}}if(d.offsetParent){do{t=d.offsetParent;D=t===f;if(t===v&&p==="fixed")r=w;i.left+=d.offsetLeft-
(r&&t&&!D?t.scrollLeft:0);i.top+=d.offsetTop-(r&&t&&!D?t.scrollTop:0)}while(d=t)}return i}function s(){return g.css("left")!==aa}function x(){var d=c.elements,f=b.style.widget;g.toggleClass(Z,f);d.content.toggleClass(Z+"-content",f);d.titlebar&&d.titlebar.toggleClass(Z+"-header",f);d.button&&d.button.toggleClass(M+"-icon",!f)}function l(){var d=c.elements;if(d.title){d.titlebar.remove();d.titlebar=d.title=d.button=F;c.reposition()}}function E(){var d=c.elements,f=b.content.title.button;d.button&&
d.button.remove();d.button=f.jquery?f:a("<a />",{"class":"ui-state-default "+(b.style.widget?"":M+"-icon"),title:"Close tooltip","aria-label":"Close tooltip"}).prepend(a("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"}));d.button.appendTo(d.titlebar).attr("role","button").hover(function(i){a(this).toggleClass("ui-state-hover",i.type==="mouseenter")}).click(function(i){g.hasClass(S)||c.hide(i);return n}).bind("mousedown keydown mouseup keyup mouseout",function(i){a(this).toggleClass("ui-state-active ui-state-focus",
i.type.substr(-4)==="down")});c.redraw()}function y(){var d=c.elements,f=B+"-title";d.titlebar&&l();d.titlebar=a("<div />",{"class":M+"-titlebar "+(b.style.widget?"ui-widget-header":"")}).append(d.title=a("<div />",{id:f,"class":M+"-title","aria-atomic":w})).insertBefore(d.content);if(b.content.title.button)E();else c.rendered===w&&c.redraw()}function z(d){var f=c.elements.title;if(!c.rendered||!d)return n;if(a.isFunction(d))d=d.call(e,c)||"";d.jquery&&d.length>0?f.empty().append(d.css({display:"block"})):
f.html(d);c.redraw();c.rendered===w&&c.reposition(c.cache.event)}function N(d){var f=c.elements.content;if(!c.rendered||!d)return n;if(a.isFunction(d))d=d.call(e,c)||"";d.jquery&&d.length>0?f.empty().append(d.css({display:"block"})):f.html(d);g.queue("fx",function(i){function p(t){r=r.not(t);if(r.length===0){c.redraw();c.rendered===w&&c.reposition(c.cache.event);i()}}var r=f.find("img:not([height]):not([width])");r.each(function(t,D){var K=["abort","error","load","unload",""].join(".qtip-image ");
a(this).bind(K,function(){clearTimeout(c.timers.img[t]);p(this)});(function A(){if(D.height)return p(D);c.timers.img[t]=setTimeout(A,20)})();return w});r.length===0&&p(r)});return c}function h(d,f,i,p){function r(u){if(g.hasClass(S))return n;G.show.trigger("qtip-"+m+"-inactive");clearTimeout(c.timers.show);clearTimeout(c.timers.hide);var H=function(){c.show(u)};if(b.show.delay>0)c.timers.show=setTimeout(H,b.show.delay);else H()}function t(u){if(g.hasClass(S))return n;var H=a(u.relatedTarget||u.target),
J=H.parents(W)[0]===g[0];H=H[0]===G.show[0];clearTimeout(c.timers.show);clearTimeout(c.timers.hide);if(C.target==="mouse"&&J||b.hide.fixed&&/mouse(out|leave|move)/.test(u.type)&&(J||H)){u.stopPropagation();u.preventDefault();return n}g.stop(1,1);if(b.hide.delay>0)c.timers.hide=setTimeout(function(){c.hide(u)},b.hide.delay);else c.hide(u)}function D(u){if(g.hasClass(S))return n;clearTimeout(c.timers.inactive);c.timers.inactive=setTimeout(function(){c.hide(u)},b.hide.inactive)}function K(u){if(!c.cache.processing){c.cache.processing=
1;s()&&c.reposition(u);c.cache.processing=0}}var A=".qtip-"+m,C=b.position,G={show:b.show.target,hide:b.hide.target,container:C.container[0]===v?document:C.container},Q={show:String(b.show.event).split(" "),hide:String(b.hide.event).split(" ")},R=a(document),I=a.browser.msie&&parseInt(a.browser.version,10)===6;if(i){if(b.hide.fixed){G.hide=G.hide.add(g);g.bind("mouseover"+A,function(){g.hasClass(S)||clearTimeout(c.timers.hide)})}g.bind("mouseenter"+A+" mouseleave"+A,function(u){c[u.type==="mouseenter"?
"focus":"blur"](u)})}if(f){if("number"===typeof b.hide.inactive){G.show.bind("qtip-"+m+"-inactive",D);a.each(a.fn.qtip.inactiveEvents,function(u,H){G.hide.add(c.elements.tooltip).bind(H+A+"-inactive",D)})}a.each(Q.hide,function(u,H){var J=a.inArray(H,Q.show),L=a(G.hide);if(J>-1&&L.add(G.show).length===L.length||H==="unfocus"){G.show.bind(H+A,function(P){s()?t(P):r(P)});delete Q.show[J]}else G.hide.bind(H+A,t)})}d&&a.each(Q.show,function(u,H){G.show.bind(H+A,r)});if(p){if(C.adjust.resize||C.viewport)a(a.event.special.resize?
C.viewport:O).bind("resize"+A,K);if(C.viewport||I&&g.css("position")==="fixed")a(C.viewport).bind("scroll"+A,K);/unfocus/i.test(b.hide.event)&&R.bind("mousedown"+A,function(u){var H=a(u.target);H.parents(W).length===0&&H.add(e).length>1&&s()&&!g.hasClass(S)&&c.hide(u)});C.target==="mouse"&&R.bind("mousemove"+A,function(u){if(C.adjust.mouse&&!g.hasClass(S)&&s())c.reposition(u||a.fn.qtip.mouse)})}}function o(d,f,i,p){p=parseInt(p,10)!==0;var r=".qtip-"+m;f={show:d?b.show.target:F,hide:f?b.hide.target:
F,tooltip:i?c.elements.tooltip:F,content:i?c.elements.content:F,container:p?b.position.container[0]===v?document:b.position.container:F,window:p?O:F};if(c.rendered)a([]).pushStack(a.grep([f.show,f.hide,f.tooltip,f.container,f.content,f.window],function(){return this!==null})).unbind(r);else d&&f.show.unbind(r+"-create")}var c=this,v=document.body,B=M+"-"+m,g;c.id=m;c.rendered=n;c.elements={target:e};c.timers={img:[]};c.options=b;c.plugins={};c.cache={event:{},target:F,disabled:n,lastFocus:v,attr:j};
a.extend(c,{render:function(d){if(c.rendered)return n;var f=c.elements,i=b.content.text,p=b.content.title.text,r=a.Event("tooltiprender");a.attr(e[0],"aria-describedby",B);g=f.tooltip=a("<div/>").attr({id:B,"class":M+" qtip ui-helper-reset "+b.style.classes,role:"alert","aria-live":"polite","aria-atomic":n,"aria-describedby":B+"-content","aria-hidden":w}).toggleClass(S,c.cache.disabled).data("qtip",c).appendTo(b.position.container).append(f.content=a("<div />",{"class":M+"-content",id:B+"-content",
"aria-atomic":w}));c.rendered=w;if(p){y();z(p)}N(i);x();a.each(a.fn.qtip.plugins,function(){this.initialize==="render"&&this(c)});h(1,1,1,1);a.each(b.events,function(t,D){if(D)g.bind(t==="toggle"?"tooltipshow tooltiphide":"tooltip"+t,D)});g.queue("fx",function(t){r.originalEvent=c.cache.event;g.trigger(r,[c]);if(b.show.ready||d){g.hide();c.show(c.cache.event)}t()});return c},get:function(d){switch(d.toLowerCase()){case "dimensions":d={height:g.outerHeight(),width:g.outerWidth()};break;case "offset":d=
k(g[0],b.position.container[0]);break;default:d=q(d.toLowerCase());d=d[0].precedance?d[0].string():d[0].jquery?d[0]:d[0][d[1]];break}return d},set:function(d,f){d=d.toLowerCase();var i=q(d),p=c.elements,r,t,D,K={builtin:{"^id$":function(){var A=f===w?a.fn.qtip.nextid:f,C=M+"-"+A;if(A!==n&&A.length>0&&!a("#"+C).length){g[0].id=C;p.content[0].id=C+"-content";p.title[0].id=C+"-title"}},"^content.text$":function(){N(f)},"^content.title.text$":function(){if(!f)return l();!c.elements.title&&f&&y();z(f)},
"^content.title.button$":function(){var A=c.elements.button,C=c.elements.title;if(c.rendered)if(f){C||y();E()}else A.remove()},"^position.(my|at)$":function(){var A=/my$/i.test(d)?"my":"at";if("string"===typeof f)b.position[A]=new a.fn.qtip.plugins.Corner(f)},"^position.container$":function(){c.rendered===w&&g.appendTo(f)},"^(show|hide).(event|target|fixed|delay|inactive)$":function(A,C,G,Q){var R=d.search(/fixed/i)>-1?[0,[0,1,1,1]]:[d.substr(0,3),d.charAt(0)==="s"?[1,0,0,0]:[0,1,0,0]];if(R[0])A[C]=
Q;o.apply(c,R[1]);if(R[0])A[C]=G;h.apply(c,R[1])},"^show.ready$":function(){c.rendered===n&&c.show()},"^style.classes$":function(){a.attr(g[0],"class",M+" qtip ui-helper-reset "+f)},"^style.widget|content.title":x,"^events.(render|show|move|hide|focus|blur)$":function(A,C,G){p.tooltip[(a.isFunction(f)?"":"un")+"bind"]("tooltip"+C,G)},"^position.(my|at|adjust|target|container)|style|content":function(){c.reposition()}}};a.each(c.plugins,function(A){if("object"===typeof this.checks)K[A]=this.checks});
r=i[0][i[1]];i[0][i[1]]=f.nodeType?a(f):f;V(b);for(t in K)for(D in K[t])RegExp(D,"i").test(d)&&K[t][D].call(c,i[0],i[1],f,r);return c},toggle:function(d,f){function i(){if(d)a.browser.msie&&g[0].style.removeAttribute("filter");else g.css({display:"",visibility:"hidden",width:"",opacity:"",left:"",top:""})}if(c.rendered===n)return n;var p=d?"show":"hide",r=b[p],t=s();if((typeof d).search("boolean|number"))d=!t;if(!t&&!d||g.is(":animated"))return c;if(f){if(/over|enter/.test(f.type)&&/out|leave/.test(c.cache.event.type)&&
f.target===b.show.target[0]&&g.has(f.relatedTarget).length)return c;c.cache.event=a.extend({},f)}t=a.Event("tooltip"+p);t.originalEvent=f?c.cache.event:F;g.trigger(t,[c,90]);if(t.isDefaultPrevented())return c;a.attr(g[0],"aria-hidden",!!!d);if(d){g.hide().css({visibility:""});c.focus(f);c.reposition(f,0);r.solo&&a(W).not(g).qtip("hide")}else{clearTimeout(c.timers.show);c.blur(f)}g.stop(1,1);if(a.isFunction(r.effect)){r.effect.call(g,c);g.queue("fx",function(D){i.call(this,D);D()})}else if(r.effect===
n){g[p]();i.call(g)}else g.fadeTo(90,d?1:0,i);d&&r.target.trigger("qtip-"+m+"-inactive");return a.fn.qtip.lastShown=c},show:function(d){c.toggle(w,d)},hide:function(d){c.toggle(n,d)},focus:function(d){if(c.rendered===n)return n;var f=a(W),i=parseInt(g[0].style.zIndex,10),p=a.fn.qtip.zindex+f.length;d=a.extend({},d);if(!g.hasClass(X)){if(i!==p){f.each(function(){if(this.style.zIndex>i)this.style.zIndex-=1});f.filter("."+X).qtip("blur",d)}c.cache.lastFocus=document.activeElement;f=a.Event("tooltipfocus");
f.originalEvent=d;g.trigger(f,[c,p]);if(!f.isDefaultPrevented())g.addClass(X)[0].style.zIndex=p}return c},blur:function(d){d=a.extend({},d);var f;g.removeClass(X);f=a.Event("tooltipblur");f.originalEvent=d;g.trigger(f,[c])},reposition:function(d,f){if(c.rendered===n)return n;var i=b.position.target,p=b.position,r=p.my,t=p.at,D=p.adjust,K=g.outerWidth(),A=g.outerHeight(),C=0,G=0,Q=a.Event("tooltipmove"),R=g.css("position")==="fixed",I=p.viewport.jquery?p.viewport:a(O),u={left:0,top:0},H={left:function(J){var L=
I.scrollLeft,P=t.x==="left"?C:t.x==="right"?-C:-C/2,U=L-J;L=J+K-I.width-L;P=(r.x==="left"?K:r.x==="right"?-K:-K/2)-(r.precedance==="x"||r.x===r.y?P:0);if(U>0&&(r.x!=="left"||L>0))u.left-=P;else if(L>0&&(r.x!=="right"||U>0))u.left-=(r.x==="center"?-1:1)*P+2*D.x;if(u.left<0&&-u.left>L)u.left=J;return u.left-J},top:function(J){var L=I.scrollTop,P=t.y==="top"?G:t.y==="bottom"?-G:-G/2,U=L-J;L=J+A-I.height-L;P=(r.y==="top"?A:r.y==="bottom"?-A:-A/2)-(r.precedance==="y"||r.x===r.y?P:0);if(U>0&&(r.y!=="top"||
L>0))u.top-=P;else if(L>0&&(r.y!=="bottom"||U>0))u.top-=(r.y==="center"?-1:1)*P+2*D.y;if(u.top<0&&-u.top>L)u.top=J;return u.top-J}};f=f===T||!!f||n;I=!I?n:{elem:I,height:I[(I[0]===O?"h":"outerH")+"eight"](),width:I[(I[0]===O?"w":"outerW")+"idth"](),scrollLeft:I.scrollLeft(),scrollTop:I.scrollTop()};if(i==="mouse"){t={x:"left",y:"top"};d=d&&(d.type==="resize"||d.type==="scroll")?c.cache.event:D.mouse||!d||!d.pageX?a.extend({},a.fn.qtip.mouse):d;u={top:d.pageY,left:d.pageX}}else{if(i==="event")i=d&&
d.target&&d.type!=="scroll"&&d.type!=="resize"?c.cache.target=a(d.target):c.cache.target;i=a(i).eq(0);if(i.length===0)return c;else if(i[0]===document||i[0]===O){C=i.width();G=i.height();if(i[0]===O)u={top:R?0:I.scrollTop,left:R?0:I.scrollLeft}}else if(i.is("area")&&a.fn.qtip.plugins.imagemap){u=a.fn.qtip.plugins.imagemap(i,t);C=u.width;G=u.height;u=u.offset}else{C=i.outerWidth();G=i.outerHeight();u=k(i[0],p.container[0])}u.left+=t.x==="right"?C:t.x==="center"?C/2:0;u.top+=t.y==="bottom"?G:t.y===
"center"?G/2:0}u.left+=D.x+(r.x==="right"?-K:r.x==="center"?-K/2:0);u.top+=D.y+(r.y==="bottom"?-A:r.y==="center"?-A/2:0);u.adjusted=p.viewport.jquery&&i[0]!==O&&i[0]!==v?{left:H.left(u.left),top:H.top(u.top)}:{left:0,top:0};g.attr("class",function(){return a.attr(this,"class").replace(/ui-tooltip-pos-\w+/i,"")}).addClass(M+"-pos-"+r.abbreviation());Q.originalEvent=a.extend({},d);g.trigger(Q,[c,u,I.elem]);if(Q.isDefaultPrevented())return c;delete u.adjusted;if(!f||!isNaN(u.left,u.top))g.css(u);else if(s()&&
a.isFunction(p.effect)){p.effect.call(g,c,u);g.queue(function(J){a(this).css({opacity:"",height:""});a.browser.msie&&this.style&&this.style.removeAttribute("filter");J()})}return c},redraw:function(){if(!c.rendered||!(a.browser.msie&&a.browser.version<8))return n;var d=M+"-fluid",f;g.css({width:"auto",height:"auto"}).addClass(d);f={height:g.outerHeight(),width:g.outerWidth()};a.each(["width","height"],function(i,p){var r=parseInt(g.css("max-"+p),10)||0,t=parseInt(g.css("min-"+p),10)||0;f[p]=r+t?Math.min(Math.max(f[p],
t),r):f[p]});g.css(f).removeClass(d)},disable:function(d){var f=S;if("boolean"!==typeof d)d=!(g.hasClass(f)||c.cache.disabled);if(c.rendered){g.toggleClass(f,d);a.attr(g[0],"aria-disabled",d)}else c.cache.disabled=!!d;return c},destroy:function(){var d=e[0],f=a.data(d,f);if(c.rendered){g.remove();a.each(c.plugins,function(){this.initialize==="render"&&this.destroy()})}clearTimeout(c.timers.show);clearTimeout(c.timers.hide);o(1,1,1,1);a.removeData(d,"qtip");f&&a.attr(d,"title",f);e.removeAttr("aria-describedby");
return e}})}function ba(e,b){var m,j,q,k=a(this),s=a(document.body),x=this===document?s:k;j=k.metadata?k.metadata(b.metadata):F;var l=b.metadata.type==="html5"&&j?j[b.metadata.name]:F,E=k.data(b.metadata.name||"qtipopts");l=a.extend(w,{},a.fn.qtip.defaults,b,V(E),V(l||j));j&&a.removeData(this,"metadata");j=l.position;if("boolean"===typeof l.content.text){q=k.attr(l.content.attr);if(l.content.attr!==n&&q)l.content.text=q;else return n}if(j.container===n)j.container=s;if(j.target===n)j.target=x;if(l.show.target===
n)l.show.target=x;if(l.hide.target===n)l.hide.target=x;if(l.position.viewport===w)l.position.viewport=j.container;j.at=new a.fn.qtip.plugins.Corner(j.at);j.my=new a.fn.qtip.plugins.Corner(j.my);if(a.data(this,"qtip"))if(l.overwrite)k.qtip("destroy");else if(l.overwrite===n)return n;if(a.attr(this,"title")){a.data(this,Y,a.attr(this,"title"));k.removeAttr("title")}m=new $(k,l,e,!!q);a.data(this,"qtip",m);k.bind("remove.qtip",function(){m.destroy()});return m}function ca(e){var b=this,m=e.elements.tooltip,
j=e.options.content.ajax;b.checks={"^content.ajax":function(q,k){if(k==="once")b.once();else j&&j.url&&b.load()}};a.extend(b,{init:function(){if(j&&j.url){b.load();m.one("tooltipshow",b.once)}},once:function(){j.once?b.destroy():m.bind("tooltipshow.qtip-ajax",b.load)},load:function(){a.ajax(a.extend({success:function(q){e.set("content.text",q)},error:function(q,k,s){e.set("content.text",k+": "+s)},context:e},j));return b},destroy:function(){m.unbind(".qtip-ajax")}});b.init()}function da(e,b,m){var j=
Math.ceil(b/2),q=Math.ceil(m/2);b={bottomright:[[0,0],[b,m],[b,0]],bottomleft:[[0,0],[b,0],[0,m]],topright:[[0,m],[b,0],[b,m]],topleft:[[0,0],[0,m],[b,m]],topcenter:[[0,m],[j,0],[b,m]],bottomcenter:[[0,0],[b,0],[j,m]],rightcenter:[[0,0],[b,q],[0,m]],leftcenter:[[b,0],[b,m],[0,q]]};b.lefttop=b.bottomright;b.righttop=b.bottomleft;b.leftbottom=b.topright;b.rightbottom=b.topleft;return b[e.string()]}function ea(e){function b(h,o,c){if(s.tip){h=a.extend({},q.corner);o=c.adjusted;var v;if(q.corner.fixed!==
w){if(o.left)h.x=h.x==="center"?o.left>0?"left":"right":h.x==="left"?"right":"left";if(o.top)h.y=h.y==="center"?o.top>0?"top":"bottom":h.y==="top"?"bottom":"top";if(h.string()!==l.corner&&(l.top!==o.top||l.left!==o.left))v=q.update(h)}v||(v=q.position(h,0));if(v.right!==T)v.left=v.right;if(v.bottom!==T)v.top=v.bottom;v.option=Math.max(0,k.offset);c.left-=v.left.charAt?v.option:(v.right?-1:1)*v.left;c.top-=v.top.charAt?v.option:(v.bottom?-1:1)*v.top;l.left=o.left;l.top=o.top;l.corner=h.string()}}function m(h,
o,c){o=!o?h[h.precedance]:o;o="border-"+o+"-width";h=parseInt((s.titlebar&&h.y==="top"?s.titlebar:s.content).css(o),10);return(c?h||parseInt(x.css(o),10):h)||0}function j(h){var o=h.precedance==="y",c=E[o?"width":"height"],v=E[o?"height":"width"],B=h.string().indexOf("center")>-1,g=c*(B?0.5:1),d=Math.pow;h=Math.round;var f=Math.sqrt(d(g,2)+d(v,2));g=[z/g*f,z/v*f];g[2]=Math.sqrt(d(g[0],2)-d(z,2));g[3]=Math.sqrt(d(g[1],2)-d(z,2));B=(f+g[2]+g[3]+(B?0:g[0]))/f;c=[h(B*v),h(B*c)];return{height:c[o?0:1],
width:c[o?1:0]}}var q=this,k=e.options.style.tip,s=e.elements,x=s.tooltip,l={top:0,left:0,corner:""},E={width:k.width,height:k.height},y={},z=k.border||0,N=a("<canvas />")[0].getContext;q.corner=F;q.mimic=F;q.checks={"^position.my|style.tip.(corner|mimic|border)$":function(){q.init()||q.destroy();e.reposition()},"^style.tip.(height|width)$":function(){E={width:k.width,height:k.height};q.create();q.update();e.reposition()},"^content.title.text|style.(classes|widget)$":function(){s.tip&&q.update()}};
a.extend(q,{init:function(){var h=q.detectCorner()&&(N||a.browser.msie);if(h){q.create();q.update();x.unbind(".qtip-tip").bind("tooltipmove.qtip-tip",b)}return h},detectCorner:function(){var h=k.corner,o=e.options.position,c=o.at;o=o.my.string?o.my.string():o.my;if(h===n||o===n&&c===n)return n;else if(h===w)q.corner=new a.fn.qtip.plugins.Corner(o);else if(!h.string){q.corner=new a.fn.qtip.plugins.Corner(h);q.corner.fixed=w}return q.corner.string()!=="centercenter"},detectColours:function(){var h=
s.tip.css({backgroundColor:"",border:""}),o=q.corner,c=o[o.precedance],v="border-"+c+"-color";c="border"+c.charAt(0)+c.substr(1)+"Color";var B=/rgba?\(0, 0, 0(, 0)?\)|transparent/i;o=s.titlebar&&(o.y==="top"||o.y==="center"&&h.position().top+E.height/2+k.offset<s.titlebar.outerHeight(1))?s.titlebar:s.content;y.fill=h.css("background-color")||"transparent";y.border=h[0].style[c];if(!y.fill||B.test(y.fill)){y.fill=o.css("background-color");if(B.test(y.fill))y.fill=x.css("background-color")}if(!y.border||
B.test(y.border)){y.border=x.css(v);if(B.test(y.border)||y.border===a(document.body).css("color"))y.border=o.css(v)!==a(e.elements.content).css("color")?o.css(v):"transparent"}a("*",h).add(h).css("background-color","transparent").css("border","0px dashed transparent")},create:function(){var h=E.width,o=E.height;s.tip&&s.tip.remove();s.tip=a("<div />",{"class":"ui-tooltip-tip"}).css({width:h,height:o}).prependTo(x);if(N)a("<canvas />").appendTo(s.tip)[0].getContext("2d").save();else{h='<vml:shape coordorigin="0,0" style="display:block; position:absolute; behavior:url(#default#VML);"></vml:shape>';
s.tip.html(z?h+=h:h)}},update:function(h){var o=s.tip,c=o.children(),v=E.width,B=E.height,g=k.mimic,d=Math.round,f,i,p;if(!h)h=q.corner;if(g===n)g=h;else{g=new a.fn.qtip.plugins.Corner(g);g.precedance=h.precedance;if(g.x==="inherit")g.x=h.x;else if(g.y==="inherit")g.y=h.y;else if(g.x===g.y)g[h.precedance]=h[h.precedance]}f=g.precedance;q.detectColours();z=y.border==="transparent"||y.border==="#123456"?0:k.border===w?m(h,F,w):k.border;i=da(g,v,B);p=j(h);o.css(p);o=h.precedance==="y"?[d(g.x==="left"?
z:g.x==="right"?p.width-v-z:(p.width-v)/2),d(g.y==="top"?p.height-B:0)]:[d(g.x==="left"?p.width-v:0),d(g.y==="top"?z:g.y==="bottom"?p.height-B-z:(p.height-B)/2)];if(N){c.attr(p);c=c[0].getContext("2d");c.restore();c.save();c.clearRect(0,0,3E3,3E3);c.translate(o[0],o[1]);c.beginPath();c.moveTo(i[0][0],i[0][1]);c.lineTo(i[1][0],i[1][1]);c.lineTo(i[2][0],i[2][1]);c.closePath();c.fillStyle=y.fill;c.strokeStyle=y.border;c.lineWidth=z*2;c.lineJoin="miter";c.miterLimit=100;c.stroke();c.fill()}else{i="m"+
i[0][0]+","+i[0][1]+" l"+i[1][0]+","+i[1][1]+" "+i[2][0]+","+i[2][1]+" xe";o[2]=z&&/^(r|b)/i.test(h.string())?1:0;c.css({antialias:""+(g.string().indexOf("center")>-1),left:o[0]-o[2]*Number(f==="x"),top:o[1]-o[2]*Number(f==="y"),width:v+z,height:B+z}).each(function(r){var t=a(this);t.attr({coordsize:v+z+" "+(B+z),path:i,fillcolor:y.fill,filled:!!r,stroked:!!!r}).css({display:z||r?"block":"none"});!r&&z>0&&t.html()===""&&t.html('<vml:stroke weight="'+z*2+'px" color="'+y.border+'" miterlimit="1000" joinstyle="miter"  style="behavior:url(#default#VML); display:block;" />')})}return q.position(h,
1)},position:function(h,o){var c=s.tip,v={},B=Math.max(0,k.offset),g,d,f;if(k.corner===n||!c)return n;h=h||q.corner;g=h.precedance;d=j(h);f=a.browser.msie&&z&&/^(b|r)/i.test(h.string())?1:0;a.each(g==="y"?[h.x,h.y]:[h.y,h.x],function(i,p){var r,t;if(p==="center"){r=g==="y"?"left":"top";v[r]="50%";v["margin-"+r]=-Math.round(d[g==="y"?"width":"height"]/2)+B}else{r=m(h,p,w);t=a.browser.mozilla;var D=h.y+(t?"":"-")+h.x;t=(t?"-moz-":a.browser.webkit?"-webkit-":"")+(t?"border-radius-"+D:"border-"+D+"-radius");
t=parseInt((s.titlebar&&h.y==="top"?s.titlebar:s.content).css(t),10)||parseInt(x.css(t),10)||0;v[p]=i||!z?m(h,p):B+(t>r?t:0)}});v[h[g]]-=d[g==="x"?"width":"height"]+f;o&&c.css({top:"",bottom:"",left:"",right:"",margin:""}).css(v);return v},destroy:function(){s.tip&&s.tip.remove();x.unbind(".qtip-tip")}});q.init()}function fa(e){var b=this,m=e.options.show.modal,j=e.elements,q=j.tooltip;b.checks={"^show.modal.(on|blur)$":function(){b.init();j.overlay.toggle(q.is(":visible"))}};a.extend(b,{init:function(){if(m.on){q.unbind(".qtipmodal").bind("tooltipshow.qtipmodal tooltiphide.qtipmodal",
function(k,s,x){k=k.type.replace("tooltip","");a.isFunction(m[k])?m[k].call(j.overlay,x,s):b[k](x)});b.create();m.blur===w&&j.overlay.unbind(".qtipmodal"+e.id).bind("click.qtipmodal"+e.id,function(){e.hide.call(e)})}},create:function(){var k=a("#qtip-overlay");if(k.length)j.overlay=k;else{j.overlay=a("<div />",{id:"#qtip-overlay".substr(1),css:{position:"absolute",top:0,left:0,display:"none",zIndex:parseInt(q.css("z-index"),10)-1}}).appendTo(document.body);a(O).bind("resize.qtipmodal",function(){j.overlay.css({height:Math.max(a(O).height(),
a(document).height()),width:Math.max(a(O).width(),a(document).width())})}).trigger("resize")}},toggle:function(k){var s=j.overlay,x=e.options.show.modal.effect,l=k?"show":"hide";s.stop(w,n);if(a.isFunction(x))x.call(s,k);else x===n?s[l]():s.fadeTo(90,k?0.7:0,function(){k||a(this).hide()})},show:function(){b.toggle(w)},hide:function(){b.toggle(n)},destroy:function(){var k=w;a("*").each(function(){var s=a(this).data("qtip");if(s&&s.id!==e.id&&s.options.show.modal)return k=n});if(k){j.overlay.remove();
a(O).unbind(".qtipmodal")}else j.overlay.unbind(".qtipmodal"+e.id);q.unbind("tooltipshow.qtipmodal tooltiphide.qtipmodal")}});b.init()}function ga(e){var b=this,m=e.elements,j=m.tooltip,q=".bgiframe-"+e.id,k="tooltipmove"+q+" tooltipshow"+q;a.extend(b,{init:function(){m.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);"></iframe>');m.bgiframe.appendTo(j);j.bind(k,b.adjust)},
adjust:function(){var s=e.get("dimensions"),x=e.plugins.tip,l=e.elements.tip,E;E=parseInt(j.css("border-left-width"),10)||0;E={left:-E,top:-E};if(x&&l){x=x.corner.precedance==="x"?["width","left"]:["height","top"];E[x[1]]-=l[x[0]]()}m.bgiframe.css(E).css(s)},destroy:function(){b.iframe.remove();j.unbind(k)}});b.init()}var w=true,n=false,F=null,M="ui-tooltip",Z="ui-widget",S="ui-state-disabled",W="div.qtip."+M,X=M+"-focus",aa="-31000px",Y="oldtitle";a.fn.qtip=function(e,b,m){var j=String(e).toLowerCase(),
q=F,k=j==="disable"?[w]:a.makeArray(arguments).slice(1,10),s=k[k.length-1],x=this[0]?a.data(this[0],"qtip"):F;if(!arguments.length&&x||j==="api")return x;else if("string"===typeof e){this.each(function(){var l=a.data(this,"qtip");if(!l)return w;if(/option|set/.test(j)&&b)if(m!==T)l.set(b,m);else q=l.get(b);else{if(!l.rendered&&(j==="show"||j==="toggle")){if(s&&s.timeStamp)l.cache.event=s;l.render(1)}else if(j==="enable"){j="disable";k=[n]}l[j]&&l[j].apply(l[j],k)}});return q!==F?q:this}else if("object"===
typeof e||!arguments.length){x=V(a.extend(w,{},e));return a.fn.qtip.bind.call(this,x,s)}};a.fn.qtip.bind=function(e,b){return this.each(function(){function m(E){function y(){l.render(typeof E==="object"||j.show.ready);q.show.unbind(k.show);q.hide.unbind(k.hide)}if(l.cache.disabled)return n;l.cache.event=a.extend({},E);if(j.show.delay>0){clearTimeout(l.timers.show);l.timers.show=setTimeout(y,j.show.delay);k.show!==k.hide&&q.hide.bind(k.hide,function(){clearTimeout(l.timers.show)})}else y()}var j,q,
k,s=e.id=!e.id||e.id===n||e.id.length<1||a("#"+M+"-"+e.id).length?a.fn.qtip.nextid++:e.id,x=".qtip-"+s+"-create",l=ba.call(this,s,e);if(l===n)return w;j=l.options;a.each(a.fn.qtip.plugins,function(){this.initialize==="initialize"&&this(l)});q={show:j.show.target,hide:j.hide.target};k={show:String(j.show.event).replace(" ",x+" ")+x,hide:String(j.hide.event).replace(" ",x+" ")+x};q.show.bind(k.show,m);if(j.show.ready||j.prerender)m(b)})};a.each({attr:function(e,b){if(this.length){var m=this[0],j=a.data(m,
"qtip");if(e==="title")if(arguments.length<2)return a.data(m,Y);else if(typeof j==="object"){j&&j.rendered&&j.options.content.attr==="title"&&j.cache.attr&&j.set("content.text",b);a.fn.attr_replacedByqTip.apply(this,arguments);a.data(m,Y,a.attr(m,"title"));return this.removeAttr("title")}}},clone:function(){var e=a([]),b;a("*",this).add(this).each(function(){var m=a.data(this,Y);if(m){a.attr(this,"title",m);e=e.add(this)}});b=a.fn.clone_replacedByqTip.apply(this,arguments);e.removeAttr("title");return b},
remove:a.ui?F:function(e,b){a(this).each(function(){if(!b)if(!e||a.filter(e,[this]).length)a("*",this).add(this).each(function(){a(this).triggerHandler("remove")})})}},function(e,b){if(!b)return w;var m=a.fn[e+"_replacedByqTip"]=a.fn[e];a.fn[e]=function(){return b.apply(this,arguments)||m.apply(this,arguments)}});a(O).load(function(){var e=document,b=e.body;a(e).bind("mousemove.qtip",function(m){a.fn.qtip.mouse={pageX:m.pageX,pageY:m.pageY}});e.activeElement===T&&e.addEventListener("focus",function(m){if(m&&
m.target)e.activeElement=m.target===e?b:m.target},true)});a.fn.qtip.version="2.0.0pre";a.fn.qtip.nextid=0;a.fn.qtip.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" ");a.fn.qtip.zindex=15E3;a.fn.qtip.plugins={Corner:function(e){e=String(e).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase();this.x=(e.match(/left|right/i)||e.match(/center/)||["inherit"])[0].toLowerCase();this.y=(e.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();this.precedance=
e.charAt(0).search(/^(t|b)/)>-1?"y":"x";this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y};this.abbreviation=function(){var b=this.x.substr(0,1),m=this.y.substr(0,1);return b===m?b:b==="c"||b!=="c"&&m!=="c"?m+b:b+m}},iOS:parseFloat((/CPU.+OS ([0-9_]{3}).*AppleWebkit.*Mobile/i.exec(navigator.userAgent)||[0,"4_2"])[1].replace("_","."))<4.1};a.fn.qtip.defaults={prerender:n,id:n,overwrite:w,content:{text:w,attr:"title",title:{text:n,button:n}},position:{my:"top left",at:"bottom right",
target:n,container:n,viewport:n,adjust:{x:0,y:0,mouse:w,resize:w},effect:w},show:{target:n,event:"mouseenter",effect:w,delay:90,solo:n,ready:n},hide:{target:n,event:"mouseleave",effect:w,delay:0,fixed:n,inactive:n},style:{classes:"",widget:n},events:{render:F,move:F,show:F,hide:F,toggle:F,focus:F,blur:F}};a.fn.qtip.plugins.ajax=function(e){var b=e.plugins.ajax;return"object"===typeof b?b:e.plugins.ajax=new ca(e)};a.fn.qtip.plugins.ajax.initialize="render";a.fn.qtip.plugins.ajax.sanitize=function(e){var b=
e.content;if(b&&"ajax"in b){b=b.ajax;if(typeof b!=="object")b=e.content.ajax={url:b};if("boolean"!==typeof b.once&&b.once)b.once=!!b.once}};a.extend(w,a.fn.qtip.defaults,{content:{ajax:{once:w}}});a.fn.qtip.plugins.tip=function(e){var b=e.plugins.tip;return"object"===typeof b?b:e.plugins.tip=new ea(e)};a.fn.qtip.plugins.tip.initialize="render";a.fn.qtip.plugins.tip.sanitize=function(e){var b=e.style;if(b&&"tip"in b){b=e.style.tip;if(typeof b!=="object")e.style.tip={corner:b};if(!/string|boolean/i.test(typeof b.corner))b.corner=
w;typeof b.width!=="number"&&delete b.width;typeof b.height!=="number"&&delete b.height;typeof b.border!=="number"&&b.border!==w&&delete b.border;typeof b.offset!=="number"&&delete b.offset}};a.extend(w,a.fn.qtip.defaults,{style:{tip:{corner:w,mimic:n,width:8,height:8,border:w,offset:0}}});a.fn.qtip.plugins.imagemap=function(e,b){function m(z,N){for(var h=0,o=1,c=1,v=0,B=0,g=z.width,d=z.height;g>0&&d>0&&o>0&&c>0;){g=Math.floor(g/2);d=Math.floor(d/2);if(b.x==="left")o=g;else if(b.x==="right")o=z.width-
g;else o+=Math.floor(g/2);if(b.y==="top")c=d;else if(b.y==="bottom")c=z.height-d;else c+=Math.floor(d/2);for(h=N.length;h--;){if(N.length<2)break;v=N[h][0]-z.offset.left;B=N[h][1]-z.offset.top;if(b.x==="left"&&v>=o||b.x==="right"&&v<=o||b.x==="center"&&(v<o||v>z.width-o)||b.y==="top"&&B>=c||b.y==="bottom"&&B<=c||b.y==="center"&&(B<c||B>z.height-c))N.splice(h,1)}}return{left:N[0][0],top:N[0][1]}}var j=e.attr("shape").toLowerCase(),q=e.attr("coords").split(","),k=[],s=a('img[usemap="#'+e.parent("map").attr("name")+
'"]'),x=s.offset(),l={width:0,height:0,offset:{top:1E10,right:0,bottom:0,left:1E10}},E=0,y=0;x.left+=Math.ceil((s.outerWidth()-s.width())/2);x.top+=Math.ceil((s.outerHeight()-s.height())/2);if(j==="poly")for(E=q.length;E--;){y=[parseInt(q[--E],10),parseInt(q[E+1],10)];if(y[0]>l.offset.right)l.offset.right=y[0];if(y[0]<l.offset.left)l.offset.left=y[0];if(y[1]>l.offset.bottom)l.offset.bottom=y[1];if(y[1]<l.offset.top)l.offset.top=y[1];k.push(y)}else k=a.map(q,function(z){return parseInt(z,10)});switch(j){case "rect":l=
{width:Math.abs(k[2]-k[0]),height:Math.abs(k[3]-k[1]),offset:{left:k[0],top:k[1]}};break;case "circle":l={width:k[2]+2,height:k[2]+2,offset:{left:k[0],top:k[1]}};break;case "poly":a.extend(l,{width:Math.abs(l.offset.right-l.offset.left),height:Math.abs(l.offset.bottom-l.offset.top)});l.offset=b.string()==="centercenter"?{left:l.offset.left+l.width/2,top:l.offset.top+l.height/2}:m(l,k.slice());l.width=l.height=0;break}l.offset.left+=x.left;l.offset.top+=x.top;return l};a.fn.qtip.plugins.modal=function(e){var b=
e.plugins.modal;return"object"===typeof b?b:e.plugins.modal=new fa(e)};a.fn.qtip.plugins.modal.initialize="render";a.fn.qtip.plugins.modal.sanitize=function(e){if(e.show)if(typeof e.show.modal!=="object")e.show.modal={on:!!e.show.modal};else if(typeof e.show.modal.on==="undefined")e.show.modal.on=w};a.extend(w,a.fn.qtip.defaults,{show:{modal:{on:n,effect:w,blur:w}}});a.fn.qtip.plugins.bgiframe=function(e){if(!(a.browser.msie&&/^6\.[0-9]/.test(a.browser.version)&&a("select, object").length))return n;
var b=e.plugins.bgiframe;if(b)return b;else{e.plugins.bgiframe=new ga(e);return e.plugins.bgiframe}};a.fn.qtip.plugins.bgiframe.initialize="render"})(jQuery,window);

