diff --git a/Makefile b/Makefile index 6443ab22..fd76dda6 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ QTIP_CSS_MIN = ${DIST_DIR}/jquery.qtip.min.css QTIP_VER = `cat version.txt` VER = sed s/@VERSION/${QTIP_VER}/ -JS_ENGINE ?= `which nodejs` +JS_ENGINE ?= `which node nodejs` COMPILER = ${JS_ENGINE} ${BUILD_DIR}/uglify.js --unsafe MINIFIER = java -Xmx96m -jar ${BUILD_DIR}/yuicompressor.jar PACKER = java -jar ${BUILD_DIR}/js.jar ${BUILD_DIR}/packer.js diff --git a/dist/jquery.qtip.css b/dist/jquery.qtip.css index 8678b8ea..4b817610 100644 --- a/dist/jquery.qtip.css +++ b/dist/jquery.qtip.css @@ -9,7 +9,7 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License * -* Date: Wed Feb 2 00:05:48 2011 +0000 +* Date: Wed Feb 2 00:07:15 2011 +0000 */ /* Fluid class for determining actual width in IE */ diff --git a/dist/jquery.qtip.js b/dist/jquery.qtip.js index 34d8eff3..e1eb5cd6 100644 --- a/dist/jquery.qtip.js +++ b/dist/jquery.qtip.js @@ -9,7 +9,7 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License * -* Date: Wed Feb 2 00:05:48 2011 +0000 +* Date: Wed Feb 2 00:07:15 2011 +0000 */ "use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ diff --git a/dist/jquery.qtip.min.js b/dist/jquery.qtip.min.js index cf06a2e1..d785f8e1 100644 --- a/dist/jquery.qtip.min.js +++ b/dist/jquery.qtip.min.js @@ -9,5 +9,5 @@ * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License * -* Date: Wed Feb 2 00:05:48 2011 +0000 +* Date: Wed Feb 2 00:07:15 2011 +0000 */"use strict",function(a,b,c){function w(b){var c=this,d=b.elements,e=d.tooltip,f=".bgiframe-"+b.id,g="tooltipmove"+f+" tooltipshow"+f;a.extend(c,{init:function(){d.bgiframe=a(''),d.bgiframe.appendTo(e),e.bind(g,c.adjust)},adjust:function(){var a=b.get("dimensions"),c=b.plugins.tip,f=b.elements.tip,g,h;h=parseInt(e.css("border-left-width"),10)||0,h={left:-h,top:-h},c&&f&&(g=c.corner.precedance==="x"?["width","left"]:["height","top"],h[g[1]]-=f[g[0]]()),d.bgiframe.css(h).css(a)},destroy:function(){c.iframe.remove(),e.unbind(g)}}),c.init()}function v(c){var f=this,g=c.options.show.modal,h=c.elements,i=h.tooltip,j="#qtip-overlay",k=".qtipmodal",l="tooltipshow"+k+" tooltiphide"+k;c.checks.modal={"^show.modal.(on|blur)$":function(){f.init(),h.overlay.toggle(i.is(":visible"))}},a.extend(f,{init:function(){g.on&&(i.unbind(k).bind(l,function(b,c,d){var e=b.type.replace("tooltip","");a.isFunction(g[e])?g[e].call(h.overlay,d,c):f[e](d)}),f.create(),g.blur===d&&h.overlay.unbind(k+c.id).bind("click"+k+c.id,function(){c.hide.call(c)}))},create:function(){var c=a(j),d;if(c.length){h.overlay=c;return c}d=h.overlay=a("
",{id:j.substr(1),css:{position:"absolute",top:0,left:0,display:"none"}}).appendTo(document.body),a(b).bind("resize"+k,function(){d.css({height:Math.max(a(b).height(),a(document).height()),width:Math.max(a(b).width(),a(document).width())})}).trigger("resize");return d},toggle:function(b){var g=h.overlay,j=c.options.show.modal.effect,k=b?"show":"hide",l;g||(g=f.create());if(!g.is(":animated")||b)g.stop(d,e),b&&(l=parseInt(a.css(i[0],"z-index"),10),g.css("z-index",(l||a.fn.qtip.zindex)-1)),a.isFunction(j)?j.call(g,b):j===e?g[k]():g.fadeTo(90,b?.7:0,function(){b||a(this).hide()})},show:function(){f.toggle(d)},hide:function(){f.toggle(e)},destroy:function(){var f=d;a("*").each(function(){var b=a(this).data("qtip");if(b&&b.id!==c.id&&b.options.show.modal)return f=e}),f?(h.overlay.remove(),a(b).unbind(k)):h.overlay.unbind(k+c.id),i.unbind(l)}}),f.init()}function u(b,g){function v(a){var b=a.precedance==="y",c=m[b?"width":"height"],d=m[b?"height":"width"],e=a.string().indexOf("center")>-1,f=c*(e?.5:1),g=Math.pow,h=Math.round,i,j,k,l=Math.sqrt(g(f,2)+g(d,2)),n=[o/f*l,o/d*l];n[2]=Math.sqrt(g(n[0],2)-g(o,2)),n[3]=Math.sqrt(g(n[1],2)-g(o,2)),i=l+n[2]+n[3]+(e?0:n[0]),j=i/l,k=[h(j*d),h(j*c)];return{height:k[b?0:1],width:k[b?1:0]}}function u(b){var c=j.titlebar&&b.y==="top",d=c?j.titlebar:j.content,e=a.browser.mozilla,f=e?"-moz-":a.browser.webkit?"-webkit-":"",g=b.y+(e?"":"-")+b.x,h=f+(e?"border-radius-"+g:"border-"+g+"-radius");return parseInt(d.css(h),10)||parseInt(k.css(h),10)||0}function s(a,b,c){b=b?b:a[a.precedance];var d=j.titlebar&&a.y==="top",e=d?j.titlebar:j.content,f="border-"+b+"-width",g=parseInt(e.css(f),10);return(c?g||parseInt(k.css(f),10):g)||0}function r(b,e,f,g){if(j.tip){var k=a.extend({},h.corner),m=f.adjusted,n;h.corner.fixed!==d&&(m.left&&(k.x=k.x==="center"?m.left>0?"left":"right":k.x==="left"?"right":"left"),m.top&&(k.y=k.y==="center"?m.top>0?"top":"bottom":k.y==="top"?"bottom":"top"),k.string()!==l.corner&&(l.top!==m.top||l.left!==m.left)&&(n=h.update(k))),n||(n=h.position(k,0)),n.right!==c&&(n.left=n.right),n.bottom!==c&&(n.top=n.bottom),n.option=Math.max(0,i.offset),f.left-=n.left.charAt?n.option:(n.right?-1:1)*n.left,f.top-=n.top.charAt?n.option:(n.bottom?-1:1)*n.top,l.left=m.left,l.top=m.top,l.corner=k.string()}}var h=this,i=b.options.style.tip,j=b.elements,k=j.tooltip,l={top:0,left:0,corner:""},m={width:i.width,height:i.height},n={},o=i.border||0,p=".qtip-tip",q=a("")[0].getContext;h.corner=f,h.mimic=f,b.checks.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){h.init()||h.destroy(),b.reposition()},"^style.tip.(height|width)$":function(){m={width:i.width,height:i.height},h.create(),h.update(),b.reposition()},"^content.title.text|style.(classes|widget)$":function(){j.tip&&h.update()}},a.extend(h,{init:function(){var b=h.detectCorner()&&(q||a.browser.msie);b&&(h.create(),h.update(),k.unbind(p).bind("tooltipmove"+p,r));return b},detectCorner:function(){var c=i.corner,f=b.options.position,g=f.at,j=f.my.string?f.my.string():f.my;if(c===e||j===e&&g===e)return e;c===d?h.corner=new a.fn.qtip.plugins.Corner(j):c.string||(h.corner=new a.fn.qtip.plugins.Corner(c),h.corner.fixed=d);return h.corner.string()!=="centercenter"},detectColours:function(){var c=j.tip.css({backgroundColor:"",border:""}),d=h.corner,e=d[d.precedance],f="border-"+e+"-color",g="border"+e.charAt(0)+e.substr(1)+"Color",l=/rgba?\(0, 0, 0(, 0)?\)|transparent/i,o="background-color",p="transparent",q=j.titlebar&&(d.y==="top"||d.y==="center"&&c.position().top+m.height/2+i.offset",{"class":"ui-tooltip-tip"}).css({width:b,height:c}).prependTo(k),q?a("").appendTo(j.tip)[0].getContext("2d").save():(d='',j.tip.html(o?d+=d:d))},update:function(b){var c=j.tip,g=c.children(),k=m.width,l=m.height,p="px solid ",r="px dashed transparent",u=i.mimic,w=Math.round,x,y,z,A,B;b||(b=h.corner),u===e?u=b:(u=new a.fn.qtip.plugins.Corner(u),u.precedance=b.precedance,u.x==="inherit"?u.x=b.x:u.y==="inherit"?u.y=b.y:u.x===u.y&&(u[b.precedance]=b[b.precedance])),x=u.precedance,h.detectColours(),o=n.border==="transparent"||n.border==="#123456"?0:i.border===d?s(b,f,d):i.border,z=t(u,k,l),B=v(b),c.css(B),b.precedance==="y"?A=[w(u.x==="left"?o:u.x==="right"?B.width-k-o:(B.width-k)/2),w(u.y==="top"?B.height-l:0)]:A=[w(u.x==="left"?B.width-k:0),w(u.y==="top"?o:u.y==="bottom"?B.height-l-o:(B.height-l)/2)],q?(g.attr(B),y=g[0].getContext("2d"),y.restore(),y.save(),y.clearRect(0,0,3e3,3e3),y.translate(A[0],A[1]),y.beginPath(),y.moveTo(z[0][0],z[0][1]),y.lineTo(z[1][0],z[1][1]),y.lineTo(z[2][0],z[2][1]),y.closePath(),y.fillStyle=n.fill,y.strokeStyle=n.border,y.lineWidth=o*2,y.lineJoin="miter",y.miterLimit=100,y.stroke(),y.fill()):(z="m"+z[0][0]+","+z[0][1]+" l"+z[1][0]+","+z[1][1]+" "+z[2][0]+","+z[2][1]+" xe",A[2]=o&&/^(r|b)/i.test(b.string())?1:0,g.css({antialias:""+(u.string().indexOf("center")>-1),left:A[0]-A[2]*Number(x==="x"),top:A[1]-A[2]*Number(x==="y"),width:k+o,height:l+o}).each(function(b){var c=a(this);c.attr({coordsize:k+o+" "+(l+o),path:z,fillcolor:n.fill,filled:!!b,stroked:!b}).css({display:o||b?"block":"none"}),!b&&o>0&&c.html()===""&&c.html('')}));return h.position(b,1)},position:function(b,c){var f=j.tip,g={},k=Math.max(0,i.offset),l,m,n;if(i.corner===e||!f)return e;b=b||h.corner,l=b.precedance,m=v(b),n=a.browser.msie&&o&&/^(b|r)/i.test(b.string())?1:0,a.each(l==="y"?[b.x,b.y]:[b.y,b.x],function(a,c){var e,f;c==="center"?(e=l==="y"?"left":"top",g[e]="50%",g["margin-"+e]=-Math.round(m[l==="y"?"width":"height"]/2)+k):(e=s(b,c,d),f=u(b),g[c]=a||!o?s(b,c):k+(f>e?f:0))}),g[b[l]]-=m[l==="x"?"width":"height"]+n,c&&f.css({top:"",bottom:"",left:"",right:"",margin:""}).css(g);return g},destroy:function(){j.tip&&j.tip.remove(),k.unbind(p)}}),h.init()}function t(a,b,c){var d=Math.ceil(b/2),e=Math.ceil(c/2),f={bottomright:[[0,0],[b,c],[b,0]],bottomleft:[[0,0],[b,0],[0,c]],topright:[[0,c],[b,0],[b,c]],topleft:[[0,0],[0,c],[b,c]],topcenter:[[0,c],[d,0],[b,c]],bottomcenter:[[0,0],[b,0],[d,c]],rightcenter:[[0,0],[b,e],[0,c]],leftcenter:[[b,0],[b,c],[0,e]]};f.lefttop=f.bottomright,f.righttop=f.bottomleft,f.leftbottom=f.topright,f.rightbottom=f.topleft;return f[a.string()]}function s(b){var c=this,d=b.elements.tooltip,e=b.options.content.ajax,f=".qtip-ajax",g=/)<[^<]*)*<\/script>/gi;b.checks.ajax={"^content.ajax":function(a,b){b==="once"?c.once():e&&e.url&&c.load()}},a.extend(c,{init:function(){e&&e.url&&(c.load(),d.one("tooltipshow",c.once))},once:function(){e.once?c.destroy():d.bind("tooltipshow"+f,c.load)},load:function(){function j(a,c,d){b.set("content.text",c+": "+d)}function i(c){h&&(c=a("
").append(c.replace(g,"")).find(h)),b.set("content.text",c)}var d=e.url.indexOf(" "),f=e.url,h;d>-1&&(h=f.substr(d),f=f.substr(0,d)),a.ajax(a.extend({success:i,error:j,context:b},e,{url:f}));return c},destroy:function(){d.unbind(f)}}),c.init()}function r(b,c){var g,h,i,j,k=a(this),l=a(document.body),m=this===document?l:k,r=k.metadata?k.metadata(c.metadata):f,s=c.metadata.type==="html5"&&r?r[c.metadata.name]:f,t=k.data(c.metadata.name||"qtipopts");try{t=typeof t==="string"?(new Function("return "+t))():t}catch(u){o("Unable to parse HTML5 attribute data: "+t)}j=a.extend(d,{},a.fn.qtip.defaults,c,typeof t==="object"?p(t):f,p(s||r)),r&&a.removeData(this,"metadata"),h=j.position,j.id=b;if("boolean"===typeof j.content.text){i=k.attr(j.content.attr);if(j.content.attr!==e&&i)j.content.text=i;else return e}h.container===e&&(h.container=l),h.target===e&&(h.target=m),j.show.target===e&&(j.show.target=m),j.hide.target===e&&(j.hide.target=m),j.position.viewport===d&&(j.position.viewport=h.container),h.at=new a.fn.qtip.plugins.Corner(h.at),h.my=new a.fn.qtip.plugins.Corner(h.my);if(a.data(this,"qtip"))if(j.overwrite)k.qtip("destroy");else if(j.overwrite===e)return e;a.attr(this,"title")&&(a.data(this,n,a.attr(this,"title")),k.removeAttr("title")),g=new q(k,j,b,!!i),a.data(this,"qtip",g),k.bind("remove.qtip",function(){g.destroy()});return g}function q(m,o,q,r){function H(c,d,e,g){g=parseInt(g,10)!==0;var h=".qtip-"+q,i={show:c?o.show.target:f,hide:d?o.hide.target:f,tooltip:e?s.elements.tooltip:f,content:e?s.elements.content:f,container:g?o.position.container[0]===t?document:o.position.container:f,window:g?b:f};s.rendered?a([]).pushStack(a.grep([i.show,i.hide,i.tooltip,i.container,i.content,i.window],function(){return this!==null})).unbind(h):c&&i.show.unbind(h+"-create")}function G(c,d,f,g){function z(a){y()&&s.reposition(a)}function x(a){if(w.hasClass(i))return e;clearTimeout(s.timers.inactive),s.timers.inactive=setTimeout(function(){s.hide(a)},o.hide.inactive)}function v(b){if(w.hasClass(i))return e;var c=a(b.relatedTarget||b.target),d=c.closest(j)[0]===w[0],f=c[0]===l.show[0];clearTimeout(s.timers.show),clearTimeout(s.timers.hide);if(k.target==="mouse"&&d||o.hide.fixed&&(/mouse(out|leave|move)/.test(b.type)&&(d||f))){b.stopPropagation(),b.preventDefault();return e}w.stop(1,1),o.hide.delay>0?s.timers.hide=setTimeout(function(){s.hide(b)},o.hide.delay):s.hide(b)}function u(a){if(w.hasClass(i))return e;l.show.trigger("qtip-"+q+"-inactive"),clearTimeout(s.timers.show),clearTimeout(s.timers.hide);var b=function(){s.show(a)};o.show.delay>0?s.timers.show=setTimeout(b,o.show.delay):b()}var h=".qtip-"+q,k=o.position,l={show:o.show.target,hide:o.hide.target,container:k.container[0]===t?document:k.container},n={show:String(o.show.event).split(" "),hide:String(o.hide.event).split(" ")},p=a(document),r=a.browser.msie&&parseInt(a.browser.version,10)===6;f&&(o.hide.fixed&&(l.hide=l.hide.add(w),w.bind("mouseover"+h,function(){w.hasClass(i)||clearTimeout(s.timers.hide)})),w.bind("mouseenter"+h+" mouseleave"+h,function(a){s[a.type==="mouseenter"?"focus":"blur"](a)})),d&&("number"===typeof o.hide.inactive&&(l.show.bind("qtip-"+q+"-inactive",x),a.each(a.fn.qtip.inactiveEvents,function(a,b){l.hide.add(s.elements.tooltip).bind(b+h+"-inactive",x)})),a.each(n.hide,function(b,c){var d=a.inArray(c,n.show),e=a(l.hide);d>-1&&e.add(l.show).length===e.length||c==="unfocus"?(l.show.bind(c+h,function(a){y()?v(a):u(a)}),delete n.show[d]):l.hide.bind(c+h,v)})),c&&a.each(n.show,function(a,b){l.show.bind(b+h,u)}),g&&((k.adjust.resize||k.viewport)&&a(a.event.special.resize?k.viewport:b).bind("resize"+h,z),(k.viewport||r&&w.css("position")==="fixed")&&a(k.viewport).bind("scroll"+h,z),/unfocus/i.test(o.hide.event)&&p.bind("mousedown"+h,function(b){var c=a(b.target);c.parents(j).length===0&&c.add(m).length>1&&y()&&!w.hasClass(i)&&s.hide(b)}),k.target==="mouse"&&p.bind("mousemove"+h,function(b){k.adjust.mouse&&!w.hasClass(i)&&y()&&s.reposition(b||a.fn.qtip.mouse)}))}function F(b,c){var f=s.elements.content;if(!s.rendered||!b)return e;a.isFunction(b)&&(b=b.call(m,s)||""),b.jquery&&b.length>0?f.empty().append(b.css({display:"block"})):f.html(b),w.queue("fx",function(b){function e(a){c=c.not(a),c.length===0&&(s.redraw(),s.rendered&&y()&&s.reposition(s.cache.event),b())}var c=f.find("img:not([height]):not([width])");c.each(function(b,c){var f=["abort","error","load","unload",""].join(".qtip-image ");a(this).bind(f,function(){clearTimeout(s.timers.img[b]),e(this)}),function g(){if(c.height)return e(c);s.timers.img[b]=setTimeout(g,20)}();return d}),c.length===0&&e(c)});return s}function E(b){var c=s.elements.title;if(!s.rendered||!b)return e;a.isFunction(b)&&(b=b.call(m,s)||""),b.jquery&&b.length>0?c.empty().append(b.css({display:"block"})):c.html(b),s.redraw(),s.rendered&&y()&&s.reposition(s.cache.event)}function D(a){var b=s.elements.button,c=s.elements.title;if(!s.rendered)return e;a?(c||C(),B()):b.remove()}function C(){var b=s.elements,c=u+"-title";b.titlebar&&A(),b.titlebar=a("
",{"class":g+"-titlebar "+(o.style.widget?"ui-widget-header":"")}).append(b.title=a("
",{id:c,"class":g+"-title","aria-atomic":d})).insertBefore(b.content),o.content.title.button?B():s.rendered&&s.redraw()}function B(){var b=s.elements,c=o.content.title.button;b.button&&b.button.remove(),c.jquery?b.button=c:b.button=a("",{"class":"ui-state-default "+(o.style.widget?"":g+"-icon"),title:"Close tooltip","aria-label":"Close tooltip"}).prepend(a("",{"class":"ui-icon ui-icon-close",html:"×"})),b.button.appendTo(b.titlebar).attr("role","button").hover(function(b){a(this).toggleClass("ui-state-hover",b.type==="mouseenter")}).click(function(a){w.hasClass(i)||s.hide(a);return e}).bind("mousedown keydown mouseup keyup mouseout",function(b){a(this).toggleClass("ui-state-active ui-state-focus",b.type.substr(-4)==="down")}),s.redraw()}function A(){var a=s.elements;a.title&&(a.titlebar.remove(),a.titlebar=a.title=a.button=f,s.reposition())}function z(){var a=s.elements,b=o.style.widget;w.toggleClass(h,b),a.content.toggleClass(h+"-content",b),a.titlebar&&a.titlebar.toggleClass(h+"-header",b),a.button&&a.button.toggleClass(g+"-icon",!b)}function y(){return w.css("left")!==l&&w.css("visibility")!=="hidden"}function x(a){var b,d,e=a.split("."),f=o[e[0]];for(b=1;b0&&!a("#"+i).length&&(w[0].id=i,s.elements.content[0].id=i+"-content",s.elements.title[0].id=i+"-title")},"^content.text$":function(a,b,c){F(c)},"^content.title.text$":function(a,b,c){if(!c)return A();!s.elements.title&&c&&C(),E(c)},"^content.title.button$":function(a,b,c){D(c)},"^position.(my|at)$":function(b,c,d){"string"===typeof d&&(b[c]=new a.fn.qtip.plugins.Corner(d))},"^position.container$":function(a,b,c){s.rendered&&w.appendTo(c)},"^(show|hide).(event|target|fixed|delay|inactive)$":function(a,b,c,d){var e=b.search(/fixed/i)>-1?[0,[0,1,1,1]]:[b.substr(0,3),b.charAt(0)==="s"?[1,0,0,0]:[0,1,0,0]];e[0]&&(a[b]=d),H.apply(s,e[1]),e[0]&&(a[b]=c),G.apply(s,e[1])},"^show.ready$":function(){s.rendered||s.show()},"^style.classes$":function(b,c,d){a.attr(w[0],"class",g+" qtip ui-helper-reset "+d)},"^style.widget|content.title":z,"^events.(render|show|move|hide|focus|blur)$":function(b,c,d){w[(a.isFunction(d)?"":"un")+"bind"]("tooltip"+c,d)}},a.extend(s,{render:function(b){if(s.rendered)return e;var c=s.elements,f=o.content.text,h=o.content.title.text,j=a.Event("tooltiprender");a.attr(m[0],"aria-describedby",u),w=c.tooltip=a("
").attr({id:u,"class":g+" qtip ui-helper-reset "+o.style.classes,role:"alert","aria-live":"polite","aria-atomic":e,"aria-describedby":u+"-content","aria-hidden":d}).toggleClass(i,s.cache.disabled).data("qtip",s).appendTo(o.position.container).append(c.content=a("
",{"class":g+"-content",id:u+"-content","aria-atomic":d})),s.rendered=d,h&&(C(),E(h)),F(f),z(),a.each(a.fn.qtip.plugins,function(){this.initialize==="render"&&this(s)}),G(1,1,1,1),a.each(o.events,function(a,b){if(b){var c=a==="toggle"?"tooltipshow tooltiphide":"tooltip"+a;w.bind(c,b)}}),w.css("visibility","hidden").queue("fx",function(a){j.originalEvent=s.cache.event,w.trigger(j,[s]),(o.show.ready||b)&&s.show(s.cache.event),a()});return s},get:function(b){var c,d;switch(b.toLowerCase()){case"dimensions":c={height:w.outerHeight(),width:w.outerWidth()};break;case"offset":c=a.fn.qtip.plugins.offset(w,o.position.container);break;default:d=x(b.toLowerCase()),c=d[0].precedance?d[0].string():d[0].jquery?d[0]:d[0][d[1]]}return c},set:function(b,c){function j(b,c){b=b.toLowerCase();var d=x(b),e,f,g;e=d[0][d[1]],d[0][d[1]]=c.nodeType?a(c):c;for(f in h)for(g in h[f])(new RegExp(g,"i")).test(b)&&h[f][g].call(s,d[0],d[1],c,e)}var d=s.elements,f=/^position.(my|at|adjust|target|container)|style|content/i,g=e,h=s.checks,i;"string"===typeof b&&(i=b,b={},b[i]=c),v=1;for(i in b)j(i,b[i]),g=f.test(i)||g;v=0,g&&y()&&s.rendered&&s.reposition(),p(o);return s},toggle:function(b,c){function k(){b?a.browser.msie&&w[0].style.removeAttribute("filter"):w.css({display:"",visibility:"hidden",width:"",opacity:"",left:"",top:""})}if(!s.rendered)return e;var d=b?"show":"hide",g=o[d],h=y(),i;(typeof b).search("boolean|number")&&(b=!h);if(h===b)return s;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(s.cache.event.type)&&c.target===o.show.target[0]&&w.has(c.relatedTarget).length)return s;s.cache.event=a.extend({},c)}i=a.Event("tooltip"+d),i.originalEvent=c?s.cache.event:f,w.trigger(i,[s,90]);if(i.isDefaultPrevented())return s;a.attr(w[0],"aria-hidden",!b),b?(w.hide().css({visibility:""}),s.focus(c),s.reposition(c,0),g.solo&&a(j).not(w).qtip("hide",i)):(clearTimeout(s.timers.show),s.blur(c)),w.stop(1,1),a.isFunction(g.effect)?(g.effect.call(w,s),w.queue("fx",function(a){k.call(this,a),a()})):g.effect===e?(w[d](),k.call(w)):w.fadeTo(90,b?1:0,k),b&&g.target.trigger("qtip-"+q+"-inactive");return s},show:function(a){s.toggle(d,a)},hide:function(a){s.toggle(e,a)},focus:function(b){if(!s.rendered)return e;var c=a(j),d=parseInt(w[0].style.zIndex,10),f=a.fn.qtip.zindex+c.length,g=a.extend({},b),h,i;w.hasClass(k)||(d!==f&&(c.each(function(){this.style.zIndex>d&&(this.style.zIndex=this.style.zIndex-1)}),c.filter("."+k).qtip("blur",g)),i=a.Event("tooltipfocus"),i.originalEvent=g,w.trigger(i,[s,f]),i.isDefaultPrevented()||(w.addClass(k)[0].style.zIndex=f));return s},blur:function(b){var c=a.extend({},b),d;w.removeClass(k),d=a.Event("tooltipblur"),d.originalEvent=c,w.trigger(d,[s])},reposition:function(f,h){if(!s.rendered||v)return e;v=d;var i=o.position.target,j=o.position,k=j.my,l=j.at,m=j.adjust,n=w.outerWidth(),p=w.outerHeight(),q=0,r=0,u=a.Event("tooltipmove"),x=w.css("position")==="fixed",z=j.viewport.jquery?j.viewport:a(b),A={left:0,top:0},B={left:function(a){var b=z.scrollLeft,c=k.x==="left"?n:k.x==="right"?-n:-n/2,d=l.x==="left"?q:l.x==="right"?-q:-q/2,e=b-a,f=a+n-z.width-b,g=c-(k.precedance==="x"||k.x===k.y?d:0);e>0&&(k.x!=="left"||f>0)?A.left-=g:f>0&&(k.x!=="right"||e>0)&&(A.left-=(k.x==="center"?-1:1)*g+2*m.x),A.left<0&&-A.left>f&&(A.left=a);return A.left-a},top:function(a){var b=z.scrollTop,c=k.y==="top"?p:k.y==="bottom"?-p:-p/2,d=l.y==="top"?r:l.y==="bottom"?-r:-r/2,e=b-a,f=a+p-z.height-b,g=c-(k.precedance==="y"||k.x===k.y?d:0);e>0&&(k.y!=="top"||f>0)?A.top-=g:f>0&&(k.y!=="bottom"||e>0)&&(A.top-=(k.y==="center"?-1:1)*g+2*m.y),A.top<0&&-A.top>f&&(A.top=a);return A.top-a}};h=h===c||!!h||e,z=z?{elem:z,height:z[(z[0]===b?"h":"outerH")+"eight"](),width:z[(z[0]===b?"w":"outerW")+"idth"](),scrollLeft:z.scrollLeft(),scrollTop:z.scrollTop()}:e;if(i==="mouse")l={x:"left",y:"top"},f=f&&(f.type==="resize"||f.type==="scroll")?s.cache.event:m.mouse||!f||!f.pageX?a.extend({},a.fn.qtip.mouse):f,A={top:f.pageY,left:f.pageX};else{i==="event"&&(f&&f.target&&f.type!=="scroll"&&f.type!=="resize"?i=s.cache.target=a(f.target):i=s.cache.target),i=a(i).eq(0);if(i.length===0)return s;i[0]===document||i[0]===b?(q=i.width(),r=i.height(),i[0]===b&&(A={top:x?0:z.scrollTop,left:x?0:z.scrollLeft})):i.is("area")&&a.fn.qtip.plugins.imagemap?(A=a.fn.qtip.plugins.imagemap(i,l),q=A.width,r=A.height,A=A.offset):i[0].namespaceURI=="http://www.w3.org/2000/svg"&&a.fn.qtip.plugins.svg?(A=a.fn.qtip.plugins.svg(i,l),q=A.width,r=A.height,A=A.offset):(q=i.outerWidth(),r=i.outerHeight(),A=a.fn.qtip.plugins.offset(i,j.container)),A.left+=l.x==="right"?q:l.x==="center"?q/2:0,A.top+=l.y==="bottom"?r:l.y==="center"?r/2:0}A.left+=m.x+(k.x==="right"?-n:k.x==="center"?-n/2:0),A.top+=m.y+(k.y==="bottom"?-p:k.y==="center"?-p/2:0),j.viewport.jquery&&i[0]!==b&&i[0]!==t?A.adjusted={left:B.left(A.left),top:B.top(A.top)}:A.adjusted={left:0,top:0},w.attr("class",function(b,c){return a.attr(this,"class").replace(/ui-tooltip-pos-\w+/i,"")}).addClass(g+"-pos-"+k.abbreviation()),u.originalEvent=a.extend({},f),w.trigger(u,[s,A,z.elem]);if(u.isDefaultPrevented())return s;delete A.adjusted,h&&isNaN(A.left,A.top)?y()&&a.isFunction(j.effect)&&(j.effect.call(w,s,A),w.queue(function(b){var c=a(this);c.css({opacity:"",height:""}),a.browser.msie&&this.style&&this.style.removeAttribute("filter"),b()})):w.css(A),v=e;return s},redraw:function(){if(!s.rendered||(!a.browser.msie||a.browser.version>=8))return e;var b=g+"-fluid",c;w.css({width:"auto",height:"auto"}).addClass(b),c={height:w.outerHeight(),width:w.outerWidth()},a.each(["width","height"],function(a,b){var d=parseInt(w.css("max-"+b),10)||0,e=parseInt(w.css("min-"+b),10)||0;c[b]=d+e?Math.min(Math.max(c[b],e),d):c[b]}),w.css(c).removeClass(b)},disable:function(b){var c=i;"boolean"!==typeof b&&(b=!w.hasClass(c)&&!s.cache.disabled),s.rendered?(w.toggleClass(c,b),a.attr(w[0],"aria-disabled",b)):s.cache.disabled=!!b;return s},destroy:function(){var b=m[0],c=a.data(b,n);s.rendered&&(w.remove(),a.each(s.plugins,function(){this.initialize==="render"&&this.destroy()})),clearTimeout(s.timers.show),clearTimeout(s.timers.hide),H(1,1,1,1),a.removeData(b,"qtip"),c&&a.attr(b,"title",c),m.removeAttr("aria-describedby");return m}})}function p(b){var c;if(!b||"object"!==typeof b)return e;"object"!==typeof b.metadata&&(b.metadata={type:b.metadata});if("content"in b){if("object"!==typeof b.content||b.content.jquery)b.content={text:b.content};c=b.content.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.text=e),"title"in b.content&&("object"!==typeof b.content.title&&(b.content.title={text:b.content.title}),c=b.content.title.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.title.text=e))}"position"in b&&("object"!==typeof b.position&&(b.position={my:b.position,at:b.position})),"show"in b&&("object"!==typeof b.show&&(b.show.jquery?b.show={target:b.show}:b.show={event:b.show})),"hide"in b&&("object"!==typeof b.hide&&(b.hide.jquery?b.hide={target:b.hide}:b.hide={event:b.hide})),"style"in b&&("object"!==typeof b.style&&(b.style={classes:b.style})),a.each(a.fn.qtip.plugins,function(){this.sanitize&&this.sanitize(b)});return b}function o(){var c=b.console;return c&&(c.error||c.log||a.noop).apply(c,arguments)}var d=!0,e=!1,f=null,g="ui-tooltip",h="ui-widget",i="ui-state-disabled",j="div.qtip."+g,k=g+"-focus",l="-31000px",m="_replacedByqTip",n="oldtitle";a.fn.qtip=function(b,g,h){var i=String(b).toLowerCase(),j=f,k=i==="disable"?[d]:a.makeArray(arguments).slice(1,10),l=k[k.length-1],m=this[0]?a.data(this[0],"qtip"):f;if(!arguments.length&&m||i==="api")return m;if("string"===typeof b){this.each(function(){var b=a.data(this,"qtip");if(!b)return d;/option|set/.test(i)&&g?a.isPlainObject(g)||h!==c?b.set(g,h):j=b.get(g):(b.rendered||i!=="show"&&i!=="toggle"?i==="enable"&&(i="disable",k=[e]):(l&&l.timeStamp&&(b.cache.event=l),b.render(1)),b[i]&&b[i].apply(b[i],k))});return j!==f?j:this}if("object"===typeof b||!arguments.length){m=p(a.extend(d,{},b));return a.fn.qtip.bind.call(this,m,l)}},a.fn.qtip.bind=function(b,c){return this.each(function(f){function n(b){function c(){m.render(typeof b==="object"||h.show.ready),i.show.unbind(j.show),i.hide.unbind(j.hide)}if(m.cache.disabled)return e;m.cache.event=a.extend({},b),h.show.delay>0?(clearTimeout(m.timers.show),m.timers.show=setTimeout(c,h.show.delay),j.show!==j.hide&&i.hide.bind(j.hide,function(){clearTimeout(m.timers.show)})):c()}var h,i,j,k=!b.id||b.id===e||b.id.length<1||a("#"+g+"-"+b.id).length?a.fn.qtip.nextid++:b.id,l=".qtip-"+k+"-create",m=r.call(this,k,b);if(m===e)return d;h=m.options,a.each(a.fn.qtip.plugins,function(){this.initialize==="initialize"&&this(m)}),i={show:h.show.target,hide:h.hide.target},j={show:String(h.show.event).replace(" ",l+" ")+l,hide:String(h.hide.event).replace(" ",l+" ")+l},i.show.bind(j.show,n),(h.show.ready||h.prerender)&&n(c)})},a.each({attr:function(b,c){if(this.length){var d=this[0],e="title",f=a.data(d,"qtip");if(b===e){if(arguments.length<2)return a.data(d,n);if(typeof f==="object"){f&&f.rendered&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",c),a.fn["attr"+m].apply(this,arguments),a.data(d,n,a.attr(d,e));return this.removeAttr("title")}}}},clone:function(b){var c=a([]),d;a("*",this).add(this).each(function(){var b=a.data(this,n);b&&(a.attr(this,"title",b),c=c.add(this))}),d=a.fn["clone"+m].apply(this,arguments),c.removeAttr("title");return d},remove:a.ui?f:function(b,c){a(this).each(function(){c||(!b||a.filter(b,[this]).length)&&a("*",this).add(this).each(function(){a(this).triggerHandler("remove")})})}},function(b,c){if(!c)return d;var e=a.fn[b+m]=a.fn[b];a.fn[b]=function(){return c.apply(this,arguments)||e.apply(this,arguments)}}),a(b).load(function(){var b=document,d=b.body;a(b).bind("mousemove.qtip",function(b){a.fn.qtip.mouse={pageX:b.pageX,pageY:b.pageY}}),b.activeElement===c&&b.addEventListener("focus",function(a){a&&a.target&&(b.activeElement=a.target===b?d:a.target)},!0)}),a.fn.qtip.version="2.0.0pre",a.fn.qtip.nextid=0,a.fn.qtip.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),a.fn.qtip.zindex=15e3,a.fn.qtip.plugins={Corner:function(a){a=String(a).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.precedance=a.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 a=this.x.substr(0,1),b=this.y.substr(0,1);return a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b}},offset:function(b,c){var d=b.offset(),e=c,f=0,g=!a.fn.qtip.plugins.iOS,h;if(e){do{if(e[0]===document.body)break;e.css("position")!=="static"&&(h=e.position(),d.left-=h.left,d.top-=h.top,f++)}while(e=e.offsetParent());if(!g||f>1)h=g?1:-1,d.left+=h*c.scrollLeft(),d.top+=h*c.scrollTop()}return d},iOS:parseFloat((/CPU.+OS ([0-9_]{3}).*AppleWebkit.*Mobile/i.exec(navigator.userAgent)||[0,"4_2"])[1].replace("_","."))<4.1},a.fn.qtip.defaults={prerender:e,id:e,overwrite:d,content:{text:d,attr:"title",title:{text:e,button:e}},position:{my:"top left",at:"bottom right",target:e,container:e,viewport:e,adjust:{x:0,y:0,mouse:d,resize:d},effect:d},show:{target:e,event:"mouseenter",effect:d,delay:90,solo:e,ready:e},hide:{target:e,event:"mouseleave",effect:d,delay:0,fixed:e,inactive:e},style:{classes:"",widget:e},events:{render:f,move:f,show:f,hide:f,toggle:f,focus:f,blur:f}},a.fn.qtip.plugins.ajax=function(a){var b=a.plugins.ajax;return"object"===typeof b?b:a.plugins.ajax=new s(a)},a.fn.qtip.plugins.ajax.initialize="render",a.fn.qtip.plugins.ajax.sanitize=function(a){var b=a.content,c;b&&"ajax"in b&&(c=b.ajax,typeof c!=="object"&&(c=a.content.ajax={url:c}),"boolean"!==typeof c.once&&c.once&&(c.once=!!c.once))},a.extend(d,a.fn.qtip.defaults,{content:{ajax:{once:d}}}),a.fn.qtip.plugins.tip=function(a){var b=a.plugins.tip;return"object"===typeof b?b:a.plugins.tip=new u(a)},a.fn.qtip.plugins.tip.initialize="render",a.fn.qtip.plugins.tip.sanitize=function(a){var b=a.style,c;b&&"tip"in b&&(c=a.style.tip,typeof c!=="object"&&(a.style.tip={corner:c}),/string|boolean/i.test(typeof c.corner)||(c.corner=d),typeof c.width!=="number"&&delete c.width,typeof c.height!=="number"&&delete c.height,typeof c.border!=="number"&&c.border!==d&&delete c.border,typeof c.offset!=="number"&&delete c.offset)},a.extend(d,a.fn.qtip.defaults,{style:{tip:{corner:d,mimic:e,width:6,height:6,border:d,offset:0}}}),a.fn.qtip.plugins.imagemap=function(b,c){function l(a,b){var d=0,e=1,f=1,g=0,h=0,i=a.width,j=a.height;while(i>0&&j>0&&e>0&&f>0){i=Math.floor(i/2),j=Math.floor(j/2),c.x==="left"?e=i:c.x==="right"?e=a.width-i:e+=Math.floor(i/2),c.y==="top"?f=j:c.y==="bottom"?f=a.height-j:f+=Math.floor(j/2),d=b.length;while(d--){if(b.length<2)break;g=b[d][0]-a.offset.left,h=b[d][1]-a.offset.top,(c.x==="left"&&g>=e||c.x==="right"&&g<=e||c.x==="center"&&(ga.width-e)||c.y==="top"&&h>=f||c.y==="bottom"&&h<=f||c.y==="center"&&(ha.height-f))&&b.splice(d,1)}}return{left:b[0][0],top:b[0][1]}}var d=b.attr("shape").toLowerCase(),e=b.attr("coords").split(","),f=[],g=a('img[usemap="#'+b.parent("map").attr("name")+'"]'),h=g.offset(),i={width:0,height:0,offset:{top:1e10,right:0,bottom:0,left:1e10}},j=0,k=0;h.left+=Math.ceil((g.outerWidth()-g.width())/2),h.top+=Math.ceil((g.outerHeight()-g.height())/2);if(d==="poly"){j=e.length;while(j--)k=[parseInt(e[--j],10),parseInt(e[j+1],10)],k[0]>i.offset.right&&(i.offset.right=k[0]),k[0]i.offset.bottom&&(i.offset.bottom=k[1]),k[1]