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

