(function(c){function z(b,d,e){var a=this;a.id=e;a.options=d;a.status={animated:false,rendered:false,disabled:false,focused:false};a.elements={target:b.addClass(a.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,button:null,tip:null,bgiframe:null};a.cache={mouse:{},position:{},toggle:0};a.timers={};c.extend(a,a.options.api,{show:function(f){function h(){a.options.position.type!=="static"&&a.focus();a.onShow.call(a,f);c.browser.msie&&a.elements.tooltip.get(0).style.removeAttribute("filter")}
var j;if(!a.status.rendered)return c.fn.qtip.log.error.call(a,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"show");if(a.elements.tooltip.css("display")!=="none")return a;a.elements.tooltip.stop(true,false);if(a.beforeShow.call(a,f)===false)return a;a.cache.toggle=1;a.options.position.type!=="static"&&a.updatePosition(f,a.options.show.effect.length>0);if(typeof a.options.show.solo=="object")j=c(a.options.show.solo);else if(a.options.show.solo===true)j=c("div.qtip").not(a.elements.tooltip);j&&j.each(function(){c(this).qtip("api").status.rendered===
true&&c(this).qtip("api").hide()});if(typeof a.options.show.effect.type=="function"){a.options.show.effect.type.call(a.elements.tooltip,a.options.show.effect.length);a.elements.tooltip.queue(function(){h();c(this).dequeue()})}else{switch(a.options.show.effect.type.toLowerCase()){case "fade":a.elements.tooltip.fadeIn(a.options.show.effect.length,h);break;case "slide":a.elements.tooltip.slideDown(a.options.show.effect.length,function(){h();a.options.position.type!=="static"&&a.updatePosition(f,true)});
break;case "grow":a.elements.tooltip.show(a.options.show.effect.length,h);break;default:a.elements.tooltip.show(null,h);break}a.elements.tooltip.addClass(a.options.style.classes.active)}return c.fn.qtip.log.error.call(a,1,c.fn.qtip.constants.EVENT_SHOWN,"show")},hide:function(f){function h(){a.onHide.call(a,f)}if(a.status.rendered){if(a.elements.tooltip.css("display")==="none")return a}else return c.fn.qtip.log.error.call(a,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"hide");clearTimeout(a.timers.show);
a.elements.tooltip.stop(true,false);if(a.beforeHide.call(a,f)===false)return a;a.cache.toggle=0;if(typeof a.options.hide.effect.type=="function"){a.options.hide.effect.type.call(a.elements.tooltip,a.options.hide.effect.length);a.elements.tooltip.queue(function(){h();c(this).dequeue()})}else{switch(a.options.hide.effect.type.toLowerCase()){case "fade":a.elements.tooltip.fadeOut(a.options.hide.effect.length,h);break;case "slide":a.elements.tooltip.slideUp(a.options.hide.effect.length,h);break;case "grow":a.elements.tooltip.hide(a.options.hide.effect.length,
h);break;default:a.elements.tooltip.hide(null,h);break}a.elements.tooltip.removeClass(a.options.style.classes.active)}return c.fn.qtip.log.error.call(a,1,c.fn.qtip.constants.EVENT_HIDDEN,"hide")},updatePosition:function(f,h){var j,g,k,l,n,m,o;if(a.status.rendered){if(a.options.position.type=="static")return c.fn.qtip.log.error.call(a,1,c.fn.qtip.constants.CANNOT_POSITION_STATIC,"updatePosition")}else return c.fn.qtip.log.error.call(a,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updatePosition");g=
{position:{left:0,top:0},dimensions:{height:0,width:0},corner:a.options.position.corner.target};k={position:a.getPosition(),dimensions:a.getDimensions(),corner:a.options.position.corner.tooltip};if(a.options.position.target!=="mouse"){if(a.options.position.target.get(0).nodeName.toLowerCase()=="area"){l=a.options.position.target.attr("coords").split(",");for(j=0;j<l.length;j++)l[j]=parseInt(l[j]);j=a.options.position.target.parent("map").attr("name");n=c('img[usemap="#'+j+'"]:first').offset();g.position=
{left:Math.floor(n.left+l[0]),top:Math.floor(n.top+l[1])};switch(a.options.position.target.attr("shape").toLowerCase()){case "rect":g.dimensions={width:Math.ceil(Math.abs(l[2]-l[0])),height:Math.ceil(Math.abs(l[3]-l[1]))};break;case "circle":g.dimensions={width:l[2]+1,height:l[2]+1};break;case "poly":g.dimensions={width:l[0],height:l[1]};for(j=0;j<l.length;j++)if(j%2==0){if(l[j]>g.dimensions.width)g.dimensions.width=l[j];if(l[j]<l[0])g.position.left=Math.floor(n.left+l[j])}else{if(l[j]>g.dimensions.height)g.dimensions.height=
l[j];if(l[j]<l[1])g.position.top=Math.floor(n.top+l[j])}g.dimensions.width-=g.position.left-n.left;g.dimensions.height-=g.position.top-n.top;break;default:return c.fn.qtip.log.error.call(a,4,c.fn.qtip.constants.INVALID_AREA_SHAPE,"updatePosition")}g.dimensions.width-=2;g.dimensions.height-=2}else if(a.options.position.target.add(document.body).length===1){g.position={left:c(document).scrollLeft(),top:c(document).scrollTop()};g.dimensions={height:c(window).height(),width:c(window).width()}}else{g.position=
typeof a.options.position.target.attr("qtip")!=="undefined"?a.options.position.target.qtip("api").cache.position:a.options.position.target.offset();g.dimensions={height:a.options.position.target.outerHeight(),width:a.options.position.target.outerWidth()}}m=c.extend({},g.position);if(g.corner.search(/right/i)!==-1)m.left+=g.dimensions.width;if(g.corner.search(/bottom/i)!==-1)m.top+=g.dimensions.height;if(g.corner.search(/((top|bottom)Middle)|center/)!==-1)m.left+=g.dimensions.width/2;if(g.corner.search(/((left|right)Middle)|center/)!==
-1)m.top+=g.dimensions.height/2}else{g.position=m={left:a.cache.mouse.x,top:a.cache.mouse.y};g.dimensions={height:1,width:1}}if(k.corner.search(/right/i)!==-1)m.left-=k.dimensions.width;if(k.corner.search(/bottom/i)!==-1)m.top-=k.dimensions.height;if(k.corner.search(/((top|bottom)Middle)|center/)!==-1)m.left-=k.dimensions.width/2;if(k.corner.search(/((left|right)Middle)|center/)!==-1)m.top-=k.dimensions.height/2;l=c.browser.msie?1:0;c.browser.msie&&parseInt(c.browser.version.charAt(0));if(a.options.style.border.radius>
0){if(k.corner.search(/Left/)!==-1)m.left-=a.options.style.border.radius;else if(k.corner.search(/Right/)!==-1)m.left+=a.options.style.border.radius;if(k.corner.search(/Top/)!==-1)m.top-=a.options.style.border.radius;else if(k.corner.search(/Bottom/)!==-1)m.top+=a.options.style.border.radius}if(l){if(k.corner.search(/top/)!==-1)m.top-=l;else if(k.corner.search(/bottom/)!==-1)m.top+=l;if(k.corner.search(/left/)!==-1)m.left-=l;else if(k.corner.search(/right/)!==-1)m.left+=l;if(k.corner.search(/leftMiddle|rightMiddle/)!==
-1)m.top-=1}if(a.options.position.adjust.screen===true)m=A.call(a,m,g,k);if(a.options.position.target==="mouse"&&a.options.position.adjust.mouse===true){g=a.options.position.adjust.screen===true&&a.elements.tip?a.elements.tip.attr("rel"):a.options.position.corner.tooltip;m.left+=g.search(/right/i)!==-1?-6:6;m.top+=g.search(/bottom/i)!==-1?-6:6}!a.elements.bgiframe&&c.browser.msie&&parseInt(c.browser.version.charAt(0))==6&&c("select, object").each(function(){o=c(this).offset();o.bottom=o.top+c(this).height();
o.right=o.left+c(this).width();m.top+k.dimensions.height>=o.top&&m.left+k.dimensions.width>=o.left&&B.call(a)});m.left+=a.options.position.adjust.x;m.top+=a.options.position.adjust.y;g=a.getPosition();if(m.left!=g.left||m.top!=g.top){g=a.beforePositionUpdate.call(a,f);if(g===false)return a;a.cache.position=m;if(h===true){a.status.animated=true;a.elements.tooltip.animate(m,200,"swing",function(){a.status.animated=false})}else a.elements.tooltip.css(m);a.onPositionUpdate.call(a,f);typeof f!=="undefined"&&
f.type&&f.type!=="mousemove"&&c.fn.qtip.log.error.call(a,1,c.fn.qtip.constants.EVENT_POSITION_UPDATED,"updatePosition")}return a},updateWidth:function(f){var h;if(a.status.rendered){if(f&&typeof f!=="number")return c.fn.qtip.log.error.call(a,2,"newWidth must be of type number","updateWidth")}else return c.fn.qtip.log.error.call(a,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateWidth");h=a.elements.contentWrapper.siblings().add(a.elements.tip).add(a.elements.button);if(!f)if(typeof a.options.style.width.value==
"number")f=a.options.style.width.value;else{a.elements.tooltip.css({width:"auto"});h.hide();c.browser.msie&&a.elements.wrapper.add(a.elements.contentWrapper.children()).css({zoom:"normal"});f=a.getDimensions().width+1;if(!a.options.style.width.value){if(f>a.options.style.width.max)f=a.options.style.width.max;if(f<a.options.style.width.min)f=a.options.style.width.min}}if(f%2!==0)f-=1;a.elements.tooltip.width(f);h.show();a.options.style.border.radius&&a.elements.tooltip.find(".qtip-betweenCorners").each(function(){c(this).width(f-
a.options.style.border.radius*2)});if(c.browser.msie){a.elements.wrapper.add(a.elements.contentWrapper.children()).css({zoom:"1"});a.elements.wrapper.width(f);a.elements.bgiframe&&a.elements.bgiframe.width(f).height(a.getDimensions.height)}return c.fn.qtip.log.error.call(a,1,c.fn.qtip.constants.EVENT_WIDTH_UPDATED,"updateWidth")},updateStyle:function(f){var h,j,g,k;if(a.status.rendered){if(typeof f!=="string"||!c.fn.qtip.styles[f])return c.fn.qtip.log.error.call(a,2,c.fn.qtip.constants.STYLE_NOT_DEFINED,
"updateStyle")}else return c.fn.qtip.log.error.call(a,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateStyle");a.options.style=q.call(a,c.fn.qtip.styles[f],a.options.user.style);a.elements.content.css(p(a.options.style));a.options.content.title.text!==false&&a.elements.title.css(p(a.options.style.title,true));a.elements.contentWrapper.css({borderColor:a.options.style.border.color});if(a.options.style.tip.corner!==false)if(c("<canvas>").get(0).getContext){f=a.elements.tooltip.find(".qtip-tip canvas:first");
j=f.get(0).getContext("2d");j.clearRect(0,0,300,300);g=f.parent("div[rel]:first").attr("rel");k=r(g,a.options.style.tip.size.width,a.options.style.tip.size.height);s.call(a,f,k,a.options.style.tip.color||a.options.style.border.color)}else if(c.browser.msie){f=a.elements.tooltip.find('.qtip-tip [nodeName="shape"]');f.attr("fillcolor",a.options.style.tip.color||a.options.style.border.color)}if(a.options.style.border.radius>0){a.elements.tooltip.find(".qtip-betweenCorners").css({backgroundColor:a.options.style.border.color});
if(c("<canvas>").get(0).getContext){h=t(a.options.style.border.radius);a.elements.tooltip.find(".qtip-wrapper canvas").each(function(){j=c(this).get(0).getContext("2d");j.clearRect(0,0,300,300);g=c(this).parent("div[rel]:first").attr("rel");u.call(a,c(this),h[g],a.options.style.border.radius,a.options.style.border.color)})}else c.browser.msie&&a.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function(){c(this).attr("fillcolor",a.options.style.border.color)})}return c.fn.qtip.log.error.call(a,
1,c.fn.qtip.constants.EVENT_STYLE_UPDATED,"updateStyle")},updateContent:function(f,h){function j(){a.updateWidth();if(h!==false){a.options.position.type!=="static"&&a.updatePosition(a.elements.tooltip.is(":visible"),true);a.options.style.tip.corner!==false&&v.call(a)}}var g,k,l;if(a.status.rendered){if(!f)return c.fn.qtip.log.error.call(a,2,c.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateContent")}else return c.fn.qtip.log.error.call(a,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateContent");g=
a.beforeContentUpdate.call(a,f);if(typeof g=="string")f=g;else if(g===false)return;c.browser.msie&&a.elements.contentWrapper.children().css({zoom:"normal"});f.jquery&&f.length>0?f.clone(true).appendTo(a.elements.content).show():a.elements.content.html(f);k=a.elements.content.find("img[complete=false]");if(k.length>0){l=0;k.each(function(){c('<img src="'+c(this).attr("src")+'" />').load(function(){++l==k.length&&j()})})}else j();a.onContentUpdate.call(a);return c.fn.qtip.log.error.call(a,1,c.fn.qtip.constants.EVENT_CONTENT_UPDATED,
"loadContent")},loadContent:function(f,h,j){function g(k){a.onContentLoad.call(a);c.fn.qtip.log.error.call(a,1,c.fn.qtip.constants.EVENT_CONTENT_LOADED,"loadContent");a.updateContent(k)}if(!a.status.rendered)return c.fn.qtip.log.error.call(a,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"loadContent");if(a.beforeContentLoad.call(a)===false)return a;j=="post"?c.post(f,h,g):c.get(f,h,g);return a},updateTitle:function(f){if(a.status.rendered){if(!f)return c.fn.qtip.log.error.call(a,2,c.fn.qtip.constants.NO_CONTENT_PROVIDED,
"updateTitle")}else return c.fn.qtip.log.error.call(a,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateTitle");returned=a.beforeTitleUpdate.call(a);if(returned===false)return a;if(a.elements.button)a.elements.button=a.elements.button.clone(true);a.elements.title.html(f);a.elements.button&&a.elements.title.prepend(a.elements.button);a.onTitleUpdate.call(a);return c.fn.qtip.log.error.call(a,1,c.fn.qtip.constants.EVENT_TITLE_UPDATED,"updateTitle")},focus:function(f){var h,j,g;if(a.status.rendered){if(a.options.position.type==
"static")return c.fn.qtip.log.error.call(a,1,c.fn.qtip.constants.CANNOT_FOCUS_STATIC,"focus")}else return c.fn.qtip.log.error.call(a,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"focus");h=parseInt(a.elements.tooltip.css("z-index"));j=6E3+c("div.qtip[qtip]").length-1;if(!a.status.focused&&h!==j){h=a.beforeFocus.call(a,f);if(h===false)return a;c("div.qtip[qtip]").not(a.elements.tooltip).each(function(){if(c(this).qtip("api").status.rendered===true){g=parseInt(c(this).css("z-index"));typeof g=="number"&&
g>-1&&c(this).css({zIndex:parseInt(c(this).css("z-index"))-1});c(this).qtip("api").status.focused=false}});a.elements.tooltip.css({zIndex:j});a.status.focused=true;a.onFocus.call(a,f);c.fn.qtip.log.error.call(a,1,c.fn.qtip.constants.EVENT_FOCUSED,"focus")}return a},disable:function(f){if(!a.status.rendered)return c.fn.qtip.log.error.call(a,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"disable");if(f)if(a.status.disabled)c.fn.qtip.log.error.call(a,1,c.fn.qtip.constants.TOOLTIP_ALREADY_DISABLED,"disable");
else{a.status.disabled=true;c.fn.qtip.log.error.call(a,1,c.fn.qtip.constants.EVENT_DISABLED,"disable")}else if(a.status.disabled){a.status.disabled=false;c.fn.qtip.log.error.call(a,1,c.fn.qtip.constants.EVENT_ENABLED,"disable")}else c.fn.qtip.log.error.call(a,1,c.fn.qtip.constants.TOOLTIP_ALREADY_ENABLED,"disable");return a},destroy:function(){var f,h;if(a.beforeDestroy.call(a)===false)return a;if(a.status.rendered){a.options.show.when.target.unbind("mousemove.qtip",a.updatePosition);a.options.show.when.target.unbind("mouseout.qtip",
a.hide);a.options.show.when.target.unbind(a.options.show.when.event+".qtip");a.options.hide.when.target.unbind(a.options.hide.when.event+".qtip");a.elements.tooltip.unbind(a.options.hide.when.event+".qtip");a.elements.tooltip.unbind("mouseover.qtip",a.focus);a.elements.tooltip.remove()}else a.options.show.when.target.unbind(a.options.show.when.event+".qtip-create");if(typeof a.elements.target.data("qtip")=="object"){h=a.elements.target.data("qtip").interfaces;if(typeof h=="object"&&h.length>0)for(f=
0;f<h.length-1;f++)h[f].id==a.id&&h.splice(f,1)}delete c.fn.qtip.interfaces[a.id];if(typeof h=="object"&&h.length>0)a.elements.target.data("qtip").current=h.length-1;else a.elements.target.removeData("qtip");a.onDestroy.call(a);c.fn.qtip.log.error.call(a,1,c.fn.qtip.constants.EVENT_DESTROYED,"destroy");return a.elements.target},getPosition:function(){var f,h;if(!a.status.rendered)return c.fn.qtip.log.error.call(a,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getPosition");(f=a.elements.tooltip.css("display")!==
"none"?false:true)&&a.elements.tooltip.css({visiblity:"hidden"}).show();h=a.elements.tooltip.offset();f&&a.elements.tooltip.css({visiblity:"visible"}).hide();return h},getDimensions:function(){var f,h;if(!a.status.rendered)return c.fn.qtip.log.error.call(a,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getDimensions");(f=!a.elements.tooltip.is(":visible")?true:false)&&a.elements.tooltip.css({visiblity:"hidden"}).show();h={height:a.elements.tooltip.outerHeight(),width:a.elements.tooltip.outerWidth()};
f&&a.elements.tooltip.css({visiblity:"visible"}).hide();return h}})}function w(){var b,d,e,a;b=this;b.beforeRender.call(b);b.status.rendered=true;b.elements.tooltip='<div qtip="'+b.id+'" class="qtip '+(b.options.style.classes.tooltip||b.options.style)+'"style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;position:'+b.options.position.type+';">  <div class="qtip-wrapper" style="position:relative; overflow:hidden; text-align:left;">    <div class="qtip-contentWrapper" style="overflow:hidden;">       <div class="qtip-content '+
b.options.style.classes.content+'"></div></div></div></div>';b.elements.tooltip=c(b.elements.tooltip);b.elements.tooltip.appendTo(b.options.position.container);b.elements.tooltip.data("qtip",{current:0,interfaces:[b]});b.elements.wrapper=b.elements.tooltip.children("div:first");b.elements.contentWrapper=b.elements.wrapper.children("div:first").css({background:b.options.style.background});b.elements.content=b.elements.contentWrapper.children("div:first").css(p(b.options.style));c.browser.msie&&b.elements.wrapper.add(b.elements.content).css({zoom:1});
b.options.hide.when.event=="unfocus"&&b.elements.tooltip.attr("unfocus",true);typeof b.options.style.width.value=="number"&&b.updateWidth();if(c("<canvas>").get(0).getContext||c.browser.msie){b.options.style.border.radius>0?C.call(b):b.elements.contentWrapper.css({border:b.options.style.border.width+"px solid "+b.options.style.border.color});b.options.style.tip.corner!==false&&x.call(b)}else{b.elements.contentWrapper.css({border:b.options.style.border.width+"px solid "+b.options.style.border.color});
b.options.style.border.radius=0;b.options.style.tip.corner=false;c.fn.qtip.log.error.call(b,2,c.fn.qtip.constants.CANVAS_VML_NOT_SUPPORTED,"render")}if(typeof b.options.content.text=="string"&&b.options.content.text.length>0||b.options.content.text.jquery&&b.options.content.text.length>0)d=b.options.content.text;else if(typeof b.elements.target.attr("title")=="string"&&b.elements.target.attr("title").length>0){d=b.elements.target.attr("title").replace("\\n","<br />");b.elements.target.attr("title",
"")}else if(typeof b.elements.target.attr("alt")=="string"&&b.elements.target.attr("alt").length>0){d=b.elements.target.attr("alt").replace("\\n","<br />");b.elements.target.attr("alt","")}else{d=" ";c.fn.qtip.log.error.call(b,1,c.fn.qtip.constants.NO_VALID_CONTENT,"render")}b.options.content.title.text!==false&&D.call(b);b.updateContent(d);E.call(b);b.options.show.ready===true&&b.show();if(b.options.content.url!==false){d=b.options.content.url;e=b.options.content.data;a=b.options.content.method||
"get";b.loadContent(d,e,a)}b.onRender.call(b);c.fn.qtip.log.error.call(b,1,c.fn.qtip.constants.EVENT_RENDERED,"render")}function C(){var b,d,e,a,f,h,j,g,k;b=this;b.elements.wrapper.find(".qtip-borderBottom, .qtip-borderTop").remove();e=b.options.style.border.width;a=b.options.style.border.radius;f=b.options.style.border.color||b.options.style.tip.color;h=t(a);j={};for(d in h){j[d]='<div rel="'+d+'" style="'+(d.search(/Left/)!==-1?"left":"right")+":0; position:absolute; height:"+a+"px; width:"+a+'px; overflow:hidden; line-height:0.1px; font-size:1px">';
if(c("<canvas>").get(0).getContext)j[d]+='<canvas height="'+a+'" width="'+a+'" style="vertical-align: top"></canvas>';else if(c.browser.msie){g=a*2+3;j[d]+='<v:arc stroked="false" fillcolor="'+f+'" startangle="'+h[d][0]+'" endangle="'+h[d][1]+'" style="width:'+g+"px; height:"+g+"px; margin-top:"+(d.search(/bottom/)!==-1?-2:-1)+"px; margin-left:"+(d.search(/Right/)!==-1?h[d][2]-3.5:-1)+'px; vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>'}j[d]+="</div>"}d=b.getDimensions().width-
Math.max(e,a)*2;d='<div class="qtip-betweenCorners" style="height:'+a+"px; width:"+d+"px; overflow:hidden; background-color:"+f+'; line-height:0.1px; font-size:1px;">';b.elements.wrapper.prepend('<div class="qtip-borderTop" dir="ltr" style="height:'+a+"px; margin-left:"+a+'px; line-height:0.1px; font-size:1px; padding:0;">'+j.topLeft+j.topRight+d);b.elements.wrapper.append('<div class="qtip-borderBottom" dir="ltr" style="height:'+a+"px; margin-left:"+a+'px; line-height:0.1px; font-size:1px; padding:0;">'+
j.bottomLeft+j.bottomRight+d);if(c("<canvas>").get(0).getContext)b.elements.wrapper.find("canvas").each(function(){k=h[c(this).parent("[rel]:first").attr("rel")];u.call(b,c(this),k,a,f)});else c.browser.msie&&b.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>');j=Math.max(a,a+(e-a));e=Math.max(e-a,0);b.elements.contentWrapper.css({border:"0px solid "+f,borderWidth:e+"px "+j+"px"})}function u(b,d,e,a){b=b.get(0).getContext("2d");b.fillStyle=a;b.beginPath();b.arc(d[0],
d[1],e,0,Math.PI*2,false);b.fill()}function x(b){var d,e,a,f,h;d=this;d.elements.tip!==null&&d.elements.tip.remove();e=d.options.style.tip.color||d.options.style.border.color;if(d.options.style.tip.corner!==false){if(!b)b=d.options.style.tip.corner;a=r(b,d.options.style.tip.size.width,d.options.style.tip.size.height);d.elements.tip='<div class="'+d.options.style.classes.tip+'" dir="ltr" rel="'+b+'" style="position:absolute; height:'+d.options.style.tip.size.height+"px; width:"+d.options.style.tip.size.width+
'px; margin:0 auto; line-height:0.1px; font-size:1px;">';if(c("<canvas>").get(0).getContext)d.elements.tip+='<canvas height="'+d.options.style.tip.size.height+'" width="'+d.options.style.tip.size.width+'"></canvas>';else if(c.browser.msie){f=d.options.style.tip.size.width+","+d.options.style.tip.size.height;h="m"+a[0][0]+","+a[0][1];h+=" l"+a[1][0]+","+a[1][1];h+=" "+a[2][0]+","+a[2][1];h+=" xe";d.elements.tip+='<v:shape fillcolor="'+e+'" stroked="false" filled="true" path="'+h+'" coordsize="'+f+
'" style="width:'+d.options.style.tip.size.width+"px; height:"+d.options.style.tip.size.height+"px; line-height:0.1px; display:inline-block; behavior:url(#default#VML); vertical-align:"+(b.search(/top/)!==-1?"bottom":"top")+'"></v:shape>';d.elements.tip+='<v:image style="behavior:url(#default#VML);"></v:image>';d.elements.contentWrapper.css("position","relative")}d.elements.tooltip.prepend(d.elements.tip+"</div>");d.elements.tip=d.elements.tooltip.find("."+d.options.style.classes.tip).eq(0);c("<canvas>").get(0).getContext&&
s.call(d,d.elements.tip.find("canvas:first"),a,e);b.search(/top/)!==-1&&c.browser.msie&&parseInt(c.browser.version.charAt(0))===6&&d.elements.tip.css({marginTop:-4});v.call(d,b)}}function s(b,d,e){b=b.get(0).getContext("2d");b.fillStyle=e;b.beginPath();b.moveTo(d[0][0],d[0][1]);b.lineTo(d[1][0],d[1][1]);b.lineTo(d[2][0],d[2][1]);b.fill()}function v(b){var d,e;d=this;if(!(d.options.style.tip.corner===false||!d.elements.tip)){b||(b=d.elements.tip.attr("rel"));e=positionAdjust=c.browser.msie?1:0;d.elements.tip.css(b.match(/left|right|top|bottom/)[0],
0);if(b.search(/top|bottom/)!==-1){if(c.browser.msie)positionAdjust=parseInt(c.browser.version.charAt(0))===6?b.search(/top/)!==-1?-3:1:b.search(/top/)!==-1?1:2;if(b.search(/Middle/)!==-1)d.elements.tip.css({left:"50%",marginLeft:-(d.options.style.tip.size.width/2)});else if(b.search(/Left/)!==-1)d.elements.tip.css({left:d.options.style.border.radius-e});else b.search(/Right/)!==-1&&d.elements.tip.css({right:d.options.style.border.radius+e});b.search(/top/)!==-1?d.elements.tip.css({top:-positionAdjust}):
d.elements.tip.css({bottom:positionAdjust})}else if(b.search(/left|right/)!==-1){if(c.browser.msie)positionAdjust=parseInt(c.browser.version.charAt(0))===6?1:b.search(/left/)!==-1?1:2;if(b.search(/Middle/)!==-1)d.elements.tip.css({top:"50%",marginTop:-(d.options.style.tip.size.height/2)});else if(b.search(/Top/)!==-1)d.elements.tip.css({top:d.options.style.border.radius-e});else b.search(/Bottom/)!==-1&&d.elements.tip.css({bottom:d.options.style.border.radius+e});b.search(/left/)!==-1?d.elements.tip.css({left:-positionAdjust}):
d.elements.tip.css({right:positionAdjust})}b="padding-"+b.match(/left|right|top|bottom/)[0];e=d.options.style.tip.size[b.search(/left|right/)!==-1?"width":"height"];d.elements.tooltip.css("padding",0);d.elements.tooltip.css(b,e);if(c.browser.msie&&parseInt(c.browser.version.charAt(0))==6){b=parseInt(d.elements.tip.css("margin-top"))||0;b+=parseInt(d.elements.content.css("margin-top"))||0;d.elements.tip.css({marginTop:b})}}}function D(){var b=this;b.elements.title!==null&&b.elements.title.remove();
b.elements.title=c('<div class="'+b.options.style.classes.title+'">').css(p(b.options.style.title,true)).css({zoom:c.browser.msie?1:0}).prependTo(b.elements.contentWrapper);b.options.content.title.text&&b.updateTitle.call(b,b.options.content.title.text);if(b.options.content.title.button!==false&&typeof b.options.content.title.button=="string")b.elements.button=c('<a class="'+b.options.style.classes.button+'" style="float:right; position: relative"></a>').css(p(b.options.style.button,true)).html(b.options.content.title.button).prependTo(b.elements.title).click(function(d){b.status.disabled||
b.hide(d)})}function E(){function b(g){if(e.status.disabled!==true){if(e.options.hide.when.event=="inactive"){c(h).each(function(){f.bind(this+".qtip-inactive",j);e.elements.content.bind(this+".qtip-inactive",j)});j()}clearTimeout(e.timers.show);clearTimeout(e.timers.hide);e.timers.show=setTimeout(function(){e.show(g)},e.options.show.delay)}}function d(g){if(e.status.disabled!==true){if(e.options.hide.fixed===true&&e.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&c(g.relatedTarget).parents("div.qtip[qtip]").length>
0){g.stopPropagation();g.preventDefault();clearTimeout(e.timers.hide);return false}clearTimeout(e.timers.show);clearTimeout(e.timers.hide);e.elements.tooltip.stop(true,true);e.timers.hide=setTimeout(function(){e.hide(g)},e.options.hide.delay)}}var e,a,f,h;e=this;a=e.options.show.when.target;f=e.options.hide.when.target;if(e.options.hide.fixed)f=f.add(e.elements.tooltip);if(e.options.hide.when.event=="inactive"){h=["click","dblclick","mousedown","mouseup","mousemove","mouseout","mouseenter","mouseleave",
"mouseover"];function j(g){if(e.status.disabled!==true){clearTimeout(e.timers.inactive);e.timers.inactive=setTimeout(function(){c(h).each(function(){f.unbind(this+".qtip-inactive");e.elements.content.unbind(this+".qtip-inactive")});e.hide(g)},e.options.hide.delay)}}}else e.options.hide.fixed===true&&e.elements.tooltip.bind("mouseover.qtip",function(){e.status.disabled!==true&&clearTimeout(e.timers.hide)});if(e.options.show.when.target.add(e.options.hide.when.target).length===1&&e.options.show.when.event==
e.options.hide.when.event&&e.options.hide.when.event!=="inactive"||e.options.hide.when.event=="unfocus"){e.cache.toggle=0;a.bind(e.options.show.when.event+".qtip",function(g){e.cache.toggle==0?b(g):d(g)})}else{a.bind(e.options.show.when.event+".qtip",b);e.options.hide.when.event!=="inactive"&&f.bind(e.options.hide.when.event+".qtip",d)}e.options.position.type.search(/(fixed|absolute)/)!==-1&&e.elements.tooltip.bind("mouseover.qtip",e.focus);e.options.position.target==="mouse"&&e.options.position.type!==
"static"&&a.bind("mousemove.qtip",function(g){e.cache.mouse={x:g.pageX,y:g.pageY};e.status.disabled===false&&e.options.position.adjust.mouse===true&&e.options.position.type!=="static"&&e.elements.tooltip.css("display")!=="none"&&e.updatePosition(g)})}function A(b,d,e){var a,f,h,j;a=this;if(e.corner=="center")return d.position;f=c.extend({},b);j={x:false,y:false};h={left:f.left<c.fn.qtip.cache.screen.scroll.left,right:f.left+e.dimensions.width+2>=c.fn.qtip.cache.screen.width+c.fn.qtip.cache.screen.scroll.left,
top:f.top<c.fn.qtip.cache.screen.scroll.top,bottom:f.top+e.dimensions.height+2>=c.fn.qtip.cache.screen.height+c.fn.qtip.cache.screen.scroll.top};h={left:h.left&&(e.corner.search(/right/i)!=-1||e.corner.search(/right/i)==-1&&!h.right),right:h.right&&(e.corner.search(/left/i)!=-1||e.corner.search(/left/i)==-1&&!h.left),top:h.top&&e.corner.search(/top/i)==-1,bottom:h.bottom&&e.corner.search(/bottom/i)==-1};if(h.left){f.left=a.options.position.target!=="mouse"?d.position.left+d.dimensions.width:a.cache.mouse.x;
j.x="Left"}else if(h.right){f.left=a.options.position.target!=="mouse"?d.position.left-e.dimensions.width:a.cache.mouse.x-e.dimensions.width;j.x="Right"}if(h.top){f.top=a.options.position.target!=="mouse"?d.position.top+d.dimensions.height:a.cache.mouse.y;j.y="top"}else if(h.bottom){f.top=a.options.position.target!=="mouse"?d.position.top-e.dimensions.height:a.cache.mouse.y-e.dimensions.height;j.y="bottom"}if(f.left<0){f.left=b.left;j.x=false}if(f.top<0){f.top=b.top;j.y=false}if(a.options.style.tip.corner!==
false){f.corner=new String(e.corner);if(j.x!==false)f.corner=f.corner.replace(/Left|Right|Middle/,j.x);if(j.y!==false)f.corner=f.corner.replace(/top|bottom/,j.y);f.corner!==a.elements.tip.attr("rel")&&x.call(a,f.corner)}return f}function p(b,d){var e;b=c.extend(true,{},b);for(e in b)if(d===true&&e.search(/(tip|classes)/i)!==-1)delete b[e];else!d&&e.search(/(width|border|tip|title|classes|user)/i)!==-1&&delete b[e];return b}function y(b){if(typeof b.tip!=="object")b.tip={corner:b.tip};if(typeof b.tip.size!==
"object")b.tip.size={width:b.tip.size,height:b.tip.size};if(typeof b.border!=="object")b.border={width:b.border};if(typeof b.width!=="object")b.width={value:b.width};if(typeof b.width.max=="string")b.width.max=parseInt(b.width.max.replace(/([0-9]+)/i,"$1"));if(typeof b.width.min=="string")b.width.min=parseInt(b.width.min.replace(/([0-9]+)/i,"$1"));if(typeof b.tip.size.x=="number"){b.tip.size.width=b.tip.size.x;delete b.tip.size.x}if(typeof b.tip.size.y=="number"){b.tip.size.height=b.tip.size.y;delete b.tip.size.y}return b}
function q(){var b,d,e;b=this;e=[true,{}];for(d=0;d<arguments.length;d++)e.push(arguments[d]);for(d=[c.extend.apply(c,e)];typeof d[0].name=="string";)d.unshift(y(c.fn.qtip.styles[d[0].name]));d.unshift(true,{classes:{tooltip:"qtip-"+(arguments[0].name||"defaults")}},c.fn.qtip.styles.defaults);d=c.extend.apply(c,d);e=c.browser.msie?1:0;d.tip.size.width+=e;d.tip.size.height+=e;if(d.tip.size.width%2>0)d.tip.size.width+=1;if(d.tip.size.height%2>0)d.tip.size.height+=1;if(d.tip.corner===true)d.tip.corner=
b.options.position.corner.tooltip==="center"?false:b.options.position.corner.tooltip;return d}function r(b,d,e){d={bottomRight:[[0,0],[d,e],[d,0]],bottomLeft:[[0,0],[d,0],[0,e]],topRight:[[0,e],[d,0],[d,e]],topLeft:[[0,0],[0,e],[d,e]],topMiddle:[[0,e],[d/2,0],[d,e]],bottomMiddle:[[0,0],[d,0],[d/2,e]],rightMiddle:[[0,0],[d,e/2],[0,e]],leftMiddle:[[d,0],[d,e],[0,e/2]]};d.leftTop=d.bottomRight;d.rightTop=d.bottomLeft;d.leftBottom=d.topRight;d.rightBottom=d.topLeft;return d[b]}function t(b){var d;if(c("<canvas>").get(0).getContext)d=
{topLeft:[b,b],topRight:[0,b],bottomLeft:[b,0],bottomRight:[0,0]};else if(c.browser.msie)d={topLeft:[-90,90,0],topRight:[-90,90,-b],bottomLeft:[90,270,0],bottomRight:[90,270,-b]};return d}function B(){var b,d;b=this;d=b.getDimensions();b.elements.bgiframe=b.elements.wrapper.prepend('<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:false" style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=\'0\'); border: 1px solid red; height:'+d.height+"px; width:"+
d.width+'px" />').children(".qtip-bgiframe:first")}c.fn.qtip=function(b,d){var e,a,f,h,j,g,k,l;if(typeof b=="string"){typeof c(this).data("qtip")!=="object"&&c.fn.qtip.log.error.call(self,1,c.fn.qtip.constants.NO_TOOLTIP_PRESENT,false);if(b=="api")return c(this).data("qtip").interfaces[c(this).data("qtip").current];else if(b=="interfaces")return c(this).data("qtip").interfaces}else{b||(b={});if(typeof b.content!=="object"||b.content.jquery&&b.content.length>0)b.content={text:b.content};if(typeof b.content.title!==
"object")b.content.title={text:b.content.title};if(typeof b.position!=="object")b.position={corner:b.position};if(typeof b.position.corner!=="object")b.position.corner={target:b.position.corner,tooltip:b.position.corner};if(typeof b.show!=="object")b.show={when:b.show};if(typeof b.show.when!=="object")b.show.when={event:b.show.when};if(typeof b.show.effect!=="object")b.show.effect={type:b.show.effect};if(typeof b.hide!=="object")b.hide={when:b.hide};if(typeof b.hide.when!=="object")b.hide.when={event:b.hide.when};
if(typeof b.hide.effect!=="object")b.hide.effect={type:b.hide.effect};if(typeof b.style!=="object")b.style={name:b.style};b.style=y(b.style);h=c.extend(true,{},c.fn.qtip.defaults,b);h.style=q.call({options:h},h.style);h.user=c.extend(true,{},b)}return c(this).each(function(){if(typeof b=="string"){g=b.toLowerCase();f=c(this).qtip("interfaces");if(typeof f=="object")if(d===true&&g=="destroy")for(;f.length>0;)f[f.length-1].destroy();else{if(d!==true)f=[c(this).qtip("api")];for(e=0;e<f.length;e++)if(g==
"destroy")f[e].destroy();else if(f[e].status.rendered===true)if(g=="show")f[e].show();else if(g=="hide")f[e].hide();else if(g=="focus")f[e].focus();else if(g=="disable")f[e].disable(true);else g=="enable"&&f[e].disable(false)}}else{k=c.extend(true,{},h);k.hide.effect.length=h.hide.effect.length;k.show.effect.length=h.show.effect.length;if(k.position.container===false)k.position.container=c(document.body);if(k.position.target===false)k.position.target=c(this);if(k.show.when.target===false)k.show.when.target=
c(this);if(k.hide.when.target===false)k.hide.when.target=c(this);a=c.fn.qtip.interfaces.length;for(e=0;e<a;e++)if(typeof c.fn.qtip.interfaces[e]=="undefined"){a=e;break}j=new z(c(this),k,a);c.fn.qtip.interfaces[a]=j;if(typeof c(this).data("qtip")=="object"){if(typeof c(this).attr("qtip")==="undefined")c(this).data("qtip").current=c(this).data("qtip").interfaces.length;c(this).data("qtip").interfaces.push(j)}else c(this).data("qtip",{current:0,interfaces:[j]});if(k.content.prerender===false&&k.show.when.event!==
false&&k.show.ready!==true)k.show.when.target.bind(k.show.when.event+".qtip-"+a+"-create",{qtip:a},function(n){l=c.fn.qtip.interfaces[n.data.qtip];l.options.show.when.target.unbind(l.options.show.when.event+".qtip-"+n.data.qtip+"-create");l.cache.mouse={x:n.pageX,y:n.pageY};w.call(l);l.options.show.when.target.trigger(l.options.show.when.event)});else{j.cache.mouse={x:k.show.when.target.offset().left,y:k.show.when.target.offset().top};w.call(j)}}})};c(document).ready(function(){c.fn.qtip.cache={screen:{scroll:{left:c(window).scrollLeft(),
top:c(window).scrollTop()},width:c(window).width(),height:c(window).height()}};var b;c(window).bind("resize scroll",function(d){clearTimeout(b);b=setTimeout(function(){if(d.type==="scroll")c.fn.qtip.cache.screen.scroll={left:c(window).scrollLeft(),top:c(window).scrollTop()};else{c.fn.qtip.cache.screen.width=c(window).width();c.fn.qtip.cache.screen.height=c(window).height()}for(i=0;i<c.fn.qtip.interfaces.length;i++){var e=c.fn.qtip.interfaces[i];if(e.status.rendered===true&&(e.options.position.type!==
"static"||e.options.position.adjust.scroll&&d.type==="scroll"||e.options.position.adjust.resize&&d.type==="resize"))e.updatePosition(d,true)}},100)});c(document).bind("mousedown.qtip",function(d){c(d.target).parents("div.qtip").length===0&&c(".qtip[unfocus]").each(function(){var e=c(this).qtip("api");c(this).is(":visible")&&!e.status.disabled&&c(d.target).add(e.elements.target).length>1&&e.hide(d)})})});c.fn.qtip.interfaces=[];c.fn.qtip.log={error:function(){return this}};c.fn.qtip.constants={};c.fn.qtip.defaults=
{content:{prerender:false,text:false,url:false,data:null,title:{text:false,button:false}},position:{target:false,corner:{target:"bottomRight",tooltip:"topLeft"},adjust:{x:0,y:0,mouse:true,screen:false,scroll:true,resize:true},type:"absolute",container:false},show:{when:{target:false,event:"mouseover"},effect:{type:"fade",length:100},delay:140,solo:false,ready:false},hide:{when:{target:false,event:"mouseout"},effect:{type:"fade",length:100},delay:0,fixed:false},api:{beforeRender:function(){},onRender:function(){},
beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeTitleUpdate:function(){},onTitleUpdate:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};c.fn.qtip.styles={defaults:{background:"white",color:"#111",overflow:"hidden",
textAlign:"left",width:{min:0,max:250},padding:"5px 9px",border:{width:1,radius:0,color:"#d3d3d3"},tip:{corner:false,color:false,size:{width:13,height:13},opacity:1},title:{background:"#e1e1e1",fontWeight:"bold",padding:"7px 12px"},button:{cursor:"pointer"},classes:{target:"",tip:"qtip-tip",title:"qtip-title",button:"qtip-button",content:"qtip-content",active:"qtip-active"}},cream:{border:{width:3,radius:0,color:"#F9E98E"},title:{background:"#F0DE7D",color:"#A27D35"},background:"#FBF7AA",color:"#A27D35",
classes:{tooltip:"qtip-cream"}},light:{border:{width:3,radius:0,color:"#E2E2E2"},title:{background:"#f1f1f1",color:"#454545"},background:"white",color:"#454545",classes:{tooltip:"qtip-light"}},dark:{border:{width:3,radius:0,color:"#303030"},title:{background:"#404040",color:"#f3f3f3"},background:"#505050",color:"#f3f3f3",classes:{tooltip:"qtip-dark"}},red:{border:{width:3,radius:0,color:"#CE6F6F"},title:{background:"#f28279",color:"#9C2F2F"},background:"#F79992",color:"#9C2F2F",classes:{tooltip:"qtip-red"}},
green:{border:{width:3,radius:0,color:"#A9DB66"},title:{background:"#b9db8c",color:"#58792E"},background:"#CDE6AC",color:"#58792E",classes:{tooltip:"qtip-green"}},blue:{border:{width:3,radius:0,color:"#ADD9ED"},title:{background:"#D0E9F5",color:"#5E99BD"},background:"#E5F6FE",color:"#4D9FBF",classes:{tooltip:"qtip-blue"}}}})(jQuery);