"use strict";(function(e,h,f){var g=true,m=false,u=null,i="ui-tooltip",c="ui-widget",d="ui-state-disabled",n="div.qtip."+i,v=i+"-focus",k="-31000px",s="_replacedByqTip",l="oldtitle";function j(){var x=h.console;return x&&(x.error||x.log||e.noop).apply(x,arguments)}function a(y){var x;if(!y||"object"!==typeof y){return m}if("object"!==typeof y.metadata){y.metadata={type:y.metadata}}if("content" in y){if("object"!==typeof y.content||y.content.jquery){y.content={text:y.content}}x=y.content.text||m;if(!e.isFunction(x)&&((!x&&!x.attr)||x.length<1||("object"===typeof x&&!x.jquery))){y.content.text=m}if("title" in y.content){if("object"!==typeof y.content.title){y.content.title={text:y.content.title}}x=y.content.title.text||m;if(!e.isFunction(x)&&((!x&&!x.attr)||x.length<1||("object"===typeof x&&!x.jquery))){y.content.title.text=m}}}if("position" in y){if("object"!==typeof y.position){y.position={my:y.position,at:y.position}}}if("show" in y){if("object"!==typeof y.show){if(y.show.jquery){y.show={target:y.show}}else{y.show={event:y.show}}}}if("hide" in y){if("object"!==typeof y.hide){if(y.hide.jquery){y.hide={target:y.hide}}else{y.hide={event:y.hide}}}}if("style" in y){if("object"!==typeof y.style){y.style={classes:y.style}}}e.each(e.fn.qtip.plugins,function(){if(this.sanitize){this.sanitize(y)}});return y}function t(Q,z,K,L){var J=this,I=document.body,F=i+"-"+K,A;J.id=K;J.rendered=m;J.elements={target:Q};J.timers={img:[]};J.options=z;J.plugins={};J.cache={event:{},target:u,disabled:m,lastFocus:I,attr:L};function C(T){var R,U,V=T.split("."),S=z[V[0]];for(R=1;R<V.length;R+=1){U=S[V[R]];if(typeof U==="object"&&!U.jquery&&!U.precedance){S=S[V[R]]}else{break}}return V[R]!==f?[S,V[R]]:[z,V[0]]}function B(W,T){var X={left:0,top:0},U,R=!e.fn.qtip.plugins.iOS,V,S;if(T){if(T.offsetParent!==I){X=B(T);X.left*=-1;X.top*=-1;X.left+=parseInt(e.css(T,"margin-left"),10)||0;X.top+=parseInt(e.css(T,"margin-top"),10)||0}else{X.left+=I.scrollLeft;X.top+=I.scrollTop}if(T!==I){if(e.css(T,"overflow")!=="visible"){X.left-=T.scrollLeft;X.top-=T.scrollTop}}}if(W.offsetParent){do{V=W.offsetParent;S=V===T;if(V===I&&U==="fixed"){R=g}X.left+=W.offsetLeft-(R&&V&&!S?V.scrollLeft:0);X.top+=W.offsetTop-(R&&V&&!S?V.scrollTop:0)}while(W=V)}return X}function M(){return A.css("left")!==k&&A.css("visibility")!=="hidden"}function P(){var S=J.elements,R=z.style.widget;A.toggleClass(c,R);S.content.toggleClass(c+"-content",R);if(S.titlebar){S.titlebar.toggleClass(c+"-header",R)}if(S.button){S.button.toggleClass(i+"-icon",!R)}}function x(){var R=J.elements;if(R.title){R.titlebar.remove();R.titlebar=R.title=R.button=u;J.reposition()}}function N(){var R=J.elements,S=z.content.title.button;if(R.button){R.button.remove()}if(S.jquery){R.button=S}else{R.button=e("<a />",{"class":"ui-state-default "+(z.style.widget?"":i+"-icon"),title:"Close tooltip","aria-label":"Close tooltip"}).prepend(e("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"}))}R.button.appendTo(R.titlebar).attr("role","button").hover(function(T){e(this).toggleClass("ui-state-hover",T.type==="mouseenter")}).click(function(T){if(!A.hasClass(d)){J.hide(T)}return m}).bind("mousedown keydown mouseup keyup mouseout",function(T){e(this).toggleClass("ui-state-active ui-state-focus",T.type.substr(-4)==="down")});J.redraw()}function E(){var R=J.elements,S=F+"-title";if(R.titlebar){x()}R.titlebar=e("<div />",{"class":i+"-titlebar "+(z.style.widget?"ui-widget-header":"")}).append(R.title=e("<div />",{id:S,"class":i+"-title","aria-atomic":g})).insertBefore(R.content);if(z.content.title.button){N()}else{if(J.rendered===g){J.redraw()}}}function H(R){var S=J.elements.button,T=J.elements.title;if(!J.rendered){return m}if(!R){S.remove()}else{if(!T){E()}N()}}function O(S){var R=J.elements.title;if(!J.rendered||!S){return m}if(e.isFunction(S)){S=S.call(Q,J)||""}if(S.jquery&&S.length>0){R.empty().append(S.css({display:"block"}))}else{R.html(S)}J.redraw();if(J.rendered===g){J.reposition(J.cache.event)}}function G(S){var R=J.elements.content;if(!J.rendered||!S){return m}if(e.isFunction(S)){S=S.call(Q,J)||""}if(S.jquery&&S.length>0){R.empty().append(S.css({display:"block"}))}else{R.html(S)}A.queue("fx",function(U){var T=R.find("img:not([height]):not([width])");function V(W){T=T.not(W);if(T.length===0){J.redraw();if(J.rendered===g){J.reposition(J.cache.event)}U()}}T.each(function(X,Y){var W=["abort","error","load","unload",""].join(".qtip-image ");e(this).bind(W,function(){clearTimeout(J.timers.img[X]);V(this)});(function Z(){if(Y.height){return V(Y)}J.timers.img[X]=setTimeout(Z,20)}());return g});if(T.length===0){V(T)}});return J}function y(ab,X,aa,Z){var U=".qtip-"+K,ac=z.position,Y={show:z.show.target,hide:z.hide.target,container:ac.container[0]===I?document:ac.container},ad={show:String(z.show.event).split(" "),hide:String(z.hide.event).split(" ")},V=e(document),W=e.browser.msie&&parseInt(e.browser.version,10)===6;function R(af){if(A.hasClass(d)){return m}Y.show.trigger("qtip-"+K+"-inactive");clearTimeout(J.timers.show);clearTimeout(J.timers.hide);var ag=function(){J.show(af)};if(z.show.delay>0){J.timers.show=setTimeout(ag,z.show.delay)}else{ag()}}function T(ai){if(A.hasClass(d)){return m}var ag=e(ai.relatedTarget||ai.target),af=ag.closest(n)[0]===A[0],ah=ag[0]===Y.show[0];clearTimeout(J.timers.show);clearTimeout(J.timers.hide);if((ac.target==="mouse"&&af)||(z.hide.fixed&&((/mouse(out|leave|move)/).test(ai.type)&&(af||ah)))){ai.stopPropagation();ai.preventDefault();return m}A.stop(1,1);if(z.hide.delay>0){J.timers.hide=setTimeout(function(){J.hide(ai)},z.hide.delay)}else{J.hide(ai)}}function S(af){if(A.hasClass(d)){return m}clearTimeout(J.timers.inactive);J.timers.inactive=setTimeout(function(){J.hide(af)},z.hide.inactive)}function ae(af){if(J.cache.processing){return}J.cache.processing=1;if(M()){J.reposition(af)}J.cache.processing=0}if(aa){if(z.hide.fixed){Y.hide=Y.hide.add(A);A.bind("mouseover"+U,function(){if(!A.hasClass(d)){clearTimeout(J.timers.hide)}})}A.bind("mouseenter"+U+" mouseleave"+U,function(af){J[af.type==="mouseenter"?"focus":"blur"](af)})}if(X){if("number"===typeof z.hide.inactive){Y.show.bind("qtip-"+K+"-inactive",S);e.each(e.fn.qtip.inactiveEvents,function(af,ag){Y.hide.add(J.elements.tooltip).bind(ag+U+"-inactive",S)})}e.each(ad.hide,function(ag,ah){var af=e.inArray(ah,ad.show),ai=e(Y.hide);if((af>-1&&ai.add(Y.show).length===ai.length)||ah==="unfocus"){Y.show.bind(ah+U,function(aj){if(M()){T(aj)}else{R(aj)}});delete ad.show[af]}else{Y.hide.bind(ah+U,T)}})}if(ab){e.each(ad.show,function(af,ag){Y.show.bind(ag+U,R)})}if(Z){if(ac.adjust.resize||ac.viewport){e(e.event.special.resize?ac.viewport:h).bind("resize"+U,ae)}if(ac.viewport||(W&&A.css("position")==="fixed")){e(ac.viewport).bind("scroll"+U,ae)}if((/unfocus/i).test(z.hide.event)){V.bind("mousedown"+U,function(ag){var af=e(ag.target);if(af.parents(n).length===0&&af.add(Q).length>1&&M()&&!A.hasClass(d)){J.hide(ag)}})}if(ac.target==="mouse"){V.bind("mousemove"+U,function(af){if(ac.adjust.mouse&&!A.hasClass(d)&&M()){J.reposition(af||e.fn.qtip.mouse)}})}}}function D(S,T,V,W){W=parseInt(W,10)!==0;var U=".qtip-"+K,R={show:S?z.show.target:u,hide:T?z.hide.target:u,tooltip:V?J.elements.tooltip:u,content:V?J.elements.content:u,container:W?z.position.container[0]===I?document:z.position.container:u,window:W?h:u};if(J.rendered){e([]).pushStack(e.grep([R.show,R.hide,R.tooltip,R.container,R.content,R.window],function(){return this!==null})).unbind(U)}else{if(S){R.show.unbind(U+"-create")}}}e.extend(J,{render:function(R){if(J.rendered){return m}var T=J.elements,S=z.content.text,U=z.content.title.text,V=e.Event("tooltiprender");e.attr(Q[0],"aria-describedby",F);A=T.tooltip=e("<div/>").attr({id:F,"class":i+" qtip ui-helper-reset "+z.style.classes,role:"alert","aria-live":"polite","aria-atomic":m,"aria-describedby":F+"-content","aria-hidden":g}).toggleClass(d,J.cache.disabled).data("qtip",J).appendTo(z.position.container).append(T.content=e("<div />",{"class":i+"-content",id:F+"-content","aria-atomic":g}));J.rendered=g;if(U){E();O(U)}G(S);P();e.each(e.fn.qtip.plugins,function(){if(this.initialize==="render"){this(J)}});y(1,1,1,1);e.each(z.events,function(W,Y){if(Y){var X=W==="toggle"?"tooltipshow tooltiphide":"tooltip"+W;A.bind(X,Y)}});A.css("visibility","hidden").queue("fx",function(W){V.originalEvent=J.cache.event;A.trigger(V,[J]);if(z.show.ready||R){J.show(J.cache.event)}W()});return J},get:function(S){var R,T;switch(S.toLowerCase()){case"dimensions":R={height:A.outerHeight(),width:A.outerWidth()};break;case"offset":R=B(A[0],z.position.container[0]);break;default:T=C(S.toLowerCase());R=(T[0].precedance)?T[0].string():(T[0].jquery)?T[0]:T[0][T[1]];break}return R},set:function(W,X){W=W.toLowerCase();var T=C(W),R=J.elements,V,U,Y,S={builtin:{"^id$":function(ac,Z,ad,aa){var ae=X===g?e.fn.qtip.nextid:X,ab=i+"-"+ae;if(ae!==m&&ae.length>0&&!e("#"+ab).length){A[0].id=ab;R.content[0].id=ab+"-content";R.title[0].id=ab+"-title"}},"^content.text$":function(){G(X)},"^content.title.text$":function(){if(!X){return x()}if(!J.elements.title&&X){E()}O(X)},"^content.title.button$":function(){H(X)},"^position.(my|at)$":function(){var Z=(/my$/i).test(W)?"my":"at";if("string"===typeof X){z.position[Z]=new e.fn.qtip.plugins.Corner(X)}},"^position.container$":function(){if(J.rendered===g){A.appendTo(X)}},"^(show|hide).(event|target|fixed|delay|inactive)$":function(ac,aa,ad,ab){var Z=W.search(/fixed/i)>-1?[0,[0,1,1,1]]:[W.substr(0,3),W.charAt(0)==="s"?[1,0,0,0]:[0,1,0,0]];if(Z[0]){ac[aa]=ab}D.apply(J,Z[1]);if(Z[0]){ac[aa]=ad}y.apply(J,Z[1])},"^show.ready$":function(){if(J.rendered===m){J.show()}},"^style.classes$":function(){e.attr(A[0],"class",i+" qtip ui-helper-reset "+X)},"^style.widget|content.title":P,"^events.(render|show|move|hide|focus|blur)$":function(ab,Z,ac,aa){R.tooltip[(e.isFunction(X)?"":"un")+"bind"]("tooltip"+Z,ac)},"^position.(my|at|adjust|target|container)|style|content":function(){J.reposition()}}};e.each(J.plugins,function(Z){if("object"===typeof this.checks){S[Z]=this.checks}});V=T[0][T[1]];T[0][T[1]]=X.nodeType?e(X):X;a(z);for(U in S){for(Y in S[U]){if((new RegExp(Y,"i")).test(W)){S[U][Y].call(J,T[0],T[1],X,V)}}}return J},toggle:function(U,T){if(J.rendered===m){return m}var R=U?"show":"hide",S=z[R],W=M(),X;if((typeof U).search("boolean|number")){U=!W}if(W===U){return J}if(T){if((/over|enter/).test(T.type)&&(/out|leave/).test(J.cache.event.type)&&T.target===z.show.target[0]&&A.has(T.relatedTarget).length){return J}J.cache.event=e.extend({},T)}X=e.Event("tooltip"+R);X.originalEvent=T?J.cache.event:u;A.trigger(X,[J,90]);if(X.isDefaultPrevented()){return J}e.attr(A[0],"aria-hidden",!!!U);if(U){A.hide().css({visibility:""});J.focus(T);J.reposition(T,0);if(S.solo){e(n).not(A).qtip("hide")}}else{clearTimeout(J.timers.show);J.blur(T)}function V(){if(U){if(e.browser.msie){A[0].style.removeAttribute("filter")}}else{A.css({display:"",visibility:"hidden",width:"",opacity:"",left:"",top:""})}}A.stop(1,1);if(e.isFunction(S.effect)){S.effect.call(A,J);A.queue("fx",function(Y){V.call(this,Y);Y()})}else{if(S.effect===m){A[R]();V.call(A)}else{A.fadeTo(90,U?1:0,V)}}if(U){S.target.trigger("qtip-"+K+"-inactive")}e.fn.qtip.lastShown=J;return J},show:function(R){J.toggle(g,R)},hide:function(R){J.toggle(m,R)},focus:function(V){if(J.rendered===m){return m}var W=e(n),T=parseInt(A[0].style.zIndex,10),S=e.fn.qtip.zindex+W.length,U=e.extend({},V),R,X;if(!A.hasClass(v)){if(T!==S){W.each(function(){if(this.style.zIndex>T){this.style.zIndex=this.style.zIndex-1}});W.filter("."+v).qtip("blur",U)}J.cache.lastFocus=document.activeElement;X=e.Event("tooltipfocus");X.originalEvent=U;A.trigger(X,[J,S]);if(!X.isDefaultPrevented()){A.addClass(v)[0].style.zIndex=S}}return J},blur:function(S){var R=e.extend({},S),T;A.removeClass(v);T=e.Event("tooltipblur");T.originalEvent=R;A.trigger(T,[J])},reposition:function(S,ag){if(J.rendered===m){return m}var aa=z.position.target,af=z.position,ac=af.my,U=af.at,ad=af.adjust,W=A.outerWidth(),T=A.outerHeight(),ab=0,Y=0,ae=e.Event("tooltipmove"),V=A.css("position")==="fixed",Z=af.viewport.jquery?af.viewport:e(h),X={left:0,top:0},R={left:function(ah){var aj=Z.scrollLeft,ai=ac.x==="left"?W:ac.x==="right"?-W:-W/2,al=U.x==="left"?ab:U.x==="right"?-ab:-ab/2,ak=aj-ah,an=ah+W-Z.width-aj,am=ai-(ac.precedance==="x"||ac.x===ac.y?al:0);if(ak>0&&(ac.x!=="left"||an>0)){X.left-=am}else{if(an>0&&(ac.x!=="right"||ak>0)){X.left-=(ac.x==="center"?-1:1)*am+(2*ad.x)}}if(X.left<0&&-X.left>an){X.left=ah}return X.left-ah},top:function(am){var aj=Z.scrollTop,ai=ac.y==="top"?T:ac.y==="bottom"?-T:-T/2,ak=U.y==="top"?Y:U.y==="bottom"?-Y:-Y/2,ah=aj-am,al=am+T-Z.height-aj,an=ai-(ac.precedance==="y"||ac.x===ac.y?ak:0);if(ah>0&&(ac.y!=="top"||al>0)){X.top-=an}else{if(al>0&&(ac.y!=="bottom"||ah>0)){X.top-=(ac.y==="center"?-1:1)*an+(2*ad.y)}}if(X.top<0&&-X.top>al){X.top=am}return X.top-am}};ag=ag===f||!!ag||m;Z=!Z?m:{elem:Z,height:Z[(Z[0]===h?"h":"outerH")+"eight"](),width:Z[(Z[0]===h?"w":"outerW")+"idth"](),scrollLeft:Z.scrollLeft(),scrollTop:Z.scrollTop()};if(aa==="mouse"){U={x:"left",y:"top"};S=S&&(S.type==="resize"||S.type==="scroll")?J.cache.event:ad.mouse||!S||!S.pageX?e.extend({},e.fn.qtip.mouse):S;X={top:S.pageY,left:S.pageX}}else{if(aa==="event"){if(S&&S.target&&S.type!=="scroll"&&S.type!=="resize"){aa=J.cache.target=e(S.target)}else{aa=J.cache.target}}aa=e(aa).eq(0);if(aa.length===0){return J}else{if(aa[0]===document||aa[0]===h){ab=aa.width();Y=aa.height();if(aa[0]===h){X={top:V?0:Z.scrollTop,left:V?0:Z.scrollLeft}}}else{if(aa.is("area")&&e.fn.qtip.plugins.imagemap){X=e.fn.qtip.plugins.imagemap(aa,U);ab=X.width;Y=X.height;X=X.offset}else{if(aa[0].namespaceURI=="http://www.w3.org/2000/svg"&&e.fn.qtip.plugins.svg){X=e.fn.qtip.plugins.svg(aa,U);ab=X.width;Y=X.height;X=X.offset}else{ab=aa.outerWidth();Y=aa.outerHeight();X=B(aa[0],af.container[0])}}}}X.left+=U.x==="right"?ab:U.x==="center"?ab/2:0;X.top+=U.y==="bottom"?Y:U.y==="center"?Y/2:0}X.left+=ad.x+(ac.x==="right"?-W:ac.x==="center"?-W/2:0);X.top+=ad.y+(ac.y==="bottom"?-T:ac.y==="center"?-T/2:0);if(af.viewport.jquery&&aa[0]!==h&&aa[0]!==I){X.adjusted={left:R.left(X.left),top:R.top(X.top)}}else{X.adjusted={left:0,top:0}}A.attr("class",function(ah,ai){return e.attr(this,"class").replace(/ui-tooltip-pos-\w+/i,"")}).addClass(i+"-pos-"+ac.abbreviation());ae.originalEvent=e.extend({},S);A.trigger(ae,[J,X,Z.elem]);if(ae.isDefaultPrevented()){return J}delete X.adjusted;if(!ag||!isNaN(X.left,X.top)){A.css(X)}else{if(M()&&e.isFunction(af.effect)){af.effect.call(A,J,X);A.queue(function(ah){var ai=e(this);ai.css({opacity:"",height:""});if(e.browser.msie&&this.style){this.style.removeAttribute("filter")}ah()})}}return J},redraw:function(){if(!J.rendered||!(e.browser.msie&&e.browser.version<8)){return m}var S=i+"-fluid",R;A.css({width:"auto",height:"auto"}).addClass(S);R={height:A.outerHeight(),width:A.outerWidth()};e.each(["width","height"],function(V,W){var T=parseInt(A.css("max-"+W),10)||0,U=parseInt(A.css("min-"+W),10)||0;R[W]=T+U?Math.min(Math.max(R[W],U),T):R[W]});A.css(R).removeClass(S)},disable:function(R){var S=d;if("boolean"!==typeof R){R=!(A.hasClass(S)||J.cache.disabled)}if(J.rendered){A.toggleClass(S,R);e.attr(A[0],"aria-disabled",R)}else{J.cache.disabled=!!R}return J},destroy:function(){var R=Q[0],S=e.data(R,l);if(J.rendered){A.remove();e.each(J.plugins,function(){if(this.initialize==="render"){this.destroy()}})}clearTimeout(J.timers.show);clearTimeout(J.timers.hide);D(1,1,1,1);e.removeData(R,"qtip");if(S){e.attr(R,"title",S)}Q.removeAttr("aria-describedby");return Q}})}function o(y,x){var B,J,F,z,A=e(this),C=e(document.body),H=this===document?C:A,G=(A.metadata)?A.metadata(x.metadata):u,I=x.metadata.type==="html5"&&G?G[x.metadata.name]:u,D=A.data(x.metadata.name||"qtipopts");try{D=typeof D==="string"?(new Function("return "+D))():D}catch(E){j("Unable to parse HTML5 attribute data: "+D)}z=e.extend(g,{},e.fn.qtip.defaults,x,typeof D==="object"?a(D):u,a(I||G));if(G){e.removeData(this,"metadata")}J=z.position;if("boolean"===typeof z.content.text){F=A.attr(z.content.attr);if(z.content.attr!==m&&F){z.content.text=F}else{return m}}if(J.container===m){J.container=C}if(J.target===m){J.target=H}if(z.show.target===m){z.show.target=H}if(z.hide.target===m){z.hide.target=H}if(z.position.viewport===g){z.position.viewport=J.container}J.at=new e.fn.qtip.plugins.Corner(J.at);J.my=new e.fn.qtip.plugins.Corner(J.my);if(e.data(this,"qtip")){if(z.overwrite){A.qtip("destroy")}else{if(z.overwrite===m){return m}}}if(e.attr(this,"title")){e.data(this,l,e.attr(this,"title"));A.removeAttr("title")}B=new t(A,z,y,!!F);e.data(this,"qtip",B);A.bind("remove.qtip",function(){B.destroy()});return B}e.fn.qtip=function(y,C,D){var E=String(y).toLowerCase(),B=u,x=E==="disable"?[g]:e.makeArray(arguments).slice(1,10),A=x[x.length-1],z=this[0]?e.data(this[0],"qtip"):u;if((!arguments.length&&z)||E==="api"){return z}else{if("string"===typeof y){this.each(function(){var F=e.data(this,"qtip");if(!F){return g}if((/option|set/).test(E)&&C){if(D!==f){F.set(C,D)}else{B=F.get(C)}}else{if(!F.rendered&&(E==="show"||E==="toggle")){if(A&&A.timeStamp){F.cache.event=A}F.render(1)}else{if(E==="enable"){E="disable";x=[m]}}if(F[E]){F[E].apply(F[E],x)}}});return B!==u?B:this}else{if("object"===typeof y||!arguments.length){z=a(e.extend(g,{},y));return e.fn.qtip.bind.call(this,z,A)}}}};e.fn.qtip.bind=function(y,x){return this.each(function(D){var B,z,C,G=y.id=(!y.id||y.id===m||y.id.length<1||e("#"+i+"-"+y.id).length)?e.fn.qtip.nextid++:y.id,E=".qtip-"+G+"-create",A=o.call(this,G,y);if(A===m){return g}B=A.options;e.each(e.fn.qtip.plugins,function(){if(this.initialize==="initialize"){this(A)}});z={show:B.show.target,hide:B.hide.target};C={show:String(B.show.event).replace(" ",E+" ")+E,hide:String(B.hide.event).replace(" ",E+" ")+E};function F(I){function H(){A.render(typeof I==="object"||B.show.ready);z.show.unbind(C.show);z.hide.unbind(C.hide)}if(A.cache.disabled){return m}A.cache.event=e.extend({},I);if(B.show.delay>0){clearTimeout(A.timers.show);A.timers.show=setTimeout(H,B.show.delay);if(C.show!==C.hide){z.hide.bind(C.hide,function(){clearTimeout(A.timers.show)})}}else{H()}}z.show.bind(C.show,F);if(B.show.ready||B.prerender){F(x)}})};e.each({attr:function(x,B){if(!this.length){return}var y=this[0],A="title",z=e.data(y,"qtip");if(x===A){if(arguments.length<2){return e.data(y,l)}else{if(typeof z==="object"){if(z&&z.rendered&&z.options.content.attr===A&&z.cache.attr){z.set("content.text",B)}e.fn["attr"+s].apply(this,arguments);e.data(y,l,e.attr(y,A));return this.removeAttr("title")}}}},clone:function(y){var z=e([]),x;e("*",this).add(this).each(function(){var A=e.data(this,l);if(A){e.attr(this,"title",A);z=z.add(this)}});x=e.fn["clone"+s].apply(this,arguments);z.removeAttr("title");return x},remove:e.ui?u:function(x,y){e(this).each(function(){if(!y){if(!x||e.filter(x,[this]).length){e("*",this).add(this).each(function(){e(this).triggerHandler("remove")})}}})}},function(y,z){if(!z){return g}var x=e.fn[y+s]=e.fn[y];e.fn[y]=function(){return z.apply(this,arguments)||x.apply(this,arguments)}});e(h).load(function(){var y=document,x=y.body;e(y).bind("mousemove.qtip",function(z){e.fn.qtip.mouse={pageX:z.pageX,pageY:z.pageY}});if(y.activeElement===f){y.addEventListener("focus",function(z){if(z&&z.target){y.activeElement=z.target===y?x:z.target}},true)}});e.fn.qtip.version="2.0.0pre";e.fn.qtip.nextid=0;e.fn.qtip.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" ");e.fn.qtip.zindex=15000;e.fn.qtip.plugins={Corner:function(x){x=String(x).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase();this.x=(x.match(/left|right/i)||x.match(/center/)||["inherit"])[0].toLowerCase();this.y=(x.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();this.precedance=(x.charAt(0).search(/^(t|b)/)>-1)?"y":"x";this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y};this.abbreviation=function(){var z=this.x.substr(0,1),A=this.y.substr(0,1);return z===A?z:(z==="c"||(z!=="c"&&A!=="c"))?A+z:z+A}},iOS:parseFloat(((/CPU.+OS ([0-9_]{3}).*AppleWebkit.*Mobile/i.exec(navigator.userAgent))||[0,"4_2"])[1].replace("_","."))<4.1};e.fn.qtip.defaults={prerender:m,id:m,overwrite:g,content:{text:g,attr:"title",title:{text:m,button:m}},position:{my:"top left",at:"bottom right",target:m,container:m,viewport:m,adjust:{x:0,y:0,mouse:g,resize:g},effect:g},show:{target:m,event:"mouseenter",effect:g,delay:90,solo:m,ready:m},hide:{target:m,event:"mouseleave",effect:g,delay:0,fixed:m,inactive:m},style:{classes:"",widget:m},events:{render:u,move:u,show:u,hide:u,toggle:u,focus:u,blur:u}};function p(A){var x=this,C=A.elements.tooltip,B=A.options.content.ajax,z=".qtip-ajax",y=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;x.checks={"^content.ajax":function(E,D){if(D==="once"){x.once()}else{if(B&&B.url){x.load()}}}};e.extend(x,{init:function(){if(B&&B.url){x.load();C.one("tooltipshow",x.once)}},once:function(){if(B.once){x.destroy()}else{C.bind("tooltipshow"+z,x.load)}},load:function(){var H=B.url.indexOf(" "),G=B.url,D;if(H>-1){D=G.substr(H);G=G.substr(0,H)}function F(I){if(D){I=e("<div/>").append(I.replace(y,"")).find(D)}A.set("content.text",I)}function E(K,I,J){A.set("content.text",I+": "+J)}e.ajax(e.extend({success:F,error:E,context:A},B,{url:G}));return x},destroy:function(){C.unbind(z)}});x.init()}e.fn.qtip.plugins.ajax=function(y){var x=y.plugins.ajax;return"object"===typeof x?x:(y.plugins.ajax=new p(y))};e.fn.qtip.plugins.ajax.initialize="render";e.fn.qtip.plugins.ajax.sanitize=function(x){var z=x.content,y;if(z&&"ajax" in z){y=z.ajax;if(typeof y!=="object"){y=x.content.ajax={url:y}}if("boolean"!==typeof y.once&&y.once){y.once=!!y.once}}};e.extend(g,e.fn.qtip.defaults,{content:{ajax:{once:g}}});function q(C,A,y){var z=Math.ceil(A/2),B=Math.ceil(y/2),x={bottomright:[[0,0],[A,y],[A,0]],bottomleft:[[0,0],[A,0],[0,y]],topright:[[0,y],[A,0],[A,y]],topleft:[[0,0],[0,y],[A,y]],topcenter:[[0,y],[z,0],[A,y]],bottomcenter:[[0,0],[A,0],[z,y]],rightcenter:[[0,0],[A,B],[0,y]],leftcenter:[[A,0],[A,y],[0,B]]};x.lefttop=x.bottomright;x.righttop=x.bottomleft;x.leftbottom=x.topright;x.rightbottom=x.topleft;return x[C.string()]}function r(I,H){var K=this,z=I.options.style.tip,B=I.elements,L=B.tooltip,A={top:0,left:0,corner:""},M={width:z.width,height:z.height},G={},F=z.border||0,E=".qtip-tip",D=e("<canvas />")[0].getContext;K.corner=u;K.mimic=u;K.checks={"^position.my|style.tip.(corner|mimic|border)$":function(){if(!K.init()){K.destroy()}I.reposition()},"^style.tip.(height|width)$":function(){M={width:z.width,height:z.height};K.create();K.update();I.reposition()},"^content.title.text|style.(classes|widget)$":function(){if(B.tip){K.update()}}};function J(Q,P,T,N){if(!B.tip){return}var R=e.extend({},K.corner),O=T.adjusted,S;if(K.corner.fixed!==g){if(O.left){R.x=R.x==="center"?(O.left>0?"left":"right"):(R.x==="left"?"right":"left")}if(O.top){R.y=R.y==="center"?(O.top>0?"top":"bottom"):(R.y==="top"?"bottom":"top")}if(R.string()!==A.corner&&(A.top!==O.top||A.left!==O.left)){S=K.update(R)}}if(!S){S=K.position(R,0)}if(S.right!==f){S.left=S.right}if(S.bottom!==f){S.top=S.bottom}S.option=Math.max(0,z.offset);T.left-=S.left.charAt?S.option:(S.right?-1:1)*S.left;T.top-=S.top.charAt?S.option:(S.bottom?-1:1)*S.top;A.left=O.left;A.top=O.top;A.corner=R.string()}function y(S,Q,O){Q=!Q?S[S.precedance]:Q;var N=B.titlebar&&S.y==="top",R=N?B.titlebar:B.content,P="border-"+Q+"-width",T=parseInt(R.css(P),10);return(O?T||parseInt(L.css(P),10):T)||0}function C(S){var N=B.titlebar&&S.y==="top",R=N?B.titlebar:B.content,Q=e.browser.mozilla,T=Q?"-moz-":e.browser.webkit?"-webkit-":"",P=S.y+(Q?"":"-")+S.x,O=T+(Q?"border-radius-"+P:"border-"+P+"-radius");return parseInt(R.css(O),10)||parseInt(L.css(O),10)||0}function x(W){var U=W.precedance==="y",O=M[U?"width":"height"],X=M[U?"height":"width"],T=W.string().indexOf("center")>-1,N=O*(T?0.5:1),Q=Math.pow,Y=Math.round,V,S,Z,P=Math.sqrt(Q(N,2)+Q(X,2)),R=[(F/N)*P,(F/X)*P];R[2]=Math.sqrt(Q(R[0],2)-Q(F,2));R[3]=Math.sqrt(Q(R[1],2)-Q(F,2));V=P+R[2]+R[3]+(T?0:R[0]);S=V/P;Z=[Y(S*X),Y(S*O)];return{height:Z[U?0:1],width:Z[U?1:0]}}e.extend(K,{init:function(){var N=K.detectCorner()&&(D||e.browser.msie);if(N){K.create();K.update();L.unbind(E).bind("tooltipmove"+E,J)}return N},detectCorner:function(){var P=z.corner,O=I.options.position,N=O.at,Q=O.my.string?O.my.string():O.my;if(P===m||(Q===m&&N===m)){return m}else{if(P===g){K.corner=new e.fn.qtip.plugins.Corner(Q)}else{if(!P.string){K.corner=new e.fn.qtip.plugins.Corner(P);K.corner.fixed=g}}}return K.corner.string()!=="centercenter"},detectColours:function(){var T=B.tip.css({backgroundColor:"",border:""}),U=K.corner,O=U[U.precedance],N="border-"+O+"-color",Q="border"+O.charAt(0)+O.substr(1)+"Color",R=/rgba?\(0, 0, 0(, 0)?\)|transparent/i,V="background-color",W="transparent",S=B.titlebar&&(U.y==="top"||(U.y==="center"&&T.position().top+(M.height/2)+z.offset<B.titlebar.outerHeight(1))),P=S?B.titlebar:B.content;G.fill=T.css(V)||W;G.border=T[0].style[Q];if(!G.fill||R.test(G.fill)){G.fill=P.css(V);if(R.test(G.fill)){G.fill=L.css(V)}}if(!G.border||R.test(G.border)){G.border=L.css(N);if(R.test(G.border)||G.border===e(document.body).css("color")){G.border=(P.css(N)!==e(I.elements.content).css("color")?P.css(N):W)}}e("*",T).add(T).css(V,W).css("border","0px dashed transparent")},create:function(){var P=M.width,O=M.height,N;if(B.tip){B.tip.remove()}B.tip=e("<div />",{"class":"ui-tooltip-tip"}).css({width:P,height:O}).prependTo(L);if(D){e("<canvas />").appendTo(B.tip)[0].getContext("2d").save()}else{N='<vml:shape coordorigin="0,0" style="display:block; position:absolute; behavior:url(#default#VML);"></vml:shape>';B.tip.html(F?N+=N:N)}},update:function(V){var U=B.tip,Z=U.children(),P=M.width,W=M.height,Q="px solid ",Y="px dashed transparent",aa=z.mimic,X=Math.round,N,O,T,R,S;if(!V){V=K.corner}if(aa===m){aa=V}else{aa=new e.fn.qtip.plugins.Corner(aa);aa.precedance=V.precedance;if(aa.x==="inherit"){aa.x=V.x}else{if(aa.y==="inherit"){aa.y=V.y}else{if(aa.x===aa.y){aa[V.precedance]=V[V.precedance]}}}}N=aa.precedance;K.detectColours();F=G.border==="transparent"||G.border==="#123456"?0:z.border===g?y(V,u,g):z.border;T=q(aa,P,W);S=x(V);U.css(S);if(V.precedance==="y"){R=[X(aa.x==="left"?F:aa.x==="right"?S.width-P-F:(S.width-P)/2),X(aa.y==="top"?S.height-W:0)]}else{R=[X(aa.x==="left"?S.width-P:0),X(aa.y==="top"?F:aa.y==="bottom"?S.height-W-F:(S.height-W)/2)]}if(D){Z.attr(S);O=Z[0].getContext("2d");O.restore();O.save();O.clearRect(0,0,3000,3000);O.translate(R[0],R[1]);O.beginPath();O.moveTo(T[0][0],T[0][1]);O.lineTo(T[1][0],T[1][1]);O.lineTo(T[2][0],T[2][1]);O.closePath();O.fillStyle=G.fill;O.strokeStyle=G.border;O.lineWidth=F*2;O.lineJoin="miter";O.miterLimit=100;O.stroke();O.fill()}else{T="m"+T[0][0]+","+T[0][1]+" l"+T[1][0]+","+T[1][1]+" "+T[2][0]+","+T[2][1]+" xe";R[2]=F&&/^(r|b)/i.test(V.string())?1:0;Z.css({antialias:""+(aa.string().indexOf("center")>-1),left:R[0]-(R[2]*Number(N==="x")),top:R[1]-(R[2]*Number(N==="y")),width:P+F,height:W+F}).each(function(ab){var ac=e(this);ac.attr({coordsize:(P+F)+" "+(W+F),path:T,fillcolor:G.fill,filled:!!ab,stroked:!!!ab}).css({display:F||ab?"block":"none"});if(!ab&&F>0&&ac.html()===""){ac.html('<vml:stroke weight="'+(F*2)+'px" color="'+G.border+'" miterlimit="1000" joinstyle="miter"  style="behavior:url(#default#VML); display:block;" />')}})}return K.position(V,1)},position:function(Q,U){var R=B.tip,N={},T=Math.max(0,z.offset),O,P,S;if(z.corner===m||!R){return m}Q=Q||K.corner;O=Q.precedance;P=x(Q);S=e.browser.msie&&F&&/^(b|r)/i.test(Q.string())?1:0;e.each(O==="y"?[Q.x,Q.y]:[Q.y,Q.x],function(Y,X){var V,W;if(X==="center"){V=O==="y"?"left":"top";N[V]="50%";N["margin-"+V]=-Math.round(P[O==="y"?"width":"height"]/2)+T}else{V=y(Q,X,g);W=C(Q);N[X]=Y||!F?y(Q,X):T+(W>V?W:0)}});N[Q[O]]-=P[O==="x"?"width":"height"]+S;if(U){R.css({top:"",bottom:"",left:"",right:"",margin:""}).css(N)}return N},destroy:function(){if(B.tip){B.tip.remove()}L.unbind(E)}});K.init()}e.fn.qtip.plugins.tip=function(y){var x=y.plugins.tip;return"object"===typeof x?x:(y.plugins.tip=new r(y))};e.fn.qtip.plugins.tip.initialize="render";e.fn.qtip.plugins.tip.sanitize=function(x){var y=x.style,z;if(y&&"tip" in y){z=x.style.tip;if(typeof z!=="object"){x.style.tip={corner:z}}if(!(/string|boolean/i).test(typeof z.corner)){z.corner=g}if(typeof z.width!=="number"){delete z.width}if(typeof z.height!=="number"){delete z.height}if(typeof z.border!=="number"&&z.border!==g){delete z.border}if(typeof z.offset!=="number"){delete z.offset}}};e.extend(g,e.fn.qtip.defaults,{style:{tip:{corner:g,mimic:m,width:6,height:6,border:g,offset:0}}});e.fn.qtip.plugins.imagemap=function(x,F){var D=x.attr("shape").toLowerCase(),z=x.attr("coords").split(","),E=[],A=e('img[usemap="#'+x.parent("map").attr("name")+'"]'),G=A.offset(),H={width:0,height:0,offset:{top:10000000000,right:0,bottom:0,left:10000000000}},B=0,C=0;function y(Q,P){var M=0,O=1,N=1,K=0,J=0,L=Q.width,I=Q.height;while(L>0&&I>0&&O>0&&N>0){L=Math.floor(L/2);I=Math.floor(I/2);if(F.x==="left"){O=L}else{if(F.x==="right"){O=Q.width-L}else{O+=Math.floor(L/2)}}if(F.y==="top"){N=I}else{if(F.y==="bottom"){N=Q.height-I}else{N+=Math.floor(I/2)}}M=P.length;while(M--){if(P.length<2){break}K=P[M][0]-Q.offset.left;J=P[M][1]-Q.offset.top;if((F.x==="left"&&K>=O)||(F.x==="right"&&K<=O)||(F.x==="center"&&(K<O||K>(Q.width-O)))||(F.y==="top"&&J>=N)||(F.y==="bottom"&&J<=N)||(F.y==="center"&&(J<N||J>(Q.height-N)))){P.splice(M,1)}}}return{left:P[0][0],top:P[0][1]}}G.left+=Math.ceil((A.outerWidth()-A.width())/2);G.top+=Math.ceil((A.outerHeight()-A.height())/2);if(D==="poly"){B=z.length;while(B--){C=[parseInt(z[--B],10),parseInt(z[B+1],10)];if(C[0]>H.offset.right){H.offset.right=C[0]}if(C[0]<H.offset.left){H.offset.left=C[0]}if(C[1]>H.offset.bottom){H.offset.bottom=C[1]}if(C[1]<H.offset.top){H.offset.top=C[1]}E.push(C)}}else{E=e.map(z,function(I){return parseInt(I,10)})}switch(D){case"rect":H={width:Math.abs(E[2]-E[0]),height:Math.abs(E[3]-E[1]),offset:{left:E[0],top:E[1]}};break;case"circle":H={width:E[2]+2,height:E[2]+2,offset:{left:E[0],top:E[1]}};break;case"poly":e.extend(H,{width:Math.abs(H.offset.right-H.offset.left),height:Math.abs(H.offset.bottom-H.offset.top)});if(F.string()==="centercenter"){H.offset={left:H.offset.left+(H.width/2),top:H.offset.top+(H.height/2)}}else{H.offset=y(H,E.slice())}H.width=H.height=0;break}H.offset.left+=G.left;H.offset.top+=G.top;return H};e.fn.qtip.plugins.svg=function(B,F){var E=e(document),z=B[0],G={width:0,height:0,offset:{top:10000000000,left:10000000000}},A,x,C,D,y;if(z.getBBox){A=z.getBBox();x=z.getScreenCTM();C=z.farthestViewportElement||z;if(!C.createSVGPoint){return G}D=C.createSVGPoint();D.x=A.x;D.y=A.y;y=D.matrixTransform(x);G.offset.left=y.x;G.offset.top=y.y;D.x+=A.width;D.y+=A.height;y=D.matrixTransform(x);G.width=y.x-G.offset.left;G.height=y.y-G.offset.top;G.offset.left+=E.scrollLeft();G.offset.top+=E.scrollTop()}return G};function b(D){var z=this,A=D.options.show.modal,y=D.elements,E=y.tooltip,x="#qtip-overlay",C=".qtipmodal",B="tooltipshow"+C+" tooltiphide"+C;z.checks={"^show.modal.(on|blur)$":function(){z.init();y.overlay.toggle(E.is(":visible"))}};e.extend(z,{init:function(){if(A.on){E.unbind(C).bind(B,function(H,G,I){var F=H.type.replace("tooltip","");if(e.isFunction(A[F])){A[F].call(y.overlay,I,G)}else{z[F](I)}});z.create();if(A.blur===g){y.overlay.unbind(C+D.id).bind("click"+C+D.id,function(){D.hide.call(D)})}}},create:function(){var F=e(x);if(F.length){y.overlay=F;return}y.overlay=e("<div />",{id:x.substr(1),css:{position:"absolute",top:0,left:0,display:"none",zIndex:parseInt(E.css("z-index"),10)-1}}).appendTo(document.body);e(h).bind("resize"+C,function(){y.overlay.css({height:Math.max(e(h).height(),e(document).height()),width:Math.max(e(h).width(),e(document).width())})}).trigger("resize")},toggle:function(I){var F=y.overlay,H=D.options.show.modal.effect,G=I?"show":"hide";F.stop(g,m);if(e.isFunction(H)){H.call(F,I)}else{if(H===m){F[G]()}else{F.fadeTo(90,I?0.7:0,function(){if(!I){e(this).hide()}})}}},show:function(){z.toggle(g)},hide:function(){z.toggle(m)},destroy:function(){var F=g;e("*").each(function(){var G=e(this).data("qtip");if(G&&G.id!==D.id&&G.options.show.modal){return(F=m)}});if(F){y.overlay.remove();e(h).unbind(C)}else{y.overlay.unbind(C+D.id)}E.unbind(B)}});z.init()}e.fn.qtip.plugins.modal=function(y){var x=y.plugins.modal;return"object"===typeof x?x:(y.plugins.modal=new b(y))};e.fn.qtip.plugins.modal.initialize="render";e.fn.qtip.plugins.modal.sanitize=function(x){if(x.show){if(typeof x.show.modal!=="object"){x.show.modal={on:!!x.show.modal}}else{if(typeof x.show.modal.on==="undefined"){x.show.modal.on=g}}}};e.extend(g,e.fn.qtip.defaults,{show:{modal:{on:m,effect:g,blur:g}}});function w(B){var y=this,x=B.elements,C=x.tooltip,A=".bgiframe-"+B.id,z="tooltipmove"+A+" tooltipshow"+A;e.extend(y,{init:function(){x.bgiframe=e('<iframe class="ui-tooltip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';"  style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0);"></iframe>');x.bgiframe.appendTo(C);C.bind(z,y.adjust)},adjust:function(){var F=B.get("dimensions"),E=B.plugins.tip,G=B.elements.tip,D,H;H=parseInt(C.css("border-left-width"),10)||0;H={left:-H,top:-H};if(E&&G){D=(E.corner.precedance==="x")?["width","left"]:["height","top"];H[D[1]]-=G[D[0]]()}x.bgiframe.css(H).css(F)},destroy:function(){y.iframe.remove();C.unbind(z)}});y.init()}e.fn.qtip.plugins.bgiframe=function(y){if(!(e.browser.msie&&(/^6\.[0-9]/).test(e.browser.version)&&e("select, object").length)){return m}var x=y.plugins.bgiframe;if(x){return x}else{y.plugins.bgiframe=new w(y);return y.plugins.bgiframe}};e.fn.qtip.plugins.bgiframe.initialize="render"}(jQuery,window));
