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