/*
* qTip - The jQuery tooltip plugin
* http://craigsworks.com/projects/qtip/
*
* Version: 2.0.0pre
* Copyright 2009 Craig Michael Thompson - http://craigsworks.com
*
* Dual licensed under MIT or GPL Version 2 licenses
*   http://en.wikipedia.org/wiki/MIT_License
*   http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Tue Nov 30 19:40:56 2010 +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 */

var TRUE=true,FALSE=false,NULL=null;
(function(a,F,K){function L(c,d){var h,i=a();if(!c)return FALSE;try{if("metadata"in c&&"object"!==typeof c.metadata)c.metadata={type:c.metadata};if("content"in c){if("object"!==typeof c.content||c.content.jquery)c.content={text:c.content};h=c.content.text||FALSE;if(!a.isFunction(h)&&(!h&&!h.attr||h.length<1||"object"===typeof h&&!h.jquery))h=c.content.text=FALSE;if("title"in c.content&&"object"!==typeof c.content.title)c.content.title={text:c.content.title}}if("position"in c){if("object"!==typeof c.position)c.position=
{my:c.position,at:c.position};if("object"!==typeof c.position.adjust)c.position.adjust={};if("undefined"!==typeof c.position.adjust.screen)c.position.adjust.screen=!!c.position.adjust.screen}if("show"in c){if("object"!==typeof c.show)c.show={event:c.show};if("object"!==typeof c.show)c.show=c.show.jquery?{target:c.show}:{event:c.show}}if("hide"in c)if("object"!==typeof c.hide)c.hide=c.hide.jquery?{target:c.hide}:{event:c.hide};if("style"in c&&"object"!==typeof c.style)c.style={classes:c.style}}catch(o){}if(a.isFunction(h)){c.content.text=
[];d.each(function(){var l=h.call(this);if(l){c.content.text.push(l);i=i.add(a(this))}})}else i=d;a.each(a.fn.qtip.plugins,function(){this.sanitize&&this.sanitize(c)});return d?i:c}function O(c,d,h){function i(b){var f,k=b.split("."),n=d[k[0]];for(b=1;b<k.length;b+=1){f=n[k[b]];if(typeof f==="object"&&!f.jquery&&!f.precedance)n=n[k[b]];else break}return k[b]!==K?[n,k[b]]:[d,k[0]]}function o(b){b=b[0];var f={left:0,top:0},k=!d.position.adjust.container;if(b.offsetParent){do{f.left+=b.offsetLeft;f.top+=
b.offsetTop}while(b=k?b.offsetParent:0)}return f}function l(b){var f=e.elements.tooltip,k=j+"-accessible",n=!f.is(":visible")?TRUE:FALSE,g=FALSE;if(!e.rendered)return FALSE;n&&f.addClass(k);switch(b){case "dimensions":g={height:f.outerHeight(),width:f.outerWidth()};break;case "position":g=o(f);break}n&&f.removeClass(k);return g}function t(){var b=e.elements;if(b.title){b.titlebar.remove();b.titlebar=b.title=b.button=NULL;b.tooltip.removeAttr("aria-labelledby")}}function s(){var b=e.elements,f=d.content.title.button;
b.button&&b.button.remove();b.button=f.jquery?f:"string"===typeof f?a("<a />",{html:f}):a("<a />",{"class":"ui-state-default",text:"Close tooltip",title:"Close tooltip",css:{"text-indent":"-10000em"}}).prepend(a("<span />",{"class":"ui-icon ui-icon-close"}));b.button.prependTo(b.titlebar).attr("role","button").addClass(j+"-"+(f===TRUE?"close":"button")).hover(function(k){a(this).toggleClass("ui-state-hover",k.type==="mouseenter")}).click(function(){b.tooltip.hasClass("ui-state-disabled")||e.hide();
return FALSE}).bind("mousedown keydown mouseup keyup mouseout",function(k){a(this).toggleClass("ui-state-active ui-state-focus",/down$/i.test(k.type))})}function r(){var b=e.elements;b.titlebar&&t();b.titlebar=a("<div />",{"class":j+"-titlebar "+(d.style.widget?"ui-widget-header":"")}).append(b.title=a("<div />",{id:j+"-"+h+"-title","class":j+"-title",html:d.content.title.text})).prependTo(b.wrapper);d.content.title.button&&s()}function u(b){var f=e.elements;if(!e.rendered||!b)return FALSE;if(a.isFunction(b))b=
b.call(c);b.jquery&&b.length>0?f.content.empty().append(b.css({display:"block"})):f.content.html(b);f.tooltip.queue("fx",function(k){function n(q){g=g.not(q);if(g.length===0){q=void 0;var w=e.elements.tooltip,y,v;if(e.rendered&&a.browser.msie&&parseInt(a.browser.version.charAt(0),10)<9){w.css({width:"auto",maxWidth:"none"});q=l("dimensions").width;w.css({maxWidth:""});y=parseInt(w.css("max-width"),10)||0;v=parseInt(w.css("min-width"),10)||0;q=y+v?Math.min(Math.max(q,v),y):q;w.width(q)}e.rendered===
TRUE&&e.reposition(e.cache.event);k()}}var g=a("img:not([height]):not([width])",e.elements.content);g.each(function(q,w){var y=["abort","error","load","unload",""].join(".qtip-image ");a(this).bind(y,function(){clearTimeout(e.timers.img[q]);n(this)});(function v(){if(w.height)return n(w);e.timers.img[q]=setTimeout(v,20)})();return TRUE});g.length===0&&n(g)});return e}function z(b,f,k,n){function g(D){if(p.tooltip.hasClass("ui-state-disabled"))return FALSE;p.show.trigger("qtip-"+h+"-inactive");clearTimeout(e.timers.show);
clearTimeout(e.timers.hide);var x=function(){e.show(D)};if(d.show.delay>0)e.timers.show=setTimeout(x,d.show.delay);else x()}function q(D){if(p.tooltip.hasClass("ui-state-disabled"))return FALSE;var x=a(D.relatedTarget||D.target).parents(m)[0]==p.tooltip[0];clearTimeout(e.timers.show);clearTimeout(e.timers.hide);if(d.hide.fixed&&(d.position.target==="mouse"&&x||/mouse(out|leave|move)/.test(D.type)&&x)){D.stopPropagation();D.preventDefault();return FALSE}p.tooltip.stop(TRUE);if(d.hide.delay>0)e.timers.hide=
setTimeout(function(){e.hide(D)},d.hide.delay);else e.hide(D)}function w(D){if(p.tooltip.hasClass("ui-state-disabled"))return FALSE;clearTimeout(e.timers.inactive);e.timers.inactive=setTimeout(function(){e.hide(D)},d.hide.inactive)}function y(D){e.elements.tooltip.is(":visible")&&e.reposition(D)}var v=".qtip-"+h,p={show:d.show.target,hide:d.hide.target,tooltip:e.elements.tooltip},C={show:String(d.show.event).split(" "),hide:String(d.hide.event).split(" ")},G=a.browser.msie&&/^6\.[0-9]/.test(a.browser.version);
c.bind("remove.qtip",function(){e.destroy()});if(k&&d.hide.fixed){p.hide=p.hide.add(p.tooltip);p.tooltip.bind("mouseover"+v,function(){p.tooltip.hasClass("ui-state-disabled")||clearTimeout(e.timers.hide)})}if(f){if("number"===typeof d.hide.inactive){p.show.bind("qtip-"+h+"-inactive",w);a.each(a.fn.qtip.inactiveEvents,function(D,x){p.hide.add(e.elements.tooltip).bind(x+v+"-inactive",w)})}a.each(C.hide,function(D,x){var B=a.inArray(x,C.show);if(B>-1&&a(p.hide).add(p.show).length===a(p.hide).length||
x==="unfocus"){p.show.bind(x+v,function(E){p.tooltip.is(":visible")?q(E):g(E)});delete C.show[B]}else p.hide.bind(x+v,q)})}if(b){a.each(C.show,function(D,x){p.show.bind(x+v,g)});p.tooltip.bind("mouseover"+v,function(){e.focus()})}if(n){if(d.position.adjust.resize||d.position.adjust.screen)a(F).bind("resize"+v,y);if(d.position.adjust.screen||G&&p.tooltip.css("position")==="fixed")a(document).bind("scroll"+v,y);/unfocus/i.test(d.hide.event)&&a(document).bind("mousedown"+v,function(D){var x=e.elements.tooltip;
a(D.target).parents(m).length===0&&a(D.target).add(c).length>1&&x.is(":visible")&&!x.hasClass("ui-state-disabled")&&e.hide()});d.position.target==="mouse"&&a(document).bind("mousemove"+v,function(D){if(d.position.adjust.mouse&&!p.tooltip.hasClass("ui-state-disabled")&&p.tooltip.is(":visible"))e.reposition(D||a.fn.qtip.mouse)})}}function A(b,f,k,n){n=parseInt(n,10)!==0;var g=".qtip-"+h,q={show:b?d.show.target:a("<div/>"),hide:f?d.hide.target:a("<div/>"),tooltip:k?e.elements.tooltip:a("<div/>")};f=
{show:String(d.show.event).split(" "),hide:String(d.hide.event).split(" ")};if(e.rendered){a.each(f.show,function(w,y){q.show.unbind(y+g)});q.show.unbind("mousemove"+g).unbind("mouseout"+g).unbind("qtip-"+h+"-inactive");a.each(f.hide,function(w,y){q.hide.add(q.tooltip).unbind(y+g)});a.each(a.fn.qtip.inactiveEvents,function(w,y){q.hide.add(k?e.elements.content:NULL).unbind(y+g+"-inactive")});q.hide.unbind("mouseout"+g);q.tooltip.unbind("mouseover"+g);if(n){a(F).unbind("resize"+g);a(document).unbind("mousedown"+
g+" mousemove"+g)}}else b&&q.show.unbind(f.show+g+"-create")}var e=this,j="ui-tooltip",m=".qtip."+j;e.id=h;e.rendered=FALSE;e.elements={target:c};e.cache={event:{},target:NULL,disabled:FALSE};e.timers={img:[]};e.options=d;e.plugins={};a.extend(e,{render:function(b){var f=e.elements,k=a.Event("tooltiprender");if(e.rendered)return FALSE;e.rendered=b?-2:-1;f.tooltip=a("<div/>").attr({id:j+"-"+h,role:"tooltip","class":j+" qtip ui-tooltip-accessible ui-helper-reset "+d.style.classes}).css("z-index",a.fn.qtip.zindex+
a(m).length).toggleClass("ui-widget",d.style.widget).toggleClass("ui-state-disabled",e.cache.disabled).data("qtip",e).appendTo(d.position.container);f.wrapper=a("<div />",{"class":j+"-wrapper"}).appendTo(f.tooltip);f.content=a("<div />",{"class":j+"-content "+(d.style.widget?"ui-widget-content":""),id:j+"-"+h+"-content"}).appendTo(f.wrapper);u(d.content.text);d.content.title.text&&r();a.each(a.fn.qtip.plugins,function(){this.initialize==="render"&&this(e)});e.rendered=TRUE;z(1,1,1,1);a.each(d.events,
function(n,g){f.tooltip.bind("tooltip"+n,g)});f.tooltip.queue("fx",function(n){if(d.show.ready||b){f.tooltip.hide();e.show(e.cache.event)}f.tooltip.removeClass("ui-tooltip-accessible");k.originalEvent=a.extend({},e.cache.event);f.tooltip.trigger(k,[e.hash()]);n()});return e},get:function(b){switch(b.toLowerCase()){case "offset":b=l("position");break;case "dimensions":b=l("dimensions");break;default:b=i(b.toLowerCase());b=b[0].precedance?b[0].string():b[0].jquery?b[0]:b[0][b[1]];break}return b},set:function(b,
f){b=b.toLowerCase();var k=i(b),n=e.elements,g=n.tooltip,q,w,y,v={builtin:{id:function(){var p=f===TRUE?a.fn.qtip.nextid:f,C=j+"-"+p;if(p!==FALSE&&p.length>0&&!a("#ui-tooltip-"+p).length){g[0].id=C;n.content[0].id=C+"-content";n.title[0].id=C+"-title"}},"^content.text":function(){u(f)},"^content.title.text":function(){if(e.rendered)if(!e.elements.title&&f){r();e.reposition()}else f?e.elements.title.html(f):t()},"^content.title.button":function(){var p=e.elements.button,C=e.elements.title;if(e.rendered)if(f){C||
r();s()}else p.remove()},"^position.(my|at)$":function(){var p=/my$/i.test(b)?"my":"at";if("string"===typeof f)d.position[p]=new a.fn.qtip.plugins.Corner(f)},"^position.(my|at|adjust|target)":function(){e.rendered&&e.reposition()},"^position.container$":function(){if(e.rendered===TRUE){g.appendTo(f);e.reposition()}},"^(show|hide).(event|target|fixed|delay|inactive)":function(p,C,G,D){var x=b.search(/fixed/i)>-1?[0,[0,1,1,1]]:[b.substr(0,3),b.charAt(0)==="s"?[1,0,0,0]:[0,1,0,0]];if(x[0])p[C]=D;A.apply(e,
x[1]);if(x[0])p[C]=G;z.apply(e,x[1])},"^show.ready$":function(){e.rendered===FALSE&&e.show()},"^style.classes$":function(){e.elements.tooltip.css("class",j+" qtip ui-helper-reset "+f)},"^style.widget$":function(){g.toggleClass("ui-widget",!!f);n.titlebar.toggleClass("ui-widget-header",!!f);n.content.toggleClass("ui-widget-content",!!f)},"^events.(render|show|move|hide|focus|blur)":function(p,C,G,D){a.isFunction(f)?n.tooltip.bind("tooltip"+C,G):n.tooltip.unbind("tooltip"+C,D)}}};a.each(e.plugins,function(p){if("object"===
typeof this.checks)v[p]=this.checks});q=k[0][k[1]];k[0][k[1]]=f.nodeType?a(f):f;L(d,c);for(w in v)for(y in v[w])RegExp(y,"i").test(b)&&v[w][y].call(e,k[0],k[1],f,q);return e},toggle:function(b,f){function k(){var v=a(this),p=b?"attr":"removeAttr",C=/^1|0$/.test(v.css("opacity"));e.elements.title&&c[p]("aria-labelledby",j+"-"+h+"-title");c[p]("aria-describedby",j+"-"+h+"-content");if(b){if(a.browser.msie&&this.style&&C){y=this.style;y.removeAttribute("filter");y.removeAttribute("opacity")}}else C&&
v.hide()}if(e.rendered===FALSE)return FALSE;var n=b?"show":"hide",g=e.elements.tooltip,q=d[n],w=g.is(":visible"),y;if((typeof b).search("boolean|number"))b=!g.is(":visible");if(!w&&!b||g.is(":animated"))return e;if(f){if(e.cache.event&&/over|enter/.test(f.type)&&/out|leave/.test(e.cache.event.type)&&a(f.target).add(d.show.target).length<2&&a(f.relatedTarget).parents(m).length>0)return e;e.cache.event=a.extend({},f)}w=a.Event("tooltip"+n);w.originalEvent=a.extend({},f);g.trigger(w,[e.hash(),90]);if(w.isDefaultPrevented())return e;
if(b){e.focus();e.reposition(f);q.solo&&a(m).qtip("hide")}else clearTimeout(e.timers.show);g.attr("aria-hidden",Boolean(!b));g.stop(TRUE,FALSE);if(a.isFunction(q.effect)){q.effect.call(g,e.hash());g.queue(function(){k.call(this);a(this).dequeue()})}else if(q.effect===FALSE){g[n]();k.call(g)}else g.fadeTo(90,b?1:0,k);b&&q.target.trigger("qtip-"+h+"-inactive");return e},show:function(b){e.toggle(TRUE,b)},hide:function(b){e.toggle(FALSE,b)},focus:function(b){if(e.rendered===false)return FALSE;var f=
e.elements.tooltip,k=a(m),n=parseInt(f.css("z-index"),10),g=a.fn.qtip.zindex+k.length,q=j+"-focus",w=a.extend({},b);if(!f.hasClass(q)&&n!==g){k.css("z-index",function(y,v){return v-1});a(m+"."+q).each(function(){var y=a(this),v=y.qtip(),p;if(!v||v.rendered===FALSE)return TRUE;y.removeClass(q);p=a.Event("tooltipblur");p.originalEvent=w;y.trigger(p,[v,g])});b=a.Event("tooltipfocus");b.originalEvent=w;f.trigger(b,[e.hash(),g]);b.isDefaultPrevented()||f.css({zIndex:g}).addClass(q)}return e},reposition:function(b){if(e.rendered===
FALSE)return FALSE;var f=d.position.target,k=e.elements.tooltip,n=d.position,g=n.my,q=n.at,w=e.elements.tooltip.width(),y=e.elements.tooltip.height(),v=a(n.container)[0],p=0,C=0,G=a.Event("tooltipmove"),D=k.css("position")==="fixed",x=a(n.adjust.container&&v!==document.body?v:F),B={left:0,top:0};v={left:function(E){var H=x.scrollTop,I=g.x==="left"?w:g.x==="right"?-w:-w/2,J=-2*n.adjust.x,M=E+w-x.width-H;if(H-E>0)B.left-=I-J;else if(M>0)B.left-=(g.x==="center"?-1:1)*(I-J);return B.left-E},top:function(E){var H=
x.scrollTop,I=g.y==="top"?y:g.y==="bottom"?-y:-y/2,J=-2*n.adjust.y,M=E+y-x.height-H;if(H-E>0)B.top-=I-J;else if(M>0)B.top-=(g.y==="center"?-1:1)*(I-J);return B.top-E}};x={elem:x,height:x[(x[0]===F?"h":"outerH")+"eight"](),width:x[(x[0]===F?"w":"outerW")+"idth"](),scrollLeft:x.scrollLeft(),scrollTop:x.scrollTop()};if(f==="mouse"){q={x:"left",y:"top"};b=n.adjust.mouse||!b||!b.pageX?a.extend({},a.fn.qtip.mouse):b;B={top:b.pageY,left:b.pageX}}else{if(f==="event")f=b&&b.target&&b.type!=="scroll"&&b.type!==
"resize"?e.cache.target=a(b.target):e.cache.target;f=a(f).eq(0);if(f.length===0)return e;else if(f[0]===document||f[0]===F){p=f.width();C=f.height();if(f[0]===F)B={top:D?0:x.scrollTop,left:D?0:x.scrollLeft}}else if(f.is("area")&&a.fn.qtip.plugins.imagemap){B=a.fn.qtip.plugins.imagemap(f,q);p=B.width;C=B.height;B=B.offset}else{p=f.outerWidth();C=f.outerHeight();B=o(f)}B.left+=q.x==="right"?p:q.x==="center"?p/2:0;B.top+=q.y==="bottom"?C:q.y==="center"?C/2:0}B.left+=n.adjust.x+(g.x==="right"?-w:g.x===
"center"?-w/2:0);B.top+=n.adjust.y+(g.y==="bottom"?-y:g.y==="center"?-y/2:0);B.adjusted=n.adjust.screen&&f[0]!==F&&f[0]!==document.body?{left:v.left(B.left),top:v.top(B.top)}:{left:0,top:0};k.attr("class",function(){return a(this).attr("class").replace(/ui-tooltip-pos-\w+/i,"")}).addClass(j+"-pos-"+g.abbreviation());G.originalEvent=a.extend({},b);k.trigger(G,[e.hash(),B,x.elem]);if(G.isDefaultPrevented())return e;delete B.adjusted;if(k.is(":visible")&&a.isFunction(n.effect)){n.effect.call(k,e.hash(),
B);k.queue(function(){var E=a(this);E.css({opacity:"",height:""});a.browser.msie&&this.style&&this.style.removeAttribute("filter");E.dequeue()})}else isNaN(B.left,B.top)||k.css(B);return e},disable:function(b){var f=e.elements.tooltip;if(e.rendered)f.toggleClass("ui-state-disabled",b);else e.cache.disabled=!!b;return e},destroy:function(){var b=e.elements,f=b.target.data("oldtitle");e.rendered&&a.each(e.plugins,function(){this.initialize==="render"&&this.destroy()});A(1,1,1,1);c.removeData("qtip");
e.rendered&&b.tooltip.remove();f&&c.attr("title",f);c.removeAttr("aria-describedby");return c},hash:function(){var b=a.extend({},e);delete b.cache;delete b.timers;delete b.options;delete b.plugins;delete b.render;delete b.hash;return b}})}function P(c,d){var h,i=a(this);h=a(document.body);var o=i.metadata?i.metadata(d.metadata):{};o=a.extend(TRUE,{},d,L(a.extend(TRUE,{},(o&&d.metadata.type==="html5"?o[d.metadata.name]:{})||o)));var l=o.position,t=this===document?h:i;i.removeData("metadata");if("boolean"===
typeof o.content.text)if(o.content.attr!==FALSE&&i.attr(o.content.attr))o.content.text=i.attr(o.content.attr);else return FALSE;if(l.container===FALSE)l.container=h;if(l.target===FALSE)l.target=t;if(o.show.target===FALSE)o.show.target=t;if(o.hide.target===FALSE)o.hide.target=t;l.at=new a.fn.qtip.plugins.Corner(l.at);l.my=new a.fn.qtip.plugins.Corner(l.my);if(i.data("qtip"))if(o.overwrite)i.qtip("destroy");else if(o.overwrite===FALSE)return FALSE;h=new O(i,o,c);i.data("qtip",h);return h}function Q(c){var d=
this;d.checks={"^content.ajax":function(){this.plugins.ajax.load(this.options.content.ajax)}};a.extend(d,{init:function(){var h=c.options.content.ajax;c.elements.tooltip.bind("tooltiprender.ajax",function(){d.load(h);c.elements.tooltip.bind("tooltipshow.ajax",function(){h.once===FALSE&&c.rendered===TRUE&&d.load(h)})})},load:function(h){a.ajax(a.extend(TRUE,{},h,{success:function(i,o){if(a.isFunction(h.success))if(h.success.call(c.hash(),i,o)===FALSE)return;c.set("content.text",i)},error:function(i,
o,l){var t=o||l;if(a.isFunction(h.error)){i=h.error.call(c.hash(),i,o,l);if(i===FALSE)return}c.set("content.text",t)}}));return d},destroy:function(){c.elements.tooltip.unbind("tooltipshow.ajax")}});d.init()}function N(c,d,h){var i=Math.floor(d/2),o=Math.floor(h/2);d={bottomright:[[0,0],[d,h],[d,0]],bottomleft:[[0,0],[d,0],[0,h]],topright:[[0,h],[d,0],[d,h]],topleft:[[0,0],[0,h],[d,h]],topcenter:[[0,h],[i,0],[d,h]],bottomcenter:[[0,0],[d,0],[i,h]],rightcenter:[[0,0],[d,o],[0,h]],leftcenter:[[d,0],
[d,h],[0,o]]};d.lefttop=d.bottomright;d.righttop=d.bottomleft;d.leftbottom=d.topright;d.rightbottom=d.topleft;return d[c]}function R(c){function d(j){var m=l.tip,b=["left","right"],f=o.offset,k,n;if(o.corner===FALSE||!m)return FALSE;j=j||i.corner;k=j.precedance;n=k==="y"?"x":"y";b[k==="y"?"push":"unshift"]("top","bottom");f=Math.max(j[n]==="center"?f:0,f);m.css({top:"",bottom:"",left:"",right:"",margin:""});switch(j[k==="y"?"x":"y"]){case "center":m.css(b[0],"50%").css("margin-"+b[0],-(u[k==="y"?
"width":"height"]/2)+f);break;case b[0]:m.css(b[0],f);break;case b[1]:m.css(b[1],f);break}f=u[k==="x"?"width":"height"];if(A){t.toggleClass("ui-tooltip-accessible",!t.is(":visible"));f-=parseInt(s.css("border-"+j[k]+"-width"),10)||0;t.removeClass("ui-tooltip-accessible")}m.css(j[k],-f)}function h(j,m,b){if(l.tip){j=a.extend({},i.corner);m=j.precedance==="y"?["y","top","left","height","x"]:["x","left","top","width","y"];var f=b.adjusted,k=[parseInt(s.css("border-"+j[m[0]]+"-width"),10)||0,0];if(f.left)j.x=
j.x==="center"?f.left>0?"left":"right":j.x==="left"?"right":"left";if(f.top)j.y=j.y==="center"?f.top>0?"top":"bottom":j.y==="top"?"bottom":"top";k[1]=Math.max(j[m[4]]==="center"?o.offset:0,o.offset);b[m[1]]+=(j[m[0]]===m[1]?1:-1)*(u[m[3]]-k[0]);b[m[2]]-=(j[m[4]]===m[2]||j[m[4]]==="center"?1:-1)*k[1];if(j.string()!==r.corner.string()&&(r.top!==f.top||r.left!==f.left))i.update(j);r.left=f.left;r.top=f.top;r.corner=j}}var i=this,o=c.options.style.tip,l=c.elements,t=l.tooltip,s=l.wrapper,r={top:0,left:0,
corner:{string:function(){}}},u={width:o.width,height:o.height},z={},A=o.border||0,e=o.method||FALSE;i.corner=NULL;i.mimic=NULL;i.checks={"^position.my|style.tip.(corner|mimic|method|border)":function(){A=o.border;if(i.init())this.get("position.target")!=="mouse"&&this.reposition();else i.destroy()},"^style.tip.(height|width)":function(){u={width:o.width,height:o.height};i.create();i.update();c.reposition()}};a.extend(i,{init:function(){var j=a.browser.msie,m=i.mimic&&/center/i.test(i.mimic.string()),
b=i.detectCorner();if(b){if(e===TRUE)e=a("<canvas />")[0].getContext?"canvas":j&&(m||u.height!==u.width)?"vml":"polygon";else if(e==="canvas")e=j?"vml":!a("<canvas />")[0].getContext?"polygon":"canvas";else if(e==="polygon")e=j&&m?"vml":e;i.create();i.detectColours();i.update();t.unbind(".qtip-tip").bind("tooltipmove.qtip-tip",h)}return b},detectCorner:function(){var j=o.corner,m=c.options.position.at,b=c.options.position.my;if(b.string)b=b.string();if(j===FALSE||b===FALSE&&m===FALSE)return FALSE;
else if(j===TRUE)i.corner=new a.fn.qtip.plugins.Corner(b);else if(!j.string)i.corner=new a.fn.qtip.plugins.Corner(j);return i.corner.string()!=="centercenter"},detectColours:function(){var j=l.tip,m=i.corner[i.corner.precedance],b="border-"+m+"-color";z.fill=j.css("background-color","").css("border","").css("background-color")||"transparent";z.border=j.get(0).style?j.get(0).style["border"+m.charAt(0)+m.substr(1)+"Color"]:j.css(b)||"transparent";if(/rgba?\(0, 0, 0(, 0)?\)|transparent/i.test(z.fill))z.fill=
s.css(A?"background-color":b);if(!z.border||/rgba?\(0, 0, 0(, 0)?\)|transparent/i.test(z.border))z.border=s.css(b)||z.fill;a("*",j).add(j).css("background-color","transparent").css("border",0)},create:function(){var j=u.width,m=u.height;l.tip&&l.tip.remove();l.tip=a('<div class="ui-tooltip-tip" />').toggleClass("ui-widget-content",c.options.style.widget).css(u).prependTo(t);switch(e){case "canvas":l.tip.append('<canvas height="'+m+'" width="'+j+'" />');break;case "vml":l.tip.html('<vml:shape coordorigin="0 0" coordsize="'+
j+" "+m+'" stroked="'+!!A+'"  style="behavior:url(#default#VML); display:inline-block; antialias:TRUE; position: absolute;  top:0; left:0; width:'+j+"px; height:"+m+"px; vertical-align:"+i.corner.y+';"><vml:stroke weight="'+(A-2)+'px" joinstyle="miter" miterlimit="10"  style="behavior:url(#default#VML); display:inline-block;" /></vml:shape>');break;case "polygon":l.tip.append('<div class="ui-tooltip-tip-inner" />').append(A?'<div class="ui-tooltip-tip-border" />':"");break}return i},update:function(j){var m=
l.tip,b=u.width,f=u.height,k=A>0?0:1,n=Math.ceil(A/2+0.5),g=o.mimic,q,w;if(!j)j=i.corner;if(g===FALSE)g=j;else{g=new a.fn.qtip.plugins.Corner(g);g.precedance=j.precedance;if(g.x==="inherit")g.x=j.x;else if(g.y==="inherit")g.y=j.y;else if(g.x===g.y)g[j.precedance]=j[j.precedance]}w=Math[/b|r/.test(g[g.precedance==="y"?"x":"y"])?"ceil":"floor"];m=m.children();switch(e){case "canvas":m=m.get(0).getContext("2d");m.restore();m.clearRect(0,0,3E3,3E3);for(q=N(g.string(),b,f);k<2;k++){if(k){m.save();m.translate(w((g.x===
"left"?1:g.x==="right"?-1:0)*(A+1)*(g.precedance==="y"?0.5:1)),w((g.y==="top"?1:g.y==="bottom"?-1:0)*(A+1)*(g.precedance==="x"?0.5:1)))}m.beginPath();m.moveTo(q[0][0],q[0][1]);m.lineTo(q[1][0],q[1][1]);m.lineTo(q[2][0],q[2][1]);m.closePath();m.fillStyle=z[k?"fill":"border"];m.fill()}break;case "vml":q=N(g.string(),b,f);k="m"+q[0][0]+","+q[0][1]+" l"+q[1][0]+","+q[1][1]+" "+q[2][0]+","+q[2][1]+" xe";m.attr({path:k,fillcolor:z.fill});if(A){m.children().attr("color",z.border);if(g.precedance==="y"){m.css("top",
(g.y==="top"?1:-1)*(A-2));m.css("left",g.x==="left"?1:-2)}else{m.css("left",(g.x==="left"?1:-1)*(A-2));m.css("top",g.y==="top"?1:-2)}}break;case "polygon":if(g.precedance==="y"){k=b>f?1.5:b<f?5:2.2;n=[g.x==="left"?n:g.x==="right"?-n:0,Math.floor(k*n*(g.y==="bottom"?-1:1)*(g.x==="center"?0.8:1))]}else{k=b<f?1.5:b>f?5:2.2;n=[Math.floor(k*n*(g.x==="right"?-1:1)*(g.y==="center"?0.9:1)),g.y==="top"?n:g.y==="bottom"?-n:0]}m.removeAttr("style").each(function(y){var v={x:g.precedance==="x"?g.x==="left"?"right":
"left":g.x,y:g.precedance==="y"?g.y==="top"?"bottom":"top":g.y},p=g.x==="center"?["left","right",v.y,f,b]:["top","bottom",v.x,b,f],C=z[!y&&A?"border":"fill"];y&&a(this).css({position:"absolute","z-index":1,left:n[0],top:n[1]});g.x==="center"||g.y==="center"?a(this).css("border-"+p[2],p[3]+"px solid "+C).css("border-"+p[0],Math.floor(p[4]/2)+"px dashed transparent").css("border-"+p[1],Math.floor(p[4]/2)+"px dashed transparent"):a(this).css("border-width",Math.floor(f/2)+"px "+Math.floor(b/2)+"px").css("border-"+
v.x,Math.floor(b/2)+"px solid "+C).css("border-"+v.y,Math.floor(f/2)+"px solid "+C)});break}d(j);return i},destroy:function(){l.tip&&l.tip.remove();t.unbind(".qtip-tip")}})}function S(c,d){var h=this,i=c.elements,o=i.tooltip;i.overlay=a("#qtip-overlay");a.extend(h,{init:function(){o.bind("tooltipshow.qtipmodal tooltiphide.qtipmodal",function(l,t,s){l=l.type.replace("tooltip","");a.isFunction(d[l])?d[l].call(i.overlay,s,t):h[l](s)});i.overlay.length||h.create();d.blur===TRUE&&i.overlay.bind("click.qtipmodal"+
c.id,function(){c.hide.call(c)})},create:function(){i.overlay=a("<div />",{id:"qtip-overlay",css:{position:"absolute",top:0,left:0,display:"none"}}).appendTo(document.body);a(F).bind("resize.qtipmodal",function(){i.overlay.css({height:Math.max(a(F).height(),a(document).height()),width:Math.max(a(F).width(),a(document).width())})}).trigger("resize")},toggle:function(l){var t=i.overlay,s=c.options.show.modal.effect,r=l?"show":"hide";t.stop(TRUE,FALSE);if(a.isFunction(s))s.call(t,l);else s===FALSE?t[r]():
t.fadeTo(90,l?0.7:0,function(){l||a(this).hide()})},show:function(){h.toggle(TRUE)},hide:function(){h.toggle(FALSE)},destroy:function(){var l=TRUE;a("*").each(function(){var t=a(this).data("qtip");if(t&&t.id!==c.id&&t.options.show.modal)return l=FALSE});if(l){i.overlay.remove();a(F).unbind("scroll.qtipmodal resize.qtipmodal")}else i.overlay.unbind("click.qtipmodal"+c.id);o.unbind("tooltipshow.qtipmodal tooltiphide.qtipmodal")}});h.init()}function T(c){var d=this,h=c.elements,i=h.tooltip,o=".bgiframe-"+
c.id,l="tooltipmove"+o+" tooltipshow"+o;a.extend(d,{init:function(){h.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>');h.bgiframe.appendTo(i);i.bind(l,d.adjust)},adjust:function(){var t=c.get("dimensions"),s=c.plugins.tip,r=c.elements.tip,u;u=parseInt(i.css("border-left-width"),10)||0;u={left:-u,top:-u};if(s&&r){s=s.corner.precedance==="x"?["width","left"]:
["height","top"];u[s[1]]-=r[s[0]]()}h.bgiframe.css(u).css(t)},destroy:function(){d.iframe.remove();i.unbind(l)}});d.init()}a.fn.qtip=function(c,d,h){var i=String(c).toLowerCase(),o=NULL,l=i==="disable"?[TRUE]:a.makeArray(arguments).slice(1,10),t=l[l.length-1],s=a.extend(TRUE,{},c),r;if(!arguments.length&&this.data("qtip")||i==="api")return(s=this.data("qtip"))?s.hash():K;else if("string"===typeof c){this.each(function(){var u=a(this).data("qtip");if(!u)return TRUE;if(/option|set/.test(i)&&d)if(h!==
K)u.set(d,h);else o=u.get(d);else{if(!u.rendered&&(i==="show"||i==="toggle")){if(t&&t.timeStamp)u.cache.event=t;u.render(1)}else if(i==="enable"){i="disable";l=[FALSE]}u[i]&&u[i].apply(u[i],l)}});return o!==NULL?o:this}else if("object"===typeof c||!arguments.length){r=L(s,this);s=a.extend(TRUE,{},a.fn.qtip.defaults,s);return a.fn.qtip.bind.call(r,s,t)}};a.fn.qtip.bind=function(c,d){return this.each(function(h){function i(e){function j(){s.render(typeof e==="object"||r.show.ready);u.show.unbind(z.show);
u.hide.unbind(z.hide)}if(s.cache.disabled)return FALSE;s.cache.event=a.extend({},e);if(r.show.delay>0){clearTimeout(s.timers.show);s.timers.show=setTimeout(j,r.show.delay);z.show!==z.hide&&u.hide.bind(z.hide,function(){clearTimeout(s.timers.show)})}else j()}var o=a(this),l=c.id,t=c.content.text,s,r,u,z,A;c.id=l=l===FALSE||l.length<1||a("#ui-tooltip-"+l).length?a.fn.qtip.nextid++:l;A=".qtip-"+l+"-create";s=P.call(this,l,c);if(s===FALSE)return TRUE;r=s.options;if(a.isArray(t))r.content.text=t[h];o.attr("title")&&
o.data("oldtitle",o.attr("title")).removeAttr("title");a.each(a.fn.qtip.plugins,function(){this.initialize==="initialize"&&this(s)});u={show:r.show.target,hide:r.hide.target};z={show:String(r.show.event).replace(" ",A+" ")+A,hide:String(r.hide.event).replace(" ",A+" ")+A};u.show.bind(z.show,i);if(c.show.ready||c.prerender)i(d)})};a.each({attr:function(c){var d=a(this),h=d.data("qtip");return arguments.length===1&&c==="title"&&h&&h.rendered===TRUE?d.data("oldtitle"):NULL},remove:a.ui?NULL:function(c,
d){a(this).each(function(){if(!d)if(!c||a.filter(c,[this]).length)a("*",this).add(this).each(function(){a(this).triggerHandler("remove")})})}},function(c,d){if(!d)return TRUE;a.fn["Old"+c]=a.fn[c];a.fn[c]=function(){return d.apply(this,arguments)||a.fn["Old"+c].apply(this,arguments)}});a(document.body).attr("role",function(c,d){return!d?"application":d});a(document).bind("mousemove.qtip",function(c){a.fn.qtip.mouse={pageX:c.pageX,pageY:c.pageY}});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(c){c=String(c).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase();this.x=(c.match(/left|right|center/i)||["inherit"])[0].toLowerCase();this.y=(c.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();this.precedance=c.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 d=this.x.substr(0,1),h=this.y.substr(0,1);return d===
h?d:d==="c"||d!=="c"&&h!=="c"?h+d:d+h}}};a.fn.qtip.defaults={prerender:FALSE,id:FALSE,overwrite:TRUE,metadata:{type:"class"},content:{text:TRUE,attr:"title",title:{text:FALSE,button:FALSE}},position:{my:"top left",at:"bottom right",target:FALSE,container:FALSE,adjust:{x:0,y:0,mouse:TRUE,screen:FALSE,resize:TRUE,container:FALSE},effect:TRUE},show:{target:FALSE,event:"mouseenter",effect:TRUE,delay:90,solo:FALSE,ready:FALSE},hide:{target:FALSE,event:"mouseleave",effect:TRUE,delay:0,fixed:FALSE,inactive:FALSE},
style:{classes:"",widget:FALSE},events:{render:a.noop,move:a.noop,show:a.noop,hide:a.noop,focus:a.noop,blur:a.noop}};a.fn.qtip.plugins.ajax=function(c){var d=c.plugins.ajax,h=c.options.content.ajax;if(h&&h.url)if(d)return d;else{c.plugins.ajax=new Q(c);return c.plugins.ajax}};a.fn.qtip.plugins.ajax.initialize="render";a.fn.qtip.plugins.ajax.sanitize=function(c){try{var d=c.content.ajax;if(typeof d!=="object")d=c.content.ajax={url:d};if("boolean"!==typeof d.once&&d.once)d.once=!!d.once}catch(h){}};
a.extend(TRUE,a.fn.qtip.defaults,{content:{ajax:{once:TRUE}}});a.fn.qtip.plugins.tip=function(c){var d=c.plugins.tip,h=c.options.style.tip;if(h&&h.corner)if(d)return d;else{c.plugins.tip=new R(c);c.plugins.tip.init();return c.plugins.tip}};a.fn.qtip.plugins.tip.initialize="render";a.fn.qtip.plugins.tip.sanitize=function(c){try{var d=c.style.tip;if(typeof d!=="object")c.style.tip={corner:d};if(!/string|boolean/i.test(typeof d.corner))d.corner=true;if(typeof d.method!=="string")d.method=TRUE;if(!/canvas|polygon/i.test(d.method))d.method=
TRUE;typeof d.width!=="number"&&delete d.width;typeof d.height!=="number"&&delete d.height;typeof d.border!=="number"&&delete d.border;typeof d.offset!=="number"&&delete d.offset}catch(h){}};a.extend(TRUE,a.fn.qtip.defaults,{style:{tip:{corner:TRUE,mimic:FALSE,method:TRUE,width:9,height:9,border:0,offset:0}}});a.fn.qtip.plugins.imagemap=function(c,d){function h(A,e){for(var j=0,m=1,b=1,f=0,k=0,n=A.width,g=A.height;n>0&&g>0&&m>0&&b>0;){n=Math.floor(n/2);g=Math.floor(g/2);if(d.x==="left")m=n;else if(d.x===
"right")m=A.width-n;else m+=Math.floor(n/2);if(d.y==="top")b=g;else if(d.y==="bottom")b=A.height-g;else b+=Math.floor(g/2);for(j=e.length;j--;){if(e.length<2)break;f=e[j][0]-A.offset.left;k=e[j][1]-A.offset.top;if(d.x==="left"&&f>=m||d.x==="right"&&f<=m||d.x==="center"&&(f<m||f>A.width-m)||d.y==="top"&&k>=b||d.y==="bottom"&&k<=b||d.y==="center"&&(k<b||k>A.height-b))e.splice(j,1)}}return{left:e[0][0],top:e[0][1]}}var i=c.attr("shape").toLowerCase(),o=c.attr("coords").split(","),l=[],t=a('img[usemap="#'+
c.parent("map").attr("name")+'"]'),s=t.offset(),r={width:0,height:0,offset:{top:1E10,right:0,bottom:0,left:1E10}},u=0,z=0;s.left+=Math.ceil((t.outerWidth()-t.width())/2);s.top+=Math.ceil((t.outerHeight()-t.height())/2);if(i==="poly")for(u=o.length;u--;){z=[parseInt(o[--u],10),parseInt(o[u+1],10)];if(z[0]>r.offset.right)r.offset.right=z[0];if(z[0]<r.offset.left)r.offset.left=z[0];if(z[1]>r.offset.bottom)r.offset.bottom=z[1];if(z[1]<r.offset.top)r.offset.top=z[1];l.push(z)}else l=a.map(o,function(A){return parseInt(A,
10)});switch(i){case "rect":r={width:Math.abs(l[2]-l[0]),height:Math.abs(l[3]-l[1]),offset:{left:l[0],top:l[1]}};break;case "circle":r={width:l[2]+2,height:l[2]+2,offset:{left:l[0],top:l[1]}};break;case "poly":a.extend(r,{width:Math.abs(r.offset.right-r.offset.left),height:Math.abs(r.offset.bottom-r.offset.top)});r.offset=d.string()==="centercenter"?{left:r.offset.left+r.width/2,top:r.offset.top+r.height/2}:h(r,l.slice());r.width=r.height=0;break}r.offset.left+=s.left;r.offset.top+=s.top;return r};
a.fn.qtip.plugins.modal=function(c){var d=c.plugins.modal,h=c.options.show.modal;if(d)return d;else if(h&&h.on===TRUE){c.plugins.modal=new S(c,h);return c.plugins.modal}};a.fn.qtip.plugins.modal.initialize="render";a.fn.qtip.plugins.modal.sanitize=function(c){if(c.show)if(typeof c.show.modal!=="object")c.show.modal={on:!!c.show.modal};else if(typeof c.show.modal.on==="undefined")c.show.modal.on=TRUE};a.extend(TRUE,a.fn.qtip.defaults,{show:{modal:{on:FALSE,effect:TRUE,blur:TRUE}}});a.fn.qtip.plugins.bgiframe=
function(c){if(!(a.browser.msie&&/^6\.[0-9]/.test(a.browser.version)&&a("select, object").length))return FALSE;var d=c.plugins.bgiframe;if(d)return d;else{c.plugins.bgiframe=new T(c);return c.plugins.bgiframe}};a.fn.qtip.plugins.bgiframe.initialize="render"})(jQuery,window);

