var dateFormat = function () {
    var g = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
        timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
        timezoneClip = /[^-+\dA-Z]/g,
        pad = function (a, b) {
            a = String(a);
            b = b || 2;
            while (a.length < b) a = "0" + a;
            return a
        };
    return function (b, c, e) {
        var f = dateFormat;
        if (arguments.length == 1 && Object.prototype.toString.call(b) == "[object String]" && !/\d/.test(b)) {
            c = b;
            b = undefined
        }
        b = b ? new Date(b) : new Date;
        if (isNaN(b)) throw SyntaxError("invalid date");
        c = String(f.masks[c] || c || f.masks["default"]);
        if (c.slice(0, 4) == "UTC:") {
            c = c.slice(4);
            e = true
        }
        var _ = e ? "getUTC" : "get",
            d = b[_ + "Date"](),
            D = b[_ + "Day"](),
            m = b[_ + "Month"](),
            y = b[_ + "FullYear"](),
            H = b[_ + "Hours"](),
            M = b[_ + "Minutes"](),
            s = b[_ + "Seconds"](),
            L = b[_ + "Milliseconds"](),
            o = e ? 0 : b.getTimezoneOffset(),
            flags = {
                d: d,
                dd: pad(d),
                ddd: f.i18n.dayNames[D],
                dddd: f.i18n.dayNames[D + 7],
                m: m + 1,
                mm: pad(m + 1),
                mmm: f.i18n.monthNames[m],
                mmmm: f.i18n.monthNames[m + 12],
                yy: String(y).slice(2),
                yyyy: y,
                h: H % 12 || 12,
                hh: pad(H % 12 || 12),
                H: H,
                HH: pad(H),
                M: M,
                MM: pad(M),
                s: s,
                ss: pad(s),
                l: pad(L, 3),
                L: pad(L > 99 ? Math.round(L / 10) : L),
                t: H < 12 ? "a" : "p",
                tt: H < 12 ? "am" : "pm",
                T: H < 12 ? "A" : "P",
                TT: H < 12 ? "AM" : "PM",
                Z: e ? "UTC" : (String(b).match(timezone) || [""]).pop().replace(timezoneClip, ""),
                o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
                S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
            };
        return c.replace(g, function (a) {
            return a in flags ? flags[a] : a.slice(1, a.length - 1)
        })
    }
}();
dateFormat.masks = {
    "default": "ddd mmm dd yyyy HH:MM:ss",
    shortDate: "m/d/yy",
    mediumDate: "mmm d, yyyy",
    longDate: "mmmm d, yyyy",
    fullDate: "dddd, mmmm d, yyyy",
    shortTime: "h:MM TT",
    mediumTime: "h:MM:ss TT",
    longTime: "h:MM:ss TT Z",
    isoDate: "yyyy-mm-dd",
    isoTime: "HH:MM:ss",
    isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
    isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
};
dateFormat.i18n = {
    dayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
    monthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
};
Date.prototype.format = function (a, b) {
    return dateFormat(this, a, b)
};
$.fn.dropdown = function () {
    $(this).hover(function () {
        $(this).addClass("hover");
        $('> .dir', this).addClass("open");
        $('ul:first', this).css('visibility', 'visible')
    }, function () {
        $(this).removeClass("hover");
        $('.open', this).removeClass("open");
        $('ul:first', this).css('visibility', 'hidden')
    })
}
function formatText(a, b) {
    return a + ""
}
$(document).ready(function () {
    $.featureList($("#tabs li a"), $("#output li"), {
        start_item: 0
    })
});
$(function () {
    $("button").button();
    var e = $('#from, #to').datepicker({
        defaultDate: "+1w",
        changeMonth: true,
        numberOfMonths: 1,
        onSelect: function (a) {
            var b = this.id == "from" ? "minDate" : "maxDate";
            var c = $(this).data("datepicker");
            var d = $.datepicker.parseDate(c.settings.dateFormat || $.datepicker._defaults.dateFormat, a, c.settings);
            e.not(this).datepicker("option", b, d)
        }
    })
});
