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