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

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

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


