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