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