/* =================================================== * bootstrap-transition.js v2.0.2 * http://twitter.github.com/bootstrap/javascript.html#transitions * =================================================== * Copyright 2012 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ========================================================== */ !function(a) { a(function() { "use strict", a.support.transition = function() { var b = document.body || document.documentElement, c = b.style, d = c.transition !== undefined || c.WebkitTransition !== undefined || c.MozTransition !== undefined || c.MsTransition !== undefined || c.OTransition !== undefined; return d && { end: function() { var b = "TransitionEnd"; return a.browser.webkit ? b = "webkitTransitionEnd" : a.browser.mozilla ? b = "transitionend" : a.browser.opera && (b = "oTransitionEnd"), b; }() }; }(); }); }(window.jQuery), !function(a) { function c() { var b = this, c = setTimeout(function() { b.$element.off(a.support.transition.end), d.call(b); }, 500); this.$element.one(a.support.transition.end, function() { clearTimeout(c), d.call(b); }); } function d(a) { this.$element.hide().trigger("hidden"), e.call(this); } function e(b) { var c = this, d = this.$element.hasClass("fade") ? "fade" : ""; if (this.isShown && this.options.backdrop) { var e = a.support.transition && d; this.$backdrop = a('
').appendTo(document.body), this.options.backdrop != "static" && this.$backdrop.click(a.proxy(this.hide, this)), e && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), e ? this.$backdrop.one(a.support.transition.end, b) : b(); } else !this.isShown && this.$backdrop ? (this.$backdrop.removeClass("in"), a.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one(a.support.transition.end, a.proxy(f, this)) : f.call(this)) : b && b(); } function f() { this.$backdrop.remove(), this.$backdrop = null; } function g() { var b = this; this.isShown && this.options.keyboard ? a(document).on("keyup.dismiss.modal", function(a) { a.which == 27 && b.hide(); }) : this.isShown || a(document).off("keyup.dismiss.modal"); } "use strict"; var b = function(b, c) { this.options = c, this.$element = a(b).delegate('[data-dismiss="modal"]', "click.dismiss.modal", a.proxy(this.hide, this)); }; b.prototype = { constructor: b, toggle: function() { return this[this.isShown ? "hide" : "show"](); }, show: function() { var b = this; if (this.isShown) return; a("body").addClass("modal-open"), this.isShown = !0, this.$element.trigger("show"), g.call(this), e.call(this, function() { var c = a.support.transition && b.$element.hasClass("fade"); !b.$element.parent().length && b.$element.appendTo(document.body), b.$element.show(), c && b.$element[0].offsetWidth, b.$element.addClass("in"), c ? b.$element.one(a.support.transition.end, function() { b.$element.trigger("shown"); }) : b.$element.trigger("shown"); }); }, hide: function(b) { b && b.preventDefault(); if (!this.isShown) return; var e = this; this.isShown = !1, a("body").removeClass("modal-open"), g.call(this), this.$element.trigger("hide").removeClass("in"), a.support.transition && this.$element.hasClass("fade") ? c.call(this) : d.call(this); } }, a.fn.modal = function(c) { return this.each(function() { var d = a(this), e = d.data("modal"), f = a.extend({}, a.fn.modal.defaults, d.data(), typeof c == "object" && c); e || d.data("modal", e = new b(this, f)), typeof c == "string" ? e[c]() : f.show && e.show(); }); }, a.fn.modal.defaults = { backdrop: !0, keyboard: !0, show: !0 }, a.fn.modal.Constructor = b, a(function() { a("body").on("click.modal.data-api", '[data-toggle="modal"]', function(b) { var c = a(this), d, e = a(c.attr("data-target") || (d = c.attr("href")) && d.replace(/.*(?=#[^\s]+$)/, "")), f = e.data("modal") ? "toggle" : a.extend({}, e.data(), c.data()); b.preventDefault(), e.modal(f); }); }); }(window.jQuery), !function(a) { "use strict"; var b = function(a, b) { this.init("tooltip", a, b); }; b.prototype = { constructor: b, init: function(b, c, d) { var e, f; this.type = b, this.$element = a(c), this.options = this.getOptions(d), this.enabled = !0, this.options.trigger != "manual" && (e = this.options.trigger == "hover" ? "mouseenter" : "focus", f = this.options.trigger == "hover" ? "mouseleave" : "blur", this.$element.on(e, this.options.selector, a.proxy(this.enter, this)), this.$element.on(f, this.options.selector, a.proxy(this.leave, this))), this.options.selector ? this._options = a.extend({}, this.options, { trigger: "manual", selector: "" }) : this.fixTitle(); }, getOptions: function(b) { return b = a.extend({}, a.fn[this.type].defaults, b, this.$element.data()), b.delay && typeof b.delay == "number" && (b.delay = { show: b.delay, hide: b.delay }), b; }, enter: function(b) { var c = a(b.currentTarget)[this.type](this._options).data(this.type); !c.options.delay || !c.options.delay.show ? c.show() : (c.hoverState = "in", setTimeout(function() { c.hoverState == "in" && c.show(); }, c.options.delay.show)); }, leave: function(b) { var c = a(b.currentTarget)[this.type](this._options).data(this.type); !c.options.delay || !c.options.delay.hide ? c.hide() : (c.hoverState = "out", setTimeout(function() { c.hoverState == "out" && c.hide(); }, c.options.delay.hide)); }, show: function() { var a, b, c, d, e, f, g; if (this.hasContent() && this.enabled) { a = this.tip(), this.setContent(), this.options.animation && a.addClass("fade"), f = typeof this.options.placement == "function" ? this.options.placement.call(this, a[0], this.$element[0]) : this.options.placement, b = /in/.test(f), a.remove().css({ top: 0, left: 0, display: "block" }).appendTo(b ? this.$element : document.body), c = this.getPosition(b), d = a[0].offsetWidth, e = a[0].offsetHeight; switch (b ? f.split(" ")[1] : f) { case "bottom": g = { top: c.top + c.height, left: c.left + c.width / 2 - d / 2 }; break; case "top": g = { top: c.top - e, left: c.left + c.width / 2 - d / 2 }; break; case "left": g = { top: c.top + c.height / 2 - e / 2, left: c.left - d }; break; case "right": g = { top: c.top + c.height / 2 - e / 2, left: c.left + c.width }; } a.css(g).addClass(f).addClass("in"); } }, setContent: function() { var a = this.tip(); a.find(".tooltip-inner").html(this.getTitle()), a.removeClass("fade in top bottom left right"); }, hide: function() { function d() { var b = setTimeout(function() { c.off(a.support.transition.end).remove(); }, 500); c.one(a.support.transition.end, function() { clearTimeout(b), c.remove(); }); } var b = this, c = this.tip(); c.removeClass("in"), a.support.transition && this.$tip.hasClass("fade") ? d() : c.remove(); }, fixTitle: function() { var a = this.$element; (a.attr("title") || typeof a.attr("data-original-title") != "string") && a.attr("data-original-title", a.attr("title") || "").removeAttr("title"); }, hasContent: function() { return this.getTitle(); }, getPosition: function(b) { return a.extend({}, b ? { top: 0, left: 0 } : this.$element.offset(), { width: this.$element[0].offsetWidth, height: this.$element[0].offsetHeight }); }, getTitle: function() { var a, b = this.$element, c = this.options; return a = b.attr("data-original-title") || (typeof c.title == "function" ? c.title.call(b[0]) : c.title), a = (a || "").toString().replace(/(^\s*|\s*$)/, ""), a; }, tip: function() { return this.$tip = this.$tip || a(this.options.template); }, validate: function() { this.$element[0].parentNode || (this.hide(), this.$element = null, this.options = null); }, enable: function() { this.enabled = !0; }, disable: function() { this.enabled = !1; }, toggleEnabled: function() { this.enabled = !this.enabled; }, toggle: function() { this[this.tip().hasClass("in") ? "hide" : "show"](); } }, a.fn.tooltip = function(c) { return this.each(function() { var d = a(this), e = d.data("tooltip"), f = typeof c == "object" && c; e || d.data("tooltip", e = new b(this, f)), typeof c == "string" && e[c](); }); }, a.fn.tooltip.Constructor = b, a.fn.tooltip.defaults = { animation: !0, delay: 0, selector: !1, placement: "top", trigger: "hover", title: "", template: '