/* Minify: at least one missing file. See http://code.google.com/p/minify/wiki/Debugging */
;
var matched, browser;
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || /(webkit)[ \/]([\w.]+)/.exec(ua) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || /(msie) ([\w.]+)/.exec(ua) || ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || [];
return {
browser: match[1] || "",
version: match[2] || "0"
};
};
matched = jQuery.uaMatch(navigator.userAgent);
browser = {};
if (matched.browser) {
browser[matched.browser] = true;
browser.version = matched.version;
}
if (browser.chrome) {
browser.webkit = true;
} else if (browser.webkit) {
browser.safari = true;
}
jQuery.browser = browser;;
/*!
* Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*!
* Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=a28fbf72a29cf7f8dd3e)
* Config saved to config.json and https://gist.github.com/a28fbf72a29cf7f8dd3e
*/
if ("undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requires jQuery"); + function(t) {
"use strict";
var e = t.fn.jquery.split(" ")[0].split(".");
if (e[0] < 2 && e[1] < 9 || 1 == e[0] && 9 == e[1] && e[2] < 1) throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")
}(jQuery), + function(t) {
"use strict";
function e(e) {
return this.each(function() {
var i = t(this),
n = i.data("bs.alert");
n || i.data("bs.alert", n = new o(this)), "string" == typeof e && n[e].call(i)
})
}
var i = '[data-dismiss="alert"]',
o = function(e) {
t(e).on("click", i, this.close)
};
o.VERSION = "3.3.5", o.TRANSITION_DURATION = 150, o.prototype.close = function(e) {
function i() {
a.detach().trigger("closed.bs.alert").remove()
}
var n = t(this),
s = n.attr("data-target");
s || (s = n.attr("href"), s = s && s.replace(/.*(?=#[^\s]*$)/, ""));
var a = t(s);
e && e.preventDefault(), a.length || (a = n.closest(".alert")), a.trigger(e = t.Event("close.bs.alert")), e.isDefaultPrevented() || (a.removeClass("in"), t.support.transition && a.hasClass("fade") ? a.one("bsTransitionEnd", i).emulateTransitionEnd(o.TRANSITION_DURATION) : i())
};
var n = t.fn.alert;
t.fn.alert = e, t.fn.alert.Constructor = o, t.fn.alert.noConflict = function() {
return t.fn.alert = n, this
}, t(document).on("click.bs.alert.data-api", i, o.prototype.close)
}(jQuery), + function(t) {
"use strict";
function e(e) {
return this.each(function() {
var o = t(this),
n = o.data("bs.button"),
s = "object" == typeof e && e;
n || o.data("bs.button", n = new i(this, s)), "toggle" == e ? n.toggle() : e && n.setState(e)
})
}
var i = function(e, o) {
this.$element = t(e), this.options = t.extend({}, i.DEFAULTS, o), this.isLoading = !1
};
i.VERSION = "3.3.5", i.DEFAULTS = {
loadingText: "loading..."
}, i.prototype.setState = function(e) {
var i = "disabled",
o = this.$element,
n = o.is("input") ? "val" : "html",
s = o.data();
e += "Text", null == s.resetText && o.data("resetText", o[n]()), setTimeout(t.proxy(function() {
o[n](null == s[e] ? this.options[e] : s[e]), "loadingText" == e ? (this.isLoading = !0, o.addClass(i).attr(i, i)) : this.isLoading && (this.isLoading = !1, o.removeClass(i).removeAttr(i))
}, this), 0)
}, i.prototype.toggle = function() {
var t = !0,
e = this.$element.closest('[data-toggle="buttons"]');
if (e.length) {
var i = this.$element.find("input");
"radio" == i.prop("type") ? (i.prop("checked") && (t = !1), e.find(".active").removeClass("active"), this.$element.addClass("active")) : "checkbox" == i.prop("type") && (i.prop("checked") !== this.$element.hasClass("active") && (t = !1), this.$element.toggleClass("active")), i.prop("checked", this.$element.hasClass("active")), t && i.trigger("change")
} else this.$element.attr("aria-pressed", !this.$element.hasClass("active")), this.$element.toggleClass("active")
};
var o = t.fn.button;
t.fn.button = e, t.fn.button.Constructor = i, t.fn.button.noConflict = function() {
return t.fn.button = o, this
}, t(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function(i) {
var o = t(i.target);
o.hasClass("btn") || (o = o.closest(".btn")), e.call(o, "toggle"), t(i.target).is('input[type="radio"]') || t(i.target).is('input[type="checkbox"]') || i.preventDefault()
}).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function(e) {
t(e.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(e.type))
})
}(jQuery), + function(t) {
"use strict";
function e(e) {
return this.each(function() {
var o = t(this),
n = o.data("bs.carousel"),
s = t.extend({}, i.DEFAULTS, o.data(), "object" == typeof e && e),
a = "string" == typeof e ? e : s.slide;
n || o.data("bs.carousel", n = new i(this, s)), "number" == typeof e ? n.to(e) : a ? n[a]() : s.interval && n.pause().cycle()
})
}
var i = function(e, i) {
this.$element = t(e), this.$indicators = this.$element.find(".carousel-indicators"), this.options = i, this.paused = null, this.sliding = null, this.interval = null, this.$active = null, this.$items = null, this.options.keyboard && this.$element.on("keydown.bs.carousel", t.proxy(this.keydown, this)), "hover" == this.options.pause && !("ontouchstart" in document.documentElement) && this.$element.on("mouseenter.bs.carousel", t.proxy(this.pause, this)).on("mouseleave.bs.carousel", t.proxy(this.cycle, this))
};
i.VERSION = "3.3.5", i.TRANSITION_DURATION = 600, i.DEFAULTS = {
interval: 5e3,
pause: "hover",
wrap: !0,
keyboard: !0
}, i.prototype.keydown = function(t) {
if (!/input|textarea/i.test(t.target.tagName)) {
switch (t.which) {
case 37:
this.prev();
break;
case 39:
this.next();
break;
default:
return
}
t.preventDefault()
}
}, i.prototype.cycle = function(e) {
return e || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(t.proxy(this.next, this), this.options.interval)), this
}, i.prototype.getItemIndex = function(t) {
return this.$items = t.parent().children(".item"), this.$items.index(t || this.$active)
}, i.prototype.getItemForDirection = function(t, e) {
var i = this.getItemIndex(e),
o = "prev" == t && 0 === i || "next" == t && i == this.$items.length - 1;
if (o && !this.options.wrap) return e;
var n = "prev" == t ? -1 : 1,
s = (i + n) % this.$items.length;
return this.$items.eq(s)
}, i.prototype.to = function(t) {
var e = this,
i = this.getItemIndex(this.$active = this.$element.find(".item.active"));
return t > this.$items.length - 1 || 0 > t ? void 0 : this.sliding ? this.$element.one("slid.bs.carousel", function() {
e.to(t)
}) : i == t ? this.pause().cycle() : this.slide(t > i ? "next" : "prev", this.$items.eq(t))
}, i.prototype.pause = function(e) {
return e || (this.paused = !0), this.$element.find(".next, .prev").length && t.support.transition && (this.$element.trigger(t.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this
}, i.prototype.next = function() {
return this.sliding ? void 0 : this.slide("next")
}, i.prototype.prev = function() {
return this.sliding ? void 0 : this.slide("prev")
}, i.prototype.slide = function(e, o) {
var n = this.$element.find(".item.active"),
s = o || this.getItemForDirection(e, n),
a = this.interval,
r = "next" == e ? "left" : "right",
l = this;
if (s.hasClass("active")) return this.sliding = !1;
var h = s[0],
d = t.Event("slide.bs.carousel", {
relatedTarget: h,
direction: r
});
if (this.$element.trigger(d), !d.isDefaultPrevented()) {
if (this.sliding = !0, a && this.pause(), this.$indicators.length) {
this.$indicators.find(".active").removeClass("active");
var p = t(this.$indicators.children()[this.getItemIndex(s)]);
p && p.addClass("active")
}
var c = t.Event("slid.bs.carousel", {
relatedTarget: h,
direction: r
});
return t.support.transition && this.$element.hasClass("slide") ? (s.addClass(e), s[0].offsetWidth, n.addClass(r), s.addClass(r), n.one("bsTransitionEnd", function() {
s.removeClass([e, r].join(" ")).addClass("active"), n.removeClass(["active", r].join(" ")), l.sliding = !1, setTimeout(function() {
l.$element.trigger(c)
}, 0)
}).emulateTransitionEnd(i.TRANSITION_DURATION)) : (n.removeClass("active"), s.addClass("active"), this.sliding = !1, this.$element.trigger(c)), a && this.cycle(), this
}
};
var o = t.fn.carousel;
t.fn.carousel = e, t.fn.carousel.Constructor = i, t.fn.carousel.noConflict = function() {
return t.fn.carousel = o, this
};
var n = function(i) {
var o, n = t(this),
s = t(n.attr("data-target") || (o = n.attr("href")) && o.replace(/.*(?=#[^\s]+$)/, ""));
if (s.hasClass("carousel")) {
var a = t.extend({}, s.data(), n.data()),
r = n.attr("data-slide-to");
r && (a.interval = !1), e.call(s, a), r && s.data("bs.carousel").to(r), i.preventDefault()
}
};
t(document).on("click.bs.carousel.data-api", "[data-slide]", n).on("click.bs.carousel.data-api", "[data-slide-to]", n), t(window).on("load", function() {
t('[data-ride="carousel"]').each(function() {
var i = t(this);
e.call(i, i.data())
})
})
}(jQuery), + function(t) {
"use strict";
function e(e) {
var i = e.attr("data-target");
i || (i = e.attr("href"), i = i && /#[A-Za-z]/.test(i) && i.replace(/.*(?=#[^\s]*$)/, ""));
var o = i && t(i);
return o && o.length ? o : e.parent()
}
function i(i) {
i && 3 === i.which || (t(n).remove(), t(s).each(function() {
var o = t(this),
n = e(o),
s = {
relatedTarget: this
};
n.hasClass("open") && (i && "click" == i.type && /input|textarea/i.test(i.target.tagName) && t.contains(n[0], i.target) || (n.trigger(i = t.Event("hide.bs.dropdown", s)), i.isDefaultPrevented() || (o.attr("aria-expanded", "false"), n.removeClass("open").trigger("hidden.bs.dropdown", s))))
}))
}
function o(e) {
return this.each(function() {
var i = t(this),
o = i.data("bs.dropdown");
o || i.data("bs.dropdown", o = new a(this)), "string" == typeof e && o[e].call(i)
})
}
var n = ".dropdown-backdrop",
s = '[data-toggle="dropdown"]',
a = function(e) {
t(e).on("click.bs.dropdown", this.toggle)
};
a.VERSION = "3.3.5", a.prototype.toggle = function(o) {
var n = t(this);
if (!n.is(".disabled, :disabled")) {
var s = e(n),
a = s.hasClass("open");
if (i(), !a) {
"ontouchstart" in document.documentElement && !s.closest(".navbar-nav").length && t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click", i);
var r = {
relatedTarget: this
};
if (s.trigger(o = t.Event("show.bs.dropdown", r)), o.isDefaultPrevented()) return;
n.trigger("focus").attr("aria-expanded", "true"), s.toggleClass("open").trigger("shown.bs.dropdown", r)
}
return !1
}
}, a.prototype.keydown = function(i) {
if (/(38|40|27|32)/.test(i.which) && !/input|textarea/i.test(i.target.tagName)) {
var o = t(this);
if (i.preventDefault(), i.stopPropagation(), !o.is(".disabled, :disabled")) {
var n = e(o),
a = n.hasClass("open");
if (!a && 27 != i.which || a && 27 == i.which) return 27 == i.which && n.find(s).trigger("focus"), o.trigger("click");
var r = " li:not(.disabled):visible a",
l = n.find(".dropdown-menu" + r);
if (l.length) {
var h = l.index(i.target);
38 == i.which && h > 0 && h--, 40 == i.which && h < l.length - 1 && h++, ~h || (h = 0), l.eq(h).trigger("focus")
}
}
}
};
var r = t.fn.dropdown;
t.fn.dropdown = o, t.fn.dropdown.Constructor = a, t.fn.dropdown.noConflict = function() {
return t.fn.dropdown = r, this
}, t(document).on("click.bs.dropdown.data-api", i).on("click.bs.dropdown.data-api", ".dropdown form", function(t) {
t.stopPropagation()
}).on("click.bs.dropdown.data-api", s, a.prototype.toggle).on("keydown.bs.dropdown.data-api", s, a.prototype.keydown).on("keydown.bs.dropdown.data-api", ".dropdown-menu", a.prototype.keydown)
}(jQuery), + function(t) {
"use strict";
function e(e, o) {
return this.each(function() {
var n = t(this),
s = n.data("bs.modal"),
a = t.extend({}, i.DEFAULTS, n.data(), "object" == typeof e && e);
s || n.data("bs.modal", s = new i(this, a)), "string" == typeof e ? s[e](o) : a.show && s.show(o)
})
}
var i = function(e, i) {
this.options = i, this.$body = t(document.body), this.$element = t(e), this.$dialog = this.$element.find(".modal-dialog"), this.$backdrop = null, this.isShown = null, this.originalBodyPad = null, this.scrollbarWidth = 0, this.ignoreBackdropClick = !1, this.options.remote && this.$element.find(".modal-content").load(this.options.remote, t.proxy(function() {
this.$element.trigger("loaded.bs.modal")
}, this))
};
i.VERSION = "3.3.5", i.TRANSITION_DURATION = 300, i.BACKDROP_TRANSITION_DURATION = 150, i.DEFAULTS = {
backdrop: !0,
keyboard: !0,
show: !0
}, i.prototype.toggle = function(t) {
return this.isShown ? this.hide() : this.show(t)
}, i.prototype.show = function(e) {
var o = this,
n = t.Event("show.bs.modal", {
relatedTarget: e
});
this.$element.trigger(n), this.isShown || n.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.setScrollbar(), this.$body.addClass("modal-open"), this.escape(), this.resize(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', t.proxy(this.hide, this)), this.$dialog.on("mousedown.dismiss.bs.modal", function() {
o.$element.one("mouseup.dismiss.bs.modal", function(e) {
t(e.target).is(o.$element) && (o.ignoreBackdropClick = !0)
})
}), this.backdrop(function() {
var n = t.support.transition && o.$element.hasClass("fade");
o.$element.parent().length || o.$element.appendTo(o.$body), o.$element.show().scrollTop(0), o.adjustDialog(), n && o.$element[0].offsetWidth, o.$element.addClass("in"), o.enforceFocus();
var s = t.Event("shown.bs.modal", {
relatedTarget: e
});
n ? o.$dialog.one("bsTransitionEnd", function() {
o.$element.trigger("focus").trigger(s)
}).emulateTransitionEnd(i.TRANSITION_DURATION) : o.$element.trigger("focus").trigger(s)
}))
}, i.prototype.hide = function(e) {
e && e.preventDefault(), e = t.Event("hide.bs.modal"), this.$element.trigger(e), this.isShown && !e.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), t(document).off("focusin.bs.modal"), this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"), this.$dialog.off("mousedown.dismiss.bs.modal"), t.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", t.proxy(this.hideModal, this)).emulateTransitionEnd(i.TRANSITION_DURATION) : this.hideModal())
}, i.prototype.enforceFocus = function() {
t(document).off("focusin.bs.modal").on("focusin.bs.modal", t.proxy(function(t) {
this.$element[0] === t.target || this.$element.has(t.target).length || this.$element.trigger("focus")
}, this))
}, i.prototype.escape = function() {
this.isShown && this.options.keyboard ? this.$element.on("keydown.dismiss.bs.modal", t.proxy(function(t) {
27 == t.which && this.hide()
}, this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal")
}, i.prototype.resize = function() {
this.isShown ? t(window).on("resize.bs.modal", t.proxy(this.handleUpdate, this)) : t(window).off("resize.bs.modal")
}, i.prototype.hideModal = function() {
var t = this;
this.$element.hide(), this.backdrop(function() {
t.$body.removeClass("modal-open"), t.resetAdjustments(), t.resetScrollbar(), t.$element.trigger("hidden.bs.modal")
})
}, i.prototype.removeBackdrop = function() {
this.$backdrop && this.$backdrop.remove(), this.$backdrop = null
}, i.prototype.backdrop = function(e) {
var o = this,
n = this.$element.hasClass("fade") ? "fade" : "";
if (this.isShown && this.options.backdrop) {
var s = t.support.transition && n;
if (this.$backdrop = t(document.createElement("div")).addClass("modal-backdrop " + n).appendTo(this.$body), this.$element.on("click.dismiss.bs.modal", t.proxy(function(t) {
return this.ignoreBackdropClick ? void(this.ignoreBackdropClick = !1) : void(t.target === t.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus() : this.hide()))
}, this)), s && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !e) return;
s ? this.$backdrop.one("bsTransitionEnd", e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION) : e()
} else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass("in");
var a = function() {
o.removeBackdrop(), e && e()
};
t.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", a).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION) : a()
} else e && e()
}, i.prototype.handleUpdate = function() {
this.adjustDialog()
}, i.prototype.adjustDialog = function() {
var t = this.$element[0].scrollHeight > document.documentElement.clientHeight;
this.$element.css({
paddingLeft: !this.bodyIsOverflowing && t ? this.scrollbarWidth : "",
paddingRight: this.bodyIsOverflowing && !t ? this.scrollbarWidth : ""
})
}, i.prototype.resetAdjustments = function() {
this.$element.css({
paddingLeft: "",
paddingRight: ""
})
}, i.prototype.checkScrollbar = function() {
var t = window.innerWidth;
if (!t) {
var e = document.documentElement.getBoundingClientRect();
t = e.right - Math.abs(e.left)
}
this.bodyIsOverflowing = document.body.clientWidth < t, this.scrollbarWidth = this.measureScrollbar()
}, i.prototype.setScrollbar = function() {
var t = parseInt(this.$body.css("padding-right") || 0, 10);
this.originalBodyPad = document.body.style.paddingRight || "", this.bodyIsOverflowing && this.$body.css("padding-right", t + this.scrollbarWidth)
}, i.prototype.resetScrollbar = function() {
this.$body.css("padding-right", this.originalBodyPad)
}, i.prototype.measureScrollbar = function() {
var t = document.createElement("div");
t.className = "modal-scrollbar-measure", this.$body.append(t);
var e = t.offsetWidth - t.clientWidth;
return this.$body[0].removeChild(t), e
};
var o = t.fn.modal;
t.fn.modal = e, t.fn.modal.Constructor = i, t.fn.modal.noConflict = function() {
return t.fn.modal = o, this
}, t(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function(i) {
var o = t(this),
n = o.attr("href"),
s = t(o.attr("data-target") || n && n.replace(/.*(?=#[^\s]+$)/, "")),
a = s.data("bs.modal") ? "toggle" : t.extend({
remote: !/#/.test(n) && n
}, s.data(), o.data());
o.is("a") && i.preventDefault(), s.one("show.bs.modal", function(t) {
t.isDefaultPrevented() || s.one("hidden.bs.modal", function() {
o.is(":visible") && o.trigger("focus")
})
}), e.call(s, a, this)
})
}(jQuery), + function(t) {
"use strict";
function e(e) {
return this.each(function() {
var o = t(this),
n = o.data("bs.tooltip"),
s = "object" == typeof e && e;
(n || !/destroy|hide/.test(e)) && (n || o.data("bs.tooltip", n = new i(this, s)), "string" == typeof e && n[e]())
})
}
var i = function(t, e) {
this.type = null, this.options = null, this.enabled = null, this.timeout = null, this.hoverState = null, this.$element = null, this.inState = null, this.init("tooltip", t, e)
};
i.VERSION = "3.3.5", i.TRANSITION_DURATION = 150, i.DEFAULTS = {
animation: !0,
placement: "top",
selector: !1,
template: '
',
trigger: "hover focus",
title: "",
delay: 0,
html: !1,
container: !1,
viewport: {
selector: "body",
padding: 0
}
}, i.prototype.init = function(e, i, o) {
if (this.enabled = !0, this.type = e, this.$element = t(i), this.options = this.getOptions(o), this.$viewport = this.options.viewport && t(t.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : this.options.viewport.selector || this.options.viewport), this.inState = {
click: !1,
hover: !1,
focus: !1
}, this.$element[0] instanceof document.constructor && !this.options.selector) throw new Error("`selector` option must be specified when initializing " + this.type + " on the window.document object!");
for (var n = this.options.trigger.split(" "), s = n.length; s--;) {
var a = n[s];
if ("click" == a) this.$element.on("click." + this.type, this.options.selector, t.proxy(this.toggle, this));
else if ("manual" != a) {
var r = "hover" == a ? "mouseenter" : "focusin",
l = "hover" == a ? "mouseleave" : "focusout";
this.$element.on(r + "." + this.type, this.options.selector, t.proxy(this.enter, this)), this.$element.on(l + "." + this.type, this.options.selector, t.proxy(this.leave, this))
}
}
this.options.selector ? this._options = t.extend({}, this.options, {
trigger: "manual",
selector: ""
}) : this.fixTitle()
}, i.prototype.getDefaults = function() {
return i.DEFAULTS
}, i.prototype.getOptions = function(e) {
return e = t.extend({}, this.getDefaults(), this.$element.data(), e), e.delay && "number" == typeof e.delay && (e.delay = {
show: e.delay,
hide: e.delay
}), e
}, i.prototype.getDelegateOptions = function() {
var e = {},
i = this.getDefaults();
return this._options && t.each(this._options, function(t, o) {
i[t] != o && (e[t] = o)
}), e
}, i.prototype.enter = function(e) {
var i = e instanceof this.constructor ? e : t(e.currentTarget).data("bs." + this.type);
return i || (i = new this.constructor(e.currentTarget, this.getDelegateOptions()), t(e.currentTarget).data("bs." + this.type, i)), e instanceof t.Event && (i.inState["focusin" == e.type ? "focus" : "hover"] = !0), i.tip().hasClass("in") || "in" == i.hoverState ? void(i.hoverState = "in") : (clearTimeout(i.timeout), i.hoverState = "in", i.options.delay && i.options.delay.show ? void(i.timeout = setTimeout(function() {
"in" == i.hoverState && i.show()
}, i.options.delay.show)) : i.show())
}, i.prototype.isInStateTrue = function() {
for (var t in this.inState)
if (this.inState[t]) return !0;
return !1
}, i.prototype.leave = function(e) {
var i = e instanceof this.constructor ? e : t(e.currentTarget).data("bs." + this.type);
return i || (i = new this.constructor(e.currentTarget, this.getDelegateOptions()), t(e.currentTarget).data("bs." + this.type, i)), e instanceof t.Event && (i.inState["focusout" == e.type ? "focus" : "hover"] = !1), i.isInStateTrue() ? void 0 : (clearTimeout(i.timeout), i.hoverState = "out", i.options.delay && i.options.delay.hide ? void(i.timeout = setTimeout(function() {
"out" == i.hoverState && i.hide()
}, i.options.delay.hide)) : i.hide())
}, i.prototype.show = function() {
var e = t.Event("show.bs." + this.type);
if (this.hasContent() && this.enabled) {
this.$element.trigger(e);
var o = t.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]);
if (e.isDefaultPrevented() || !o) return;
var n = this,
s = this.tip(),
a = this.getUID(this.type);
this.setContent(), s.attr("id", a), this.$element.attr("aria-describedby", a), this.options.animation && s.addClass("fade");
var r = "function" == typeof this.options.placement ? this.options.placement.call(this, s[0], this.$element[0]) : this.options.placement,
l = /\s?auto?\s?/i,
h = l.test(r);
h && (r = r.replace(l, "") || "top"), s.detach().css({
top: 0,
left: 0,
display: "block"
}).addClass(r).data("bs." + this.type, this), this.options.container ? s.appendTo(this.options.container) : s.insertAfter(this.$element), this.$element.trigger("inserted.bs." + this.type);
var d = this.getPosition(),
p = s[0].offsetWidth,
c = s[0].offsetHeight;
if (h) {
var f = r,
u = this.getPosition(this.$viewport);
r = "bottom" == r && d.bottom + c > u.bottom ? "top" : "top" == r && d.top - c < u.top ? "bottom" : "right" == r && d.right + p > u.width ? "left" : "left" == r && d.left - p < u.left ? "right" : r, s.removeClass(f).addClass(r)
}
var g = this.getCalculatedOffset(r, d, p, c);
this.applyPlacement(g, r);
var m = function() {
var t = n.hoverState;
n.$element.trigger("shown.bs." + n.type), n.hoverState = null, "out" == t && n.leave(n)
};
t.support.transition && this.$tip.hasClass("fade") ? s.one("bsTransitionEnd", m).emulateTransitionEnd(i.TRANSITION_DURATION) : m()
}
}, i.prototype.applyPlacement = function(e, i) {
var o = this.tip(),
n = o[0].offsetWidth,
s = o[0].offsetHeight,
a = parseInt(o.css("margin-top"), 10),
r = parseInt(o.css("margin-left"), 10);
isNaN(a) && (a = 0), isNaN(r) && (r = 0), e.top += a, e.left += r, t.offset.setOffset(o[0], t.extend({
using: function(t) {
o.css({
top: Math.round(t.top),
left: Math.round(t.left)
})
}
}, e), 0), o.addClass("in");
var l = o[0].offsetWidth,
h = o[0].offsetHeight;
"top" == i && h != s && (e.top = e.top + s - h);
var d = this.getViewportAdjustedDelta(i, e, l, h);
d.left ? e.left += d.left : e.top += d.top;
var p = /top|bottom/.test(i),
c = p ? 2 * d.left - n + l : 2 * d.top - s + h,
f = p ? "offsetWidth" : "offsetHeight";
o.offset(e), this.replaceArrow(c, o[0][f], p)
}, i.prototype.replaceArrow = function(t, e, i) {
this.arrow().css(i ? "left" : "top", 50 * (1 - t / e) + "%").css(i ? "top" : "left", "")
}, i.prototype.setContent = function() {
var t = this.tip(),
e = this.getTitle();
t.find(".tooltip-inner")[this.options.html ? "html" : "text"](e), t.removeClass("fade in top bottom left right")
}, i.prototype.hide = function(e) {
function o() {
"in" != n.hoverState && s.detach(), n.$element.removeAttr("aria-describedby").trigger("hidden.bs." + n.type), e && e()
}
var n = this,
s = t(this.$tip),
a = t.Event("hide.bs." + this.type);
return this.$element.trigger(a), a.isDefaultPrevented() ? void 0 : (s.removeClass("in"), t.support.transition && s.hasClass("fade") ? s.one("bsTransitionEnd", o).emulateTransitionEnd(i.TRANSITION_DURATION) : o(), this.hoverState = null, this)
}, i.prototype.fixTitle = function() {
var t = this.$element;
(t.attr("title") || "string" != typeof t.attr("data-original-title")) && t.attr("data-original-title", t.attr("title") || "").attr("title", "")
}, i.prototype.hasContent = function() {
return this.getTitle()
}, i.prototype.getPosition = function(e) {
e = e || this.$element;
var i = e[0],
o = "BODY" == i.tagName,
n = i.getBoundingClientRect();
null == n.width && (n = t.extend({}, n, {
width: n.right - n.left,
height: n.bottom - n.top
}));
var s = o ? {
top: 0,
left: 0
} : e.offset(),
a = {
scroll: o ? document.documentElement.scrollTop || document.body.scrollTop : e.scrollTop()
},
r = o ? {
width: t(window).width(),
height: t(window).height()
} : null;
return t.extend({}, n, a, r, s)
}, i.prototype.getCalculatedOffset = function(t, e, i, o) {
return "bottom" == t ? {
top: e.top + e.height,
left: e.left + e.width / 2 - i / 2
} : "top" == t ? {
top: e.top - o,
left: e.left + e.width / 2 - i / 2
} : "left" == t ? {
top: e.top + e.height / 2 - o / 2,
left: e.left - i
} : {
top: e.top + e.height / 2 - o / 2,
left: e.left + e.width
}
}, i.prototype.getViewportAdjustedDelta = function(t, e, i, o) {
var n = {
top: 0,
left: 0
};
if (!this.$viewport) return n;
var s = this.options.viewport && this.options.viewport.padding || 0,
a = this.getPosition(this.$viewport);
if (/right|left/.test(t)) {
var r = e.top - s - a.scroll,
l = e.top + s - a.scroll + o;
r < a.top ? n.top = a.top - r : l > a.top + a.height && (n.top = a.top + a.height - l)
} else {
var h = e.left - s,
d = e.left + s + i;
h < a.left ? n.left = a.left - h : d > a.right && (n.left = a.left + a.width - d)
}
return n
}, i.prototype.getTitle = function() {
var t, e = this.$element,
i = this.options;
return t = e.attr("data-original-title") || ("function" == typeof i.title ? i.title.call(e[0]) : i.title)
}, i.prototype.getUID = function(t) {
do t += ~~(1e6 * Math.random()); while (document.getElementById(t));
return t
}, i.prototype.tip = function() {
if (!this.$tip && (this.$tip = t(this.options.template), 1 != this.$tip.length)) throw new Error(this.type + " `template` option must consist of exactly 1 top-level element!");
return this.$tip
}, i.prototype.arrow = function() {
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
}, i.prototype.enable = function() {
this.enabled = !0
}, i.prototype.disable = function() {
this.enabled = !1
}, i.prototype.toggleEnabled = function() {
this.enabled = !this.enabled
}, i.prototype.toggle = function(e) {
var i = this;
e && (i = t(e.currentTarget).data("bs." + this.type), i || (i = new this.constructor(e.currentTarget, this.getDelegateOptions()), t(e.currentTarget).data("bs." + this.type, i))), e ? (i.inState.click = !i.inState.click, i.isInStateTrue() ? i.enter(i) : i.leave(i)) : i.tip().hasClass("in") ? i.leave(i) : i.enter(i)
}, i.prototype.destroy = function() {
var t = this;
clearTimeout(this.timeout), this.hide(function() {
t.$element.off("." + t.type).removeData("bs." + t.type), t.$tip && t.$tip.detach(), t.$tip = null, t.$arrow = null, t.$viewport = null
})
};
var o = t.fn.tooltip;
t.fn.tooltip = e, t.fn.tooltip.Constructor = i, t.fn.tooltip.noConflict = function() {
return t.fn.tooltip = o, this
}
}(jQuery), + function(t) {
"use strict";
function e(e) {
return this.each(function() {
var o = t(this),
n = o.data("bs.popover"),
s = "object" == typeof e && e;
(n || !/destroy|hide/.test(e)) && (n || o.data("bs.popover", n = new i(this, s)), "string" == typeof e && n[e]())
})
}
var i = function(t, e) {
this.init("popover", t, e)
};
if (!t.fn.tooltip) throw new Error("Popover requires tooltip.js");
i.VERSION = "3.3.5", i.DEFAULTS = t.extend({}, t.fn.tooltip.Constructor.DEFAULTS, {
placement: "right",
trigger: "click",
content: "",
template: ''
}), i.prototype = t.extend({}, t.fn.tooltip.Constructor.prototype), i.prototype.constructor = i, i.prototype.getDefaults = function() {
return i.DEFAULTS
}, i.prototype.setContent = function() {
var t = this.tip(),
e = this.getTitle(),
i = this.getContent();
t.find(".popover-title")[this.options.html ? "html" : "text"](e), t.find(".popover-content").children().detach().end()[this.options.html ? "string" == typeof i ? "html" : "append" : "text"](i), t.removeClass("fade top bottom left right in"), t.find(".popover-title").html() || t.find(".popover-title").hide()
}, i.prototype.hasContent = function() {
return this.getTitle() || this.getContent()
}, i.prototype.getContent = function() {
var t = this.$element,
e = this.options;
return t.attr("data-content") || ("function" == typeof e.content ? e.content.call(t[0]) : e.content)
}, i.prototype.arrow = function() {
return this.$arrow = this.$arrow || this.tip().find(".arrow")
};
var o = t.fn.popover;
t.fn.popover = e, t.fn.popover.Constructor = i, t.fn.popover.noConflict = function() {
return t.fn.popover = o, this
}
}(jQuery), + function(t) {
"use strict";
function e(e) {
return this.each(function() {
var o = t(this),
n = o.data("bs.tab");
n || o.data("bs.tab", n = new i(this)), "string" == typeof e && n[e]()
})
}
var i = function(e) {
this.element = t(e)
};
i.VERSION = "3.3.5", i.TRANSITION_DURATION = 150, i.prototype.show = function() {
var e = this.element,
i = e.closest("ul:not(.dropdown-menu)"),
o = e.data("target");
if (o || (o = e.attr("href"), o = o && o.replace(/.*(?=#[^\s]*$)/, "")), !e.parent("li").hasClass("active")) {
var n = i.find(".active:last a"),
s = t.Event("hide.bs.tab", {
relatedTarget: e[0]
}),
a = t.Event("show.bs.tab", {
relatedTarget: n[0]
});
if (n.trigger(s), e.trigger(a), !a.isDefaultPrevented() && !s.isDefaultPrevented()) {
var r = t(o);
this.activate(e.closest("li"), i), this.activate(r, r.parent(), function() {
n.trigger({
type: "hidden.bs.tab",
relatedTarget: e[0]
}), e.trigger({
type: "shown.bs.tab",
relatedTarget: n[0]
})
})
}
}
}, i.prototype.activate = function(e, o, n) {
function s() {
a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !1), e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", !0), r ? (e[0].offsetWidth, e.addClass("in")) : e.removeClass("fade"), e.parent(".dropdown-menu").length && e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !0), n && n()
}
var a = o.find("> .active"),
r = n && t.support.transition && (a.length && a.hasClass("fade") || !!o.find("> .fade").length);
a.length && r ? a.one("bsTransitionEnd", s).emulateTransitionEnd(i.TRANSITION_DURATION) : s(), a.removeClass("in")
};
var o = t.fn.tab;
t.fn.tab = e, t.fn.tab.Constructor = i, t.fn.tab.noConflict = function() {
return t.fn.tab = o, this
};
var n = function(i) {
i.preventDefault(), e.call(t(this), "show")
};
t(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', n).on("click.bs.tab.data-api", '[data-toggle="pill"]', n)
}(jQuery), + function(t) {
"use strict";
function e(e) {
return this.each(function() {
var o = t(this),
n = o.data("bs.affix"),
s = "object" == typeof e && e;
n || o.data("bs.affix", n = new i(this, s)), "string" == typeof e && n[e]()
})
}
var i = function(e, o) {
this.options = t.extend({}, i.DEFAULTS, o), this.$target = t(this.options.target).on("scroll.bs.affix.data-api", t.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", t.proxy(this.checkPositionWithEventLoop, this)), this.$element = t(e), this.affixed = null, this.unpin = null, this.pinnedOffset = null, this.checkPosition()
};
i.VERSION = "3.3.5", i.RESET = "affix affix-top affix-bottom", i.DEFAULTS = {
offset: 0,
target: window
}, i.prototype.getState = function(t, e, i, o) {
var n = this.$target.scrollTop(),
s = this.$element.offset(),
a = this.$target.height();
if (null != i && "top" == this.affixed) return i > n ? "top" : !1;
if ("bottom" == this.affixed) return null != i ? n + this.unpin <= s.top ? !1 : "bottom" : t - o >= n + a ? !1 : "bottom";
var r = null == this.affixed,
l = r ? n : s.top,
h = r ? a : e;
return null != i && i >= n ? "top" : null != o && l + h >= t - o ? "bottom" : !1
}, i.prototype.getPinnedOffset = function() {
if (this.pinnedOffset) return this.pinnedOffset;
this.$element.removeClass(i.RESET).addClass("affix");
var t = this.$target.scrollTop(),
e = this.$element.offset();
return this.pinnedOffset = e.top - t
}, i.prototype.checkPositionWithEventLoop = function() {
setTimeout(t.proxy(this.checkPosition, this), 1)
}, i.prototype.checkPosition = function() {
if (this.$element.is(":visible")) {
var e = this.$element.height(),
o = this.options.offset,
n = o.top,
s = o.bottom,
a = Math.max(t(document).height(), t(document.body).height());
"object" != typeof o && (s = n = o), "function" == typeof n && (n = o.top(this.$element)), "function" == typeof s && (s = o.bottom(this.$element));
var r = this.getState(a, e, n, s);
if (this.affixed != r) {
null != this.unpin && this.$element.css("top", "");
var l = "affix" + (r ? "-" + r : ""),
h = t.Event(l + ".bs.affix");
if (this.$element.trigger(h), h.isDefaultPrevented()) return;
this.affixed = r, this.unpin = "bottom" == r ? this.getPinnedOffset() : null, this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix", "affixed") + ".bs.affix")
}
"bottom" == r && this.$element.offset({
top: a - e - s
})
}
};
var o = t.fn.affix;
t.fn.affix = e, t.fn.affix.Constructor = i, t.fn.affix.noConflict = function() {
return t.fn.affix = o, this
}, t(window).on("load", function() {
t('[data-spy="affix"]').each(function() {
var i = t(this),
o = i.data();
o.offset = o.offset || {}, null != o.offsetBottom && (o.offset.bottom = o.offsetBottom), null != o.offsetTop && (o.offset.top = o.offsetTop), e.call(i, o)
})
})
}(jQuery), + function(t) {
"use strict";
function e(e) {
var i, o = e.attr("data-target") || (i = e.attr("href")) && i.replace(/.*(?=#[^\s]+$)/, "");
return t(o)
}
function i(e) {
return this.each(function() {
var i = t(this),
n = i.data("bs.collapse"),
s = t.extend({}, o.DEFAULTS, i.data(), "object" == typeof e && e);
!n && s.toggle && /show|hide/.test(e) && (s.toggle = !1), n || i.data("bs.collapse", n = new o(this, s)), "string" == typeof e && n[e]()
})
}
var o = function(e, i) {
this.$element = t(e), this.options = t.extend({}, o.DEFAULTS, i), this.$trigger = t('[data-toggle="collapse"][href="#' + e.id + '"],[data-toggle="collapse"][data-target="#' + e.id + '"]'), this.transitioning = null, this.options.parent ? this.$parent = this.getParent() : this.addAriaAndCollapsedClass(this.$element, this.$trigger), this.options.toggle && this.toggle()
};
o.VERSION = "3.3.5", o.TRANSITION_DURATION = 350, o.DEFAULTS = {
toggle: !0
}, o.prototype.dimension = function() {
var t = this.$element.hasClass("width");
return t ? "width" : "height"
}, o.prototype.show = function() {
if (!this.transitioning && !this.$element.hasClass("in")) {
var e, n = this.$parent && this.$parent.children(".panel").children(".in, .collapsing");
if (!(n && n.length && (e = n.data("bs.collapse"), e && e.transitioning))) {
var s = t.Event("show.bs.collapse");
if (this.$element.trigger(s), !s.isDefaultPrevented()) {
n && n.length && (i.call(n, "hide"), e || n.data("bs.collapse", null));
var a = this.dimension();
this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded", !0), this.$trigger.removeClass("collapsed").attr("aria-expanded", !0), this.transitioning = 1;
var r = function() {
this.$element.removeClass("collapsing").addClass("collapse in")[a](""), this.transitioning = 0, this.$element.trigger("shown.bs.collapse")
};
if (!t.support.transition) return r.call(this);
var l = t.camelCase(["scroll", a].join("-"));
this.$element.one("bsTransitionEnd", t.proxy(r, this)).emulateTransitionEnd(o.TRANSITION_DURATION)[a](this.$element[0][l]);
}
}
}
}, o.prototype.hide = function() {
if (!this.transitioning && this.$element.hasClass("in")) {
var e = t.Event("hide.bs.collapse");
if (this.$element.trigger(e), !e.isDefaultPrevented()) {
var i = this.dimension();
this.$element[i](this.$element[i]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", !1), this.$trigger.addClass("collapsed").attr("aria-expanded", !1), this.transitioning = 1;
var n = function() {
this.transitioning = 0, this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")
};
return t.support.transition ? void this.$element[i](0).one("bsTransitionEnd", t.proxy(n, this)).emulateTransitionEnd(o.TRANSITION_DURATION) : n.call(this)
}
}
}, o.prototype.toggle = function() {
this[this.$element.hasClass("in") ? "hide" : "show"]()
}, o.prototype.getParent = function() {
return t(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(t.proxy(function(i, o) {
var n = t(o);
this.addAriaAndCollapsedClass(e(n), n)
}, this)).end()
}, o.prototype.addAriaAndCollapsedClass = function(t, e) {
var i = t.hasClass("in");
t.attr("aria-expanded", i), e.toggleClass("collapsed", !i).attr("aria-expanded", i)
};
var n = t.fn.collapse;
t.fn.collapse = i, t.fn.collapse.Constructor = o, t.fn.collapse.noConflict = function() {
return t.fn.collapse = n, this
}, t(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function(o) {
var n = t(this);
n.attr("data-target") || o.preventDefault();
var s = e(n),
a = s.data("bs.collapse"),
r = a ? "toggle" : n.data();
i.call(s, r)
})
}(jQuery), + function(t) {
"use strict";
function e(i, o) {
this.$body = t(document.body), this.$scrollElement = t(t(i).is(document.body) ? window : i), this.options = t.extend({}, e.DEFAULTS, o), this.selector = (this.options.target || "") + " .nav li > a", this.offsets = [], this.targets = [], this.activeTarget = null, this.scrollHeight = 0, this.$scrollElement.on("scroll.bs.scrollspy", t.proxy(this.process, this)), this.refresh(), this.process()
}
function i(i) {
return this.each(function() {
var o = t(this),
n = o.data("bs.scrollspy"),
s = "object" == typeof i && i;
n || o.data("bs.scrollspy", n = new e(this, s)), "string" == typeof i && n[i]()
})
}
e.VERSION = "3.3.5", e.DEFAULTS = {
offset: 10
}, e.prototype.getScrollHeight = function() {
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
}, e.prototype.refresh = function() {
var e = this,
i = "offset",
o = 0;
this.offsets = [], this.targets = [], this.scrollHeight = this.getScrollHeight(), t.isWindow(this.$scrollElement[0]) || (i = "position", o = this.$scrollElement.scrollTop()), this.$body.find(this.selector).map(function() {
var e = t(this),
n = e.data("target") || e.attr("href"),
s = /^#./.test(n) && t(n);
return s && s.length && s.is(":visible") && [
[s[i]().top + o, n]
] || null
}).sort(function(t, e) {
return t[0] - e[0]
}).each(function() {
e.offsets.push(this[0]), e.targets.push(this[1])
})
}, e.prototype.process = function() {
var t, e = this.$scrollElement.scrollTop() + this.options.offset,
i = this.getScrollHeight(),
o = this.options.offset + i - this.$scrollElement.height(),
n = this.offsets,
s = this.targets,
a = this.activeTarget;
if (this.scrollHeight != i && this.refresh(), e >= o) return a != (t = s[s.length - 1]) && this.activate(t);
if (a && e < n[0]) return this.activeTarget = null, this.clear();
for (t = n.length; t--;) a != s[t] && e >= n[t] && (void 0 === n[t + 1] || e < n[t + 1]) && this.activate(s[t])
}, e.prototype.activate = function(e) {
this.activeTarget = e, this.clear();
var i = this.selector + '[data-target="' + e + '"],' + this.selector + '[href="' + e + '"]',
o = t(i).parents("li").addClass("active");
o.parent(".dropdown-menu").length && (o = o.closest("li.dropdown").addClass("active")), o.trigger("activate.bs.scrollspy")
}, e.prototype.clear = function() {
t(this.selector).parentsUntil(this.options.target, ".active").removeClass("active")
};
var o = t.fn.scrollspy;
t.fn.scrollspy = i, t.fn.scrollspy.Constructor = e, t.fn.scrollspy.noConflict = function() {
return t.fn.scrollspy = o, this
}, t(window).on("load.bs.scrollspy.data-api", function() {
t('[data-spy="scroll"]').each(function() {
var e = t(this);
i.call(e, e.data())
})
})
}(jQuery), + function(t) {
"use strict";
function e() {
var t = document.createElement("bootstrap"),
e = {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "oTransitionEnd otransitionend",
transition: "transitionend"
};
for (var i in e)
if (void 0 !== t.style[i]) return {
end: e[i]
};
return !1
}
t.fn.emulateTransitionEnd = function(e) {
var i = !1,
o = this;
t(this).one("bsTransitionEnd", function() {
i = !0
});
var n = function() {
i || t(o).trigger(t.support.transition.end)
};
return setTimeout(n, e), this
}, t(function() {
t.support.transition = e(), t.support.transition && (t.event.special.bsTransitionEnd = {
bindType: t.support.transition.end,
delegateType: t.support.transition.end,
handle: function(e) {
return t(e.target).is(this) ? e.handleObj.handler.apply(this, arguments) : void 0
}
})
})
}(jQuery);;
function openWindow(theURL, winName, features) {
if (!features) features = "status=yes,toolbar=no,menubar=no,location=no";
return window.open(theURL, winName, features);
}
function load_script(href) {
if (typeof jQuery != 'undefined') {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = href;
$("head").append(script);
} else
with(document) {
var span = null;
span = body.appendChild(createElement("SPAN"));
span.style.display = 'none';
span.innerHTML = 'Text for IE.' + 'script>';
setTimeout(function() {
var s = span.getElementsByTagName("script")[0];
s.language = "JavaScript";
if (s.setAttribute) s.setAttribute('src', href);
else s.src = href;
}, 10);
}
}
function initModules(paramArr) {
if (empty(paramArr.arr)) return;
var modules = paramArr.arr;
var base_dir = '';
if (!empty(paramArr.base)) base_dir = paramArr.base;
for (var i = 0; i < modules.length; i++) {
var curr = modules[i];
if (curr.indexOf('.js') <= 0 && curr.indexOf('.inc') <= 0) curr = curr + '.js';
load_script(base_dir + curr);
}
}
function printEmail(str, title) {
if (empty(str)) return;
if (empty(title)) title = str;
document.write('' + title + '');
}
function getFlashVer() {
var f = "-",
n = navigator;
if (n.plugins && n.plugins.length) {
for (var ii = 0; ii < n.plugins.length; ii++) {
if (n.plugins[ii].name.indexOf('Shockwave Flash') != -1) {
f = n.plugins[ii].description.split('Shockwave Flash ')[1];
break;
}
}
} else if (window.ActiveXObject) {
for (var ii = 12; ii >= 2; ii--) {
try {
var fl = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + ii + "');");
if (fl) {
f = ii + '.0';
break;
}
} catch (e) {}
}
}
return f;
}
function empty(variable) {
if (typeof(variable) == 'undefined') return true;
if (variable == '' || variable == 0 || variable == '0' || !variable) return true;
return false;
}
function is_undef(variable) {
if (typeof(variable) == 'undefined') return true;
return false;
}
function is_array() {
if (typeof arguments[0] == 'object') {
var criterion = arguments[0].constructor.toString().match(/array/i);
return (criterion != null);
}
return false;
}
function is_hash() {
if (typeof arguments[0] == 'object') {
var non_empty = false;
for (var k in arguments[0])
if (!is_undef(k) || !is_undef(arguments[0][k])) {
non_empty = true;
break;
}
var criterion = arguments[0].constructor.toString().match(/object\(\)/i) && non_empty;
return (criterion != null);
}
return false;
}
function array_search(needle, haystack) {
if (typeof(needle) == 'undefined' || typeof(haystack) == 'undefined') return false;
if (typeof(haystack.length) == 'undefined' || needle == false) return false;
for (var i = 0; i <= haystack.length - 1; i++)
if (needle == haystack[i]) return i;
return -1;
}
function in_array(needle, haystack) {
if (typeof(needle) == 'undefined' || typeof(haystack) == 'undefined') return false;
if (typeof(haystack.length) == 'undefined' || !needle) return false;
for (var i = 0; i <= haystack.length - 1; i++)
if (needle == haystack[i]) return true;
return false;
}
function is_obj(variable) {
if (typeof(variable) == 'object') return true;
return false;
}
function is_object(variable) {
return is_obj(variable);
}
function getElement(e, f) {
f = (f) ? f : self;
if (document.getElementById) return f.document.getElementById(e);
if (document.layers) {
f = (f) ? f : self;
if (f.document.layers[e]) {
return f.document.layers[e];
}
for (W = 0; i < f.document.layers.length; W++) {
return (getElement(e, f.document.layers[W]));
}
}
if (document.all) {
return f.document.all[e];
}
return false;
}
function getElementByMask(mask, container) {
if (empty(container)) {
container = document.getElementsByTagName('body')[0];
}
if (!empty(container)) {
var out_array = new Array();
var arr = container.childNodes;
var out_array = arr;
var str = '';
if (!empty(arr))
for (var i = 0; i < arr.length; i++)
if (!empty(arr[i])) {
var new_el_arr = getElementByMask(mask, arr[i]);
if (new_el_arr)
for (var j = 0; j < new_el_arr.length; i++)
if (!empty(new_el_arr[j])) {
new_el = new_el_arr[j];
if (!empty(new_el.id) && IsContain(mask, new_el.id)) {
out_array.push(new_el_arr[j]);
}
}
}
if (!empty(out_array)) return out_array;
}
return false;
}
arrPrototypeReserved = ["sizeOf", "show"];
function show_array(arr) {
var str = '';
for (var k in arr) {
str = str + k + "=>" + arr[k] + ', ';
}
if (str.length > 0) str = str.substring(0, str.length - 2);
alert(str);
}
function init_arr_from_str(str) {
if (!empty(str)) {
var tmp_arr = str.split(",");
var out_arr = new Array();
for (var k in tmp_arr)
if (!empty(tmp_arr[k])) {
var tmp_arr2 = tmp_arr[k].split(":");
out_arr[tmp_arr2[0]] = tmp_arr2[1];
}
return out_arr;
}
return false;
}
function IsContain(needle, s) {
var re = new RegExp(needle, "i");
return re.test(s);
}
function strip_tags() {
var re = /<\S[^><]*>/g
return arguments[0].replace(re, "");
}
function el_value(el) {
var ret_val = false;
if (!empty(el.type)) {
var tmp = el.type;
if (tmp.indexOf('select') > -1) {
if (el.selectedIndex != -1) return el.options[el.selectedIndex].value;
} else if (tmp.indexOf('radio') > -1) {
var tmp_form = el.form;
var radioGrp = tmp_form[el.name];
for (var i = 0; i < radioGrp.length; i++) {
if (radioGrp[i].checked) {
return radioGrp[i].value;
}
}
}
}
if (typeof(el.value) != 'undefined') return el.value;
return ret_val;
}
function addEvent(elm, evType, fn, useCapture) {
useCapture = useCapture || false;
if (elm.addEventListener) {
elm.addEventListener(evType, fn, useCapture);
return true;
} else if (elm.attachEvent) {
var r = elm.attachEvent('on' + evType, fn);
return r;
} else {
elm['on' + evType] = fn;
}
}
function fix_inline_links() {
var tmp_els = document.getElementsByTagName("a");
var base_url = document.getElementsByTagName('base')[0].href;
var curr_url = location.href;
if (curr_url.indexOf("#") >= 0) {
curr_url = curr_url.substring(0, curr_url.indexOf("#"));
}
var curr_el, tmp_str;
if (!empty(tmp_els) && !empty(base_url))
for (var i = 0; i < tmp_els.length; i++) {
curr_el = tmp_els[i];
if (!empty(curr_el.href)) {
tmp_str = curr_el.href;
if (tmp_str.indexOf("#") >= 0) {
if (tmp_str.indexOf(base_url) >= 0) {
tmp_str = tmp_str.substr(base_url.length);
if (tmp_str.indexOf("#") == 0) curr_el.href = curr_url + tmp_str;
}
}
}
}
}
function clear_fields_requireness(selector) {
if (empty(selector)) return;
$(selector).each(function() {
var el_id = $(this).attr('id');
var i = 0;
while (el_id.lastIndexOf("_") > -1) {
if (el_id[el_id.length - 1] != "_" || i > 100) break;
el_id = el_id.substr(0, el_id.length - 1);
i++;
}
$(this).attr('id', el_id);
});
};
debugMode = false;
requesterName = "IBS support";
var min_pwd_length = 4;
var lng;
var errMsgs = new Array();
errMsgs[1] = '���������� ��������� ��� ����������� ���� "';
var el_first;
var elTitles = new Array();
elTitles["login"] = "Login";
elTitles["pwd"] = "Password";
elTitles["pwdconf"] = "Password Confirmation";
elTitles["firstName"] = "���";
elTitles["lastName"] = "�������";
elTitles["city"] = "�����";
elTitles["suburb"] = "Suburb";
elTitles["strAddress"] = "������";
elTitles["phoneBusiness"] = "Business Phone Number";
elTitles["email"] = "Email";
elTitles["fio"] = "���";
elTitles["phone"] = "�������";
var timeout2 = null;
var of = document.form1;
var scr = window.screen;
function init() {
var of = document.form1;
}
function unmake_required(el) {
if (!is_obj(el) && !empty(el)) el = getElement(el);
if (empty(el)) return;
var id = el.id;
if (!empty(id)) {
if (id.substr(id.length - 1, 1) == "_") el.id = id.substr(0, id.length - 1);
}
return true;
}
function make_required(el) {
if (!is_obj(el) && !empty(el)) el = getElement(el);
if (empty(el)) return;
var id = el.id;
if (!empty(id)) {
if (id.substr(id.length - 1, 1) != "_") el.id = id + '_';
}
return true;
}
function focusEmpty(of) {
var empty_el_arr = new Array();
var ee_count = 0;
var found = false;
el_first = null;
for (var i = 0; i < of.elements.length; i++) {
el = of.elements[i];
elID = of.elements[i].id;
if (elID.substr(elID.length - 1, 1) == "_") {
var elValue = el_value(el);
if (elValue == false || elValue == '') {
found = true;
if (el_first == null) el_first = el;
empty_el_arr[ee_count] = el.name;
ee_count = ee_count + 1;
} else {
el.className = '';
}
}
}
if (found == true) {
var recipient = document.getElementById('err_reporter');
if (recipient) {
var list = '';
for (var i = 0; i < empty_el_arr.length; i++) {
if (elTitles[empty_el_arr[i]])
list = list + (elTitles[empty_el_arr[i]] || empty_el_arr[i]) + ', ';
}
if (list != '') recipient.innerHTML = shellErrMsg(errMsgs[1]) + list.substr(0, list.length - 2) + '" !
';
window.status = strip_tags(recipient.innerHTML);
}
var anchor_to = '#top_a';
var new_loc = location.href;
if (new_loc.indexOf(anchor_to) <= 0) {
new_loc = new_loc + anchor_to;
}
window.location.href = new_loc;
if (el_first.style) el_first.className = "input_hl";
if (timeout2) clearTimeout(timeout2);
timeout2 = setTimeout("el_first.focus();", 400);
return 0;
}
return 1;
}
function shellErrMsg(msg) {
return '' + msg + '';
}
function onSubmit(obj) {
if (typeof(obj) == 'string') obj = getElement(obj);
if (typeof(obj.form) == 'undefined') return false;
var of = obj.form;
if (focusEmpty(of) == 1) {
of.submit();
return true;
}
return false;
}
function onSubmit_a(form) {
var of = document.forms[form];
if (focusEmpty(of) == 1) {
of.submit();
}
}
function onCancel() {
var nav_path = (PathTo) ? PathTo : 'index.php';
if (!empty(PathTo)) location.href = PathTo;
}
function checkEmail(obj) {
var oEmail = obj.form.email;
var email = oEmail.value;
if (lng == 'ru') {
err_msg = "E-mail ����� �������� ������! ��������� ���������� ����";
} else if (lng == 'ua') {
err_msg = "E-mail �� ������� ������! �������� ����-����� ��� �����";
} else {
err_msg = "Incorrect email format! Please reenter";
}
if (oEmail.value) {
var parts = email.split("@");
if ((parts.length != 2) || (!parts[0]) || (!parts[1])) {
alert(err_msg);
oEmail.focus();
return false;
} else {
var domain_parts = parts[1].split(".");
if (domain_parts.length < 2) {
alert(err_msg);
oEmail.focus();
return false;
}
confEmail = getElement('emailconf_');
if (!empty(confEmail) && email != confEmail.value) {
alert(err_msg);
confEmail.focus();
return false;
}
return true;
}
} else {
return true;
}
}
function checkPwd(obj) {
var oPwd = obj.form.pwd;
var oPwdconf = obj.form.pwdconf;
var pwd = oPwd.value;
if ((pwd != '')) {
if (pwd.length < min_pwd_length) {
if (lng == 'ru') {
err_msg = "������ ������ ������ " + min_pwd_length + " ��������! ���������� ������� ������ ������� ������";
} else if (lng == 'ua') {
err_msg = "������� ������ ����� " + min_pwd_length + " �������! ����-����� ������ ������ ������";
} else {
err_msg = "Password length less than " + min_pwd_length + " characters! Please enter longer password";
}
alert(err_msg);
oPwd.focus();
return false;
} else {
if (pwd != oPwdconf.value) {
if (lng == 'ru') {
err_msg = "������ � ��� ������������� �� ���������! ������� ���������� ���������� ������";
} else if (lng == 'ua') {
err_msg = "������ �� ���� ����������� �� ����������! ������ ����-����� �������� �����";
} else {
err_msg = "Password and password confirmation aren`t equal! Please enter identical passwords";
}
alert(err_msg);
oPwd.focus();
return false;
} else {
return true;
}
}
} else {
return true;
}
}
function doReset() {
form1.reset();
init();
}
var rusChars = new Array('�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�');
var transChars = new Array('#', 'a', 'b', 'v', 'g', 'd', 'e', 'yo', 'zh', 'z', 'i', 'y', 'k', 'l', 'm', 'n', 'o', 'p', 'r', 's', 't', 'u', 'f', 'kh', 'ts', 'ch', 'sh', 'shch', 'e', 'yu', 'ya', 'y', '', '', 'ye', 'i', 'yi');
function convert(from) {
if (empty(from)) return;
from = from.toLowerCase();
var to = "";
var len = from.length;
var character, isRus;
for (i = 0; i < len; i++) {
character = from.charAt(i, 1);
isRus = false;
j = array_search(character, rusChars);
if (j > -1 && j != false) isRus = true;
to += (isRus) ? transChars[j] : character;
}
return to;
}
function str2tid(str) {
if (str == '') return false;
str = str.replace(/\s{1,}/gi, "_");
str = convert(str);
str = str.replace(/[^a-zA-Z0-9_]/gi, "");
return str;
}
function IsContain(needle, s) {
var re = new RegExp(needle, "i");
return re.test(s);
};
var base_url = $("base").attr("href");
tmp = $("link[rel=stylesheet]").attr("href");
if (!empty(tmp)) var domain_url = tmp.substr(0, tmp.indexOf("res/"));
$(document).ready(function() {
function searchValid(searchStr, len) {
regex = /^[a-zA-Z\u0430-\u044f\u0410-\u042f\u0451\u04010-9 ]+$/;
regexlen = /^[a-zA-Z\u0430-\u044f\u0410-\u042f\u0451\u04010-9 ]{3,}$/;
if (len) isValid = regexlen.test(searchStr) && (searchStr != ' \u041f\u043e\u0438\u0441\u043a');
else isValid = regex.test(searchStr) && (searchStr != ' \u041f\u043e\u0438\u0441\u043a');
if (!isValid) $('#searchMsg').fadeIn().click(function() {
$('#searchMsg').fadeOut();
return false;
});
else $('#searchMsg').fadeOut();
return isValid;
}
$('form.search').submit(function() {
return searchValid($('#searchField').val(), true);
}).after('');
position = $('form.search').offset();
$('#searchField').focus(function() {
if ($(this).val() == ' \u041f\u043e\u0438\u0441\u043a') $(this).val('')
}).keyup(function() {
searchValid($('#searchField').val(), false);
});
$(".menu_line a, .menu_line .h2 span.no_link").each(function() {
var td_el = $("table td", $(this));
var src_el = $(this);
$(td_el).click(function() {
var href = $(src_el).attr("href");
if (empty(href)) href = $(src_el).attr("lang");
location.href = href;
});
});
$(".search_panel input").each(function() {
var val = $(this).val();
if (val == "") $(this).val($(this).attr("title"));
$(this).attr("lang", $(this).attr("name"));
}).bind("focus", function() {
var val = $(this).val();
if (!empty(val) && val.toLowerCase() == $(this).attr("title")) $(this).val('');
}).bind("blur", function() {
var val = $(this).val();
if (empty(val) || val == "") $(this).val($(this).attr("title"));
});
$(".search_panel_wide button[type='submit']").bind("click", function() {
var el_feeder = $('.search_panel_wide #model');
if ($(el_feeder).val() == $(el_feeder).attr('title')) {
$(el_feeder).focus();
return false;
}
});
if (typeof(am) != 'undefined' && am)
$('div.photo').each(function() {
var title = $(this).attr("lang");
if (!empty(title)) $(this).attr("title", title);
});
if (location.href) var href_curr = location.href;
if (!empty(href_curr)) {
if (href_curr.indexOf("#accessories") > 0) {} else $("#acsr").hide();
}
$('.acessories a').click(function() {
$("#acsr").show();
});
$('.instant_suggest').each(function() {
var dt = $(this).attr("lang");
if (!empty(dt))
$(this).instant_suggest('hr_gate.php?test=500&r=' + Math.random(), {
disableHighlight: true,
dataType: dt,
sendConnected: true,
minchars: 1,
onSelect: function() {
return false;
}
});
$(this).focus(function() {});
});
$('.suggest').each(function() {
var dt = $(this).attr("lang");
if (!empty(dt))
$(this).suggest('hr_gate.php?test=500&r=' + Math.random(), {
disableHighlight: true,
dataType: dt,
minchars: 1,
onSelect: function() {
$("#qs_sel").val($(this).attr('lang'));
return false;
}
});
$(this).focus(function() {
setTimeout(function() {
$(".ac_results").hide();
}, 500);
});
});
$(".search_panel #price_from, .search_panel #price_to").bind("keyup", function() {
var val = parseFloat($(this).val());
if (isNaN(val)) val = '';
$(this).val(val);
});
$(".search_panel button[type=reset]").bind("click", function() {
$(".search_panel input").each(function() {
$(this).val($(this).attr("title"));
});
return false;
});
$(".set_homepage").bind("click", function() {
var url = location.href;
if (!empty(url)) {
$.setHomepage(url);
}
return false;
});
$('.toolbar-style').change(function(event) {
style = $(this).val();
if (style == 'list') {
$('#centrit .prodBox').addClass('list');
style = 1;
} else {
$('#centrit .prodBox').removeClass('list');
style = 2;
}
JsHttpRequest.query('hr_gate.php?test=500&r=' + Math.random(), {
'sp': "prod_list_style",
'style': style
}, function(result, errors) {}, true);
});
});
jQuery.extend({
setHomepage: function(url) {
if (document.all) {
document.body.style.behavior = 'url(#default#homepage)';
document.body.setHomePage(url);
} else if (window.sidebar) {
if (window.netscape) {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
} catch (e) {
var strTemp = '';
strTemp += "this action was aviod by your browser,";
strTemp += "if you want to enable,please enter about:config in your address line,";
strTemp += "and change the value of signed.applets.codebase_principal_support to true";
alert(strTemp);
}
}
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
prefs.setCharPref('browser.startup.homepage', url);
}
}
});;
$(document).ready(function() {
$(".button").hover(function() {
$(".cc", $(this)).addClass("cc_h");
$(".rr", $(this)).addClass("rr_h");
$(".ll", $(this)).addClass("ll_h");
}, function() {
$(".cc_h", $(this)).removeClass("cc_h");
$(".rr_h", $(this)).removeClass("rr_h");
$(".ll_h", $(this)).removeClass("ll_h");
});
});;
var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right, currentOpts = {};;
(function($) {
var
selectedIndex = 0,
selectedOpts = {},
selectedArray = [],
currentIndex = 0,
currentArray = [],
ajaxLoader = null,
imgPreloader = new Image(),
imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,
swfRegExp = /[^\.]\.(swf)\s*$/i,
loadingTimer, loadingFrame = 1,
titleHeight = 0,
titleStr = '',
start_pos, final_pos, busy = false,
fx = $.extend($('')[0], {
prop: 0
}),
isIE6 = navigator.userAgent.match(/msie [6]/i) && !window.XMLHttpRequest,
_abort = function() {
loading.hide();
imgPreloader.onerror = imgPreloader.onload = null;
if (ajaxLoader) {
ajaxLoader.abort();
}
tmp.empty();
},
_error = function() {
if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) {
loading.hide();
busy = false;
return;
}
selectedOpts.titleShow = false;
selectedOpts.width = 'auto';
selectedOpts.height = 'auto';
tmp.html('The requested content cannot be loaded.
Please try again later.
');
_process_inline();
},
_start = function() {
var obj = selectedArray[selectedIndex],
href, type, title, str, emb, ret;
_abort();
selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));
ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);
if (ret === false) {
busy = false;
return;
} else if (typeof ret == 'object') {
selectedOpts = $.extend(selectedOpts, ret);
}
title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || '';
if (obj.nodeName && !selectedOpts.orig) {
selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj);
}
if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) {
title = selectedOpts.orig.attr('alt');
}
href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null;
if ((/^(?:javascript)/i).test(href) || href == '#') {
href = null;
}
if (selectedOpts.type) {
type = selectedOpts.type;
if (!href) {
href = selectedOpts.content;
}
} else if (selectedOpts.content) {
type = 'html';
} else if (href) {
if (href.match(imgRegExp)) {
type = 'image';
} else if (href.match(swfRegExp)) {
type = 'swf';
} else if ($(obj).hasClass("iframe")) {
type = 'iframe';
} else if (href.indexOf("#") === 0) {
type = 'inline';
} else {
type = 'ajax';
}
}
if (!type) {
_error();
return;
}
if (type == 'inline') {
obj = href.substr(href.indexOf("#"));
type = $(obj).length > 0 ? 'inline' : 'ajax';
}
selectedOpts.type = type;
selectedOpts.href = href;
selectedOpts.title = title;
if (selectedOpts.autoDimensions) {
if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') {
selectedOpts.width = 'auto';
selectedOpts.height = 'auto';
} else {
selectedOpts.autoDimensions = false;
}
}
if (selectedOpts.modal) {
selectedOpts.overlayShow = true;
selectedOpts.hideOnOverlayClick = false;
selectedOpts.hideOnContentClick = false;
selectedOpts.enableEscapeButton = false;
selectedOpts.showCloseButton = false;
}
selectedOpts.padding = parseInt(selectedOpts.padding, 10);
selectedOpts.margin = parseInt(selectedOpts.margin, 10);
tmp.css('padding', (selectedOpts.padding + selectedOpts.margin));
$('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() {
$(this).replaceWith(content.children());
});
switch (type) {
case 'html':
tmp.html(selectedOpts.content);
_process_inline();
break;
case 'inline':
if ($(obj).parent().is('#fancybox-content') === true) {
busy = false;
return;
}
$('').hide().insertBefore($(obj)).bind('fancybox-cleanup', function() {
$(this).replaceWith(content.children());
}).bind('fancybox-cancel', function() {
$(this).replaceWith(tmp.children());
});
$(obj).appendTo(tmp);
_process_inline();
break;
case 'image':
busy = false;
$.fancybox.showActivity();
imgPreloader = new Image();
imgPreloader.onerror = function() {
_error();
};
imgPreloader.onload = function() {
busy = true;
imgPreloader.onerror = imgPreloader.onload = null;
_process_image();
};
imgPreloader.src = href;
break;
case 'swf':
selectedOpts.scrolling = 'no';
str = '';
tmp.html(str);
_process_inline();
break;
case 'ajax':
busy = false;
$.fancybox.showActivity();
selectedOpts.ajax.win = selectedOpts.ajax.success;
ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, {
url: href,
data: selectedOpts.ajax.data || {},
error: function(XMLHttpRequest, textStatus, errorThrown) {
if (XMLHttpRequest.status > 0) {
_error();
}
},
success: function(data, textStatus, XMLHttpRequest) {
var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader;
if (o.status == 200) {
if (typeof selectedOpts.ajax.win == 'function') {
ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest);
if (ret === false) {
loading.hide();
return;
} else if (typeof ret == 'string' || typeof ret == 'object') {
data = ret;
}
}
tmp.html(data);
_process_inline();
}
}
}));
break;
case 'iframe':
_show();
break;
}
},
_process_inline = function() {
var
w = selectedOpts.width,
h = selectedOpts.height;
if (w.toString().indexOf('%') > -1) {
w = parseInt(($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px';
} else {
w = w == 'auto' ? 'auto' : w + 'px';
}
if (h.toString().indexOf('%') > -1) {
h = parseInt(($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px';
} else {
h = h == 'auto' ? 'auto' : h + 'px';
}
tmp.wrapInner('');
selectedOpts.width = tmp.width();
selectedOpts.height = tmp.height();
_show();
},
_process_image = function() {
selectedOpts.width = imgPreloader.width;
selectedOpts.height = imgPreloader.height;
$("
").attr({
'id': 'fancybox-img',
'src': imgPreloader.src,
'alt': selectedOpts.title
}).appendTo(tmp);
_show();
},
_show = function() {
var pos, equal;
loading.hide();
if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
$.event.trigger('fancybox-cancel');
busy = false;
return;
}
busy = true;
$(content.add(overlay)).unbind();
$(window).unbind("resize.fb scroll.fb");
$(document).unbind('keydown.fb');
if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') {
wrap.css('height', wrap.height());
}
currentArray = selectedArray;
currentIndex = selectedIndex;
currentOpts = selectedOpts;
if (currentOpts.overlayShow) {
overlay.css({
'background-color': currentOpts.overlayColor,
'opacity': currentOpts.overlayOpacity,
'cursor': currentOpts.hideOnOverlayClick ? 'pointer' : 'auto',
'height': $(document).height()
});
if (!overlay.is(':visible')) {
if (isIE6) {
$('select:not(#fancybox-tmp select)').filter(function() {
return this.style.visibility !== 'hidden';
}).css({
'visibility': 'hidden'
}).one('fancybox-cleanup', function() {
this.style.visibility = 'inherit';
});
}
overlay.show();
}
} else {
overlay.hide();
}
final_pos = _get_zoom_to();
_process_title();
if (wrap.is(":visible")) {
$(close.add(nav_left).add(nav_right)).hide();
pos = wrap.position(), start_pos = {
top: pos.top,
left: pos.left,
width: wrap.width(),
height: wrap.height()
};
equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height);
content.fadeTo(currentOpts.changeFade, 0.3, function() {
var finish_resizing = function() {
content.html(tmp.contents()).fadeTo(currentOpts.changeFade, 1, _finish);
};
$.event.trigger('fancybox-change');
content.empty().removeAttr('filter').css({
'border-width': currentOpts.padding,
'width': final_pos.width - currentOpts.padding * 2,
'height': selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
});
if (equal) {
finish_resizing();
} else {
fx.prop = 0;
$(fx).animate({
prop: 1
}, {
duration: currentOpts.changeSpeed,
easing: currentOpts.easingChange,
step: _draw,
complete: finish_resizing
});
}
});
return;
}
wrap.removeAttr("style");
content.css('border-width', currentOpts.padding);
if (currentOpts.transitionIn == 'elastic') {
start_pos = _get_zoom_from();
content.html(tmp.contents());
wrap.show();
if (currentOpts.opacity) {
final_pos.opacity = 0;
}
fx.prop = 0;
$(fx).animate({
prop: 1
}, {
duration: currentOpts.speedIn,
easing: currentOpts.easingIn,
step: _draw,
complete: _finish
});
return;
}
if (currentOpts.titlePosition == 'inside' && titleHeight > 0) {
title.show();
}
content.css({
'width': final_pos.width - currentOpts.padding * 2,
'height': selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
}).html(tmp.contents());
wrap.css(final_pos).fadeIn(currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish);
},
_format_title = function(title) {
if (title && title.length) {
if (currentOpts.titlePosition == 'float') {
return '';
}
return '' + title + '
';
}
return false;
},
_process_title = function() {
titleStr = currentOpts.title || '';
titleHeight = 0;
title.empty().removeAttr('style').removeClass();
if (currentOpts.titleShow === false) {
title.hide();
return;
}
titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr);
if (!titleStr || titleStr === '') {
title.hide();
return;
}
title.addClass('fancybox-title-' + currentOpts.titlePosition).html(titleStr).appendTo('body').show();
switch (currentOpts.titlePosition) {
case 'inside':
title.css({
'width': final_pos.width - (currentOpts.padding * 2),
'marginLeft': currentOpts.padding,
'marginRight': currentOpts.padding
});
titleHeight = title.outerHeight(true);
title.appendTo(outer);
final_pos.height += titleHeight;
break;
case 'over':
title.css({
'marginLeft': currentOpts.padding,
'width': final_pos.width - (currentOpts.padding * 2),
'bottom': currentOpts.padding
}).appendTo(outer);
break;
case 'float':
title.css('left', parseInt((title.width() - final_pos.width - 40) / 2, 10) * -1).appendTo(wrap);
break;
default:
title.css({
'width': final_pos.width - (currentOpts.padding * 2),
'paddingLeft': currentOpts.padding,
'paddingRight': currentOpts.padding
}).appendTo(wrap);
break;
}
title.hide();
},
_set_navigation = function() {
if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) {
$(document).bind('keydown.fb', function(e) {
if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
e.preventDefault();
$.fancybox.close();
} else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
e.preventDefault();
$.fancybox[e.keyCode == 37 ? 'prev' : 'next']();
}
});
}
if (!currentOpts.showNavArrows) {
nav_left.hide();
nav_right.hide();
return;
}
if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) {
nav_left.show();
}
if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length - 1)) {
nav_right.show();
}
},
_finish = function() {
if (!$.support.opacity) {
content.get(0).style.removeAttribute('filter');
wrap.get(0).style.removeAttribute('filter');
}
if (selectedOpts.autoDimensions) {
content.css('height', 'auto');
}
wrap.css('height', 'auto');
if (titleStr && titleStr.length) {
title.show();
}
if (currentOpts.showCloseButton) {
close.show();
}
_set_navigation();
if (currentOpts.hideOnContentClick) {
content.bind('click', $.fancybox.close);
}
if (currentOpts.hideOnOverlayClick) {
overlay.bind('click', $.fancybox.close);
}
$(window).bind("resize.fb", $.fancybox.resize);
if (currentOpts.centerOnScroll) {
$(window).bind("scroll.fb", $.fancybox.center);
}
if (currentOpts.type == 'iframe') {
$('').appendTo(content);
}
wrap.show();
busy = false;
$.fancybox.center();
currentOpts.onComplete(currentArray, currentIndex, currentOpts);
_preload_images();
},
_preload_images = function() {
var href, objNext;
if ((currentArray.length - 1) > currentIndex) {
href = currentArray[currentIndex + 1].href;
if (typeof href !== 'undefined' && href.match(imgRegExp)) {
objNext = new Image();
objNext.src = href;
}
}
if (currentIndex > 0) {
href = currentArray[currentIndex - 1].href;
if (typeof href !== 'undefined' && href.match(imgRegExp)) {
objNext = new Image();
objNext.src = href;
}
}
},
_draw = function(pos) {
var dim = {
width: parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10),
height: parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10),
top: parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10),
left: parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10)
};
if (typeof final_pos.opacity !== 'undefined') {
dim.opacity = pos < 0.5 ? 0.5 : pos;
}
wrap.css(dim);
content.css({
'width': dim.width - currentOpts.padding * 2,
'height': dim.height - (titleHeight * pos) - currentOpts.padding * 2
});
},
_get_viewport = function() {
return [$(window).width() - (currentOpts.margin * 2), $(window).height() - (currentOpts.margin * 2), $(document).scrollLeft() + currentOpts.margin, $(document).scrollTop() + currentOpts.margin];
},
_get_zoom_to = function() {
var view = _get_viewport(),
to = {},
resize = currentOpts.autoScale,
double_padding = currentOpts.padding * 2,
ratio;
if (currentOpts.width.toString().indexOf('%') > -1) {
to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10);
} else {
to.width = currentOpts.width + double_padding;
}
if (currentOpts.height.toString().indexOf('%') > -1) {
to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10);
} else {
to.height = currentOpts.height + double_padding;
}
if (resize && (to.width > view[0] || to.height > view[1])) {
if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') {
ratio = (currentOpts.width) / (currentOpts.height);
if ((to.width) > view[0]) {
to.width = view[0];
to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10);
}
if ((to.height) > view[1]) {
to.height = view[1];
to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10);
}
} else {
to.width = Math.min(to.width, view[0]);
to.height = Math.min(to.height, view[1]);
}
}
to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10);
to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10);
return to;
},
_get_obj_pos = function(obj) {
var pos = obj.offset();
pos.top += parseInt(obj.css('paddingTop'), 10) || 0;
pos.left += parseInt(obj.css('paddingLeft'), 10) || 0;
pos.top += parseInt(obj.css('border-top-width'), 10) || 0;
pos.left += parseInt(obj.css('border-left-width'), 10) || 0;
pos.width = obj.width();
pos.height = obj.height();
return pos;
},
_get_zoom_from = function() {
var orig = selectedOpts.orig ? $(selectedOpts.orig) : false,
from = {},
pos, view;
if (orig && orig.length) {
pos = _get_obj_pos(orig);
from = {
width: pos.width + (currentOpts.padding * 2),
height: pos.height + (currentOpts.padding * 2),
top: pos.top - currentOpts.padding - 20,
left: pos.left - currentOpts.padding - 20
};
} else {
view = _get_viewport();
from = {
width: currentOpts.padding * 2,
height: currentOpts.padding * 2,
top: parseInt(view[3] + view[1] * 0.5, 10),
left: parseInt(view[2] + view[0] * 0.5, 10)
};
}
return from;
},
_animate_loading = function() {
if (!loading.is(':visible')) {
clearInterval(loadingTimer);
return;
}
$('div', loading).css('top', (loadingFrame * -40) + 'px');
loadingFrame = (loadingFrame + 1) % 12;
};
$.fn.fancybox = function(options) {
if (!$(this).length) {
return this;
}
$(this).data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {}))).unbind('click.fb').bind('click.fb', function(e) {
e.preventDefault();
if (busy) {
return;
}
busy = true;
$(this).blur();
selectedArray = [];
selectedIndex = 0;
var rel = $(this).attr('rel') || '';
if (!rel || rel == '' || rel === 'nofollow') {
selectedArray.push(this);
} else {
selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]");
selectedIndex = selectedArray.index(this);
}
_start();
return;
});
return this;
};
$.fancybox = function(obj) {
var opts;
if (busy) {
return;
}
busy = true;
opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {};
selectedArray = [];
selectedIndex = parseInt(opts.index, 10) || 0;
if ($.isArray(obj)) {
for (var i = 0, j = obj.length; i < j; i++) {
if (typeof obj[i] == 'object') {
$(obj[i]).data('fancybox', $.extend({}, opts, obj[i]));
} else {
obj[i] = $({}).data('fancybox', $.extend({
content: obj[i]
}, opts));
}
}
selectedArray = jQuery.merge(selectedArray, obj);
} else {
if (typeof obj == 'object') {
$(obj).data('fancybox', $.extend({}, opts, obj));
} else {
obj = $({}).data('fancybox', $.extend({
content: obj
}, opts));
}
selectedArray.push(obj);
}
if (selectedIndex > selectedArray.length || selectedIndex < 0) {
selectedIndex = 0;
}
_start();
};
$.fancybox.showActivity = function() {
clearInterval(loadingTimer);
loading.show();
loadingTimer = setInterval(_animate_loading, 66);
};
$.fancybox.hideActivity = function() {
loading.hide();
};
$.fancybox.next = function() {
return $.fancybox.pos(currentIndex + 1);
};
$.fancybox.prev = function() {
return $.fancybox.pos(currentIndex - 1);
};
$.fancybox.pos = function(pos) {
if (busy) {
return;
}
pos = parseInt(pos);
selectedArray = currentArray;
if (pos > -1 && pos < currentArray.length) {
selectedIndex = pos;
_start();
} else if (currentOpts.cyclic && currentArray.length > 1) {
selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1;
_start();
}
return;
};
$.fancybox.cancel = function() {
if (busy) {
return;
}
busy = true;
$.event.trigger('fancybox-cancel');
_abort();
selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts);
busy = false;
};
$.fancybox.close = function() {
if (busy || wrap.is(':hidden')) {
return;
}
busy = true;
if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
busy = false;
return;
}
_abort();
$(close.add(nav_left).add(nav_right)).hide();
$(content.add(overlay)).unbind();
$(window).unbind("resize.fb scroll.fb");
$(document).unbind('keydown.fb');
content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank');
if (currentOpts.titlePosition !== 'inside') {
title.empty();
}
wrap.stop();
function _cleanup() {
overlay.fadeOut('fast');
title.empty().hide();
wrap.hide();
$.event.trigger('fancybox-cleanup');
content.empty();
currentOpts.onClosed(currentArray, currentIndex, currentOpts);
currentArray = selectedOpts = [];
currentIndex = selectedIndex = 0;
currentOpts = selectedOpts = {};
busy = false;
}
if (currentOpts.transitionOut == 'elastic') {
start_pos = _get_zoom_from();
var pos = wrap.position();
final_pos = {
top: pos.top,
left: pos.left,
width: wrap.width(),
height: wrap.height()
};
if (currentOpts.opacity) {
final_pos.opacity = 1;
}
title.empty().hide();
fx.prop = 1;
$(fx).animate({
prop: 0
}, {
duration: currentOpts.speedOut,
easing: currentOpts.easingOut,
step: _draw,
complete: _cleanup
});
} else {
wrap.fadeOut(currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup);
}
};
$.fancybox.resize = function() {
if (overlay.is(':visible')) {
overlay.css('height', $(document).height());
}
$.fancybox.center(true);
};
$.fancybox.center = function() {
var view, align;
if (busy) {
return;
}
align = arguments[0] === true ? 1 : 0;
view = _get_viewport();
if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) {
return;
}
wrap.stop().animate({
'top': parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)),
'left': parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding))
}, typeof arguments[0] == 'number' ? arguments[0] : 200);
};
$.fancybox.init = function() {
if ($("#fancybox-wrap").length) {
return;
}
tmp = $('');
loading = $('');
overlay = $('');
wrap = $('');
$('body').append(tmp, loading, overlay, wrap);
outer = $('').append('').appendTo(wrap);
outer.append(content = $(''), close = $(''), title = $(''), nav_left = $(''), nav_right = $(''));
close.click($.fancybox.close);
loading.click($.fancybox.cancel);
nav_left.click(function(e) {
e.preventDefault();
$.fancybox.prev();
});
nav_right.click(function(e) {
e.preventDefault();
$.fancybox.next();
});
if ($.fn.mousewheel) {
wrap.bind('mousewheel.fb', function(e, delta) {
if (busy) {
e.preventDefault();
} else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) {
e.preventDefault();
$.fancybox[delta > 0 ? 'prev' : 'next']();
}
});
}
if (!$.support.opacity) {
wrap.addClass('fancybox-ie');
}
if (isIE6) {
loading.addClass('fancybox-ie6');
wrap.addClass('fancybox-ie6');
$('').prependTo(outer);
}
};
$.fn.fancybox.defaults = {
padding: 10,
margin: 40,
opacity: false,
modal: false,
cyclic: false,
scrolling: 'auto',
width: 560,
height: 340,
autoScale: true,
autoDimensions: true,
centerOnScroll: false,
ajax: {},
swf: {
wmode: 'transparent'
},
hideOnOverlayClick: true,
hideOnContentClick: false,
overlayShow: true,
overlayOpacity: 0.7,
overlayColor: '#777',
titleShow: true,
titlePosition: 'float',
titleFormat: null,
titleFromAlt: false,
transitionIn: 'fade',
transitionOut: 'fade',
speedIn: 300,
speedOut: 300,
changeSpeed: 300,
changeFade: 'fast',
easingIn: 'swing',
easingOut: 'swing',
showCloseButton: true,
showNavArrows: true,
enableEscapeButton: true,
enableKeyboardNav: true,
onStart: function() {},
onCancel: function() {},
onComplete: function() {},
onCleanup: function() {},
onClosed: function() {},
onError: function() {}
};
$(document).ready(function() {
$.fancybox.init();
});
})(jQuery);;
eval(function(p, a, c, k, e, r) {
e = function(c) {
return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
};
if (!''.replace(/^/, String)) {
while (c--) r[e(c)] = k[c] || e(c);
k = [function(e) {
return r[e]
}];
e = function() {
return '\\w+'
};
c = 1
};
while (c--)
if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
return p
}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t 1) {
$(container).css('position', 'relative').css('height', settings.containerheight).addClass(settings.runningclass);
for (var i = 0; i < elements.length; i++) {
$(elements[i]).css('z-index', String(elements.length - i)).css('position', 'absolute').hide();
};
if (settings.type == "sequence") {
setTimeout(function() {
$.innerfade.next(elements, settings, 1, 0);
}, settings.timeout);
$(elements[0]).show();
} else if (settings.type == "random") {
var last = Math.floor(Math.random() * (elements.length));
setTimeout(function() {
do {
current = Math.floor(Math.random() * (elements.length));
} while (last == current);
$.innerfade.next(elements, settings, current, last);
}, settings.timeout);
$(elements[last]).show();
} else if (settings.type == 'random_start') {
settings.type = 'sequence';
var current = Math.floor(Math.random() * (elements.length));
setTimeout(function() {
$.innerfade.next(elements, settings, (current + 1) % elements.length, current);
}, settings.timeout);
$(elements[current]).show();
} else {
alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');
}
}
};
$.innerfade.next = function(elements, settings, current, last) {
if (settings.animationtype == 'slide') {
$(elements[last]).slideUp(settings.speed);
$(elements[current]).slideDown(settings.speed);
} else if (settings.animationtype == 'fade') {
$(elements[last]).fadeOut(settings.speed);
$(elements[current]).fadeIn(settings.speed, function() {
removeFilter($(this)[0]);
});
} else
alert('Innerfade-animationtype must either be \'slide\' or \'fade\'');
if (settings.type == "sequence") {
if ((current + 1) < elements.length) {
current = current + 1;
last = current - 1;
} else {
current = 0;
last = elements.length - 1;
}
} else if (settings.type == "random") {
last = current;
while (current == last)
current = Math.floor(Math.random() * elements.length);
} else
alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');
setTimeout((function() {
$.innerfade.next(elements, settings, current, last);
}), settings.timeout);
};
})(jQuery);
function removeFilter(element) {
if (element.style.removeAttribute) {
element.style.removeAttribute('filter');
}
};
jQuery.fn.extend({
everyTime: function(interval, label, fn, times, belay) {
return this.each(function() {
jQuery.timer.add(this, interval, label, fn, times, belay);
});
},
oneTime: function(interval, label, fn) {
return this.each(function() {
jQuery.timer.add(this, interval, label, fn, 1);
});
},
stopTime: function(label, fn) {
return this.each(function() {
jQuery.timer.remove(this, label, fn);
});
}
});
jQuery.extend({
timer: {
guid: 1,
global: {},
regex: /^([0-9]+)\s*(.*s)?$/,
powers: {
'ms': 1,
'cs': 10,
'ds': 100,
's': 1000,
'das': 10000,
'hs': 100000,
'ks': 1000000
},
timeParse: function(value) {
if (value == undefined || value == null)
return null;
var result = this.regex.exec(jQuery.trim(value.toString()));
if (result[2]) {
var num = parseInt(result[1], 10);
var mult = this.powers[result[2]] || 1;
return num * mult;
} else {
return value;
}
},
add: function(element, interval, label, fn, times, belay) {
var counter = 0;
if (jQuery.isFunction(label)) {
if (!times)
times = fn;
fn = label;
label = interval;
}
interval = jQuery.timer.timeParse(interval);
if (typeof interval != 'number' || isNaN(interval) || interval <= 0)
return;
if (times && times.constructor != Number) {
belay = !!times;
times = 0;
}
times = times || 0;
belay = belay || false;
if (!element.$timers)
element.$timers = {};
if (!element.$timers[label])
element.$timers[label] = {};
fn.$timerID = fn.$timerID || this.guid++;
var handler = function() {
if (belay && this.inProgress)
return;
this.inProgress = true;
if ((++counter > times && times !== 0) || fn.call(element, counter) === false)
jQuery.timer.remove(element, label, fn);
this.inProgress = false;
};
handler.$timerID = fn.$timerID;
if (!element.$timers[label][fn.$timerID])
element.$timers[label][fn.$timerID] = window.setInterval(handler, interval);
if (!this.global[label])
this.global[label] = [];
this.global[label].push(element);
},
remove: function(element, label, fn) {
var timers = element.$timers,
ret;
if (timers) {
if (!label) {
for (label in timers)
this.remove(element, label, fn);
} else if (timers[label]) {
if (fn) {
if (fn.$timerID) {
window.clearInterval(timers[label][fn.$timerID]);
delete timers[label][fn.$timerID];
}
} else {
for (var fn in timers[label]) {
window.clearInterval(timers[label][fn]);
delete timers[label][fn];
}
}
for (ret in timers[label]) break;
if (!ret) {
ret = null;
delete timers[label];
}
}
for (ret in timers) break;
if (!ret)
element.$timers = null;
}
}
}
});;
$(document).ready(function() {
$("#search_str_").keyup(function() {
var qstr = $(this).val();
if (qstr.length > 1) {
$.ajax({
type: "POST",
url: "/ajax/quick_search.php",
data: "qstr=" + qstr,
success: function(html) {
$("#out_qsearch").html(html);
$("#out_qsearch").show();
}
});
} else {
$("#out_qsearch").html("");
}
});
$("#sform").mouseenter(function() {
$("#out_qsearch").show();
});
$("#sform").mouseleave(function() {
$("#out_qsearch").hide();
});
});;
function JsHttpRequest() {
var t = this;
t.onreadystatechange = null;
t.readyState = 0;
t.responseText = null;
t.responseXML = null;
t.status = 200;
t.statusText = "OK";
t.responseJS = null;
t.caching = false;
t.loader = null;
t.session_name = "PHPSESSID";
t._ldObj = null;
t._reqHeaders = [];
t._openArgs = null;
t._errors = {
inv_form_el: "Invalid FORM element detected: name=%, tag=%",
must_be_single_el: "If used,