Current File : //etc/zpanel/panel/etc/styles/CstyleX-master/inc/jquery.qtip.min.js |
/*
* qTip2 - Pretty powerful tooltips
* http://craigsworks.com/projects/qtip2/
*
* Version: nightly
* Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com
*
* Dual licensed under MIT or GPLv2 licenses
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Thu Apr 14 16:58:32 PDT 2011
*/"use strict",function(a,b,c){
function z(b){
var c=this,d=b.elements,e=d.tooltip,f=".bgiframe-"+b.id;
a.extend(c,{
init:function(){
d.bgiframe=a('<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>'),d.bgiframe.appendTo(e),e.bind("tooltipmove"+f,c.adjust)
},
adjust:function(){
var a=b.get("dimensions"),c=b.plugins.tip,f=d.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(){
d.bgiframe.remove(),e.unbind(f)
}
}),c.init()
}
function y(c){
var f=this,g=c.options.show.modal,h=c.elements,i=h.tooltip,j="#qtip-overlay",k=".qtipmodal",l;
c.checks.modal={
"^show.modal.(on|blur)$":function(){
f.init(),h.overlay.toggle(i.is(":visible"))
}
},a.extend(f,{
init:function(){
if(!g.on)return f;
i.unbind(k).unbind(k+c.id).bind("tooltipshow"+k+" tooltiphide"+k,function(b,c,d){
var e=b.type.replace("tooltip","");
a.isFunction(g[e])?g[e].call(h.overlay,d,c):f[e](d)
}).bind("tooltipfocus",function(a,b,c){
l.css("z-index",c-1)
}),f.create(),h.overlay.css("cursor",g.blur?"pointer":""),g.blur===d&&h.overlay.bind("click"+k+c.id,function(){
c.hide.call(c)
});
return f
},
create:function(){
var c=a(j);
if(c.length){
h.overlay=c;
return c
}
l=h.overlay=a("<div />",{
id:j.substr(1),
css:{
position:"absolute",
top:0,
left:0,
display:"none"
},
mousedown:function(){
return e
}
}).appendTo(document.body),a(b).bind("resize"+k,function(){
l.css({
height:Math.max(a(b).height(),a(document).height()),
width:Math.max(a(b).width(),a(document).width())
})
}).trigger("resize");
return l
},
toggle:function(b){
var g=c.options.show.modal.effect,h=b?"show":"hide",i;
l||(l=f.create());
if(!l.is(":animated")||b){
l.stop(d,e),a.isFunction(g)?g.call(l,b):g===e?l[h]():l.fadeTo(90,b?.7:0,function(){
b||a(this).hide()
});
return f
}
},
show:function(){
return f.toggle(d)
},
hide:function(){
return f.toggle(e)
},
destroy:function(){
var d=l;
d&&(a(j).each(function(){
var b=a(this).data("qtip");
if(b&&b.id!==b.id&&b.options.show.modal)return d=e
}),d?(h.overlay.remove(),a(b).unbind(k)):h.overlay.unbind(k+c.id));
return i.unbind(k)
}
}),f.init()
}
function x(b,g){
function v(a){
var b=a.precedance==="y",c=n[b?"width":"height"],d=n[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)),m=[p/f*l,p/d*l];
m[2]=Math.sqrt(g(m[0],2)-g(p,2)),m[3]=Math.sqrt(g(m[1],2)-g(p,2)),i=l+m[2]+m[3]+(e?0:m[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=k.titlebar&&b.y==="top",d=c?k.titlebar:k.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(l.css(h),10)||0
}
function t(a,b,c){
b=b?b:a[a.precedance];
var d=k.titlebar&&a.y==="top",e=d?k.titlebar:k.content,f="border-"+b+"-width",g=parseInt(e.css(f),10);
return(c?g||parseInt(l.css(f),10):g)||0
}
function s(f,g,h,l){
if(k.tip){
var n=a.extend({},i.corner),o=h.adjusted,p=b.options.position.adjust.method.substr(0,5)==="shift",q={
left:0,
top:0,
shift:p
},r;
i.corner.fixed!==d&&(p?(o.top&&(q.top=Math.abs(o.top)),o.left&&(q.left=Math.abs(o.left)),n.precedance==="y"&&o.top&&n.x!=="center"?n.precedance=n.precedance==="y"?"x":"y":n.precedance==="x"&&o.left&&n.y!=="center"&&(n.precedance=n.precedance==="x"?"y":"x"),!q.left&&!q.top&&(p=q.shift=e)):(o.left&&(n.x=n.x==="center"?o.left>0?"left":"right":n.x==="left"?"right":"left"),o.top&&(n.y=n.y==="center"?o.top>0?"top":"bottom":n.y==="top"?"bottom":"top")),n.string()!==m.corner&&(m.top!==o.top||m.left!==o.left)&&(r=i.update(n,e))),r=i.position(n,q,1),r.right!==c&&(r.left=r.right),r.bottom!==c&&(r.top=r.bottom),r.option=Math.max(0,j.offset),h.left-=p&&q.left||r.left.charAt?r.option:0,h.left-=(p&&q.top&&!q.left||!p?(r.right?-1:1)*r.left:0)||0,h.top-=p&&q.top||r.top.charAt?r.option:0,h.top-=(p&&q.left&&!q.top||!p?(r.bottom?-1:1)*r.top:0)||0,m.left=o.left,m.top=o.top,m.corner=n.string()
}
}
var i=this,j=b.options.style.tip,k=b.elements,l=k.tooltip,m={
top:0,
left:0,
corner:""
},n={
width:j.width,
height:j.height
},o={},p=j.border||0,q=".qtip-tip",r=a("<canvas />")[0].getContext;
i.corner=f,i.mimic=f,b.checks.tip={
"^position.my|style.tip.(corner|mimic|border)$":function(){
i.init()||i.destroy(),b.reposition()
},
"^style.tip.(height|width)$":function(){
n={
width:j.width,
height:j.height
},i.create(),i.update(),b.reposition()
},
"^content.title.text|style.(classes|widget)$":function(){
k.tip&&i.update()
}
},a.extend(i,{
init:function(){
var b=i.detectCorner()&&(r||a.browser.msie);
b&&(i.create(),i.update(),l.unbind(q).bind("tooltipmove"+q,s));
return b
},
detectCorner:function(){
var a=j.corner,c=b.options.position,f=c.at,g=c.my.string?c.my.string():c.my;
if(a===e||g===e&&f===e)return e;
a===d?i.corner=new h.Corner(g):a.string||(i.corner=new h.Corner(a),i.corner.fixed=d);
return i.corner.string()!=="centercenter"
},
detectColours:function(){
var c,d,e,f=k.tip.css({
backgroundColor:"",
border:""
}),g=i.corner,h=g[g.precedance],m="border-"+h+"-color",p="border"+h.charAt(0)+h.substr(1)+"Color",q=/rgba?\(0, 0, 0(, 0)?\)|transparent/i,r="background-color",s="transparent",t="ui-tooltip-fluid",u=a(document.body).css("color"),v=b.elements.content.css("color"),w=k.titlebar&&(g.y==="top"||g.y==="center"&&f.position().top+n.height/2+j.offset<k.titlebar.outerHeight(1)),x=w?k.titlebar:k.content;
l.addClass(t),d=f.css(r)||s,e=f[0].style[p];
if(!d||q.test(d))o.fill=x.css(r),q.test(o.fill)&&(o.fill=l.css(r)||d);
if(!e||q.test(e)){
o.border=l.css(m);
if(q.test(o.border)||o.border===u)o.border=x.css(m),o.border===v&&(o.border=e)
}
a("*",f).add(f).css(r,s).css("border",""),l.removeClass(t)
},
create:function(){
var b=n.width,c=n.height,d;
k.tip&&k.tip.remove(),k.tip=a("<div />",{
"class":"ui-tooltip-tip"
}).css({
width:b,
height:c
}).prependTo(l),r?a("<canvas />").appendTo(k.tip)[0].getContext("2d").save():(d='<vml:shape coordorigin="0,0" style="display:inline-block; position:absolute; behavior:url(#default#VML);"></vml:shape>',k.tip.html(p?d+=d:d))
},
update:function(b,c){
var g=k.tip,l=g.children(),m=n.width,q=n.height,s="px solid ",u="px dashed transparent",x=j.mimic,y=Math.round,z,A,B,C,D;
b||(b=i.corner),x===e?x=b:(x=new h.Corner(x),x.precedance=b.precedance,x.x==="inherit"?x.x=b.x:x.y==="inherit"?x.y=b.y:x.x===x.y&&(x[b.precedance]=b[b.precedance])),z=x.precedance,i.detectColours(),p=o.border==="transparent"||o.border==="#123456"?0:j.border===d?t(b,f,d):j.border,B=w(x,m,q),D=v(b),g.css(D),b.precedance==="y"?C=[y(x.x==="left"?p:x.x==="right"?D.width-m-p:(D.width-m)/2),y(x.y==="top"?D.height-q:0)]:C=[y(x.x==="left"?D.width-m:0),y(x.y==="top"?p:x.y==="bottom"?D.height-q-p:(D.height-q)/2)],r?(l.attr(D),A=l[0].getContext("2d"),A.restore(),A.save(),A.clearRect(0,0,3e3,3e3),A.translate(C[0],C[1]),A.beginPath(),A.moveTo(B[0][0],B[0][1]),A.lineTo(B[1][0],B[1][1]),A.lineTo(B[2][0],B[2][1]),A.closePath(),A.fillStyle=o.fill,A.strokeStyle=o.border,A.lineWidth=p*2,A.lineJoin="miter",A.miterLimit=100,A.stroke(),A.fill()):(B="m"+B[0][0]+","+B[0][1]+" l"+B[1][0]+","+B[1][1]+" "+B[2][0]+","+B[2][1]+" xe",C[2]=p&&/^(r|b)/i.test(b.string())?parseFloat(a.browser.version,10)===8?2:1:0,l.css({
antialias:""+(x.string().indexOf("center")>-1),
left:C[0]-C[2]*Number(z==="x"),
top:C[1]-C[2]*Number(z==="y"),
width:m+p,
height:q+p
}).each(function(b){
var c=a(this);
c.attr({
coordsize:m+p+" "+(q+p),
path:B,
fillcolor:o.fill,
filled:!!b,
stroked:!b
}).css({
display:p||b?"block":"none"
}),!b&&p>0&&c.html()===""&&c.html('<vml:stroke weight="'+p*2+'px" color="'+o.border+'" miterlimit="1000" joinstyle="miter" style="behavior:url(#default#VML); display:inline-block;" />')
})),c!==e&&i.position(b,null,d)
},
position:function(b,c,f){
var g=k.tip,h={},l=Math.max(0,j.offset),m,n,o,p;
if(j.corner===e||!g)return e;
b=b||i.corner,n=b.precedance,o=v(b),p=[b.x,b.y],m=[c?c.left:0,c?c.top:0],n==="x"&&(p.reverse(),m.reverse()),a.each(p,function(a,e){
var f,g;
e==="center"?(f=n==="y"?"left":"top",h[f]="50%",h["margin-"+f]=-Math.round(o[n==="y"?"width":"height"]/2)+m[a]):(f=t(b,e,d),g=u(b),h[e]=a?t(b,e):c&&c.shift?g>m[a]?g>f?g:0:m[a]+l:m[a]+l+(g>f?g:0))
}),h[b[n]]-=o[n==="x"?"width":"height"],f&&g.css({
top:"",
bottom:"",
left:"",
right:"",
margin:""
}).css(h);
return h
},
destroy:function(){
k.tip&&k.tip.remove(),l.unbind(q)
}
}),i.init()
}
function w(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 v(b){
var c=this,f=b.elements.tooltip,g=b.options.content.ajax,h=".qtip-ajax",i=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,j=d;
b.checks.ajax={
"^content.ajax":function(a,b,d){
b==="ajax"&&(g=d),b==="once"?(f.unbind(h),d&&f.bind("tooltipshow"+h,c.load)):g&&g.url?c.load():f.unbind(h)
}
},a.extend(c,{
init:function(){
g&&g.url&&f.bind("tooltipshow"+h,c.load);
return c
},
load:function(d,h){
function p(a,c,d){
b.set("content.text",c+": "+d),n()
}
function o(c){
l&&(c=a("<div/>").append(c.replace(i,"")).find(l)),b.set("content.text",c),n()
}
function n(){
m&&(f.css("visibility",""),h=e)
}
if(d.isDefaultPrevented())return c;
var j=g.url.indexOf(" "),k=g.url,l,m=g.once&&!g.loading&&h;
m&&f.css("visibility","hidden"),j>-1&&(l=k.substr(j),k=k.substr(0,j)),a.ajax(a.extend({
success:o,
error:p,
context:b
},g,{
url:k
}));
return c
}
}),c.init()
}
function u(b,c){
var i,j,k,l,m=a(this),n=a(document.body),o=this===document?n:m,p=m.metadata?m.metadata(c.metadata):f,u=c.metadata.type==="html5"&&p?p[c.metadata.name]:f,v=m.data(c.metadata.name||"qtipopts");
try{
v=typeof v==="string"?(new Function("return "+v))():v
}catch(w){
r("Unable to parse HTML5 attribute data: "+v)
}
l=a.extend(d,{},g.defaults,c,typeof v==="object"?s(v):f,s(u||p)),p&&a.removeData(this,"metadata"),j=l.position,l.id=b;
if("boolean"===typeof l.content.text){
k=m.attr(l.content.attr);
if(l.content.attr!==e&&k)l.content.text=k;else return e
}
j.container===e&&(j.container=n),j.target===e&&(j.target=o),l.show.target===e&&(l.show.target=o),l.show.solo===d&&(l.show.solo=n),l.hide.target===e&&(l.hide.target=o),l.position.viewport===d&&(l.position.viewport=j.container),j.at=new h.Corner(j.at),j.my=new h.Corner(j.my);
if(a.data(this,"qtip"))if(l.overwrite)m.qtip("destroy");
else if(l.overwrite===e)return e;
a.attr(this,"title")&&(a.attr(this,q,a.attr(this,"title")),this.removeAttribute("title")),i=new t(m,l,b,!!k),a.data(this,"qtip",i),m.bind("remove.qtip",function(){
i.destroy()
});
return i
}
function t(c,o,p,r){
function K(c,d,e,f){
f=parseInt(f,10)!==0;
var g=".qtip-"+p,h={
show:c&&o.show.target[0],
hide:d&&o.hide.target[0],
tooltip:e&&t.rendered&&z.tooltip[0],
content:e&&t.rendered&&z.content[0],
container:f&&o.position.container[0]===u?document:o.position.container[0],
window:f&&b
};
t.rendered?a([]).pushStack(a.grep([h.show,h.hide,h.tooltip,h.container,h.content,h.window],function(a){
return typeof a==="object"
})).unbind(g):c&&o.show.target.unbind(g+"-create")
}
function J(d,f,h,j){
function B(a){
y.is(":visible")&&t.reposition(a)
}
function A(a){
if(y.hasClass(l))return e;
clearTimeout(t.timers.inactive),t.timers.inactive=setTimeout(function(){
t.hide(a)
},o.hide.inactive)
}
function x(b){
if(y.hasClass(l))return e;
var c=a(b.relatedTarget||b.target),d=c.closest(m)[0]===y[0],f=c[0]===q.show[0];
clearTimeout(t.timers.show),clearTimeout(t.timers.hide);
if(n.target==="mouse"&&d||o.hide.fixed&&(/mouse(out|leave|move)/.test(b.type)&&(d||f))){
b.stopPropagation(),b.preventDefault();
return e
}
o.hide.delay>0?t.timers.hide=setTimeout(function(){
t.hide(b)
},o.hide.delay):t.hide(b)
}
function w(a){
if(y.hasClass(l))return e;
q.show.trigger("qtip-"+p+"-inactive"),clearTimeout(t.timers.show),clearTimeout(t.timers.hide);
var b=function(){
t.show(a)
};
o.show.delay>0?t.timers.show=setTimeout(b,o.show.delay):b()
}
var k=".qtip-"+p,n=o.position,q={
show:o.show.target,
hide:o.hide.target,
container:n.container[0]===u?a(document):n.container,
doc:a(document)
},r={
show:a.trim(""+o.show.event).split(" "),
hide:a.trim(""+o.hide.event).split(" ")
},s=a.browser.msie&&parseInt(a.browser.version,10)===6,v;
h&&(o.hide.fixed&&(q.hide=q.hide.add(y),y.bind("mouseover"+k,function(){
y.hasClass(l)||clearTimeout(t.timers.hide)
})),n.target==="mouse"&&n.adjust.mouse&&o.hide.event&&y.bind("mouseleave"+k,function(a){
(a.relatedTarget||a.target)!==q.show[0]&&t.hide(a)
}),y.bind("mouseenter"+k+" mouseleave"+k,function(a){
t[a.type==="mouseenter"?"focus":"blur"](a)
})),f&&("number"===typeof o.hide.inactive&&(q.show.bind("qtip-"+p+"-inactive",A),a.each(g.inactiveEvents,function(a,b){
q.hide.add(z.tooltip).bind(b+k+"-inactive",A)
})),a.each(r.hide,function(b,c){
var d=a.inArray(c,r.show),e=a(q.hide);
d>-1&&e.add(q.show).length===e.length||c==="unfocus"?(q.show.bind(c+k,function(a){
y.is(":visible")?x(a):w(a)
}),delete r.show[d]):q.hide.bind(c+k,x)
})),d&&a.each(r.show,function(a,b){
q.show.bind(b+k,w)
}),j&&((n.adjust.resize||n.viewport)&&a(a.event.special.resize?n.viewport:b).bind("resize"+k,B),(n.viewport||s&&y.css("position")==="fixed")&&a(n.viewport).bind("scroll"+k,B),/unfocus/i.test(o.hide.event)&&q.doc.bind("mousedown"+k,function(b){
var d=a(b.target);
d.parents(m).length===0&&d.add(c).length>1&&y.is(":visible")&&!y.hasClass(l)&&t.hide(b)
}),o.hide.leave&&/mouseleave|mouseout/i.test(o.hide.event)&&a(b).bind("blur"+k+" mouse"+(o.hide.leave.indexOf("frame")>-1?"out":"leave")+k,function(a){
a.relatedTarget||t.hide(a)
}),n.target==="mouse"&&q.doc.bind("mousemove"+k,function(a){
n.adjust.mouse&&!y.hasClass(l)&&y.is(":visible")&&t.reposition(a||i)
}))
}
function I(b,d){
function g(a){
function c(c){
(b=b.not(this)).length===0&&(t.redraw(),t.reposition(A.event),a())
}
var b;
if((b=f.find("img:not([height]):not([width])")).length===0)return c.call(b);
b.each(function(a,b){
(function d(){
var e=t.timers.img;
if(b.height&&b.width){
clearTimeout(e[a]);
return c.call(b)
}
e[a]=setTimeout(d,20)
})()
})
}
var f=z.content;
if(!t.rendered||!b)return e;
a.isFunction(b)&&(b=b.call(c,t)||""),b.jquery&&b.length>0?f.empty().append(b.css({
display:"block"
})):f.html(b),t.rendered<0?y.queue("fx",g):(x=0,g(a.noop));
return t
}
function H(b){
var d=z.title;
if(!t.rendered||!b)return e;
a.isFunction(b)&&(b=b.call(c,t)||""),b.jquery&&b.length>0?d.empty().append(b.css({
display:"block"
})):d.html(b),t.redraw(),t.rendered&&y.is(":visible")&&t.reposition(A.event)
}
function G(a){
var b=z.button,c=z.title;
if(!t.rendered)return e;
a?(c||F(),E()):b.remove()
}
function F(){
var b=v+"-title";
z.titlebar&&D(),z.titlebar=a("<div />",{
"class":j+"-titlebar "+(o.style.widget?"ui-widget-header":"")
}).append(z.title=a("<div />",{
id:b,
"class":j+"-title",
"aria-atomic":d
})).insertBefore(z.content),o.content.title.button?E():t.rendered&&t.redraw()
}
function E(){
var b=o.content.title.button,c=typeof b==="string",d=c?b:"Close tooltip";
z.button&&z.button.remove(),b.jquery?z.button=b:z.button=a("<a />",{
"class":"ui-state-default "+(o.style.widget?"":j+"-icon"),
title:d,
"aria-label":d
}).prepend(a("<span />",{
"class":"ui-icon ui-icon-close",
html:"×"
})),z.button.appendTo(z.titlebar).attr("role","button").hover(function(b){
a(this).toggleClass("ui-state-hover",b.type==="mouseenter")
}).click(function(a){
y.hasClass(l)||t.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")
}),t.redraw()
}
function D(){
z.title&&(z.titlebar.remove(),z.titlebar=z.title=z.button=f,t.reposition())
}
function C(){
var a=o.style.widget;
y.toggleClass(k,a),z.content.toggleClass(k+"-content",a),z.titlebar&&z.titlebar.toggleClass(k+"-header",a),z.button&&z.button.toggleClass(j+"-icon",!a)
}
function B(a){
var b=0,c,d=o,e=a.split(".");
while(d=d[e[b++]])b<e.length&&(c=d);
return[c||o,e.pop()]
}
var t=this,u=document.body,v=j+"-"+p,w=0,x=0,y=a(),z,A;
t.id=p,t.rendered=e,t.elements=z={
target:c
},t.timers={
img:[]
},t.options=o,t.checks={},t.plugins={},t.cache=A={
event:{},
target:f,
disabled:e,
attr:r
},t.checks.builtin={
"^id$":function(b,c,f){
var h=f===d?g.nextid:f,i=j+"-"+h;
h!==e&&h.length>0&&!a("#"+i).length&&(y[0].id=i,z.content[0].id=i+"-content",z.title[0].id=i+"-title")
},
"^content.text$":function(a,b,c){
I(c)
},
"^content.title.text$":function(a,b,c){
if(!c)return D();
!z.title&&c&&F(),H(c)
},
"^content.title.button$":function(a,b,c){
G(c)
},
"^position.(my|at)$":function(a,b,c){
"string"===typeof c&&(a[b]=new h.Corner(c))
},
"^position.container$":function(a,b,c){
t.rendered&&y.appendTo(c)
},
"^(show|hide).(event|target|fixed|delay|inactive)$":function(a,b,c,d,e){
var f=[1,0,0];
f[e[1]==="show"?"push":"unshift"](0),K.apply(t,f),J.apply(t,[1,1,0,0])
},
"^show.ready$":function(){
t.rendered?t.show():t.render(1)
},
"^style.classes$":function(b,c,d){
a.attr(y[0],"class",j+" qtip ui-helper-reset "+d)
},
"^style.widget|content.title":C,
"^events.(render|show|move|hide|focus|blur)$":function(b,c,d){
y[(a.isFunction(d)?"":"un")+"bind"]("tooltip"+c,d)
}
},a.extend(t,{
render:function(b){
if(t.rendered)return t;
var f=o.content.text,g=o.content.title.text,i=a.Event("tooltiprender");
a.attr(c[0],"aria-describedby",v),y=z.tooltip=a("<div/>",{
id:v,
"class":j+" qtip ui-helper-reset "+o.style.classes,
width:o.style.width||"",
role:"alert",
"aria-live":"polite",
"aria-atomic":e,
"aria-describedby":v+"-content",
"aria-hidden":d
}).toggleClass(l,A.disabled).data("qtip",t).appendTo(o.position.container).append(z.content=a("<div />",{
"class":j+"-content",
id:v+"-content",
"aria-atomic":d
})),t.rendered=-1,x=1,g&&(F(),H(g)),I(f),t.rendered=d,C(),a.each(o.events,function(b,c){
a.isFunction(c)&&y.bind(b==="toggle"?"tooltipshow tooltiphide":"tooltip"+b,c)
}),a.each(h,function(){
this.initialize==="render"&&this(t)
}),J(1,1,1,1),y.queue("fx",function(a){
i.originalEvent=A.event,y.trigger(i,[t]),x=0,t.redraw(),(o.show.ready||b)&&t.show(A.event),a()
});
return t
},
get:function(a){
var b,c;
switch(a.toLowerCase()){
case"dimensions":
b={
height:y.outerHeight(),
width:y.outerWidth()
};
break;
case"offset":
b=h.offset(y,o.position.container);
break;
default:
c=B(a.toLowerCase()),b=c[0][c[1]],b=b.precedance?b.string():b
}
return b
},
set:function(b,c){
function m(a,b){
var c,d,e;
for(c in k)for(d in k[c])if(e=(new RegExp(d,"i")).exec(a))b.push(e),k[c][d].apply(t,b)
}
var g=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,h=/^content\.(title|attr)|style/i,i=e,j=e,k=t.checks,l;
"string"===typeof b?(l=b,b={},b[l]=c):b=a.extend(d,{},b),a.each(b,function(c,d){
var e=B(c.toLowerCase()),f;
f=e[0][e[1]],e[0][e[1]]="object"===typeof d&&d.nodeType?a(d):d,b[c]=[e[0],e[1],d,f],i=g.test(c)||i,j=h.test(c)||j
}),s(o),w=x=1,a.each(b,m),w=x=0,y.is(":visible")&&t.rendered&&(i&&t.reposition(o.position.target==="mouse"?f:A.event),j&&t.redraw());
return t
},
toggle:function(b,c){
function j(){
b?(a.browser.msie&&y[0].style.removeAttribute("filter"),y.css("overflow","")):y.css({
display:"",
visibility:"",
width:"",
opacity:"",
left:"",
top:""
})
}
if(!t.rendered)if(b)t.render(1);else return t;
var d=b?"show":"hide",g=o[d],h=y.is(":visible"),i;
(typeof b).search("boolean|number")&&(b=!h);
if(h===b)return t;
if(c){
if(/over|enter/.test(c.type)&&/out|leave/.test(A.event.type)&&c.target===o.show.target[0]&&y.has(c.relatedTarget).length)return t;
A.event=a.extend({},c)
}
i=a.Event("tooltip"+d),i.originalEvent=c?A.event:f,y.trigger(i,[t,90]);
if(i.isDefaultPrevented())return t;
a.attr(y[0],"aria-hidden",!b),b?(t.focus(c),t.reposition(c),g.solo&&a(m,g.solo).not(y).qtip("hide",i)):(clearTimeout(t.timers.show),t.blur(c)),y.stop(0,1),a.isFunction(g.effect)?(g.effect.call(y,t),y.queue("fx",function(a){
j(),a()
})):g.effect===e?(y[d](),j.call(y)):y.fadeTo(90,b?1:0,j),b&&g.target.trigger("qtip-"+p+"-inactive");
return t
},
show:function(a){
return t.toggle(d,a)
},
hide:function(a){
return t.toggle(e,a)
},
focus:function(b){
if(!t.rendered)return t;
var c=a(m),d=parseInt(y[0].style.zIndex,10),e=g.zindex+c.length,f=a.extend({},b),h,i;
y.hasClass(n)||(d!==e&&(c.each(function(){
this.style.zIndex>d&&(this.style.zIndex=this.style.zIndex-1)
}),c.filter("."+n).qtip("blur",f)),i=a.Event("tooltipfocus"),i.originalEvent=f,y.trigger(i,[t,e]),i.isDefaultPrevented()||(y.addClass(n)[0].style.zIndex=e));
return t
},
blur:function(b){
var c=a.extend({},b),d;
y.removeClass(n),d=a.Event("tooltipblur"),d.originalEvent=c,y.trigger(d,[t]);
return t
},
reposition:function(c,d){
if(!t.rendered||w)return t;
w=1;
var f=o.position.target,g=o.position,k=g.my,l=g.at,m=g.adjust,n=m.method,p=y.outerWidth(),q=y.outerHeight(),r=0,s=0,v=a.Event("tooltipmove"),x=y.css("position")==="fixed",z=g.viewport.jquery?g.viewport:a(b),B={
left:0,
top:0
},C=(t.plugins.tip||{}).corner,D={
method:n.substr(0,5),
horizontal:n.length<6||n.indexOf("horizontal")>-1,
vertical:n.length<6||n.indexOf("vertical")>-1,
left:function(a){
if(!D.horizontal)return 0;
var b=z.scrollLeft,c=k.x==="left"?p:k.x==="right"?-p:-p/2,d=l.x==="left"?r:l.x==="right"?-r:-r/2,e=C&&C.precedance==="x"?o.style.tip.width:0,f=(z.offset.left||0)+b-a-e,g=a+p-z.width-b+e,h=c-(k.precedance==="x"||k.x===k.y?d:0),i=k.x==="center";
D.method==="shift"?B.left+=f>0?f-e:g>0?-g+e:0:(f>0&&(k.x!=="left"||g>0)?B.left-=h+(i?0:2*m.x):g>0&&(k.x!=="right"||f>0)&&(B.left-=i?-h:h+2*m.x),B.left!==a&&i&&(B.left-=m.x)),B.left<b&&-B.left>g&&(B.left=a);
return B.left-a
},
top:function(a){
if(!D.vertical)return 0;
var b=z.scrollTop,c=k.y==="top"?q:k.y==="bottom"?-q:-q/2,d=l.y==="top"?s:l.y==="bottom"?-s:-s/2,e=C&&C.precedance==="y"?o.style.tip.height:0,f=(z.offset.top||0)+b-a-e,g=a+q-z.height-b+e,h=c-(k.precedance==="y"||k.x===k.y?d:0),i=k.y==="center";
D.method==="shift"?B.top+=f-e>0?f:g>0?-g+e:0:(f>0&&(k.y!=="top"||g>0)?B.top-=h+(i?0:2*m.y):g>0&&(k.y!=="bottom"||f>0)&&(B.top-=i?-h:h+2*m.y),B.top!==a&&i&&(B.top-=m.y)),B.top<0&&-B.top>g&&(B.top=a);
return B.top-a
}
};
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(),
offset:z.offset()||{}
}:e;
if(f==="mouse")l={
x:"left",
y:"top"
},c=c&&(c.type==="resize"||c.type==="scroll")?A.event:m.mouse||!c||!c.pageX||/over|enter$/i.test(c.type)&&!m.mouse?a.extend({},i):c,B={
top:c.pageY,
left:c.pageX
};
else{
f==="event"&&(c&&c.target&&c.type!=="scroll"&&c.type!=="resize"?f=A.target=a(c.target):f=A.target),f=a(f).eq(0);
if(f.length===0)return t;
f[0]===document||f[0]===b?(r=f.width(),s=f.height(),f[0]===b&&(B={
top:!x||h.iOS?z.scrollTop:0,
left:!x||h.iOS?z.scrollLeft:0
})):f.is("area")&&h.imagemap?B=h.imagemap(f,l):f[0].namespaceURI=="http://www.w3.org/2000/svg"&&h.svg?B=h.svg(f,l):(r=f.outerWidth(),s=f.outerHeight(),B=h.offset(f,g.container)),B.offset&&(r=B.width,s=B.height,B=B.offset),B.left+=l.x==="right"?r:l.x==="center"?r/2:0,B.top+=l.y==="bottom"?s:l.y==="center"?s/2:0
}
B.left+=m.x+(k.x==="right"?-p:k.x==="center"?-p/2:0),B.top+=m.y+(k.y==="bottom"?-q:k.y==="center"?-q/2:0),g.viewport.jquery&&f[0]!==b&&f[0]!==u?B.adjusted={
left:D.left(B.left),
top:D.top(B.top)
}:B.adjusted={
left:0,
top:0
},y.attr("class",function(b,c){
return a.attr(this,"class").replace(/ui-tooltip-pos-\w+/i,"")
}).addClass(j+"-pos-"+k.abbreviation()),v.originalEvent=a.extend({},c),y.trigger(v,[t,B,z.elem]);
if(v.isDefaultPrevented())return t;
delete B.adjusted,d===e||isNaN(B.left)||isNaN(B.top)||!a.isFunction(g.effect)?y.css(B):a.isFunction(g.effect)&&(g.effect.call(y,t,a.extend({},B)),y.queue(function(b){
a(this).css({
opacity:"",
height:""
}),a.browser.msie&&this.style.removeAttribute("filter"),b()
})),w=0;
return t
},
redraw:function(){
if(t.rendered<1||o.style.width||x)return t;
var b=j+"-fluid",c,d,e;
x=1,y.css("width","").addClass(b),c=y.width()+(a.browser.mozilla?1:0),d=parseInt(y.css("max-width"),10)||0,e=parseInt(y.css("min-width"),10)||0,c=d+e?Math.min(Math.max(c,e),d):c,y.css("width",c).removeClass(b),x=0;
return t
},
disable:function(b){
var c=l;
"boolean"!==typeof b&&(b=!y.hasClass(c)&&!A.disabled),t.rendered?(y.toggleClass(c,b),a.attr(y[0],"aria-disabled",b)):A.disabled=!!b;
return t
},
enable:function(){
return t.disable(e)
},
destroy:function(){
var b=c[0],d=a.attr(b,q);
t.rendered&&(y.remove(),a.each(t.plugins,function(){
this.destroy&&this.destroy()
})),clearTimeout(t.timers.show),clearTimeout(t.timers.hide),K(1,1,1,1),a.removeData(b,"qtip"),d&&(a.attr(b,"title",d),c.removeAttr(q)),c.removeAttr("aria-describedby").unbind(".qtip");
return c
}
})
}
function s(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
}),"adjust"in b.position&&(/flip|shift( horizontal| vertical)*/i.test(b.position.adjust.method)||delete b.position.adjust.method)),"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(h,function(){
this.sanitize&&this.sanitize(b)
});
return b
}
function r(){
var c=b.console;
return c&&(c.error||c.log||a.noop).apply(c,arguments)
}
var d=!0,e=!1,f=null,g,h,i,j="ui-tooltip",k="ui-widget",l="ui-state-disabled",m="div.qtip."+j,n=j+"-focus",o="-31000px",p="_replacedByqTip",q="oldtitle";
g=a.fn.qtip=function(b,h,i){
var j=(""+b).toLowerCase(),k=f,l=j==="disable"?[d]:a.makeArray(arguments).slice(1,10),m=l[l.length-1],n=this[0]?a.data(this[0],"qtip"):f;
if(!arguments.length&&n||j==="api")return n;
if("string"===typeof b){
this.each(function(){
var b=a.data(this,"qtip");
if(!b)return d;
m&&m.timeStamp&&(b.cache.event=m);
if(j!=="option"&&j!=="options"||!h)b[j]&&b[j].apply(b[j],l);
else if(a.isPlainObject(h)||i!==c)b.set(h,i);
else{
k=b.get(h);
return e
}
});
return k!==f?k:this
}
if("object"===typeof b||!arguments.length){
n=s(a.extend(d,{},b));
return g.bind.call(this,n,m)
}
},g.bind=function(b,c){
return this.each(function(f){
function p(b){
function c(){
o.render(typeof b==="object"||i.show.ready),k.show.unbind(l.show),k.hide.unbind(l.hide)
}
if(o.cache.disabled)return e;
o.cache.event=a.extend({},b),i.show.delay>0?(clearTimeout(o.timers.show),o.timers.show=setTimeout(c,i.show.delay),l.show!==l.hide&&k.hide.bind(l.hide,function(){
clearTimeout(o.timers.show)
})):c()
}
var i,k,l,m=!b.id||b.id===e||b.id.length<1||a("#"+j+"-"+b.id).length?g.nextid++:b.id,n=".qtip-"+m+"-create",o=u.call(this,m,b);
if(o===e)return d;
i=o.options,a.each(h,function(){
this.initialize==="initialize"&&this(o)
}),k={
show:i.show.target,
hide:i.hide.target
},l={
show:a.trim(""+i.show.event).replace(/ /g,n+" ")+n,
hide:a.trim(""+i.hide.event).replace(/ /g,n+" ")+n
},i.hide.event==="unfocus"&&(l.hide="mouseleave"+n),k.show.bind(l.show,p),(i.show.ready||i.prerender)&&p(c)
})
},h=g.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=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(c,d){
function k(a,b){
e.left+=b*a.scrollLeft(),e.top+=b*a.scrollTop()
}
var e=c.offset(),f=d,g=0,i=document.body,j;
if(f){
do{
if(f[0]===i)break;
f.css("position")!=="static"&&(j=f.position(),e.left-=j.left+(parseInt(f.css("borderLeftWidth"),10)||0),e.top-=j.top+(parseInt(f.css("borderTopWidth"),10)||0),g++)
}while(f=f.offsetParent());
(d[0]!==i||g>1)&&k(d,1),h.iOS<4.1&&h.iOS>3.1&&k(a(b),-1)
}
return e
},
iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_","."))||e,
fn:{
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.attr(d,q);
if(typeof f==="object"){
f&&f.rendered&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",c),a.fn["attr"+p].apply(this,arguments),a.attr(d,q,a.attr(d,e));
return this.removeAttr(e)
}
}
}
},
clone:function(b){
var c=a([]),d="title",e;
e=a.fn["clone"+p].apply(this,arguments).filter("[oldtitle]").each(function(){
a.attr(this,d,a.attr(this,q)),this.removeAttribute(q)
}).end();
return e
},
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")
})
})
}
}
},a.each(h.fn,function(b,c){
if(!c)return d;
var e=a.fn[b+p]=a.fn[b];
a.fn[b]=function(){
return c.apply(this,arguments)||e.apply(this,arguments)
}
}),a(document).bind("mousemove.qtip",function(a){
i={
pageX:a.pageX,
pageY:a.pageY,
type:"mousemove"
}
}),g.version="nightly",g.nextid=0,g.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),g.zindex=15e3,g.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,
method:"flip"
},
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,
leave:"window"
},
style:{
classes:"",
widget:e,
width:e
},
events:{
render:f,
move:f,
show:f,
hide:f,
toggle:f,
focus:f,
blur:f
}
},h.ajax=function(a){
var b=a.plugins.ajax;
return"object"===typeof b?b:a.plugins.ajax=new v(a)
},h.ajax.initialize="render",h.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,g.defaults,{
content:{
ajax:{
loading:d,
once:d
}
}
}),h.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"&&(g<e||g>a.width-e)||c.y==="top"&&h>=f||c.y==="bottom"&&h<=f||c.y==="center"&&(h<f||h>a.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.left&&(i.offset.left=k[0]),k[1]>i.offset.bottom&&(i.offset.bottom=k[1]),k[1]<i.offset.top&&(i.offset.top=k[1]),f.push(k)
}else f=a.map(e,function(a){
return parseInt(a,10)
});
switch(d){
case"rect":
i={
width:Math.abs(f[2]-f[0]),
height:Math.abs(f[3]-f[1]),
offset:{
left:f[0],
top:f[1]
}
};
break;
case"circle":
i={
width:f[2]+2,
height:f[2]+2,
offset:{
left:f[0],
top:f[1]
}
};
break;
case"poly":
a.extend(i,{
width:Math.abs(i.offset.right-i.offset.left),
height:Math.abs(i.offset.bottom-i.offset.top)
}),c.string()==="centercenter"?i.offset={
left:i.offset.left+i.width/2,
top:i.offset.top+i.height/2
}:i.offset=l(i,f.slice()),i.width=i.height=0
}
i.offset.left+=h.left,i.offset.top+=h.top;
return i
},h.tip=function(a){
var b=a.plugins.tip;
return"object"===typeof b?b:a.plugins.tip=new x(a)
},h.tip.initialize="render",h.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,g.defaults,{
style:{
tip:{
corner:d,
mimic:e,
width:6,
height:6,
border:d,
offset:0
}
}
}),h.svg=function(b,c){
var d=a(document),e=b[0],f={
width:0,
height:0,
offset:{
top:1e10,
left:1e10
}
},g,h,i,j,k;
if(e.getBBox&&e.parentNode){
g=e.getBBox(),h=e.getScreenCTM(),i=e.farthestViewportElement||e;
if(!i.createSVGPoint)return f;
j=i.createSVGPoint(),j.x=g.x,j.y=g.y,k=j.matrixTransform(h),f.offset.left=k.x,f.offset.top=k.y,j.x+=g.width,j.y+=g.height,k=j.matrixTransform(h),f.width=k.x-f.offset.left,f.height=k.y-f.offset.top,f.offset.left+=d.scrollLeft(),f.offset.top+=d.scrollTop()
}
return f
},h.modal=function(a){
var b=a.plugins.modal;
return"object"===typeof b?b:a.plugins.modal=new y(a)
},h.modal.initialize="render",h.modal.sanitize=function(a){
a.show&&(typeof a.show.modal!=="object"?a.show.modal={
on:!!a.show.modal
}:typeof a.show.modal.on==="undefined"&&(a.show.modal.on=d))
},a.extend(d,g.defaults,{
show:{
modal:{
on:e,
effect:d,
blur:d
}
}
}),h.bgiframe=function(b){
var c=a.browser,d=b.plugins.bgiframe;
if(a("select, object").length<1||(!c.msie||c.version.charAt(0)!=="6"))return e;
return"object"===typeof d?d:b.plugins.bgiframe=new z(b)
},h.bgiframe.initialize="render"
}(jQuery,window)