/* * jquery.qtip. the jquery tooltip plugin * * copyright (c) 2009 craig thompson * http://craigsworks.com * * licensed under mit * http://www.opensource.org/licenses/mit-license.php * * launch : february 2009 * version : 1.0.0-rc3 * released: tuesday 12th may, 2009 - 00:00 * debug: jquery.qtip.debug.js */ (function(f){f.fn.qtip=function(b,u){var y,t,a,s,x,w,v,z;if(typeof b=="string"){if(typeof f(this).data("qtip")!=="object"){f.fn.qtip.log.error.call(self,1,f.fn.qtip.constants.no_tooltip_present,false)}if(b=="api"){return f(this).data("qtip").interfaces[f(this).data("qtip").current]}else{if(b=="interfaces"){return f(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=c(b.style);s=f.extend(true,{},f.fn.qtip.defaults,b);s.style=a.call({options:s},s.style);s.user=f.extend(true,{},b)}return f(this).each(function(){if(typeof b=="string"){w=b.tolowercase();a=f(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=[f(this).qtip("api")]}for(y=0;y0))}if(typeof s.options.show.solo=="object"){z=f(s.options.show.solo)}else{if(s.options.show.solo===true){z=f("div.qtip").not(s.elements.tooltip)}}if(z){z.each(function(){if(f(this).qtip("api").status.rendered===true){f(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();f(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 f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.event_shown,"show")},hide:function(y){var x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.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);x=s.beforehide.call(s,y);if(x===false){return s}function w(){s.onhide.call(s,y)}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(){w();f(this).dequeue()})}else{switch(s.options.hide.effect.type.tolowercase()){case"fade":s.elements.tooltip.fadeout(s.options.hide.effect.length,w);break;case"slide":s.elements.tooltip.slideup(s.options.hide.effect.length,w);break;case"grow":s.elements.tooltip.hide(s.options.hide.effect.length,w);break;default:s.elements.tooltip.hide(null,w);break}s.elements.tooltip.removeclass(s.options.style.classes.active)}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.event_hidden,"hide")},updateposition:function(w,x){var c,g,l,j,h,e,y,i,b,d,k,a,f,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.tooltip_not_rendered,"updateposition")}else{if(s.options.position.type=="static"){return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.cannot_position_static,"updateposition")}}g={position:{left:0,top:0},dimensions:{height:0,width:0},corner:s.options.position.corner.target};l={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"){j=s.options.position.target.attr("coords").split(",");for(c=0;cg.dimensions.width){g.dimensions.width=j[c]}if(j[c]g.dimensions.height){g.dimensions.height=j[c]}if(j[c]0){if(l.corner.search(/left/)!==-1){y.left-=s.options.style.border.radius}else{if(l.corner.search(/right/)!==-1){y.left+=s.options.style.border.radius}}if(l.corner.search(/top/)!==-1){y.top-=s.options.style.border.radius}else{if(l.corner.search(/bottom/)!==-1){y.top+=s.options.style.border.radius}}}if(i){if(l.corner.search(/top/)!==-1){y.top-=i}else{if(l.corner.search(/bottom/)!==-1){y.top+=i}}if(l.corner.search(/left/)!==-1){y.left-=i}else{if(l.corner.search(/right/)!==-1){y.left+=i}}if(l.corner.search(/leftmiddle|rightmiddle/)!==-1){y.top-=1}}if(s.options.position.adjust.screen===true){y=o.call(s,y,g,l)}if(s.options.position.target==="mouse"&&s.options.position.adjust.mouse===true){if(s.options.position.adjust.screen===true&&s.elements.tip){k=s.elements.tip.attr("rel")}else{k=s.options.position.corner.tooltip}y.left+=(k.search(/right/i)!==-1)?-6:6;y.top+=(k.search(/bottom/i)!==-1)?-6:6}if(!s.elements.bgiframe&&f.browser.msie&&parseint(f.browser.version.charat(0))==6){f("select, object").each(function(){a=f(this).offset();a.bottom=a.top+f(this).height();a.right=a.left+f(this).width();if(y.top+l.dimensions.height>=a.top&&y.left+l.dimensions.width>=a.left){k.call(s)}})}y.left+=s.options.position.adjust.x;y.top+=s.options.position.adjust.y;f=s.getposition();if(y.left!=f.left||y.top!=f.top){z=s.beforepositionupdate.call(s,w);if(z===false){return s}s.cache.position=y;if(x===true){s.status.animated=true;s.elements.tooltip.animate(y,200,"swing",function(){s.status.animated=false})}else{s.elements.tooltip.css(y)}s.onpositionupdate.call(s,w);if(typeof w!=="undefined"&&w.type&&w.type!=="mousemove"){f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.event_position_updated,"updateposition")}}return s},updatewidth:function(w){var x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.tooltip_not_rendered,"updatewidth")}else{if(w&&typeof w!=="number"){return f.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(f.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").get(0).getcontext){z=s.elements.tooltip.find(".qtip-tip canvas:first");x=z.get(0).getcontext("2d");x.clearrect(0,0,300,300);y=z.parent("div[rel]:first").attr("rel");b=b(y,s.options.style.tip.size.width,s.options.style.tip.size.height);h.call(s,z,b,s.options.style.tip.color||s.options.style.border.color)}else{if(f.browser.msie){z=s.elements.tooltip.find('.qtip-tip [nodename="shape"]');z.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(f("").get(0).getcontext){a=g(s.options.style.border.radius);s.elements.tooltip.find(".qtip-wrapper canvas").each(function(){x=f(this).get(0).getcontext("2d");x.clearrect(0,0,300,300);y=f(this).parent("div[rel]:first").attr("rel");r.call(s,f(this),a[y],s.options.style.border.radius,s.options.style.border.color)})}else{if(f.browser.msie){s.elements.tooltip.find('.qtip-wrapper [nodename="arc"]').each(function(){f(this).attr("fillcolor",s.options.style.border.color)})}}}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.event_style_updated,"updatestyle")},updatecontent:function(a,y){var z,x,w;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.tooltip_not_rendered,"updatecontent")}else{if(!a){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.no_content_provided,"updatecontent")}}z=s.beforecontentupdate.call(s,a);if(typeof z=="string"){a=z}else{if(z===false){return}}if(f.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){w=0;x.each(function(c){f('').load(function(){if(++w==x.length){b()}})})}else{b()}function b(){s.updatewidth();if(y!==false){if(s.options.position.type!=="static"){s.updateposition(s.elements.tooltip.is(":visible"),true)}if(s.options.style.tip.corner!==false){n.call(s)}}}s.oncontentupdate.call(s);return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.event_content_updated,"loadcontent")},loadcontent:function(w,z,a){var y;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.tooltip_not_rendered,"loadcontent")}y=s.beforecontentload.call(s);if(y===false){return s}if(a=="post"){f.post(w,z,x)}else{f.get(w,z,x)}function x(b){s.oncontentload.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.event_content_loaded,"loadcontent");s.updatecontent(b)}return s},updatetitle:function(w){if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.tooltip_not_rendered,"updatetitle")}else{if(!w){return f.fn.qtip.log.error.call(s,2,f.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 f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.event_title_updated,"updatetitle")},focus:function(a){var y,x,w,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.tooltip_not_rendered,"focus")}else{if(s.options.position.type=="static"){return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.cannot_focus_static,"focus")}}y=parseint(s.elements.tooltip.css("z-index"));x=6000+f("div.qtip[qtip]").length-1;if(!s.status.focused&&y!==x){z=s.beforefocus.call(s,a);if(z===false){return s}f("div.qtip[qtip]").not(s.elements.tooltip).each(function(){if(f(this).qtip("api").status.rendered===true){w=parseint(f(this).css("z-index"));if(typeof w=="number"&&w>-1){f(this).css({zindex:parseint(f(this).css("z-index"))-1})}f(this).qtip("api").status.focused=false}});s.elements.tooltip.css({zindex:x});s.status.focused=true;s.onfocus.call(s,a);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.event_focused,"focus")}return s},disable:function(w){if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.tooltip_not_rendered,"disable")}if(w){if(!s.status.disabled){s.status.disabled=true;f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.event_disabled,"disable")}else{f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.tooltip_already_disabled,"disable")}}else{if(s.status.disabled){s.status.disabled=false;f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.event_enabled,"disable")}else{f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.tooltip_already_enabled,"disable")}}return s},destroy:function(){var w,x,y;x=s.beforedestroy.call(s);if(x===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"){y=s.elements.target.data("qtip").interfaces;if(typeof y=="object"&&y.length>0){for(w=0;w0){s.elements.target.data("qtip").current=y.length-1}else{s.elements.target.removedata("qtip")}s.ondestroy.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.event_destroyed,"destroy");return s.elements.target},getposition:function(){var w,x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.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 f.fn.qtip.log.error.call(s,2,f.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 p(){var s,w,u,t,v,y,x;s=this;s.beforerender.call(s);s.status.rendered=true;s.elements.tooltip='';s.elements.tooltip=f(s.elements.tooltip);s.elements.tooltip.appendto(s.options.position.container);s.elements.tooltip.data("qtip",{current:0,interfaces:[s]});s.elements.wrapper=s.elements.tooltip.children("div:first");s.elements.contentwrapper=s.elements.wrapper.children("div:first").css({background:s.options.style.background});s.elements.content=s.elements.contentwrapper.children("div:first").css(q(s.options.style));if(f.browser.msie){s.elements.wrapper.add(s.elements.content).css({zoom:1})}if(s.options.hide.when.event=="unfocus"){s.elements.tooltip.attr("unfocus",true)}if(typeof s.options.style.width.value=="number"){s.updatewidth()}if(f("").get(0).getcontext||f.browser.msie){if(s.options.style.border.radius>0){m.call(s)}else{s.elements.contentwrapper.css({border:s.options.style.border.width+"px solid "+s.options.style.border.color})}if(s.options.style.tip.corner!==false){e.call(s)}}else{s.elements.contentwrapper.css({border:s.options.style.border.width+"px solid "+s.options.style.border.color});s.options.style.border.radius=0;s.options.style.tip.corner=false;f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.canvas_vml_not_supported,"render")}if((typeof s.options.content.text=="string"&&s.options.content.text.length>0)||(s.options.content.text.jquery&&s.options.content.text.length>0)){u=s.options.content.text}else{if(typeof s.elements.target.attr("title")=="string"&&s.elements.target.attr("title").length>0){u=s.elements.target.attr("title").replace("\\n","
");s.elements.target.attr("title","")}else{if(typeof s.elements.target.attr("alt")=="string"&&s.elements.target.attr("alt").length>0){u=s.elements.target.attr("alt").replace("\\n","
");s.elements.target.attr("alt","")}else{u=" ";f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.no_valid_content,"render")}}}if(s.options.content.title.text!==false){j.call(s)}s.updatecontent(u);l.call(s);if(s.options.show.ready===true){s.show()}if(s.options.content.url!==false){t=s.options.content.url;v=s.options.content.data;y=s.options.content.method||"get";s.loadcontent(t,v,y)}s.onrender.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.event_rendered,"render")}function m(){var f,z,t,b,x,e,u,g,d,y,w,c,a,s,v;f=this;f.elements.wrapper.find(".qtip-borderbottom, .qtip-bordertop").remove();t=f.options.style.border.width;b=f.options.style.border.radius;x=f.options.style.border.color||f.options.style.tip.color;e=g(b);u={};for(z in e){u[z]='
';if(f("").get(0).getcontext){u[z]+=''}else{if(f.browser.msie){g=b*2+3;u[z]+=''}}u[z]+="
"}d=f.getdimensions().width-(math.max(t,b)*2);y='
';w='
'+u.topleft+u.topright+y;f.elements.wrapper.prepend(w);c='
'+u.bottomleft+u.bottomright+y;f.elements.wrapper.append(c);if(f("").get(0).getcontext){f.elements.wrapper.find("canvas").each(function(){a=e[f(this).parent("[rel]:first").attr("rel")];r.call(f,f(this),a,b,x)})}else{if(f.browser.msie){f.elements.tooltip.append('')}}s=math.max(b,(b+(t-b)));v=math.max(t-b,0);f.elements.contentwrapper.css({border:"0px solid "+x,borderwidth:v+"px "+s+"px"})}function r(u,w,s,t){var v=u.get(0).getcontext("2d");v.fillstyle=t;v.beginpath();v.arc(w[0],w[1],s,0,math.pi*2,false);v.fill()}function e(v){var t,s,x,u,w;t=this;if(t.elements.tip!==null){t.elements.tip.remove()}s=t.options.style.tip.color||t.options.style.border.color;if(t.options.style.tip.corner===false){return}else{if(!v){v=t.options.style.tip.corner}}x=b(v,t.options.style.tip.size.width,t.options.style.tip.size.height);t.elements.tip='
';if(f("").get(0).getcontext){t.elements.tip+=''}else{if(f.browser.msie){u=t.options.style.tip.size.width+","+t.options.style.tip.size.height;w="m"+x[0][0]+","+x[0][1];w+=" l"+x[1][0]+","+x[1][1];w+=" "+x[2][0]+","+x[2][1];w+=" xe";t.elements.tip+='';t.elements.tip+='';t.elements.contentwrapper.css("position","relative")}}t.elements.tooltip.prepend(t.elements.tip+"
");t.elements.tip=t.elements.tooltip.find("."+t.options.style.classes.tip).eq(0);if(f("").get(0).getcontext){h.call(t,t.elements.tip.find("canvas:first"),x,s)}if(v.search(/top/)!==-1&&f.browser.msie&&parseint(f.browser.version.charat(0))===6){t.elements.tip.css({margintop:-4})}n.call(t,v)}function h(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 n(u){var t,w,s,x,v;t=this;if(t.options.style.tip.corner===false||!t.elements.tip){return}if(!u){u=t.elements.tip.attr("rel")}w=positionadjust=(f.browser.msie)?1:0;t.elements.tip.css(u.match(/left|right|top|bottom/)[0],0);if(u.search(/top|bottom/)!==-1){if(f.browser.msie){if(parseint(f.browser.version.charat(0))===6){positionadjust=(u.search(/top/)!==-1)?-3:1}else{positionadjust=(u.search(/top/)!==-1)?1:2}}if(u.search(/middle/)!==-1){t.elements.tip.css({left:"50%",marginleft:-(t.options.style.tip.size.width/2)})}else{if(u.search(/left/)!==-1){t.elements.tip.css({left:t.options.style.border.radius-w})}else{if(u.search(/right/)!==-1){t.elements.tip.css({right:t.options.style.border.radius+w})}}}if(u.search(/top/)!==-1){t.elements.tip.css({top:-positionadjust})}else{t.elements.tip.css({bottom:positionadjust})}}else{if(u.search(/left|right/)!==-1){if(f.browser.msie){positionadjust=(parseint(f.browser.version.charat(0))===6)?1:((u.search(/left/)!==-1)?1:2)}if(u.search(/middle/)!==-1){t.elements.tip.css({top:"50%",margintop:-(t.options.style.tip.size.height/2)})}else{if(u.search(/top/)!==-1){t.elements.tip.css({top:t.options.style.border.radius-w})}else{if(u.search(/bottom/)!==-1){t.elements.tip.css({bottom:t.options.style.border.radius+w})}}}if(u.search(/left/)!==-1){t.elements.tip.css({left:-positionadjust})}else{t.elements.tip.css({right:positionadjust})}}}s="padding-"+u.match(/left|right|top|bottom/)[0];x=t.options.style.tip.size[(s.search(/left|right/)!==-1)?"width":"height"];t.elements.tooltip.css("padding",0);t.elements.tooltip.css(s,x);if(f.browser.msie&&parseint(f.browser.version.charat(0))==6){v=parseint(t.elements.tip.css("margin-top"))||0;v+=parseint(t.elements.content.css("margin-top"))||0;t.elements.tip.css({margintop:v})}}function j(){var s=this;if(s.elements.title!==null){s.elements.title.remove()}s.elements.title=f('
').css(q(s.options.style.title,true)).css({zoom:(f.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=f('').css(q(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 l(){var t,v,u,s;t=this;v=t.options.show.when.target;u=t.options.hide.when.target;if(t.options.hide.fixed){u=u.add(t.elements.tooltip)}if(t.options.hide.when.event=="inactive"){s=["click","dblclick","mousedown","mouseup","mousemove","mouseout","mouseenter","mouseleave","mouseover"];function y(z){if(t.status.disabled===true){return}cleartimeout(t.timers.inactive);t.timers.inactive=settimeout(function(){f(s).each(function(){u.unbind(this+".qtip-inactive");t.elements.content.unbind(this+".qtip-inactive")});t.hide(z)},t.options.hide.delay)}}else{if(t.options.hide.fixed===true){t.elements.tooltip.bind("mouseover.qtip",function(){if(t.status.disabled===true){return}cleartimeout(t.timers.hide)})}}function x(z){if(t.status.disabled===true){return}if(t.options.hide.when.event=="inactive"){f(s).each(function(){u.bind(this+".qtip-inactive",y);t.elements.content.bind(this+".qtip-inactive",y)});y()}cleartimeout(t.timers.show);cleartimeout(t.timers.hide);t.timers.show=settimeout(function(){t.show(z)},t.options.show.delay)}function w(z){if(t.status.disabled===true){return}if(t.options.hide.fixed===true&&t.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&f(z.relatedtarget).parents("div.qtip[qtip]").length>0){z.stoppropagation();z.preventdefault();cleartimeout(t.timers.hide);return false}cleartimeout(t.timers.show);cleartimeout(t.timers.hide);t.elements.tooltip.stop(true,true);t.timers.hide=settimeout(function(){t.hide(z)},t.options.hide.delay)}if((t.options.show.when.target.add(t.options.hide.when.target).length===1&&t.options.show.when.event==t.options.hide.when.event&&t.options.hide.when.event!=="inactive")||t.options.hide.when.event=="unfocus"){t.cache.toggle=0;v.bind(t.options.show.when.event+".qtip",function(z){if(t.cache.toggle==0){x(z)}else{w(z)}})}else{v.bind(t.options.show.when.event+".qtip",x);if(t.options.hide.when.event!=="inactive"){u.bind(t.options.hide.when.event+".qtip",w)}}if(t.options.position.type.search(/(fixed|absolute)/)!==-1){t.elements.tooltip.bind("mouseover.qtip",t.focus)}if(t.options.position.target==="mouse"&&t.options.position.type!=="static"){v.bind("mousemove.qtip",function(z){t.cache.mouse={x:z.pagex,y:z.pagey};if(t.status.disabled===false&&t.options.position.adjust.mouse===true&&t.options.position.type!=="static"&&t.elements.tooltip.css("display")!=="none"){t.updateposition(z)}})}}function o(u,v,a){var z,s,x,y,t,w;z=this;if(a.corner=="center"){return v.position}s=f.extend({},u);y={x:false,y:false};t={left:(s.left=f.fn.qtip.cache.screen.width+f.fn.qtip.cache.screen.scroll.left),top:(s.top=f.fn.qtip.cache.screen.height+f.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")){e.call(z,s.corner)}}return s}function q(u,t){var v,s;v=f.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 c(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 a(){var s,t,u,x,v,w;s=this;u=[true,{}];for(t=0;t0){v.tip.size.width+=1}if(v.tip.size.height%2>0){v.tip.size.height+=1}if(v.tip.corner===true){v.tip.corner=(s.options.position.corner.tooltip==="center")?false:s.options.position.corner.tooltip}return v}function b(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 g(s){var t;if(f("").get(0).getcontext){t={topleft:[s,s],topright:[0,s],bottomleft:[s,0],bottomright:[0,0]}}else{if(f.browser.msie){t={topleft:[-90,90,0],topright:[-90,90,-s],bottomleft:[90,270,0],bottomright:[90,270,-s]}}}return t}function k(){var s,t,u;s=this;u=s.getdimensions();t='