(function(d){function x(b,c){var a=this;a.options=c;a.elements={target:b.addClass(a.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,tip:null};a.mouse={};a.timers={};d.extend(a,a.options.api,{show:function(e){function f(){a.onShow.call(a,e)}a.elements.tooltip.stop(true,true);if(a.beforeShow.call(a,e)!==false){typeof a.options.show.when.target.data("qtip-toggle")=="number"&&a.options.show.when.target.data("qtip-toggle",1);a.updatePosition(e);if(typeof a.options.show.solo== "object")var g=d(a.options.show.solo);else if(a.options.show.solo===true)g=d("div.qtip").not(a.elements.tooltip);g&&g.each(function(){d(this).qtip("api").hide()});if(typeof a.options.show.effect.type=="function"){a.options.show.effect.type.call(a.elements.tooltip,a.options.show.effect.length);a.elements.tooltip.queue(function(){f();d(this).dequeue()})}else{switch(a.options.show.effect.type){case "fade":a.elements.tooltip.fadeIn(a.options.show.effect.length,f);break;case "slide":a.elements.tooltip.slideDown(a.options.show.effect.length, function(){f();a.updatePosition(e,true)});break;case "grow":a.elements.tooltip.show(a.options.show.effect.length,f);break;default:a.elements.tooltip.show(null,f);break}a.elements.tooltip.addClass(a.options.style.classes.active)}a.options.position.type.search(/(fixed|absolute)/)!==-1&&a.focus();a.onShow.call(a,e);return a}},hide:function(e){function f(){a.onHide.call(a,e)}clearTimeout(a.timers.show);a.elements.tooltip.stop(true,true);if(a.beforeHide.call(a,e)===false)return false;typeof a.options.show.when.target.data("qtip-toggle")== "number"&&a.options.show.when.target.data("qtip-toggle",0);if(typeof a.options.hide.effect.type=="function"){a.options.hide.effect.type.call(a.elements.tooltip,a.options.hide.effect.length);a.elements.tooltip.queue(function(){f();d(this).dequeue()})}else{switch(a.options.hide.effect.type){case "fade":a.elements.tooltip.fadeOut(a.options.hide.effect.length,f);break;case "slide":a.elements.tooltip.slideUp(a.options.hide.effect.length,function(){a.updatePosition(e,true);f()});break;case "grow":a.elements.tooltip.hide(a.options.hide.effect.length, f);break;default:a.elements.tooltip.hide(null,f);break}a.elements.tooltip.removeClass(a.options.style.classes.active)}a.onHide.call(a,e);return a},updatePosition:function(e,f){if(a.beforePositionUpdate.call(a,e)===false)return false;if(a.options.position.target=="mouse")var g={left:a.mouse.x,top:a.mouse.y},i={height:1,width:1};else{if(a.options.position.target.get(0).nodeName=="AREA"){for(var h=a.options.position.target.attr("coords").split(","),j=0;j<h.length;j++)h[j]=parseInt(h[j]);g=a.options.position.target.parent("map").attr("name"); var k=d('img[usemap="#'+g+'"]:first').offset();g={left:Math.floor(k.left+h[0]),top:Math.floor(k.top+h[1])};switch(a.options.position.target.attr("shape")){case "rect":i={width:Math.floor(Math.abs(h[2]-h[0])),height:Math.floor(Math.abs(h[3]-h[1]))};break;case "circle":i={width:h[2],height:h[2]};g.left+=h[2]+2;g.top+=h[2]+2;break;case "poly":i={width:h[0],height:h[1]};for(j=0;j<h.length;j++)if(j%2==0){if(h[j]>i.width)i.width=h[j];if(h[j]<h[0])g.left=Math.floor(k.left+h[j])}else{if(h[j]>i.height)i.height= h[j];if(h[j]<h[1])g.top=Math.floor(k.top+h[j])}i.width-=g.left-k.left;i.height-=g.top-k.top;break}i.width-=2;i.height-=2}else if(a.options.position.target.add(document.body).length!==1){g=a.options.position.target.offset();i={height:a.options.position.target.outerHeight(),width:a.options.position.target.outerWidth()}}else{g={left:d(document).scrollLeft(),top:d(document).scrollTop()};i={height:d(window).height(),width:d(window).width()}}h=a.options.position.corner.target;if(h.search(/right/i)!==-1)g.left+= i.width;if(h.search(/bottom/i)!==-1)g.top+=i.height;if(h.search(/((top|bottom)Middle)|center/)!==-1)g.left+=i.width/2;if(h.search(/((left|right)Middle)|center/)!==-1)g.top+=i.height/2}h=a.options.position.corner.tooltip;if(h.search(/right/i)!==-1)g.left-=a.elements.tooltip.outerWidth();if(h.search(/bottom/i)!==-1)g.top-=a.elements.tooltip.outerHeight();if(h.search(/((top|bottom)Middle)|center/)!==-1)g.left-=a.elements.tooltip.outerWidth()/2;if(h.search(/((left|right)Middle)|center/)!==-1)g.top-=a.elements.tooltip.outerHeight()/ 2;g.left+=a.options.position.adjust.x;g.top+=a.options.position.adjust.y;if(a.options.position.adjust.screen)g=y.call(a,g,i,e);if(a.options.position.target=="mouse"){g.left+=a.options.style.tip.corner.search(/right/i)!==-1?-6:6;g.top+=a.options.style.tip.corner.search(/bottom/i)!==-1?-6:6}f===true?a.elements.tooltip.animate({left:g.left,top:g.top},200,"swing"):a.elements.tooltip.css({left:g.left,top:g.top});a.onPositionUpdate.call(a,e);return a},updateWidth:function(e){if(!(e&&typeof e!=="number")){var f= Math.max(a.options.style.border.width,a.options.style.border.radius);if(!e)if(typeof a.options.style.width.value=="number")e=a.options.style.width.value;else{a.elements.tooltip.outerWidth();a.elements.tooltip.css({width:"auto"});if(d.support&&!d.support.cssFloat||d.browser.msie){a.elements.wrapper.css({position:"static",zoom:"normal"});a.elements.tip&&a.elements.tip.hide()}e=a.elements.tooltip.outerWidth()+f*2+1;if(!a.options.style.width.value){if(e>a.options.style.width.max)e=a.options.style.width.max; if(e<a.options.style.width.min)e=a.options.style.width.min}}if(e%2!==0)e-=1;a.elements.tooltip.width(e);a.options.style.border.radius&&a.elements.tooltip.find(".qtip-betweenCorners").each(function(){d(this).width(e-a.options.style.border.radius*2)});if(d.support&&!d.support.cssFloat||d.browser.msie){a.elements.wrapper.css({position:"relative",zoom:"1"}).width(e);a.elements.tip&&a.elements.tip.show()}return a}},updateStyle:function(e){if(typeof e!=="string"||!d.fn.qtip.styles[e])return m("No such style is defined"); a.options.style=n.call(a,d.fn.qtip.styles[e],a.options.user.style);a.elements.content.css(l(a.options.style));a.options.content.title.text!==false&&a.elements.title.css(l(a.options.style.title,true));a.elements.contentWrapper.css({borderColor:a.options.style.border.color});if(a.options.style.tip.corner!==false)if(document.createElement("canvas").getContext){e=a.elements.tooltip.find(".qtip-tip canvas:first");e.get(0).getContext("2d").clearRect(0,0,300,300);o.call(a,e,e.parent("div[rel]:first").attr("rel"), a.options.style.tip.color||a.options.style.border.color)}else if(d.support&&!d.support.cssFloat||d.browser.msie){e=a.elements.tooltip.find('.qtip-tip [nodeName="shape"]');e.attr("fillcolor",a.options.style.tip.color||a.options.style.border.color)}if(a.options.style.border.radius>0){a.elements.tooltip.find(".qtip-betweenCorners").css({backgroundColor:a.options.style.border.color});if(document.createElement("canvas").getContext){var f=p(a.options.style.border.radius);a.elements.tooltip.find(".qtip-wrapper canvas").each(function(){d(this).get(0).getContext("2d").clearRect(0, 0,300,300);var g=d(this).parent("div[rel]:first").attr("rel");q.call(a,d(this),f[g],a.options.style.border.radius,a.options.style.border.color)})}else if(d.support&&!d.support.cssFloat||d.browser.msie)a.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function(){d(this).attr("fillcolor",a.options.style.border.color)})}return a},updateContent:function(e,f){function f(){a.updateWidth();if(f!==false){a.updatePosition(a.elements.tooltip.is(":visible"));a.options.style.tip.corner!==false&& r.call(a)}}if(!e)return false;var g=a.beforeContentUpdate.call(a,e);if(typeof g=="string")e=g;else if(g===false)return;a.elements.content.html(e);var i=a.elements.content.find("img");if(i.length>0){var h=0;i.each(function(){d('<img src="'+d(this).attr("src")+'" />').load(function(){++h==i.length&&f()})})}else f();a.onContentUpdate.call(a);return a},loadContent:function(e,f,g){function i(h){a.updateContent(h);a.onContentLoad.call(a)}if(a.beforeContentLoad.call(a)!==false){g=="post"?d.post(e,f,i):d.get(e, f,i);return a}},focus:function(e){if(a.beforeFocus.call(a,e)!==false){var f=parseInt(a.elements.tooltip.css("z-index")),g=6E3+d(".qtip").length-1;if(f!==g){d(".qtip").not(a.elements.tooltip).each(function(){d(this).css({zIndex:parseInt(d(this).css("z-index"))-1})});a.elements.tooltip.css({zIndex:g})}a.onFocus.call(a,e);return a}},disable:function(e){if(e){a.options.show.when.target.unbind("mousemove.qtip",a.updatePosition);a.options.show.when.target.unbind("mouseout.qtip",a.hide);a.options.show.when.target.unbind(a.options.show.when.event+ ".qtip");a.options.show.when.target.removeData("qtip-toggle");a.options.hide.when.target.unbind(a.options.hide.when.event+".qtip");a.elements.tooltip.unbind(a.options.hide.when.event+".qtip");a.elements.tooltip.unbind("mouseover.qtip",a.focus)}else s.call(a);return a},destroy:function(){if(a.beforeDestroy.call(a)!==false){a.disable(true);a.elements.tooltip.remove();a.elements.target.removeData("qtip");a.onDestroy.call(a);return a.elements.target}},getPosition:function(){var e=!a.elements.tooltip.is(":visible")? true:false;e&&a.elements.tooltip.css({visiblity:"hidden"}).show();var f=a.elements.tooltip.offset();e&&a.elements.tooltip.css({visiblity:"visible"}).hide();return f}});z.call(a)}function z(){function b(){c.beforeRender.call({options:c.options,elements:{target:c.elements.target}});c.elements.tooltip=d(document.createElement("div")).addClass("qtip").addClass(c.options.style.classes.tooltip||c.options.style).css("-moz-border-radius","").css("-webkit-border-radius","").css({position:c.options.position.type, zIndex:6E3+d(".qtip").length}).appendTo(c.options.position.container).hide().data("qtip",c);c.elements.wrapper=d(document.createElement("div")).addClass("qtip-wrapper").css({position:"relative",overflow:"hidden",textAlign:"left"}).appendTo(c.elements.tooltip);c.elements.contentWrapper=d(document.createElement("div")).addClass("qtip-contentWrapper").css({overflow:"hidden"}).appendTo(c.elements.wrapper);c.elements.content=d(document.createElement("div")).addClass(c.options.style.classes.content).css(l(c.options.style)).appendTo(c.elements.contentWrapper); if(d.support&&!d.support.cssFloat||d.browser.msie){d(c.elements.wrapper,c.elements.contentWrapper).css({lineHeight:"100%"});d(c.elements.wrapper).css({zoom:"1"});if(parseInt(d.browser.version.charAt(0))==6){d("select, object").length&&A.call(c);c.elements.content.css({marginTop:c.options.style.border.radius<6?-1:-2})}}typeof c.options.style.width.value=="number"&&c.updateWidth();B.call(c);t.call(c);if(c.options.content.text===false){var f=c.elements.target.attr("title").replace("\\n","<br />");c.elements.target.attr("title", "")}else f=typeof d(c.options.content.text).length>0?d(c.options.content.text).clone(true):c.options.content.text;c.updateContent(f);c.options.content.title.text!==false&&C.call(c);if(c.options.content.url!==false)c.loadContent(c.options.content.url,c.options.content.data,c.options.content.method||"get");s.call(c);if(c.options.show.ready===true){f=c.options.show.effect.length;c.elements.tooltip.show();c.options.show.effect.length=f}c.onRender.call(c)}var c=this;if(c.options.content.prerender===false&& c.options.show.when.event!==false&&c.options.show.ready!==true){var a=c.options.show.when.target,e=c.options.show.when.event;a.bind(e+".qtip-create",function(f){a.unbind(e+".qtip-create");b();c.mouse={x:f.pageX,y:f.pageY};a.trigger(f)})}else b()}function B(){this.elements.tooltip.find(".qtip-borderTop, .qtip-borderBottom").remove();var b=this.options.style.border.width,c=this.options.style.border.radius,a=this.options.style.border.color||this.options.style.tip.color;if(c===0)this.elements.contentWrapper.css({border:b+ "px solid "+a});else{var e=p(c),f={};for(var g in e)f[g]=d(document.createElement("div")).css({height:c,width:c,overflow:"hidden",position:"absolute",lineHeight:0.1,fontSize:1}).css(g.search(/Left/)!==-1?"left":"right",0).attr("rel",g);if(document.createElement("canvas").getContext)for(g in e){var i=d(document.createElement("canvas")).attr("height",c).attr("width",c).css({verticalAlign:"top"}).appendTo(f[g]);q.call(this,i,e[g],c,a)}else if(d.support&&!d.support.cssFloat||d.browser.msie)for(g in e)d('<v:arc style="behavior: url(#default#VML)"></v:arc>').attr("stroked", false).attr("fillcolor",a).attr("startangle",e[g][0]).attr("endangle",e[g][1]).css({width:c*2+3,height:c*2+3,marginLeft:g.search(/Right/)!==-1?e[g][2]-3.5:-1,marginTop:g.search(/bottom/)!==-1?-2:-1,verticalAlign:"top",display:"inline-block"}).appendTo(f[g]);e=d(document.createElement("div")).addClass("qtip-betweenCorners").css({height:c,width:this.elements.tooltip.outerWidth()-Math.max(b,c)*2,overflow:"hidden",backgroundColor:a,lineHeight:0.1,fontSize:1});d(document.createElement("div")).addClass("qtip-borderTop").css({height:c, marginLeft:c,lineHeight:0.1,fontSize:1,padding:0}).append(f.topLeft).append(f.topRight).append(e).prependTo(this.elements.wrapper);d(document.createElement("div")).addClass("qtip-borderBottom").css({height:c,marginLeft:c,lineHeight:0.1,fontSize:1,padding:0,clear:"both"}).append(f.bottomLeft).append(f.bottomRight).append(e.clone()).appendTo(this.elements.wrapper);f=Math.max(c,c+(b-c));this.elements.contentWrapper.css({margin:0,border:"0px solid "+a,borderWidth:Math.max(b-c,0)+"px "+f+"px",position:"relative", clear:"both"})}}function q(b,c,a,e){b=b.get(0).getContext("2d");b.fillStyle=e;b.beginPath();b.arc(c[0],c[1],a,0,Math.PI*2,false);b.fill()}function t(b){var c=this.options.style.tip.color||this.options.style.border.color;if(this.options.style.tip.corner!==false){if(!b)b=this.options.style.tip.corner;this.elements.tip!==null&&this.elements.tip.remove();d(this.elements.tooltip).find("."+this.options.style.classes.tip).remove();this.elements.tip=d(document.createElement("div")).addClass(this.options.style.classes.tip).css({width:this.options.style.tip.size.x, height:this.options.style.tip.size.y,margin:"0 auto",lineHeight:0.1,fontSize:1}).attr("rel",b);if(document.createElement("canvas").getContext){var a=d(document.createElement("canvas")).attr("width",this.options.style.tip.size.x).attr("height",this.options.style.tip.size.y).appendTo(this.elements.tip);o.call(this,a,b,c)}else if(d.support&&!d.support.cssFloat||d.browser.msie){a=u(b,this.options.style.tip.size.x,this.options.style.tip.size.y);var e="m"+a[0][0]+","+a[0][1];e+=" l"+a[1][0]+","+a[1][1]; e+=" "+a[2][0]+","+a[2][1];e+=" xe";d('<v:shape style="behavior: url(#default#VML)"></v:shape>').attr("fillcolor",c).attr("stroked","false").attr("coordsize",this.options.style.tip.size.x+","+this.options.style.tip.size.y).attr("path",e).css({width:this.options.style.tip.size.x,height:this.options.style.tip.size.y,lineHeight:0.1,verticalAlign:b.search(/top/)!==-1?"bottom":"top",display:"inline-block"}).appendTo(this.elements.tip);if(d.support&&!d.support.cssFloat||d.browser.msie)this.elements.content.css({position:"relative"})}else return m("Canvas/VML unsupported, cannot draw the tip!"); b.search(/left|top|right/)!==-1?this.elements.tip.prependTo(this.elements.tooltip):this.elements.tip.appendTo(this.elements.tooltip);r.call(this,b)}}function o(b,c,a){c=u(c,this.options.style.tip.size.x,this.options.style.tip.size.y);b=b.get(0).getContext("2d");b.fillStyle=a;b.beginPath();b.moveTo(c[0][0],c[0][1]);b.lineTo(c[1][0],c[1][1]);b.lineTo(c[2][0],c[2][1]);b.fill()}function r(b){if(!(this.options.style.tip.corner===false||!this.elements.tip)){b||(b=this.elements.tip.attr("rel"));var c=this.options.style.border.radius, a=d.support&&!d.support.cssFloat||d.browser.msie?1:0;this.elements.tip.css(b.match(/left|right|top|bottom/)[0],0);if(b.search(/top|bottom/)!==-1){if(b.search(/Middle/)!==-1)this.elements.tooltip.css({textAlign:"center"});else if(b.search(/Left/)!==-1){this.elements.tip.css({marginLeft:c-a});this.elements.tooltip.css({marginLeft:-c})}else if(b.search(/Right/)!==-1){this.elements.tip.css({marginLeft:this.elements.tooltip.outerWidth()-this.options.style.tip.size.x-c-a});this.elements.tooltip.css({marginLeft:c})}if(d.support&& !d.support.cssFloat||d.browser.msie)b.search(/bottom/)!==-1&&this.elements.tip.css({marginTop:-2})}else if(b.search(/left|right/)!==-1){if(b.search(/Middle/)!==-1)this.elements.tip.css({position:"absolute",top:"50%",marginTop:-(this.options.style.tip.size.y/2)});else if(b.search(/Top/)!==-1){this.elements.tip.css({position:"absolute",top:c-a});this.elements.tooltip.css({marginTop:-c})}else if(b.search(/Bottom/)!==-1){this.elements.tip.css({position:"absolute",bottom:c+a});this.elements.tooltip.css({marginTop:c})}if(d.support&& !d.support.cssFloat||d.browser.msie)b.search(/left/)!==-1?this.elements.tip.css({marginLeft:-1}):this.elements.tip.css({marginRight:1});b="padding-"+b.match(/left|right/)[0];c=b.search(/left/)!==-1?this.options.style.tip.size.x:this.options.style.tip.size.y;b!=="padding-bottom"&&this.elements.tooltip.css(b,c-1)}}}function C(){this.elements.title!==null&&this.elements.title.remove();this.elements.title=d(document.createElement("div")).addClass(this.options.style.classes.title).css(l(this.options.style.title, true)).html(this.options.content.title.text).prependTo(this.elements.contentWrapper);this.options.content.title.button!==false&&typeof this.options.content.title.button=="string"&&d(document.createElement("a")).attr("href","#").css({"float":"right",position:"relative"}).addClass(this.options.style.classes.button).html(this.options.content.title.button).prependTo(this.elements.title).click(this.hide)}function s(){function b(h){if(a.options.hide.when.event=="inactive"){d(g).each(function(){f.bind(this+ ".qtip-inactive",i);a.elements.content.bind(this+".qtip-inactive",i)});i()}clearTimeout(a.timers.show);clearTimeout(a.timers.hide);a.timers.show=setTimeout(function(){a.show(h)},a.options.show.delay)}function c(h){if(a.options.hide.fixed===true&&a.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&d(h.relatedTarget).parents(".qtip").length>0){h.stopPropagation();h.preventDefault();clearTimeout(a.timers.hide);return false}clearTimeout(a.timers.show);clearTimeout(a.timers.hide);a.timers.hide= setTimeout(function(){a.hide(h)},a.options.hide.delay)}var a=this,e=a.options.show.when.target,f=a.options.hide.when.target;if(a.options.hide.fixed)f=f.add(a.elements.tooltip);if(a.options.hide.when.event=="inactive")var g=["click","dblclick","mousedown","mouseup","mousemove","mouseout","mouseenter","mouseleave","mouseover"],i=function(){clearTimeout(a.timers.inactive);a.timers.inactive=setTimeout(function(){d(g).each(function(){f.unbind(this+".qtip-inactive");a.elements.content.unbind(this+".qtip-inactive")}); a.hide()},a.options.hide.delay)};else a.options.hide.fixed===true&&a.elements.tooltip.bind("mouseover.qtip",function(){clearTimeout(a.timers.hide)});if(a.options.show.when.target.add(a.options.hide.when.target).length===1&&a.options.show.when.event==a.options.hide.when.event&&a.options.hide.when.event!=="inactive"||a.options.hide.when.event=="unfocus"){e.data("qtip-toggle",0);a.options.hide.when.event=="unfocus"&&a.elements.tooltip.attr("unfocus",true);e.bind(a.options.show.when.event+".qtip",function(h){parseInt(d(this).data("qtip-toggle"))=== 0?b(h):c(h)})}else{e.bind(a.options.show.when.event+".qtip",b);a.options.hide.when.event!=="inactive"&&f.bind(a.options.hide.when.event+".qtip",c)}a.options.position.type.search(/(fixed|absolute)/)!==-1&&a.elements.tooltip.bind("mouseover.qtip",a.focus);a.options.position.target=="mouse"&&e.bind("mousemove.qtip",function(h){a.mouse={x:h.pageX,y:h.pageY};a.elements.tip.css("display")!=="none"&&a.updatePosition(h,false)})}function y(b,c){var a=this.options.position.corner.tooltip;if(a!="center"){var e= {height:this.elements.tooltip.outerHeight(),width:this.elements.tooltip.outerWidth()},f=d.extend(true,{},b);if(this.options.position.target!=="mouse")var g=this.options.position.target.offset();var i={leftMin:b.left<d(window).scrollLeft(),leftMax:f.left+e.width+2>=d(window).width()+d(window).scrollLeft(),topMin:b.top<d(window).scrollTop(),topMax:f.top+e.height+2>=d(window).height()+d(window).scrollTop()};if(i.leftMin||i.leftMax)if(i.leftMin&&(a.search(/right/i)===-1&&!i.leftMax||a.search(/right/i)!== -1))f.left=this.options.position.target=="mouse"?this.mouse.x:g.left+c.width;else if(i.leftMax&&(a.search(/left/i)===-1&&!i.leftMin||a.search(/left/i)!==-1))f.left-=a.search(/(top|bottom)Middle/)!==-1?c.width/2+e.width/2+this.options.position.adjust.x*2:e.width+c.width+this.options.position.adjust.x*2;if(i.topMin||i.topMax)if(i.topMin&&a.search(/top/i)===-1)f.top=this.options.position.target=="mouse"?this.mouse.y:g.top+c.height;else if(i.topMax&&a.search(/bottom/i)===-1)f.top-=a.search(/(left|right)Middle/)!== -1?c.height/2+e.height/2+this.options.position.adjust.y*2:e.height+c.height+this.options.position.adjust.y*2;if(f.left<0)f.left=b.left;if(f.top<0)f.top=b.top;if(this.options.style.tip.corner!==false){a=a;e=f.top!==b.top;if(f.left!==b.left)if(a.search(/(top|bottom)Middle/)!==-1)if(i.leftMin)a=a.replace("Middle","Left");else{if(i.leftMax)a=a.replace("Middle","Right")}else if(a.search(/right/)!==-1)a=a.replace("right","left");else if(a.search(/Right/)!==-1)a=a.replace("Right","Left");else if(a.search(/left/)!== -1)a=a.replace("left","right");else if(a.search(/Left/)!==-1)a=a.replace("Left","Right");if(e)if(a.search(/(left|right)Middle/)!==-1)if(i.topMin)a=a.replace("Middle","Top");else{if(i.topMax)a=a.replace("Middle","Bottom")}else if(a.search(/top/)!==-1)a=a.replace("top","bottom");else if(a.search(/Top/)!==-1)a=a.replace("Top","Bottom");else if(a.search(/bottom/)!==-1)a=a.replace("bottom","top");else if(a.search(/Bottom/)!==-1)a=a.replace("Bottom","Top");a=a;if(a!==this.elements.tip.attr("rel")){this.options.style.tip.corner= a;t.call(this)}}return f}}function l(b,c){var a=d.extend(true,{},b);for(var e in a)if(c===true&&e.search(/(tip|classes)/i)!==-1)delete a[e];else e.search(/(width|border|tip|title|classes|user)/i)!==-1&&delete a[e];return a}function v(b){if(typeof b.tip!=="object")b.tip={corner:b.tip};if(typeof b.tip.size!=="object")b.tip.size={x:b.tip.size,y:b.tip.size};if(typeof b.border!=="object")b.border={width:b.border};if(typeof b.width!=="object")b.width={value:b.width};if(typeof b.width.max=="string")b.width.max= parseInt(b.width.max.replace(/([0-9]+)/i,"$1"));if(typeof b.width.min=="string")b.width.min=parseInt(b.width.min.replace(/([0-9]+)/i,"$1"));return b}function n(){for(var b=[true,{}],c=0;c<arguments.length;c++)b.push(arguments[c]);for(b=[d.extend.apply(d,b)];typeof b[0].name=="string";){c=v(d.fn.qtip.styles[b[0].name]);b.unshift(c)}b.unshift(true,{classes:{tooltip:"qtip-"+arguments[0].name}},d.fn.qtip.styles.defaults);b=d.extend.apply(d,b);c=d.support&&!d.support.cssFloat||d.browser.msie?1:0;b.tip.size.x+= c;b.tip.size.y+=c;if(b.tip.size.x%2>0)b.tip.size.x+=1;if(b.tip.size.y%2>0)b.tip.size.y+=1;if(b.tip.corner===true)b.tip.corner=this.options.position.corner.tooltip==="center"?false:this.options.position.corner.tooltip;return b}function u(b,c,a){c={bottomRight:[[0,0],[c,a],[c,0]],bottomLeft:[[0,0],[c,0],[0,a]],topRight:[[0,a],[c,0],[c,a]],topLeft:[[0,0],[0,a],[c,a]],topMiddle:[[0,a],[c/2,0],[c,a]],bottomMiddle:[[0,0],[c,0],[c/2,a]],rightMiddle:[[0,0],[c,a/2],[0,a]],leftMiddle:[[c,0],[c,a],[0,a/2]]}; c.leftTop=c.bottomRight;c.rightTop=c.bottomLeft;c.leftBottom=c.topRight;c.rightBottom=c.topLeft;return c[b]}function p(b){if(document.createElement("canvas").getContext)var c={topLeft:[b,b],topRight:[0,b],bottomLeft:[b,0],bottomRight:[0,0]};else if(d.support&&!d.support.cssFloat||d.browser.msie)c={topLeft:[-90,90,0],topRight:[-90,90,-b],bottomLeft:[90,270,0],bottomRight:[90,270,-b]};return c}function A(){d("<iframe class=\"qtip-bgiframe\" frameborder=\"0\" tabindex=\"-1\" src=\"javascript:false\" style=\"display:block; position:absolute; z-index:-1; filter:Alpha(Opacity='0'); top:expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px'); left:expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px'); width:expression(this.parentNode.offsetWidth+'px'); height:expression(this.parentNode.offsetHeight+'px');\"/>").prependTo(this.elements.tooltip)} function m(b){window.console&&window.console.log&&window.console.log("qTip: "+b)}d.fn.qtip=function(b){if(typeof b=="string"){if(b=="api")return d(this).eq(0).data("qtip")}else{b||(b={});if(typeof b.content!=="object")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=v(b.style);var c=d.extend(true,{},d.fn.qtip.defaults,b);c.style=n.call({options:c},c.style); c.user=d.extend(true,{},b)}return d(this).each(function(){if(typeof b=="string")switch(b){case "show":d(this).data("qtip").show();break;case "hide":d(this).data("qtip").hide();break;case "focus":d(this).data("qtip").focus();break;case "disable":d(this).data("qtip").disable(true);break;case "enable":d(this).data("qtip").disable(false);break;case "destroy":d(this).data("qtip").destroy();break}else{var a=d.extend(true,{},c);a.hide.effect.length=c.hide.effect.length;a.show.effect.length=c.show.effect.length; if(a.position.container===false)a.position.container=d(document.body);if(a.position.target===false)a.position.target=d(this);if(a.show.when.target===false)a.show.when.target=d(this);if(a.hide.when.target===false)a.hide.when.target=d(this);a=new x(d(this),a);d(this).data("qtip",a)}})};d.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,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(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};d.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:{x:13,y:13},opacity:1},title:{background:"#e1e1e1",fontWeight:"bold",padding:"7px 12px"},classes:{target:"",tip:"qtip-tip",title:"qtip-title", 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"}}};var w;d(window).bind("resize scroll", function(b){clearTimeout(w);w=setTimeout(function(){d(".qtip").each(function(){var c=d(this).qtip("api");if(c.options.position.adjust.scroll&&b.type==="scroll"||c.options.position.adjust.resize&&b.type==="resize")c.updatePosition(b)})},100)});d(document).bind("mousedown.qtip",function(b){d(b.target).parents("div.qtip").length===0&&d(".qtip[unfocus]").each(function(){var c=d(this).qtip("api");d(this).is(":visible")&&d(b.target).add(c.elements.target).length>1&&c.hide()})})})(jQuery);