(function (l, ga) {
    function hb(a) {
        l.extend(true, Oa, a)
    }
    function Db(a, b, f) {
        function e(q) {
            if (I) {
                s();
                r();
                ja();
                N(q)
            } else g()
        }
        function g() {
            P = b.theme ? "ui" : "fc";
            a.addClass("fc");
            b.isRTL && a.addClass("fc-rtl");
            b.theme && a.addClass("ui-widget");
            I = l("<div class='fc-content " + P + "-widget-content' style='position:relative'/>").prependTo(a);
            L = new Eb(Y, b);
            (D = L.render()) && a.prepend(D);
            z(b.defaultView);
            l(window).resize(ha);
            t() || h()
        }
        function h() {
            setTimeout(function () {
                !v.start && t() && N()
            }, 0)
        }
        function m() {
            l(window).unbind("resize", ha);
            L.destroy();
            I.remove();
            a.removeClass("fc fc-rtl fc-ui-widget")
        }
        function o() {
            return Q.offsetWidth !== 0
        }
        function t() {
            return l("body")[0].offsetWidth !== 0
        }
        function z(q) {
            if (!v || q != v.name) {
                p++;
                A();
                var B = v,
                    J;
                if (B) {
                    (B.beforeHide || ib)();
                    Ra(I, I.height());
                    B.element.hide()
                } else Ra(I, 1);
                I.css("overflow", "hidden");
                if (v = j[q]) v.element.show();
                else v = j[q] = new Fa[q](J = k = l("<div class='fc-view fc-view-" + q + "' style='position:absolute'/>").appendTo(I), Y);
                B && L.deactivateButton(B.name);
                L.activateButton(q);
                N();
                I.css("overflow", "");
                B && Ra(I, 1);
                J || (v.afterShow || ib)();
                p--
            }
        }
        function N(q) {
            if (o()) {
                p++;
                A();
                E === ga && s();
                var B = false;
                if (!v.start || q || u < v.start || u >= v.end) {
                    v.render(u, q || 0);
                    Z(true);
                    B = true
                } else if (v.sizeDirty) {
                    v.clearEvents();
                    Z();
                    B = true
                } else if (v.eventsDirty) {
                    v.clearEvents();
                    B = true
                }
                v.sizeDirty = false;
                v.eventsDirty = false;
                da(B);
                i = a.outerWidth();
                L.updateTitle(v.title);
                q = new Date;
                q >= v.start && q < v.end ? L.disableButton("today") : L.enableButton("today");
                p--;
                v.trigger("viewDisplay", Q)
            }
        }
        function O() {
            r();
            if (o()) {
                s();
                Z();
                A();
                v.clearEvents();
                v.renderEvents(V);
                v.sizeDirty = false
            }
        }
        function r() {
            l.each(j, function (q, B) {
                B.sizeDirty = true
            })
        }
        function s() {
            E = b.contentHeight ? b.contentHeight : b.height ? b.height - (D ? D.height() : 0) - Sa(I[0]) : Math.round(I.width() / Math.max(b.aspectRatio, 0.5))
        }
        function Z(q) {
            p++;
            v.setHeight(E, q);
            if (k) {
                k.css("position", "relative");
                k = null
            }
            v.setWidth(I.width(), q);
            p--
        }
        function ha() {
            if (!p) if (v.start) {
                var q = ++c;
                setTimeout(function () {
                    if (q == c && !p && o()) if (i != (i = a.outerWidth())) {
                        p++;
                        O();
                        v.trigger("windowResize", Q);
                        p--
                    }
                }, 200)
            } else h()
        }

        function da(q) {
            if (!b.lazyFetching || w(v.visStart, v.visEnd)) X();
            else q && aa()
        }
        function X() {
            K(v.visStart, v.visEnd)
        }
        function la(q) {
            V = q;
            aa()
        }
        function oa(q) {
            aa(q)
        }
        function aa(q) {
            ja();
            if (o()) {
                v.clearEvents();
                v.renderEvents(V, q);
                v.eventsDirty = false
            }
        }
        function ja() {
            l.each(j, function (q, B) {
                B.eventsDirty = true
            })
        }
        function ca(q, B, J) {
            v.select(q, B, J === ga ? true : J)
        }
        function A() {
            v && v.unselect()
        }
        function ia() {
            N(-1)
        }
        function x() {
            N(1)
        }
        function d() {
            Ta(u, -1);
            N()
        }
        function F() {
            Ta(u, 1);
            N()
        }
        function H() {
            u = new Date;
            N()
        }
        function R(q, B, J) {
            if (q instanceof Date) u = C(q);
            else jb(u, q, B, J);
            N()
        }
        function ma(q, B, J) {
            q !== ga && Ta(u, q);
            B !== ga && Ua(u, B);
            J !== ga && T(u, J);
            N()
        }
        function ka() {
            return C(u)
        }
        function G() {
            return v
        }
        function U(q, B) {
            if (B === ga) return b[q];
            if (q == "height" || q == "contentHeight" || q == "aspectRatio") {
                b[q] = B;
                O()
            }
        }
        function va(q, B) {
            if (b[q]) return b[q].apply(B || Q, Array.prototype.slice.call(arguments, 2))
        }
        var Y = this;
        Y.options = b;
        Y.render = e;
        Y.destroy = m;
        Y.refetchEvents = X;
        Y.reportEvents = la;
        Y.reportEventChange = oa;
        Y.changeView = z;
        Y.select = ca;
        Y.unselect = A;
        Y.prev = ia;
        Y.next = x;
        Y.prevYear = d;
        Y.nextYear = F;
        Y.today = H;
        Y.gotoDate = R;
        Y.incrementDate = ma;
        Y.formatDate = function (q, B) {
            return Ha(q, B, b)
        };
        Y.formatDates = function (q, B, J) {
            return Va(q, B, J, b)
        };
        Y.getDate = ka;
        Y.getView = G;
        Y.option = U;
        Y.trigger = va;
        Fb.call(Y, b, f);
        var w = Y.isFetchNeeded,
            K = Y.fetchEvents,
            Q = a[0],
            L, D, I, P, v, j = {},
            i, E, k, c = 0,
            p = 0,
            u = new Date,
            V = [],
            $;
        jb(u, b.year, b.month, b.date);
        b.droppable && l(document).bind("dragstart", function (q, B) {
            var J = q.target,
                fa = l(J);
            if (!fa.parents(".fc").length) {
                var na = b.dropAccept;
                if (l.isFunction(na) ? na.call(J, fa) : fa.is(na)) {
                    $ = J;
                    v.dragStart($, q, B)
                }
            }
        }).bind("dragstop", function (q, B) {
            if ($) {
                v.dragStop($, q, B);
                $ = null
            }
        })
    }
    function Eb(a, b) {
        function f() {
            r = b.theme ? "ui" : "fc";
            var s = b.header;
            if (s) return O = l("<table class='fc-header'/>").append(l("<tr/>").append(l("<td class='fc-header-left'/>").append(g(s.left))).append(l("<td class='fc-header-center'/>").append(g(s.center))).append(l("<td class='fc-header-right'/>").append(g(s.right))))
        }
        function e() {
            O.remove()
        }
        function g(s) {
            if (s) {
                var Z = l("<tr/>");
                l.each(s.split(" "), function (ha) {
                    ha > 0 && Z.append("<td><span class='fc-header-space'/></td>");
                    var da;
                    l.each(this.split(","), function (X, la) {
                        if (la == "title") {
                            Z.append("<td><h2 class='fc-header-title'>&nbsp;</h2></td>");
                            da && da.addClass(r + "-corner-right");
                            da = null
                        } else {
                            var oa;
                            if (a[la]) oa = a[la];
                            else if (Fa[la]) oa = function () {
                                aa.removeClass(r + "-state-hover");
                                a.changeView(la)
                            };
                            if (oa) {
                                da && da.addClass(r + "-no-right");
                                var aa;
                                X = b.theme ? Wa(b.buttonIcons, la) : null;
                                var ja = Wa(b.buttonText, la);
                                if (X) aa = l("<div class='fc-button-" + la + " ui-state-default'><a><span class='ui-icon ui-icon-" + X + "'/></a></div>");
                                else if (ja) aa = l("<div class='fc-button-" + la + " " + r + "-state-default'><a><span>" + ja + "</span></a></div>");
                                if (aa) {
                                    aa.click(function () {
                                        aa.hasClass(r + "-state-disabled") || oa()
                                    }).mousedown(function () {
                                        aa.not("." + r + "-state-active").not("." + r + "-state-disabled").addClass(r + "-state-down")
                                    }).mouseup(function () {
                                        aa.removeClass(r + "-state-down")
                                    }).hover(function () {
                                        aa.not("." + r + "-state-active").not("." + r + "-state-disabled").addClass(r + "-state-hover")
                                    }, function () {
                                        aa.removeClass(r + "-state-hover").removeClass(r + "-state-down")
                                    }).appendTo(l("<td/>").appendTo(Z));
                                    da ? da.addClass(r + "-no-right") : aa.addClass(r + "-corner-left");
                                    da = aa
                                }
                            }
                        }
                    });
                    da && da.addClass(r + "-corner-right")
                });
                return l("<table/>").append(Z)
            }
        }
        function h(s) {
            O.find("h2.fc-header-title").html(s)
        }
        function m(s) {
            O.find("div.fc-button-" + s).addClass(r + "-state-active")
        }
        function o(s) {
            O.find("div.fc-button-" + s).removeClass(r + "-state-active")
        }
        function t(s) {
            O.find("div.fc-button-" + s).addClass(r + "-state-disabled")
        }
        function z(s) {
            O.find("div.fc-button-" + s).removeClass(r + "-state-disabled")
        }
        var N = this;
        N.render = f;
        N.destroy = e;
        N.updateTitle = h;
        N.activateButton = m;
        N.deactivateButton = o;
        N.disableButton = t;
        N.enableButton = z;
        var O = l([]),
            r
    }
    function Fb(a, b) {
        function f(d, F) {
            return !oa || d < oa || F > aa
        }
        function e(d, F) {
            oa = d;
            aa = F;
            x = [];
            d = ++ja;
            ca = F = b.length;
            for (var H = 0; H < F; H++) g(b[H], d)
        }
        function g(d, F) {
            h(d, function (H) {
                if (F == ja) {
                    for (var R = 0; R < H.length; R++) {
                        Z(H[R]);
                        H[R].source = d
                    }
                    x = x.concat(H);
                    ca--;
                    ca || la(x)
                }
            })
        }
        function h(d, F) {
            if (typeof d == "string") {
                var H = {};
                H[a.startParam] = Math.round(oa.getTime() / 1E3);
                H[a.endParam] = Math.round(aa.getTime() / 1E3);
                if (a.cacheParam) H[a.cacheParam] = (new Date).getTime();
                r();
                l.ajax({
                    url: d,
                    dataType: "json",
                    data: H,
                    cache: a.cacheParam || false,
                    success: function (R) {
                        s();
                        F(R)
                    }
                })
            } else if (l.isFunction(d)) {
                r();
                d(C(oa), C(aa), function (R) {
                    s();
                    F(R)
                })
            } else F(d)
        }
        function m(d) {
            b.push(d);
            ca++;
            g(d, ja)
        }
        function o(d) {
            b = l.grep(b, function (F) {
                return F != d
            });
            x = l.grep(x, function (F) {
                return F.source != d
            });
            la(x)
        }
        function t(d) {
            var F, H = x.length,
                R, ma = X().defaultEventEnd,
                ka = d.start - d._start,
                G = d.end ? d.end - (d._end || ma(d)) : 0;
            for (F = 0; F < H; F++) {
                R = x[F];
                if (R._id == d._id && R != d) {
                    R.start = new Date(+R.start + ka);
                    R.end = d.end ? R.end ? new Date(+R.end + G) : new Date(+ma(R) + G) : null;
                    R.title = d.title;
                    R.url = d.url;
                    R.allDay = d.allDay;
                    R.className = d.className;
                    R.editable = d.editable;
                    Z(R)
                }
            }
            Z(d);
            la(x)
        }
        function z(d, F) {
            Z(d);
            if (!d.source) {
                if (F) {
                    ia.push(d);
                    d.source = ia
                }
                x.push(d)
            }
            la(x)
        }
        function N(d) {
            if (d) {
                if (!l.isFunction(d)) {
                    var F = d + "";
                    d = function (R) {
                        return R._id == F
                    }
                }
                x = l.grep(x, d, true);
                for (H = 0; H < b.length; H++) if (typeof b[H] == "object") b[H] = l.grep(b[H], d, true)
            } else {
                x = [];
                for (var H = 0; H < b.length; H++) if (typeof b[H] == "object") b[H] = []
            }
            la(x)
        }
        function O(d) {
            if (l.isFunction(d)) return l.grep(x, d);
            else if (d) {
                d += "";
                return l.grep(x, function (F) {
                    return F._id == d
                })
            }
            return x
        }
        function r() {
            A++ || da("loading", null, true)
        }
        function s() {
            --A || da("loading", null, false)
        }
        function Z(d) {
            d._id = d._id || (d.id === ga ? "_fc" + Gb++ : d.id + "");
            if (d.date) {
                if (!d.start) d.start = d.date;
                delete d.date
            }
            d._start = C(d.start = Xa(d.start, a.ignoreTimezone));
            d.end = Xa(d.end, a.ignoreTimezone);
            if (d.end && d.end <= d.start) d.end = null;
            d._end = d.end ? C(d.end) : null;
            if (d.allDay === ga) d.allDay = a.allDayDefault;
            if (d.className) {
                if (typeof d.className == "string") d.className = d.className.split(/\s+/)
            } else d.className = []
        }
        var ha = this;
        ha.isFetchNeeded = f;
        ha.fetchEvents = e;
        ha.addEventSource = m;
        ha.removeEventSource = o;
        ha.updateEvent = t;
        ha.renderEvent = z;
        ha.removeEvents = N;
        ha.clientEvents = O;
        ha.normalizeEvent = Z;
        var da = ha.trigger,
            X = ha.getView,
            la = ha.reportEvents,
            oa, aa, ja = 0,
            ca = 0,
            A = 0,
            ia = [],
            x = [];
        b.push(ia)
    }
    function Hb(a, b) {
        function f(o, t) {
            if (t) {
                Ua(o, t);
                o.setDate(1)
            }
            o = C(o, true);
            o.setDate(1);
            t = Ua(C(o), 1);
            var z = C(o),
                N = C(t),
                O = g("firstDay"),
                r = g("weekends") ? 0 : 1;
            if (r) {
                ta(z);
                ta(N, -1, true)
            }
            T(z, -((z.getDay() - Math.max(O, r) + 7) % 7));
            T(N, (7 - N.getDay() + Math.max(O, r)) % 7);
            O = Math.round((N - z) / (kb * 7));
            if (g("weekMode") == "fixed") {
                T(N, (6 - O) * 7);
                O = 6
            }
            e.title = m(o, g("titleFormat"));
            e.start = o;
            e.end = t;
            e.visStart = z;
            e.visEnd = N;
            h(O, r ? 5 : 7, true)
        }
        var e = this;
        e.render = f;
        Ya.call(e, a, b, "month");
        var g = e.opt,
            h = e.renderBasic,
            m = b.formatDate
    }
    function Ib(a, b) {
        function f(o, t) {
            t && T(o, t * 7);
            o = T(C(o), -((o.getDay() - g("firstDay") + 7) % 7));
            t = T(C(o), 7);
            var z = C(o),
                N = C(t),
                O = g("weekends");
            if (!O) {
                ta(z);
                ta(N, -1, true)
            }
            e.title = m(z, T(C(N), -1), g("titleFormat"));
            e.start = o;
            e.end = t;
            e.visStart = z;
            e.visEnd = N;
            h(1, O ? 7 : 5, false)
        }
        var e = this;
        e.render = f;
        Ya.call(e, a, b, "basicWeek");
        var g = e.opt,
            h = e.renderBasic,
            m = b.formatDates
    }
    function Jb(a, b) {
        function f(o, t) {
            if (t) {
                T(o, t);
                g("weekends") || ta(o, t < 0 ? -1 : 1)
            }
            e.title = m(o, g("titleFormat"));
            e.start = e.visStart = C(o, true);
            e.end = e.visEnd = T(C(e.start), 1);
            h(1, 1, false)
        }
        var e = this;
        e.render = f;
        Ya.call(e, a, b, "basicDay");
        var g = e.opt,
            h = e.renderBasic,
            m = b.formatDate
    }
    function Ya(a, b, f) {
        function e(k, c, p) {
            w = k;
            K = c;
            if (ka = ia("isRTL")) {
                G = -1;
                U = K - 1
            } else {
                G = 1;
                U = 0
            }
            va = ia("firstDay");
            Y = ia("weekends") ? 0 : 1;
            var u = ia("theme") ? "ui" : "fc",
                V = ia("columnFormat"),
                $ = A.start.getMonth(),
                q = Ga(new Date),
                B, J = C(A.visStart);
            if (P) {
                d();
                c = P.find("tr").length;
                if (w < c) P.find("tr:gt(" + (w - 1) + ")").remove();
                else if (w > c) {
                    k = "";
                    for (c = c; c < w; c++) {
                        k += "<tr class='fc-week" + c + "'>";
                        for (B = 0; B < K; B++) {
                            k += "<td class='fc-" + Ca[J.getDay()] + " " + u + "-state-default fc-new fc-day" + (c * K + B) + (B == U ? " fc-leftmost" : "") + "'>" + (p ? "<div class='fc-day-number'></div>" : "") + "<div class='fc-day-content'><div style='position:relative'>&nbsp;</div></div></td>";
                            T(J, 1);
                            Y && ta(J)
                        }
                        k += "</tr>"
                    }
                    P.append(k)
                }
                m(P.find("td.fc-new").removeClass("fc-new"));
                J = C(A.visStart);
                P.find("td").each(function () {
                    var na = l(this);
                    if (w > 1) J.getMonth() == $ ? na.removeClass("fc-other-month") : na.addClass("fc-other-month"); + J == +q ? na.removeClass("fc-not-today").addClass("fc-today").addClass(u + "-state-highlight") : na.addClass("fc-not-today").removeClass("fc-today").removeClass(u + "-state-highlight");
                    na.find("div.fc-day-number").text(J.getDate());
                    T(J, 1);
                    Y && ta(J)
                });
                if (w == 1) {
                    J = C(A.visStart);
                    I.find("th").each(function (na, W) {
                        l(W).text(ma(J, V));
                        W.className = W.className.replace(/^fc-\w+(?= )/, "fc-" + Ca[J.getDay()]);
                        T(J, 1);
                        Y && ta(J)
                    });
                    J = C(A.visStart);
                    P.find("td").each(function (na, W) {
                        W.className = W.className.replace(/^fc-\w+(?= )/, "fc-" + Ca[J.getDay()]);
                        T(J, 1);
                        Y && ta(J)
                    })
                }
            } else {
                var fa = l("<table/>").appendTo(a);
                k = "<thead><tr>";
                for (c = 0; c < K; c++) {
                    k += "<th class='fc-" + Ca[J.getDay()] + " " + u + "-state-default" + (c == U ? " fc-leftmost" : "") + "'>" + ma(J, V) + "</th>";
                    T(J, 1);
                    Y && ta(J)
                }
                I = l(k + "</tr></thead>").appendTo(fa);
                k = "<tbody>";
                J = C(A.visStart);
                for (c = 0; c < w; c++) {
                    k += "<tr class='fc-week" + c + "'>";
                    for (B = 0; B < K; B++) {
                        k += "<td class='fc-" + Ca[J.getDay()] + " " + u + "-state-default fc-day" + (c * K + B) + (B == U ? " fc-leftmost" : "") + (w > 1 && J.getMonth() != $ ? " fc-other-month" : "") + (+J == +q ? " fc-today " + u + "-state-highlight" : " fc-not-today") + "'>" + (p ? "<div class='fc-day-number'>" + J.getDate() + "</div>" : "") + "<div class='fc-day-content'><div style='position:relative'>&nbsp;</div></div></td>";
                        T(J, 1);
                        Y && ta(J)
                    }
                    k += "</tr>"
                }
                P = l(k + "</tbody>").appendTo(fa);
                m(P.find("td"));
                v = l("<div style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(a)
            }
        }
        function g(k) {
            D = k;
            k = P.find("tr td:first-child");
            var c = D - I.height(),
                p;
            if (ia("weekMode") == "variable") p = c = Math.floor(c / (w == 1 ? 2 : 6));
            else {
                p = Math.floor(c / w);
                c = c - p * (w - 1)
            }
            if (Za === ga) {
                var u = P.find("tr:first").find("td:first");
                u.height(p);
                Za = p != u.height()
            }
            if (Za) {
                k.slice(0, -1).height(p);
                k.slice(-1).height(c)
            } else {
                Pa(k.slice(0, -1), p);
                Pa(k.slice(-1), c)
            }
        }
        function h(k) {
            L = k;
            E.clear();
            Q = Math.floor(L / K);
            Ia(I.find("th").slice(0, -1), Q)
        }
        function m(k) {
            k.click(o).mousedown(R)
        }
        function o(k) {
            if (!ia("selectable")) {
                var c = parseInt(this.className.match(/fc\-day(\d+)/)[1]);
                c = T(C(A.visStart), Math.floor(c / K) * 7 + c % K);
                x("dayClick", this, c, true, k)
            }
        }
        function t(k, c, p) {
            p && j.build();
            p = C(A.visStart);
            for (var u = T(C(p), K), V = 0; V < w; V++) {
                var $ = new Date(Math.max(p, k)),
                    q = new Date(Math.min(u, c));
                if ($ < q) {
                    var B;
                    if (ka) {
                        B = za(q, p) * G + U + 1;
                        $ = za($, p) * G + U + 1
                    } else {
                        B = za($, p);
                        $ = za(q, p)
                    }
                    m(z(V, B, V, $ - 1))
                }
                T(p, 7);
                T(u, 7)
            }
        }
        function z(k, c, p, u) {
            k = j.rect(k, c, p, u, a);
            return F(k, a)
        }
        function N(k) {
            return C(k)
        }
        function O(k, c) {
            t(k, T(C(c), 1), true)
        }
        function r() {
            H()
        }
        function s(k, c) {
            i.start(function (p) {
                H();
                p && z(p.row, p.col, p.row, p.col)
            }, c)
        }
        function Z(k, c, p) {
            var u = i.stop();
            H();
            if (u) {
                u = aa(u);
                x("drop", k, u, true, c, p)
            }
        }
        function ha(k) {
            return C(k.start)
        }
        function da(k) {
            return E.left(k)
        }
        function X(k) {
            return E.right(k)
        }
        function la(k) {
            return (k - Math.max(va, Y) + K) % K
        }
        function oa(k) {
            return {
                row: Math.floor(za(k, A.visStart) / 7),
                col: la(k.getDay()) * G + U
            }
        }
        function aa(k) {
            return T(C(A.visStart), k.row * 7 + k.col * G + U)
        }
        function ja(k) {
            return P.find("tr:eq(" + k + ")")
        }
        function ca() {
            return {
                left: 0,
                right: L
            }
        }
        var A = this;
        A.renderBasic = e;
        A.setHeight = g;
        A.setWidth = h;
        A.renderDayOverlay = t;
        A.defaultSelectionEnd = N;
        A.renderSelection = O;
        A.clearSelection = r;
        A.dragStart = s;
        A.dragStop = Z;
        A.defaultEventEnd = ha;
        A.getHoverListener = function () {
            return i
        };
        A.colContentLeft = da;
        A.colContentRight = X;
        A.dayOfWeekCol = la;
        A.dateCell = oa;
        A.cellDate = aa;
        A.cellIsAllDay = function () {
            return true
        };
        A.allDayTR = ja;
        A.allDayBounds = ca;
        A.getRowCnt = function () {
            return w
        };
        A.getColCnt = function () {
            return K
        };
        A.getColWidth = function () {
            return Q
        };
        A.getDaySegmentContainer = function () {
            return v
        };
        lb.call(A, a, b, f);
        mb.call(A);
        nb.call(A);
        Kb.call(A);
        var ia = A.opt,
            x = A.trigger,
            d = A.clearEvents,
            F = A.renderOverlay,
            H = A.clearOverlays,
            R = A.daySelectionMousedown,
            ma = b.formatDate,
            ka, G, U, va, Y, w, K, Q, L, D, I, P, v, j, i, E;
        ob(a.addClass("fc-grid"));
        j = new pb(function (k, c) {
            var p, u, V, $ = P.find("tr:first td");
            if (ka) $ = l($.get().reverse());
            $.each(function (q, B) {
                p = l(B);
                u = p.offset().left;
                if (q) V[1] = u;
                V = [u];
                c[q] = V
            });
            V[1] = u + p.outerWidth();
            P.find("tr").each(function (q, B) {
                p = l(B);
                u = p.offset().top;
                if (q) V[1] = u;
                V = [u];
                k[q] = V
            });
            V[1] = u + p.outerHeight()
        });
        i = new qb(j);
        E = new rb(function (k) {
            return P.find("td:eq(" + k + ") div div")
        })
    }
    function Kb() {
        function a(ca, A) {
            t(ca);
            aa(f(ca), A)
        }
        function b() {
            z();
            Z().empty()
        }
        function f(ca) {
            var A = la(),
                ia = oa(),
                x = C(h.visStart);
            ia = T(C(x), ia);
            var d = l.map(ca, Na),
                F, H, R, ma, ka, G, U = [];
            for (F = 0; F < A; F++) {
                H = $a(ab(ca, d, x, ia));
                for (R = 0; R < H.length; R++) {
                    ma = H[R];
                    for (ka = 0; ka < ma.length; ka++) {
                        G = ma[ka];
                        G.row = F;
                        G.level = R;
                        U.push(G)
                    }
                }
                T(x, 7);
                T(ia, 7)
            }
            return U
        }
        function e(ca, A, ia) {
            N(ca, A);
            if (ca.editable || ca.editable === ga && m("editable")) {
                g(ca, A);
                ia.isEnd && ja(ca, A, ia)
            }
        }
        function g(ca, A) {
            if (!m("disableDragging") && A.draggable) {
                var ia = ha(),
                    x;
                A.draggable({
                    zIndex: 9,
                    delay: 50,
                    opacity: m("dragOpacity"),
                    revertDuration: m("dragRevertDuration"),
                    start: function (d, F) {
                        o("eventDragStart", A, ca, d, F);
                        r(ca, A);
                        ia.start(function (H, R, ma, ka) {
                            A.draggable("option", "revert", !H || !ma && !ka);
                            X();
                            if (H) {
                                x = ma * 7 + ka * (m("isRTL") ? -1 : 1);
                                da(T(C(ca.start), x), T(Na(ca), x))
                            } else x = 0
                        }, d, "drag")
                    },
                    stop: function (d, F) {
                        ia.stop();
                        X();
                        o("eventDragStop", A, ca, d, F);
                        if (x) {
                            A.find("a").removeAttr("href");
                            s(this, ca, x, 0, ca.allDay, d, F)
                        } else {
                            l.browser.msie && A.css("filter", "");
                            O(ca, A)
                        }
                    }
                })
            }
        }
        var h = this;
        h.renderEvents = a;
        h.compileDaySegs = f;
        h.clearEvents = b;
        h.bindDaySeg = e;
        sb.call(h);
        var m = h.opt,
            o = h.trigger,
            t = h.reportEvents,
            z = h.reportEventClear,
            N = h.eventElementHandlers,
            O = h.showEvents,
            r = h.hideEvents,
            s = h.eventDrop,
            Z = h.getDaySegmentContainer,
            ha = h.getHoverListener,
            da = h.renderDayOverlay,
            X = h.clearOverlays,
            la = h.getRowCnt,
            oa = h.getColCnt,
            aa = h.renderDaySegs,
            ja = h.resizableDayEvent
    }
    function Lb(a, b) {
        function f(o, t) {
            t && T(o, t * 7);
            o = T(C(o), -((o.getDay() - g("firstDay") + 7) % 7));
            t = T(C(o), 7);
            var z = C(o),
                N = C(t),
                O = g("weekends");
            if (!O) {
                ta(z);
                ta(N, -1, true)
            }
            e.title = m(z, T(C(N), -1), g("titleFormat"));
            e.start = o;
            e.end = t;
            e.visStart = z;
            e.visEnd = N;
            h(O ? 7 : 5)
        }
        var e = this;
        e.render = f;
        tb.call(e, a, b, "agendaWeek");
        var g = e.opt,
            h = e.renderAgenda,
            m = b.formatDates
    }
    function Mb(a, b) {
        function f(o, t) {
            if (t) {
                T(o, t);
                g("weekends") || ta(o, t < 0 ? -1 : 1)
            }
            t = C(o, true);
            var z = T(C(t), 1);
            e.title = m(o, g("titleFormat"));
            e.start = e.visStart = t;
            e.end = e.visEnd = z;
            h(1)
        }
        var e = this;
        e.render = f;
        tb.call(e, a, b, "agendaDay");
        var g = e.opt,
            h = e.renderAgenda,
            m = b.formatDate
    }
    function tb(a, b, f) {
        function e(n) {
            c = n;
            fa = U("theme") ? "ui" : "fc";
            W = U("weekends") ? 0 : 1;
            na = U("firstDay");
            if (sa = U("isRTL")) {
                ea = -1;
                pa = c - 1
            } else {
                ea = 1;
                pa = 0
            }
            Aa = bb(U("minTime"));
            Ba = bb(U("maxTime"));
            n = sa ? T(C(G.visEnd), -1) : C(G.visStart);
            var y = C(n),
                M = Ga(new Date),
                S = U("columnFormat");
            if (v) {
                Y();
                v.find("tr:first th").slice(1, -1).each(function (Ja, xa) {
                    l(xa).text(P(y, S));
                    xa.className = xa.className.replace(/^fc-\w+(?= )/, "fc-" + Ca[y.getDay()]);
                    T(y, ea);
                    W && ta(y, ea)
                });
                y = C(n);
                k.find("td").each(function (Ja, xa) {
                    xa.className = xa.className.replace(/^fc-\w+(?= )/, "fc-" + Ca[y.getDay()]); + y == +M ? l(xa).removeClass("fc-not-today").addClass("fc-today").addClass(fa + "-state-highlight") : l(xa).addClass("fc-not-today").removeClass("fc-today").removeClass(fa + "-state-highlight");
                    T(y, ea);
                    W && ta(y, ea)
                })
            } else {
                var ba, ua, Da = U("slotMinutes") % 15 == 0,
                    qa = "<div class='fc-agenda-head' style='position:relative;z-index:4'><table style='width:100%'><tr class='fc-first" + (U("allDaySlot") ? "" : " fc-last") + "'><th class='fc-leftmost " + fa + "-state-default'>&nbsp;</th>";
                for (ba = 0; ba < c; ba++) {
                    qa += "<th class='fc-" + Ca[y.getDay()] + " " + fa + "-state-default'>" + P(y, S) + "</th>";
                    T(y, ea);
                    W && ta(y, ea)
                }
                qa += "<th class='" + fa + "-state-default'>&nbsp;</th></tr>";
                if (U("allDaySlot")) qa += "<tr class='fc-all-day'><th class='fc-axis fc-leftmost " + fa + "-state-default'>" + U("allDayText") + "</th><td colspan='" + c + "' class='" + fa + "-state-default'><div class='fc-day-content'><div style='position:relative'>&nbsp;</div></div></td><th class='" + fa + "-state-default'>&nbsp;</th></tr><tr class='fc-divider fc-last'><th colspan='" + (c + 2) + "' class='" + fa + "-state-default fc-leftmost'><div/></th></tr>";
                qa += "</table></div>";
                v = l(qa).appendTo(a);
                z(v.find("td"));
                ub = l("<div style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(v);
                y = vb();
                var cb = ra(C(y), Ba);
                ra(y, Aa);
                qa = "<table>";
                for (ba = 0; y < cb; ba++) {
                    ua = y.getMinutes();
                    qa += "<tr class='" + (!ba ? "fc-first" : !ua ? "" : "fc-minor") + "'><th class='fc-axis fc-leftmost " + fa + "-state-default'>" + (!Da || !ua ? P(y, U("axisFormat")) : "&nbsp;") + "</th><td class='fc-slot" + ba + " " + fa + "-state-default'><div style='position:relative'>&nbsp;</div></td></tr>";
                    ra(y, U("slotMinutes"));
                    p++
                }
                qa += "</table>";
                j = l("<div class='fc-agenda-body' style='position:relative;z-index:2;overflow:auto'/>").append(i = l("<div style='position:relative;overflow:hidden'>").append(E = l(qa))).appendTo(a);
                N(j.find("td"));
                wb = l("<div style='position:absolute;z-index:8;top:0;left:0'/>").appendTo(i);
                y = C(n);
                qa = "<div class='fc-agenda-bg' style='position:absolute;z-index:1'><table style='width:100%;height:100%'><tr class='fc-first'>";
                for (ba = 0; ba < c; ba++) {
                    qa += "<td class='fc-" + Ca[y.getDay()] + " " + fa + "-state-default " + (!ba ? "fc-leftmost " : "") + (+y == +M ? fa + "-state-highlight fc-today" : "fc-not-today") + "'><div class='fc-day-content'><div>&nbsp;</div></div></td>";
                    T(y, ea);
                    W && ta(y, ea)
                }
                qa += "</tr></table></div>";
                k = l(qa).appendTo(a)
            }
        }

        function g(n, y) {
            if (n === ga) n = B;
            B = n;
            db = {};
            n = n - v.height();
            n = Math.min(n, E.height());
            j.height(n);
            $ = j.find("tr:first div").height() + 1;
            y && m()
        }
        function h(n) {
            q = n;
            Qa.clear();
            j.width(n).css("overflow", "auto");
            E.width("");
            var y = v.find("tr:first th"),
                M = v.find("tr.fc-all-day th:last"),
                S = k.find("td"),
                ba = j[0].clientWidth;
            E.width(ba);
            ba = j[0].clientWidth;
            E.width(ba);
            u = 0;
            Ia(v.find("tr:lt(2) th:first").add(j.find("tr:first th")).width(1).each(function () {
                u = Math.max(u, l(this).outerWidth())
            }), u);
            V = Math.floor((ba - u) / c);
            Ia(S.slice(0, -1), V);
            Ia(y.slice(1, -2), V);
            if (n != ba) {
                Ia(y.slice(-2, -1), ba - u - V * (c - 1));
                y.slice(-1).show();
                M.show()
            } else {
                j.css("overflow", "hidden");
                y.slice(-2, -1).width("");
                y.slice(-1).hide();
                M.hide()
            }
            k.css({
                top: v.find("tr").height(),
                left: u,
                width: ba - u,
                height: B
            })
        }
        function m() {
            var n = vb(),
                y = C(n);
            y.setHours(U("firstHour"));
            var M = oa(n, y) + 1;
            n = function () {
                j.scrollTop(M)
            };
            n();
            setTimeout(n, 0)
        }
        function o() {
            J = j.scrollTop()
        }
        function t() {
            j.scrollTop(J)
        }
        function z(n) {
            n.click(O).mousedown(D)
        }
        function N(n) {
            n.click(O).mousedown(R)
        }

        function O(n) {
            if (!U("selectable")) {
                var y = Math.min(c - 1, Math.floor((n.pageX - k.offset().left) / V));
                y = T(C(G.visStart), y * ea + pa);
                var M = this.className.match(/fc-slot(\d+)/);
                if (M) {
                    M = parseInt(M[1]) * U("slotMinutes");
                    var S = Math.floor(M / 60);
                    y.setHours(S);
                    y.setMinutes(M % 60 + Aa);
                    va("dayClick", this, y, false, n)
                } else va("dayClick", this, y, true, n)
            }
        }
        function r(n, y, M) {
            M && wa.build();
            var S = C(G.visStart);
            if (sa) {
                M = za(y, S) * ea + pa + 1;
                n = za(n, S) * ea + pa + 1
            } else {
                M = za(n, S);
                n = za(y, S)
            }
            M = Math.max(0, M);
            n = Math.min(c, n);
            M < n && z(s(0, M, 0, n - 1))
        }

        function s(n, y, M, S) {
            n = wa.rect(n, y, M, S, v);
            return w(n, v)
        }
        function Z(n, y) {
            for (var M = C(G.visStart), S = T(C(M), 1), ba = 0; ba < c; ba++) {
                var ua = new Date(Math.max(M, n)),
                    Da = new Date(Math.min(S, y));
                if (ua < Da) {
                    var qa = ba * ea + pa;
                    qa = wa.rect(0, qa, 0, qa, i);
                    ua = oa(M, ua);
                    Da = oa(M, Da);
                    qa.top = ua;
                    qa.height = Da - ua;
                    N(w(qa, i))
                }
                T(M, 1);
                T(S, 1)
            }
        }
        function ha(n) {
            return u + Qa.left(n)
        }
        function da(n) {
            return u + Qa.right(n)
        }
        function X(n) {
            return (n - Math.max(na, W) + c) % c * ea + pa
        }
        function la(n) {
            return {
                row: Math.floor(za(n, G.visStart) / 7),
                col: X(n.getDay())
            }
        }

        function oa(n, y) {
            n = C(n, true);
            if (y < ra(C(n), Aa)) return 0;
            if (y >= ra(C(n), Ba)) return i.height();
            n = U("slotMinutes");
            y = y.getHours() * 60 + y.getMinutes() - Aa;
            var M = Math.floor(y / n),
                S = db[M];
            if (S === ga) S = db[M] = j.find("tr:eq(" + M + ") td div")[0].offsetTop;
            return Math.max(0, Math.round(S - 1 + $ * (y % n / n)))
        }
        function aa(n) {
            var y = T(C(G.visStart), n.col * ea + pa);
            n = n.row;
            U("allDaySlot") && n--;
            n >= 0 && ra(y, Aa + n * U("slotMinutes"));
            return y
        }
        function ja(n) {
            return U("allDaySlot") && !n.row
        }
        function ca() {
            return {
                left: u,
                right: q
            }
        }
        function A() {
            return v.find("tr.fc-all-day")
        }

        function ia(n) {
            var y = C(n.start);
            if (n.allDay) return y;
            return ra(y, U("defaultEventMinutes"))
        }
        function x(n, y) {
            if (y) return C(n);
            return ra(C(n), U("slotMinutes"))
        }
        function d(n, y, M) {
            if (M) U("allDaySlot") && r(n, T(C(y), 1), true);
            else F(n, y)
        }
        function F(n, y) {
            var M = U("selectHelper");
            wa.build();
            if (M) {
                var S = za(n, G.visStart) * ea + pa;
                if (S >= 0 && S < c) {
                    S = wa.rect(0, S, 0, S, i);
                    var ba = oa(n, n),
                        ua = oa(n, y);
                    if (ua > ba) {
                        S.top = ba;
                        S.height = ua - ba;
                        S.left += 2;
                        S.width -= 5;
                        if (l.isFunction(M)) {
                            if (n = M(n, y)) {
                                S.position = "absolute";
                                S.zIndex = 8;
                                ya = l(n).css(S).appendTo(i)
                            }
                        } else {
                            ya = l(I({
                                title: "",
                                start: n,
                                end: y,
                                className: [],
                                editable: false
                            }, S, "fc-event fc-event-vert fc-corner-top fc-corner-bottom "));
                            l.browser.msie && ya.find("span.fc-event-bg").hide();
                            ya.css("opacity", U("dragOpacity"))
                        }
                        if (ya) {
                            N(ya);
                            i.append(ya);
                            Ia(ya, S.width, true);
                            Pa(ya, S.height, true)
                        }
                    }
                }
            } else Z(n, y)
        }
        function H() {
            K();
            if (ya) {
                ya.remove();
                ya = null
            }
        }
        function R(n) {
            if (n.which == 1 && U("selectable")) {
                L(n);
                var y = this,
                    M;
                Ka.start(function (S, ba) {
                    H();
                    if (S && S.col == ba.col && !ja(S)) {
                        ba = aa(ba);
                        S = aa(S);
                        M = [ba, ra(C(ba), U("slotMinutes")), S, ra(C(S), U("slotMinutes"))].sort(eb);
                        F(M[0], M[3])
                    } else M = null
                }, n);
                l(document).one("mouseup", function (S) {
                    Ka.stop();
                    if (M) {
                        +M[0] == +M[1] && va("dayClick", y, M[0], false, S);
                        Q(M[0], M[3], false, S)
                    }
                })
            }
        }
        function ma(n, y) {
            Ka.start(function (M) {
                K();
                if (M) if (ja(M)) s(M.row, M.col, M.row, M.col);
                else {
                    M = aa(M);
                    var S = ra(C(M), U("defaultEventMinutes"));
                    Z(M, S)
                }
            }, y)
        }
        function ka(n, y, M) {
            var S = Ka.stop();
            K();
            S && va("drop", n, aa(S), ja(S), y, M)
        }
        var G = this;
        G.renderAgenda = e;
        G.setWidth = h;
        G.setHeight = g;
        G.beforeHide = o;
        G.afterShow = t;
        G.defaultEventEnd = ia;
        G.timePosition = oa;
        G.dayOfWeekCol = X;
        G.dateCell = la;
        G.cellDate = aa;
        G.cellIsAllDay = ja;
        G.allDayTR = A;
        G.allDayBounds = ca;
        G.getHoverListener = function () {
            return Ka
        };
        G.colContentLeft = ha;
        G.colContentRight = da;
        G.getDaySegmentContainer = function () {
            return ub
        };
        G.getSlotSegmentContainer = function () {
            return wb
        };
        G.getMinMinute = function () {
            return Aa
        };
        G.getMaxMinute = function () {
            return Ba
        };
        G.getBodyContent = function () {
            return i
        };
        G.getRowCnt = function () {
            return 1
        };
        G.getColCnt = function () {
            return c
        };
        G.getColWidth = function () {
            return V
        };
        G.getSlotHeight = function () {
            return $
        };
        G.defaultSelectionEnd = x;
        G.renderDayOverlay = r;
        G.renderSelection = d;
        G.clearSelection = H;
        G.dragStart = ma;
        G.dragStop = ka;
        lb.call(G, a, b, f);
        mb.call(G);
        nb.call(G);
        Nb.call(G);
        var U = G.opt,
            va = G.trigger,
            Y = G.clearEvents,
            w = G.renderOverlay,
            K = G.clearOverlays,
            Q = G.reportSelection,
            L = G.unselect,
            D = G.daySelectionMousedown,
            I = G.slotSegHtml,
            P = b.formatDate,
            v, j, i, E, k, c, p = 0,
            u, V, $, q, B, J, fa, na, W, sa, ea, pa, Aa, Ba, wa, Ka, Qa, db = {},
            ya, ub, wb;
        ob(a.addClass("fc-agenda"));
        wa = new pb(function (n, y) {
            function M(xa) {
                return Math.max(qa, Math.min(cb, xa))
            }
            var S, ba, ua;
            k.find("td").each(function (xa, Ob) {
                S = l(Ob);
                ba = S.offset().left;
                if (xa) ua[1] = ba;
                ua = [ba];
                y[xa] = ua
            });
            ua[1] = ba + S.outerWidth();
            if (U("allDaySlot")) {
                S = v.find("td");
                ba = S.offset().top;
                n[0] = [ba, ba + S.outerHeight()]
            }
            for (var Da = i.offset().top, qa = j.offset().top, cb = qa + j.outerHeight(), Ja = 0; Ja < p; Ja++) n.push([M(Da + $ * Ja), M(Da + $ * (Ja + 1))])
        });
        Ka = new qb(wa);
        Qa = new rb(function (n) {
            return k.find("td:eq(" + n + ") div div")
        })
    }
    function Nb() {
        function a(j, i) {
            da(j);
            var E, k = j.length,
                c = [],
                p = [];
            for (E = 0; E < k; E++) j[E].allDay ? c.push(j[E]) : p.push(j[E]);
            if (s("allDaySlot")) {
                H(f(c), i);
                oa()
            }
            h(e(p), i)
        }
        function b() {
            X();
            aa().empty();
            ja().empty()
        }
        function f(j) {
            j = $a(ab(j, l.map(j, Na), r.visStart, r.visEnd));
            var i, E = j.length,
                k, c, p, u = [];
            for (i = 0; i < E; i++) {
                k = j[i];
                for (c = 0; c < k.length; c++) {
                    p = k[c];
                    p.row = 0;
                    p.level = i;
                    u.push(p)
                }
            }
            return u
        }
        function e(j) {
            var i = ma(),
                E = ia(),
                k = A(),
                c = ra(C(r.visStart), E),
                p = l.map(j, g),
                u, V, $, q, B, J, fa = [];
            for (u = 0; u < i; u++) {
                V = $a(ab(j, p, c, ra(C(c), k - E)));
                Pb(V);
                for ($ = 0; $ < V.length; $++) {
                    q = V[$];
                    for (B = 0; B < q.length; B++) {
                        J = q[B];
                        J.col = u;
                        J.level = $;
                        fa.push(J)
                    }
                }
                T(c, 1, true)
            }
            return fa
        }
        function g(j) {
            return j.end ? C(j.end) : ra(C(j.start), s("defaultEventMinutes"))
        }
        function h(j, i) {
            var E, k = j.length,
                c, p, u, V, $, q, B, J, fa, na, W = "",
                sa, ea, pa = {},
                Aa = {},
                Ba = ja(),
                wa;
            E = ma();
            if (sa = s("isRTL")) {
                ea = -1;
                wa = E - 1
            } else {
                ea = 1;
                wa = 0
            }
            for (E = 0; E < k; E++) {
                c = j[E];
                p = c.event;
                u = "fc-event fc-event-vert ";
                if (c.isStart) u += "fc-corner-top ";
                if (c.isEnd) u += "fc-corner-bottom ";
                V = x(c.start, c.start);
                $ = x(c.start, c.end);
                q = c.col;
                B = c.level;
                J = c.forward || 0;
                fa = d(q * ea + wa);
                na = F(q * ea + wa) - fa;
                na = Math.min(na - 6, na * 0.95);
                q = B ? na / (B + J + 1) : J ? (na / (J + 1) - 6) * 2 : na;
                B = fa + na / (B + J + 1) * B * ea + (sa ? na - q : 0);
                c.top = V;
                c.left = B;
                c.outerWidth = q;
                c.outerHeight = $ - V;
                W += m(p, c, u)
            }
            Ba[0].innerHTML = W;
            sa = Ba.children();
            for (E = 0; E < k; E++) {
                c = j[E];
                p = c.event;
                W = l(sa[E]);
                ea = Z("eventRender", p, p, W);
                if (ea === false) W.remove();
                else {
                    if (ea && ea !== true) {
                        W.remove();
                        W = l(ea).css({
                            position: "absolute",
                            top: c.top,
                            left: c.left
                        }).appendTo(Ba)
                    }
                    c.element = W;
                    if (p._id === i) t(p, W, c);
                    else W[0]._fci = E;
                    va(p, W)
                }
            }
            xb(Ba, j, t);
            for (E = 0; E < k; E++) {
                c = j[E];
                if (W = c.element) {
                    p = pa[i = c.key = yb(W[0])];
                    c.vsides = p === ga ? (pa[i] = Sa(W[0], true)) : p;
                    p = Aa[i];
                    c.hsides = p === ga ? (Aa[i] = fb(W[0], true)) : p;
                    i = W.find("span.fc-event-title");
                    if (i.length) c.titleTop = i[0].offsetTop
                }
            }
            for (E = 0; E < k; E++) {
                c = j[E];
                if (W = c.element) {
                    W[0].style.width = Math.max(0, c.outerWidth - c.hsides) + "px";
                    pa = Math.max(0, c.outerHeight - c.vsides);
                    W[0].style.height = pa + "px";
                    p = c.event;
                    if (c.titleTop !== ga && pa - c.titleTop < 10) {
                        W.find("span.fc-event-time").text(P(p.start, s("timeFormat")) + " - " + p.title);
                        W.find("span.fc-event-title").remove()
                    }
                    Z("eventAfterRender", p, p, W)
                }
            }
        }
        function m(j, i, E) {
            return "<div class='" + E + j.className.join(" ") + "' style='position:absolute;z-index:8;top:" + i.top + "px;left:" + i.left + "px'><a" + (j.url ? " href='" + La(j.url) + "'" : "") + "><span class='fc-event-bg'></span><span class='fc-event-time'>" + La(v(j.start, j.end, s("timeFormat"))) + "</span><span class='fc-event-title'>" + La(j.title) + "</span></a>" + ((j.editable || j.editable === ga && s("editable")) && !s("disableResizing") && l.fn.resizable ? "<div class='ui-resizable-handle ui-resizable-s'>=</div>" : "") + "</div>"
        }

        function o(j, i, E) {
            la(j, i);
            if (j.editable || j.editable === ga && s("editable")) {
                z(j, i, E.isStart);
                E.isEnd && R(j, i, E)
            }
        }
        function t(j, i, E) {
            la(j, i);
            if (j.editable || j.editable === ga && s("editable")) {
                var k = i.find("span.fc-event-time");
                N(j, i, k);
                E.isEnd && O(j, i, k)
            }
        }
        function z(j, i, E) {
            if (!s("disableDragging") && i.draggable) {
                var k, c = true,
                    p, u = s("isRTL") ? -1 : 1,
                    V = ca(),
                    $ = ka(),
                    q = G(),
                    B = ia();
                i.draggable({
                    zIndex: 9,
                    opacity: s("dragOpacity", "month"),
                    revertDuration: s("dragRevertDuration"),
                    start: function (fa, na) {
                        Z("eventDragStart", i, j, fa, na);
                        w(j, i);
                        k = i.width();
                        V.start(function (W, sa, ea, pa) {
                            i.draggable("option", "revert", !W || !ea && !pa);
                            D();
                            if (W) {
                                p = pa * u;
                                if (W.row) {
                                    if (E && c) {
                                        Pa(i.width($ - 10), q * Math.round((j.end ? (j.end - j.start) / Qb : s("defaultEventMinutes")) / s("slotMinutes")));
                                        i.draggable("option", "grid", [$, 1]);
                                        c = false
                                    }
                                } else {
                                    L(T(C(j.start), p), T(Na(j), p));
                                    J()
                                }
                            }
                        }, fa, "drag")
                    },
                    stop: function (fa, na) {
                        var W = V.stop();
                        D();
                        Z("eventDragStop", i, j, fa, na);
                        if (W && (!c || p)) {
                            i.find("a").removeAttr("href");
                            W = 0;
                            c || (W = Math.round((i.offset().top - U().offset().top) / q) * s("slotMinutes") + B - (j.start.getHours() * 60 + j.start.getMinutes()));
                            K(this, j, p, W, c, fa, na)
                        } else {
                            J();
                            l.browser.msie && i.css("filter", "");
                            Y(j, i)
                        }
                    }
                });

                function J() {
                    if (!c) {
                        i.width(k).height("").draggable("option", "grid", null);
                        c = true
                    }
                }
            }
        }
        function N(j, i, E) {
            if (!s("disableDragging") && i.draggable) {
                var k, c = false,
                    p, u, V, $ = s("isRTL") ? -1 : 1,
                    q = ca(),
                    B = ma(),
                    J = ka(),
                    fa = G();
                i.draggable({
                    zIndex: 9,
                    scroll: false,
                    grid: [J, fa],
                    axis: B == 1 ? "y" : false,
                    opacity: s("dragOpacity"),
                    revertDuration: s("dragRevertDuration"),
                    start: function (sa, ea) {
                        Z("eventDragStart", i, j, sa, ea);
                        w(j, i);
                        l.browser.msie && i.find("span.fc-event-bg").hide();
                        k = i.position();
                        u = V = 0;
                        q.start(function (pa, Aa, Ba, wa) {
                            i.draggable("option", "revert", !pa);
                            D();
                            if (pa) {
                                p = wa * $;
                                if (s("allDaySlot") && !pa.row) {
                                    if (!c) {
                                        c = true;
                                        E.hide();
                                        i.draggable("option", "grid", null)
                                    }
                                    L(T(C(j.start), p), T(Na(j), p))
                                } else W()
                            }
                        }, sa, "drag")
                    },
                    drag: function (sa, ea) {
                        u = Math.round((ea.position.top - k.top) / fa) * s("slotMinutes");
                        if (u != V) {
                            c || na(u);
                            V = u
                        }
                    },
                    stop: function (sa, ea) {
                        var pa = q.stop();
                        D();
                        Z("eventDragStop", i, j, sa, ea);
                        if (pa && (p || u || c)) K(this, j, p, c ? 0 : u, c, sa, ea);
                        else {
                            W();
                            i.css(k);
                            na(0);
                            l.browser.msie && i.css("filter", "").find("span.fc-event-bg").css("display", "");
                            Y(j, i)
                        }
                    }
                });

                function na(sa) {
                    var ea = ra(C(j.start), sa),
                        pa;
                    if (j.end) pa = ra(C(j.end), sa);
                    E.text(v(ea, pa, s("timeFormat")))
                }
                function W() {
                    if (c) {
                        E.css("display", "");
                        i.draggable("option", "grid", [J, fa]);
                        c = false
                    }
                }
            }
        }
        function O(j, i, E) {
            if (!s("disableResizing") && i.resizable) {
                var k, c, p = G();
                i.resizable({
                    handles: {
                        s: "div.ui-resizable-s"
                    },
                    grid: p,
                    start: function (u, V) {
                        k = c = 0;
                        w(j, i);
                        l.browser.msie && l.browser.version == "6.0" && i.css("overflow", "hidden");
                        i.css("z-index", 9);
                        Z("eventResizeStart", this, j, u, V)
                    },
                    resize: function (u, V) {
                        k = Math.round((Math.max(p, i.height()) - V.originalSize.height) / p);
                        if (k != c) {
                            E.text(v(j.start, !k && !j.end ? null : ra(ha(j), s("slotMinutes") * k), s("timeFormat")));
                            c = k
                        }
                    },
                    stop: function (u, V) {
                        Z("eventResizeStop", this, j, u, V);
                        if (k) Q(this, j, 0, s("slotMinutes") * k, u, V);
                        else {
                            i.css("z-index", 8);
                            Y(j, i)
                        }
                    }
                })
            }
        }
        var r = this;
        r.renderEvents = a;
        r.compileDaySegs = f;
        r.clearEvents = b;
        r.slotSegHtml = m;
        r.bindDaySeg = o;
        sb.call(r);
        var s = r.opt,
            Z = r.trigger,
            ha = r.eventEnd,
            da = r.reportEvents,
            X = r.reportEventClear,
            la = r.eventElementHandlers,
            oa = r.setHeight,
            aa = r.getDaySegmentContainer,
            ja = r.getSlotSegmentContainer,
            ca = r.getHoverListener,
            A = r.getMaxMinute,
            ia = r.getMinMinute,
            x = r.timePosition,
            d = r.colContentLeft,
            F = r.colContentRight,
            H = r.renderDaySegs,
            R = r.resizableDayEvent,
            ma = r.getColCnt,
            ka = r.getColWidth,
            G = r.getSlotHeight,
            U = r.getBodyContent,
            va = r.reportEventElement,
            Y = r.showEvents,
            w = r.hideEvents,
            K = r.eventDrop,
            Q = r.eventResize,
            L = r.renderDayOverlay,
            D = r.clearOverlays,
            I = r.calendar,
            P = I.formatDate,
            v = I.formatDates
    }
    function Pb(a) {
        var b, f, e, g, h, m;
        for (b = a.length - 1; b > 0; b--) {
            g = a[b];
            for (f = 0; f < g.length; f++) {
                h = g[f];
                for (e = 0; e < a[b - 1].length; e++) {
                    m = a[b - 1][e];
                    if (zb(h, m)) m.forward = Math.max(m.forward || 0, (h.forward || 0) + 1)
                }
            }
        }
    }
    function lb(a, b, f) {
        function e(x, d) {
            x = ia[x];
            if (typeof x == "object") return Wa(x, d || f);
            return x
        }
        function g(x, d) {
            return b.trigger.apply(b, [x, d || X].concat(Array.prototype.slice.call(arguments, 2), [X]))
        }
        function h(x) {
            ja = {};
            var d, F = x.length,
                H;
            for (d = 0; d < F; d++) {
                H = x[d];
                if (ja[H._id]) ja[H._id].push(H);
                else ja[H._id] = [H]
            }
        }
        function m(x) {
            return x.end ? C(x.end) : la(x)
        }
        function o(x, d) {
            ca.push(d);
            if (A[x._id]) A[x._id].push(d);
            else A[x._id] = [d]
        }
        function t() {
            ca = [];
            A = {}
        }
        function z(x, d) {
            d.click(function (F) {
                if (!d.hasClass("ui-draggable-dragging") && !d.hasClass("ui-resizable-resizing")) return g("eventClick", this, x, F)
            }).hover(function (F) {
                g("eventMouseover", this, x, F)
            }, function (F) {
                g("eventMouseout", this, x, F)
            })
        }
        function N(x, d) {
            r(x, d, "show")
        }
        function O(x, d) {
            r(x, d, "hide")
        }
        function r(x, d, F) {
            x = A[x._id];
            var H, R = x.length;
            for (H = 0; H < R; H++) if (!d || x[H][0] != d[0]) x[H][F]()
        }
        function s(x, d, F, H, R, ma, ka) {
            var G = d.allDay,
                U = d._id;
            ha(ja[U], F, H, R);
            g("eventDrop", x, d, F, H, R, function () {
                ha(ja[U], -F, -H, G);
                aa(U)
            }, ma, ka);
            aa(U)
        }
        function Z(x, d, F, H, R, ma) {
            var ka = d._id;
            da(ja[ka], F, H);
            g("eventResize", x, d, F, H, function () {
                da(ja[ka], -F, -H);
                aa(ka)
            }, R, ma);
            aa(ka)
        }
        function ha(x, d, F, H) {
            F = F || 0;
            for (var R, ma = x.length, ka = 0; ka < ma; ka++) {
                R = x[ka];
                if (H !== ga) R.allDay = H;
                ra(T(R.start, d, true), F);
                if (R.end) R.end = ra(T(R.end, d, true), F);
                oa(R, ia)
            }
        }
        function da(x, d, F) {
            F = F || 0;
            for (var H, R = x.length, ma = 0; ma < R; ma++) {
                H = x[ma];
                H.end = ra(T(m(H), d, true), F);
                oa(H, ia)
            }
        }
        var X = this;
        X.element = a;
        X.calendar = b;
        X.name = f;
        X.opt = e;
        X.trigger = g;
        X.reportEvents = h;
        X.eventEnd = m;
        X.reportEventElement = o;
        X.reportEventClear = t;
        X.eventElementHandlers = z;
        X.showEvents = N;
        X.hideEvents = O;
        X.eventDrop = s;
        X.eventResize = Z;
        var la = X.defaultEventEnd,
            oa = b.normalizeEvent,
            aa = b.reportEventChange,
            ja = {},
            ca = [],
            A = {},
            ia = b.options
    }
    function sb() {
        function a(w, K) {
            var Q = ma(),
                L = ja(),
                D = ca(),
                I = 0,
                P, v, j = w.length,
                i, E;
            Q[0].innerHTML = f(w);
            e(w, Q.children());
            g(w);
            h(w, Q, K);
            m(w);
            o(w);
            t(w);
            K = z();
            for (Q = 0; Q < L; Q++) {
                P = [];
                for (v = 0; v < D; v++) P[v] = 0;
                for (; I < j && (i = w[I]).row == Q;) {
                    v = Ab(P.slice(i.startCol, i.endCol));
                    i.top = v;
                    v += i.outerHeight;
                    for (E = i.startCol; E < i.endCol; E++) P[E] = v;
                    I++
                }
                K[Q].height(Ab(P))
            }
            O(w, N(K))
        }
        function b(w, K, Q) {
            var L = l("<div/>"),
                D = ma(),
                I = w.length,
                P;
            L[0].innerHTML = f(w);
            L = L.children();
            D.append(L);
            e(w, L);
            m(w);
            o(w);
            t(w);
            O(w, N(z()));
            L = [];
            for (D = 0; D < I; D++) if (P = w[D].element) {
                w[D].row === K && P.css("top", Q);
                L.push(P[0])
            }
            return l(L)
        }
        function f(w) {
            var K = Z("isRTL"),
                Q, L = w.length,
                D, I, P;
            Q = ia();
            var v = Q.left,
                j = Q.right,
                i = [],
                E, k, c = "";
            for (Q = 0; Q < L; Q++) {
                D = w[Q];
                I = D.event;
                P = "fc-event fc-event-hori ";
                if (K) {
                    if (D.isStart) P += "fc-corner-right ";
                    if (D.isEnd) P += "fc-corner-left ";
                    i[0] = F(D.end.getDay() - 1);
                    i[1] = F(D.start.getDay());
                    E = D.isEnd ? x(i[0]) : v;
                    k = D.isStart ? d(i[1]) : j
                } else {
                    if (D.isStart) P += "fc-corner-left ";
                    if (D.isEnd) P += "fc-corner-right ";
                    i[0] = F(D.start.getDay());
                    i[1] = F(D.end.getDay() - 1);
                    E = D.isStart ? x(i[0]) : v;
                    k = D.isEnd ? d(i[1]) : j
                }
                c += "<div class='" + P + I.className.join(" ") + "' style='position:absolute;z-index:8;left:" + E + "px'><a" + (I.url ? " href='" + La(I.url) + "'" : "") + ">" + (!I.allDay && D.isStart ? "<span class='fc-event-time'>" + La(G(I.start, I.end, Z("timeFormat"))) + "</span>" : "") + "<span class='fc-event-title'>" + La(I.title) + "</span></a>" + (D.isEnd && (I.editable || I.editable === ga && Z("editable")) && !Z("disableResizing") ? "<div class='ui-resizable-handle ui-resizable-" + (K ? "w" : "e") + "'></div>" : "") + "</div>";
                D.left = E;
                D.outerWidth = k - E;
                i.sort(eb);
                D.startCol = i[0];
                D.endCol = i[1] + 1
            }
            return c
        }
        function e(w, K) {
            var Q, L = w.length,
                D, I, P;
            for (Q = 0; Q < L; Q++) {
                D = w[Q];
                I = D.event;
                P = l(K[Q]);
                I = ha("eventRender", I, I, P);
                if (I === false) P.remove();
                else {
                    if (I && I !== true) {
                        I = l(I).css({
                            position: "absolute",
                            left: D.left
                        });
                        P.replaceWith(I);
                        P = I
                    }
                    D.element = P
                }
            }
        }
        function g(w) {
            var K, Q = w.length,
                L, D;
            for (K = 0; K < Q; K++) {
                L = w[K];
                (D = L.element) && X(L.event, D)
            }
        }
        function h(w, K, Q) {
            var L, D = w.length,
                I, P, v;
            for (L = 0; L < D; L++) {
                I = w[L];
                if (P = I.element) {
                    v = I.event;
                    if (v._id === Q) ka(v, P, I);
                    else P[0]._fci = L
                }
            }
            xb(K, w, ka)
        }
        function m(w) {
            var K, Q = w.length,
                L, D, I, P, v = {};
            for (K = 0; K < Q; K++) {
                L = w[K];
                if (D = L.element) {
                    I = L.key = yb(D[0]);
                    P = v[I];
                    if (P === ga) P = v[I] = fb(D[0], true);
                    L.hsides = P
                }
            }
        }
        function o(w) {
            var K, Q = w.length,
                L, D;
            for (K = 0; K < Q; K++) {
                L = w[K];
                if (D = L.element) D[0].style.width = Math.max(0, L.outerWidth - L.hsides) + "px"
            }
        }
        function t(w) {
            var K, Q = w.length,
                L, D, I, P, v = {};
            for (K = 0; K < Q; K++) {
                L = w[K];
                if (D = L.element) {
                    I = L.key;
                    P = v[I];
                    if (P === ga) P = v[I] = Bb(D[0]);
                    L.outerHeight = D[0].offsetHeight + P
                }
            }
        }
        function z() {
            var w, K = ja(),
                Q = [];
            for (w = 0; w < K; w++) Q[w] = A(w).find("td:first div.fc-day-content > div");
            return Q
        }
        function N(w) {
            var K, Q = w.length,
                L = [];
            for (K = 0; K < Q; K++) L[K] = w[K][0].offsetTop;
            return L
        }
        function O(w, K) {
            var Q, L = w.length,
                D, I;
            for (Q = 0; Q < L; Q++) {
                D = w[Q];
                if (I = D.element) {
                    I[0].style.top = K[D.row] + (D.top || 0) + "px";
                    D = D.event;
                    ha("eventAfterRender", D, D, I)
                }
            }
        }
        function r(w, K, Q) {
            if (!Z("disableResizing") && Q.isEnd) {
                var L = Z("isRTL"),
                    D = L ? "w" : "e";
                K.find("div.ui-resizable-" + D).mousedown(function (I) {
                    function P(q) {
                        ha("eventResizeStop", this, w, q);
                        l("body").css("cursor", "auto");
                        v.stop();
                        va();
                        p && aa(this, w, p, 0, q)
                    }
                    if (I.which == 1) {
                        var v = s.getHoverListener(),
                            j = ja(),
                            i = ca(),
                            E = L ? -1 : 1,
                            k = L ? i : 0,
                            c = K.css("top"),
                            p, u, V = l.extend({}, w),
                            $ = H(w.start);
                        Y();
                        l("body").css("cursor", D + "-resize").one("mouseup", P);
                        ha("eventResizeStart", this, w, I);
                        v.start(function (q, B) {
                            if (q) {
                                var J = Math.max($.row, q.row);
                                q = q.col;
                                if (j == 1) J = 0;
                                if (J == $.row) q = L ? Math.min($.col, q) : Math.max($.col, q);
                                p = J * i + q * E + k - (B.row * i + B.col * E + k);
                                B = T(da(w), p, true);
                                if (p) {
                                    V.end = B;
                                    J = u;
                                    u = b(R([V]), Q.row, c);
                                    u.find("*").css("cursor", D + "-resize");
                                    J && J.remove();
                                    oa(w)
                                } else if (u) {
                                    la(w);
                                    u.remove();
                                    u = null
                                }
                                va();
                                U(w.start, T(C(B), 1))
                            }
                        }, I)
                    }
                })
            }
        }
        var s = this;
        s.renderDaySegs = a;
        s.resizableDayEvent = r;
        var Z = s.opt,
            ha = s.trigger,
            da = s.eventEnd,
            X = s.reportEventElement,
            la = s.showEvents,
            oa = s.hideEvents,
            aa = s.eventResize,
            ja = s.getRowCnt,
            ca = s.getColCnt,
            A = s.allDayTR,
            ia = s.allDayBounds,
            x = s.colContentLeft,
            d = s.colContentRight,
            F = s.dayOfWeekCol,
            H = s.dateCell,
            R = s.compileDaySegs,
            ma = s.getDaySegmentContainer,
            ka = s.bindDaySeg,
            G = s.calendar.formatDates,
            U = s.renderDayOverlay,
            va = s.clearOverlays,
            Y = s.clearSelection
    }
    function nb() {
        function a(O, r, s) {
            b();
            r || (r = o(O, s));
            t(O, r, s);
            f(O, r, s)
        }
        function b(O) {
            if (N) {
                N = false;
                z();
                m("unselect", null, O)
            }
        }
        function f(O, r, s, Z) {
            N = true;
            m("select", null, O, r, s, Z)
        }
        function e(O) {
            var r = g.cellDate,
                s = g.cellIsAllDay,
                Z = g.getHoverListener();
            if (O.which == 1 && h("selectable")) {
                b(O);
                var ha = this,
                    da;
                Z.start(function (X, la) {
                    z();
                    if (X && s(X)) {
                        da = [r(la), r(X)].sort(eb);
                        t(da[0], da[1], true)
                    } else da = null
                }, O);
                l(document).one("mouseup", function (X) {
                    Z.stop();
                    if (da) {
                        +da[0] == +da[1] && m("dayClick", ha, da[0], true, X);
                        f(da[0], da[1], true, X)
                    }
                })
            }
        }
        var g = this;
        g.select = a;
        g.unselect = b;
        g.reportSelection = f;
        g.daySelectionMousedown = e;
        var h = g.opt,
            m = g.trigger,
            o = g.defaultSelectionEnd,
            t = g.renderSelection,
            z = g.clearSelection,
            N = false;
        h("selectable") && h("unselectAuto") && l(document).mousedown(function (O) {
            var r = h("unselectCancel");
            if (r) if (l(O.target).parents(r).length) return;
            b(O)
        })
    }
    function mb() {
        function a(h, m) {
            var o = g.shift();
            o || (o = l("<div class='fc-cell-overlay' style='position:absolute;z-index:3'/>"));
            o[0].parentNode != m[0] && o.appendTo(m);
            e.push(o.css(h).show());
            return o
        }
        function b() {
            for (var h; h = e.shift();) g.push(h.hide().unbind())
        }
        var f = this;
        f.renderOverlay = a;
        f.clearOverlays = b;
        var e = [],
            g = []
    }
    function pb(a) {
        var b = this,
            f, e;
        b.build = function () {
            f = [];
            e = [];
            a(f, e)
        };
        b.cell = function (g, h) {
            var m = f.length,
                o = e.length,
                t, z = -1,
                N = -1;
            for (t = 0; t < m; t++) if (h >= f[t][0] && h < f[t][1]) {
                z = t;
                break
            }
            for (t = 0; t < o; t++) if (g >= e[t][0] && g < e[t][1]) {
                N = t;
                break
            }
            return z >= 0 && N >= 0 ? {
                row: z,
                col: N
            } : null
        };
        b.rect = function (g, h, m, o, t) {
            t = t.offset();
            return {
                top: f[g][0] - t.top,
                left: e[h][0] - t.left,
                width: e[o][1] - e[h][0],
                height: f[m][1] - f[g][0]
            }
        }
    }
    function qb(a) {
        function b(o) {
            o = a.cell(o.pageX, o.pageY);
            if (!o != !m || o && (o.row != m.row || o.col != m.col)) {
                if (o) {
                    h || (h = o);
                    g(o, h, o.row - h.row, o.col - h.col)
                } else g(o, h);
                m = o
            }
        }
        var f = this,
            e, g, h, m;
        f.start = function (o, t, z) {
            g = o;
            h = m = null;
            a.build();
            b(t);
            e = z || "mousemove";
            l(document).bind(e, b)
        };
        f.stop = function () {
            l(document).unbind(e, b);
            return m
        }
    }
    function rb(a) {
        function b(m) {
            return e[m] = e[m] || a(m)
        }
        var f = this,
            e = {},
            g = {},
            h = {};
        f.left = function (m) {
            return g[m] = g[m] === ga ? b(m).position().left : g[m]
        };
        f.right = function (m) {
            return h[m] = h[m] === ga ? f.left(m) + b(m).width() : h[m]
        };
        f.clear = function () {
            e = {};
            g = {};
            h = {}
        }
    }
    function Ta(a, b, f) {
        a.setFullYear(a.getFullYear() + b);
        f || Ga(a);
        return a
    }
    function Ua(a, b, f) {
        if (+a) {
            b = a.getMonth() + b;
            var e = C(a);
            e.setDate(1);
            e.setMonth(b);
            a.setMonth(b);
            for (f || Ga(a); a.getMonth() != e.getMonth();) a.setDate(a.getDate() + (a < e ? 1 : -1))
        }
        return a
    }
    function T(a, b, f) {
        if (+a) {
            b = a.getDate() + b;
            var e = C(a);
            e.setHours(9);
            e.setDate(b);
            a.setDate(b);
            f || Ga(a);
            gb(a, e)
        }
        return a
    }

    function gb(a, b) {
        if (+a) for (; a.getDate() != b.getDate();) a.setTime(+a + (a < b ? 1 : -1) * Rb)
    }
    function ra(a, b) {
        a.setMinutes(a.getMinutes() + b);
        return a
    }
    function Ga(a) {
        a.setHours(0);
        a.setMinutes(0);
        a.setSeconds(0);
        a.setMilliseconds(0);
        return a
    }
    function C(a, b) {
        if (b) return Ga(new Date(+a));
        return new Date(+a)
    }
    function vb() {
        var a = 0,
            b;
        do b = new Date(1970, a++, 1);
        while (b.getHours());
        return b
    }
    function ta(a, b, f) {
        for (b = b || 1; !a.getDay() || f && a.getDay() == 1 || !f && a.getDay() == 6;) T(a, b);
        return a
    }
    function za(a, b) {
        return Math.round((C(a, true) - C(b, true)) / kb)
    }
    function jb(a, b, f, e) {
        if (b !== ga && b != a.getFullYear()) {
            a.setDate(1);
            a.setMonth(0);
            a.setFullYear(b)
        }
        if (f !== ga && f != a.getMonth()) {
            a.setDate(1);
            a.setMonth(f)
        }
        e !== ga && a.setDate(e)
    }
    function Xa(a, b) {
        if (typeof a == "object") return a;
        if (typeof a == "number") return new Date(a * 1E3);
        if (typeof a == "string") {
            if (a.match(/^\d+$/)) return new Date(parseInt(a) * 1E3);
            if (b === ga) b = true;
            return Cb(a, b) || (a ? new Date(a) : null)
        }
        return null
    }
    function Cb(a, b) {
        a = a.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?$/);
        if (!a) return null;
        var f = new Date(a[1], 0, 1);
        if (b || !a[14]) {
            b = new Date(a[1], 0, 1, 9, 0);
            if (a[3]) {
                f.setMonth(a[3] - 1);
                b.setMonth(a[3] - 1)
            }
            if (a[5]) {
                f.setDate(a[5]);
                b.setDate(a[5])
            }
            gb(f, b);
            a[7] && f.setHours(a[7]);
            a[8] && f.setMinutes(a[8]);
            a[10] && f.setSeconds(a[10]);
            a[12] && f.setMilliseconds(Number("0." + a[12]) * 1E3);
            gb(f, b)
        } else {
            f.setUTCFullYear(a[1], a[3] ? a[3] - 1 : 0, a[5] || 1);
            f.setUTCHours(a[7] || 0, a[8] || 0, a[10] || 0, a[12] ? Number("0." + a[12]) * 1E3 : 0);
            b = Number(a[16]) * 60 + Number(a[17]);
            b *= a[15] == "-" ? 1 : -1;
            f = new Date(+f + b * 60 * 1E3)
        }
        return f
    }
    function bb(a) {
        if (typeof a == "number") return a * 60;
        if (typeof a == "object") return a.getHours() * 60 + a.getMinutes();
        if (a = a.match(/(\d+)(?::(\d+))?\s*(\w+)?/)) {
            var b = parseInt(a[1]);
            if (a[3]) {
                b %= 12;
                if (a[3].toLowerCase().charAt(0) == "p") b += 12
            }
            return b * 60 + (a[2] ? parseInt(a[2]) : 0)
        }
    }
    function Ha(a, b, f) {
        return Va(a, null, b, f)
    }
    function Va(a, b, f, e) {
        e = e || Oa;
        var g = a,
            h = b,
            m, o = f.length,
            t, z, N, O = "";
        for (m = 0; m < o; m++) {
            t = f.charAt(m);
            if (t == "'") for (z = m + 1; z < o; z++) {
                if (f.charAt(z) == "'") {
                    if (g) {
                        O += z == m + 1 ? "'" : f.substring(m + 1, z);
                        m = z
                    }
                    break
                }
            } else if (t == "(") for (z = m + 1; z < o; z++) {
                if (f.charAt(z) == ")") {
                    m = Ha(g, f.substring(m + 1, z), e);
                    if (parseInt(m.replace(/\D/, ""))) O += m;
                    m = z;
                    break
                }
            } else if (t == "[") for (z = m + 1; z < o; z++) {
                if (f.charAt(z) == "]") {
                    t = f.substring(m + 1, z);
                    m = Ha(g, t, e);
                    if (m != Ha(h, t, e)) O += m;
                    m = z;
                    break
                }
            } else if (t == "{") {
                g = b;
                h = a
            } else if (t == "}") {
                g = a;
                h = b
            } else {
                for (z = o; z > m; z--) if (N = Sb[f.substring(m, z)]) {
                    if (g) O += N(g, e);
                    m = z - 1;
                    break
                }
                if (z == m) if (g) O += t
            }
        }
        return O
    }
    function Na(a) {
        return a.end ? Tb(a.end, a.allDay) : T(C(a.start), 1)
    }
    function Tb(a, b) {
        a = C(a);
        return b || a.getHours() || a.getMinutes() ? T(a, 1) : Ga(a)
    }
    function Ub(a, b) {
        return (b.msLength - a.msLength) * 100 + (a.event.start - b.event.start)
    }
    function zb(a, b) {
        return a.end > b.start && a.start < b.end
    }
    function ab(a, b, f, e) {
        var g = [],
            h, m = a.length,
            o, t, z, N, O;
        for (h = 0; h < m; h++) {
            o = a[h];
            t = o.start;
            z = b[h];
            if (z > f && t < e) {
                if (t < f) {
                    t = C(f);
                    N = false
                } else {
                    t = t;
                    N = true
                }
                if (z > e) {
                    z = C(e);
                    O = false
                } else {
                    z = z;
                    O = true
                }
                g.push({
                    event: o,
                    start: t,
                    end: z,
                    isStart: N,
                    isEnd: O,
                    msLength: z - t
                })
            }
        }
        return g.sort(Ub)
    }
    function $a(a) {
        var b = [],
            f, e = a.length,
            g, h, m, o;
        for (f = 0; f < e; f++) {
            g = a[f];
            for (h = 0;;) {
                m = false;
                if (b[h]) for (o = 0; o < b[h].length; o++) if (zb(b[h][o], g)) {
                    m = true;
                    break
                }
                if (m) h++;
                else break
            }
            if (b[h]) b[h].push(g);
            else b[h] = [g]
        }
        return b
    }
    function xb(a, b, f) {
        a.unbind("mouseover").mouseover(function (e) {
            for (var g = e.target, h; g != this;) {
                h = g;
                g = g.parentNode
            }
            if ((g = h._fci) !== ga) {
                h._fci = ga;
                h = b[g];
                f(h.event, h.element, h);
                l(e.target).trigger(e)
            }
            e.stopPropagation()
        })
    }
    function Ia(a, b, f) {
        a.each(function (e, g) {
            g.style.width = Math.max(0, b - fb(g, f)) + "px"
        })
    }
    function Pa(a, b, f) {
        a.each(function (e, g) {
            g.style.height = Math.max(0, b - Sa(g, f)) + "px"
        })
    }
    function fb(a, b) {
        return (parseFloat(l.curCSS(a, "paddingLeft", true)) || 0) + (parseFloat(l.curCSS(a, "paddingRight", true)) || 0) + (parseFloat(l.curCSS(a, "borderLeftWidth", true)) || 0) + (parseFloat(l.curCSS(a, "borderRightWidth", true)) || 0) + (b ? Vb(a) : 0)
    }
    function Vb(a) {
        return (parseFloat(l.curCSS(a, "marginLeft", true)) || 0) + (parseFloat(l.curCSS(a, "marginRight", true)) || 0)
    }
    function Sa(a, b) {
        return (parseFloat(l.curCSS(a, "paddingTop", true)) || 0) + (parseFloat(l.curCSS(a, "paddingBottom", true)) || 0) + (parseFloat(l.curCSS(a, "borderTopWidth", true)) || 0) + (parseFloat(l.curCSS(a, "borderBottomWidth", true)) || 0) + (b ? Bb(a) : 0)
    }
    function Bb(a) {
        return (parseFloat(l.curCSS(a, "marginTop", true)) || 0) + (parseFloat(l.curCSS(a, "marginBottom", true)) || 0)
    }
    function Ra(a, b) {
        b = typeof b == "number" ? b + "px" : b;
        a[0].style.cssText += ";min-height:" + b + ";_height:" + b
    }
    function ib() {}
    function eb(a, b) {
        return a - b
    }
    function Ab(a) {
        return Math.max.apply(Math, a)
    }
    function Ma(a) {
        return (a < 10 ? "0" : "") + a
    }
    function Wa(a, b) {
        if (a[b] !== ga) return a[b];
        b = b.split(/(?=[A-Z])/);
        for (var f = b.length - 1, e; f >= 0; f--) {
            e = a[b[f].toLowerCase()];
            if (e !== ga) return e
        }
        return a[""]
    }
    function La(a) {
        return a.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/'/g, "&#039;").replace(/"/g, "&quot;").replace(/\n/g, "<br />")
    }
    function yb(a) {
        return a.id + "/" + a.className + "/" + a.style.cssText.replace(/(^|;)\s*(top|left|width|height)\s*:[^;]*/ig, "")
    }
    function ob(a) {
        a.attr("unselectable", "on").css("MozUserSelect", "none").bind("selectstart.ui", function () {
            return false
        })
    }
    var Oa = {
        defaultView: "month",
        aspectRatio: 1.35,
        header: {
            left: "title",
            center: "",
            right: "today prev,next"
        },
        weekends: true,
        allDayDefault: true,
        ignoreTimezone: true,
        lazyFetching: true,
        startParam: "start",
        endParam: "end",
        titleFormat: {
            month: "MMMM yyyy",
            week: "MMM d[ yyyy]{ '&#8212;'[ MMM] d yyyy}",
            day: "dddd, MMM d, yyyy"
        },
        columnFormat: {
            month: "ddd",
            week: "ddd M/d",
            day: "dddd M/d"
        },
        timeFormat: {
            "": "h(:mm)t"
        },
        isRTL: false,
        firstDay: 0,
        monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
        monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
        dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
        dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
        buttonText: {
            prev: "&nbsp;&#9668;&nbsp;",
            next: "&nbsp;&#9658;&nbsp;",
            prevYear: "&nbsp;&lt;&lt;&nbsp;",
            nextYear: "&nbsp;&gt;&gt;&nbsp;",
            today: "today",
            month: "month",
            week: "week",
            day: "day"
        },
        theme: false,
        buttonIcons: {
            prev: "circle-triangle-w",
            next: "circle-triangle-e"
        },
        unselectAuto: true,
        dropAccept: "*"
    },
        Wb = {
            header: {
                left: "next,prev today",
                center: "",
                right: "title"
            },
            buttonText: {
                prev: "&nbsp;&#9658;&nbsp;",
                next: "&nbsp;&#9668;&nbsp;",
                prevYear: "&nbsp;&gt;&gt;&nbsp;",
                nextYear: "&nbsp;&lt;&lt;&nbsp;"
            },
            buttonIcons: {
                prev: "circle-triangle-e",
                next: "circle-triangle-w"
            }
        },
        Ea = l.fullCalendar = {
            version: "1.4.9"
        },
        Fa = Ea.views = {};
    l.fn.fullCalendar = function (a) {
        if (typeof a == "string") {
            var b = Array.prototype.slice.call(arguments, 1),
                f;
            this.each(function () {
                var g = l.data(this, "fullCalendar");
                if (g && l.isFunction(g[a])) {
                    g = g[a].apply(g, b);
                    if (f === ga) f = g;
                    a == "destroy" && l.removeData(this, "fullCalendar")
                }
            });
            if (f !== ga) return f;
            return this
        }
        var e = a.eventSources || [];
        delete a.eventSources;
        if (a.events) {
            e.push(a.events);
            delete a.events
        }
        a = l.extend(true, {}, Oa, a.isRTL || a.isRTL === ga && Oa.isRTL ? Wb : {}, a);
        this.each(function (g, h) {
            g = l(h);
            h = new Db(g, a, e);
            g.data("fullCalendar", h);
            h.render()
        });
        return this
    };
    var Gb = 1;
    Fa.month = Hb;
    Fa.basicWeek = Ib;
    Fa.basicDay = Jb;
    var Za;
    hb({
        weekMode: "fixed"
    });
    Fa.agendaWeek = Lb;
    Fa.agendaDay = Mb;
    hb({
        allDaySlot: true,
        allDayText: "all-day",
        firstHour: 6,
        slotMinutes: 30,
        defaultEventMinutes: 120,
        axisFormat: "h(:mm)tt",
        timeFormat: {
            agenda: "h:mm{ - h:mm}"
        },
        dragOpacity: {
            agenda: 0.5
        },
        minTime: 0,
        maxTime: 24
    });
    Ea.addDays = T;
    Ea.cloneDate = C;
    Ea.parseDate = Xa;
    Ea.parseISO8601 = Cb;
    Ea.parseTime = bb;
    Ea.formatDate = Ha;
    Ea.formatDates = Va;
    var Ca = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"],
        kb = 864E5,
        Rb = 36E5,
        Qb = 6E4,
        Sb = {
            s: function (a) {
                return a.getSeconds()
            },
            ss: function (a) {
                return Ma(a.getSeconds())
            },
            m: function (a) {
                return a.getMinutes()
            },
            mm: function (a) {
                return Ma(a.getMinutes())
            },
            h: function (a) {
                return a.getHours() % 12 || 12
            },
            hh: function (a) {
                return Ma(a.getHours() % 12 || 12)
            },
            H: function (a) {
                return a.getHours()
            },
            HH: function (a) {
                return Ma(a.getHours())
            },
            d: function (a) {
                return a.getDate()
            },
            dd: function (a) {
                return Ma(a.getDate())
            },
            ddd: function (a, b) {
                return b.dayNamesShort[a.getDay()]
            },
            dddd: function (a, b) {
                return b.dayNames[a.getDay()]
            },
            M: function (a) {
                return a.getMonth() + 1
            },
            MM: function (a) {
                return Ma(a.getMonth() + 1)
            },
            MMM: function (a, b) {
                return b.monthNamesShort[a.getMonth()]
            },
            MMMM: function (a, b) {
                return b.monthNames[a.getMonth()]
            },
            yy: function (a) {
                return (a.getFullYear() + "").substring(2)
            },
            yyyy: function (a) {
                return a.getFullYear()
            },
            t: function (a) {
                return a.getHours() < 12 ? "a" : "p"
            },
            tt: function (a) {
                return a.getHours() < 12 ? "am" : "pm"
            },
            T: function (a) {
                return a.getHours() < 12 ? "A" : "P"
            },
            TT: function (a) {
                return a.getHours() < 12 ? "AM" : "PM"
            },
            u: function (a) {
                return Ha(a, "yyyy-MM-dd'T'HH:mm:ss'Z'")
            },
            S: function (a) {
                a = a.getDate();
                if (a > 10 && a < 20) return "th";
                return ["st", "nd", "rd"][a % 10 - 1] || "th"
            }
        }
})(jQuery);
