/*
* 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 Aug 10 23:51:21 2010 +0100
*/

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

