').css(q(s.options.style.title, true)).css({zoom: (f.browser.msie) ? 1 : 0}).prependTo(s.elements.contentWrapper);
if (s.options.content.title.text) {
s.updateTitle.call(s, s.options.content.title.text)
}
if (s.options.content.title.button !== false && typeof s.options.content.title.button == "string") {
s.elements.button = f('
').css(q(s.options.style.button, true)).html(s.options.content.title.button).prependTo(s.elements.title).click(function(t) {
if (!s.status.disabled) {
s.hide(t)
}
})
}
}
function l() {
var t, v, u, s;
t = this;
v = t.options.show.when.target;
u = t.options.hide.when.target;
if (t.options.hide.fixed) {
u = u.add(t.elements.tooltip)
}
if (t.options.hide.when.event == "inactive") {
s = ["click", "dblclick", "mousedown", "mouseup", "mousemove", "mouseout", "mouseover", "mouseleave", "mouseover"];
function y(z) {
if (t.status.disabled === true) {
return
}
clearTimeout(t.timers.inactive);
t.timers.inactive = setTimeout(function() {
f(s).each(function() {
u.unbind(this + ".qtip-inactive");
t.elements.content.unbind(this + ".qtip-inactive")
});
t.hide(z)
}, t.options.hide.delay)
}}
else {
if (t.options.hide.fixed === true) {
t.elements.tooltip.bind("mouseover.qtip", function() {
if (t.status.disabled === true) {
return
}
clearTimeout(t.timers.hide)
})
}
}
function x(z) {
if (t.status.disabled === true) {
return
}
if (t.options.hide.when.event == "inactive") {
f(s).each(function() {
u.bind(this + ".qtip-inactive", y);
t.elements.content.bind(this + ".qtip-inactive", y)
});
y()
}
clearTimeout(t.timers.show);
clearTimeout(t.timers.hide);
t.timers.show = setTimeout(function() {
t.show(z)
}, t.options.show.delay)
}
function w(z) {
if (t.status.disabled === true) {
return
}
if (t.options.hide.fixed === true && t.options.hide.when.event.search(/mouse(out|leave)/i) !== -1 && f(z.relatedTarget).parents("div.qtip[qtip]").length > 0) {
z.stopPropagation();
z.preventDefault();
clearTimeout(t.timers.hide);
return false
}
clearTimeout(t.timers.show);
clearTimeout(t.timers.hide);
t.elements.tooltip.stop(true, true);
t.timers.hide = setTimeout(function() {
t.hide(z)
}, t.options.hide.delay)
}
if ((t.options.show.when.target.add(t.options.hide.when.target).length === 1 && t.options.show.when.event == t.options.hide.when.event && t.options.hide.when.event !== "inactive") || t.options.hide.when.event == "unfocus") {
t.cache.toggle = 0;
v.bind(t.options.show.when.event + ".qtip", function(z) {
if (t.cache.toggle == 0) {
x(z)
} else {
w(z)
}
})
} else {
v.bind(t.options.show.when.event + ".qtip", x);
if (t.options.hide.when.event !== "inactive") {
u.bind(t.options.hide.when.event + ".qtip", w)
}
}
if (t.options.position.type.search(/(fixed|absolute)/) !== -1) {
t.elements.tooltip.bind("mouseover.qtip", t.focus)
}
if (t.options.position.target === "mouse" && t.options.position.type !== "static") {
v.bind("mousemove.qtip", function(z) {
t.cache.mouse = {x: z.pageX, y: z.pageY};
if (t.status.disabled === false && t.options.position.adjust.mouse === true && t.options.position.type !== "static" && t.elements.tooltip.css("display") !== "none") {
t.updatePosition(z)
}
})
}
}
function o(u, v, A) {
var z, s, x, y, t, w;
z = this;
if (A.corner == "center") {
return v.position
}
s = f.extend({}, u);
y = {x: false, y: false};
t = {left: (s.left < f.fn.qtip.cache.screen.scroll.left), right: (s.left + A.dimensions.width + 2 >= f.fn.qtip.cache.screen.width + f.fn.qtip.cache.screen.scroll.left), top: (s.top < f.fn.qtip.cache.screen.scroll.top), bottom: (s.top + A.dimensions.height + 2 >= f.fn.qtip.cache.screen.height + f.fn.qtip.cache.screen.scroll.top)};
x = {left: (t.left && (A.corner.search(/right/i) != -1 || (A.corner.search(/right/i) == -1 && !t.right))), right: (t.right && (A.corner.search(/left/i) != -1 || (A.corner.search(/left/i) == -1 && !t.left))), top: (t.top && A.corner.search(/top/i) == -1), bottom: (t.bottom && A.corner.search(/bottom/i) == -1)};
if (x.left) {
if (z.options.position.target !== "mouse") {
s.left = v.position.left + v.dimensions.width
} else {
s.left = z.cache.mouse.x
}
y.x = "Left"
} else {
if (x.right) {
if (z.options.position.target !== "mouse") {
s.left = v.position.left - A.dimensions.width
} else {
s.left = z.cache.mouse.x - A.dimensions.width
}
y.x = "Right"
}
}
if (x.top) {
if (z.options.position.target !== "mouse") {
s.top = v.position.top + v.dimensions.height
} else {
s.top = z.cache.mouse.y
}
y.y = "top"
} else {
if (x.bottom) {
if (z.options.position.target !== "mouse") {
s.top = v.position.top - A.dimensions.height
} else {
s.top = z.cache.mouse.y - A.dimensions.height
}
y.y = "bottom"
}
}
if (s.left < 0) {
s.left = u.left;
y.x = false
}
if (s.top < 0) {
s.top = u.top;
y.y = false
}
if (z.options.style.tip.corner !== false) {
s.corner = new String(A.corner);
if (y.x !== false) {
s.corner = s.corner.replace(/Left|Right|Middle/, y.x)
}
if (y.y !== false) {
s.corner = s.corner.replace(/top|bottom/, y.y)
}
if (s.corner !== z.elements.tip.attr("rel")) {
e.call(z, s.corner)
}
}
return s
}
function q(u, t) {
var v, s;
v = f.extend(true, {}, u);
for (s in v) {
if (t === true && s.search(/(tip|classes)/i) !== -1) {
delete v[s]
} else {
if (!t && s.search(/(width|border|tip|title|classes|user)/i) !== -1) {
delete v[s]
}
}
}
return v
}
function c(s) {
if (typeof s.tip !== "object") {
s.tip = {corner: s.tip}
}
if (typeof s.tip.size !== "object") {
s.tip.size = {width: s.tip.size, height: s.tip.size}
}
if (typeof s.border !== "object") {
s.border = {width: s.border}
}
if (typeof s.width !== "object") {
s.width = {value: s.width}
}
if (typeof s.width.max == "string") {
s.width.max = parseInt(s.width.max.replace(/([0-9]+)/i, "$1"))
}
if (typeof s.width.min == "string") {
s.width.min = parseInt(s.width.min.replace(/([0-9]+)/i, "$1"))
}
if (typeof s.tip.size.x == "number") {
s.tip.size.width = s.tip.size.x;
delete s.tip.size.x
}
if (typeof s.tip.size.y == "number") {
s.tip.size.height = s.tip.size.y;
delete s.tip.size.y
}
return s
}
function a() {
var s, t, u, x, v, w;
s = this;
u = [true, {}];
for (t = 0; t < arguments.length; t++) {
u.push(arguments[t])
}
x = [f.extend.apply(f, u)];
while (typeof x[0].name == "string") {
x.unshift(c(f.fn.qtip.styles[x[0].name]))
}
x.unshift(true, {classes: {tooltip: "qtip-" + (arguments[0].name || "defaults")}}, f.fn.qtip.styles.defaults);
v = f.extend.apply(f, x);
w = (f.browser.msie) ? 1 : 0;
v.tip.size.width += w;
v.tip.size.height += w;
if (v.tip.size.width % 2 > 0) {
v.tip.size.width += 1
}
if (v.tip.size.height % 2 > 0) {
v.tip.size.height += 1
}
if (v.tip.corner === true) {
v.tip.corner = (s.options.position.corner.tooltip === "center") ? false : s.options.position.corner.tooltip
}
return v
}
function b(v, u, t) {
var s = {bottomRight: [[0, 0], [u, t], [u, 0]], bottomLeft: [[0, 0], [u, 0], [0, t]], topRight: [[0, t], [u, 0], [u, t]], topLeft: [[0, 0], [0, t], [u, t]], topMiddle: [[0, t], [u / 2, 0], [u, t]], bottomMiddle: [[0, 0], [u, 0], [u / 2, t]], rightMiddle: [[0, 0], [u, t / 2], [0, t]], leftMiddle: [[u, 0], [u, t], [0, t / 2]]};
s.leftTop = s.bottomRight;
s.rightTop = s.bottomLeft;
s.leftBottom = s.topRight;
s.rightBottom = s.topLeft;
return s[v]
}
function g(s) {
var t;
if (f("