function browser() {
    var b = !!(window.opera && window.opera.version);
    var e = a("MozBoxSizing");
    var c = Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor") > 0;
    var d = !c && a("WebkitTransform");

    function a(f) {
        return f in document.documentElement.style
    }

    if (b) {
        return false
    } else {
        if (c || d) {
            return true
        } else {
            return false
        }
    }
}
jQuery(document).ready(function (a) {
    a("input, textarea").placeholder()
});
jQuery(document).ready(function (a) {
    a("textarea").autosize()
});
jQuery(document).ready(function (a) {
    a(".discussions").find(".delete").click(function () {
        a(this).parent().fadeTo("slow", 0, function () {
            a(this).slideUp("slow", function () {
                a(this).remove()
            })
        })
    })
});
jQuery(document).ready(function (a) {
    if (a(".messagesList").width()) {
        if (jQuery.browser.version.substring(0, 2) == "8.") {
            a("ul.messagesList li:nth-child(2n+1)").addClass("odd")
        }
    }
});
function retina() {
    retinaMode = (window.devicePixelRatio > 1);
    return retinaMode
}
jQuery(document).ready(function (a) {
    a("ul.main-menu li a").each(function () {
        if (a(a(this))[0].href == String(window.location)) {
            a(this).parent().addClass("active")
        }
    });
    a("ul.main-menu li ul li a").each(function () {
        if (a(a(this))[0].href == String(window.location)) {
            a(this).parent().addClass("active");
            a(this).parent().parent().show()
        }
    });
    a(".dropmenu").click(function (b) {
        b.preventDefault();
        a(this).parent().find("ul").slideToggle()
    })
});
jQuery(document).ready(function (b) {
    var a = true;
    b("#main-menu-toggle").click(function () {
        if (b(this).hasClass("open")) {
            b(this).removeClass("open").addClass("close");
            var f = b("#content").attr("class");
            var e = parseInt(f.replace(/^\D+/g, ""));
            var c = e + 2;
            var d = "span" + c;
            b("#content").addClass("full");
            b(".brand").addClass("noBg");
            b("#sidebar-left").hide()
        } else {
            b(this).removeClass("close").addClass("open");
            var f = b("#content").attr("class");
            var e = parseInt(f.replace(/^\D+/g, ""));
            var c = e - 2;
            var d = "span" + c;
            b("#content").removeClass("full");
            b(".brand").removeClass("noBg");
            b("#sidebar-left").show()
        }
    })
});
jQuery(document).ready(function (a) {
    if (a(".boxchart")) {
        if (retina()) {
            a(".boxchart").sparkline("html", {type: "bar", height: "60", barWidth: "8", barSpacing: "2", barColor: "#ffffff", negBarColor: "#eeeeee"});
            a(".boxchart").css("zoom", 0.5)
        } else {
            a(".boxchart").sparkline("html", {type: "bar", height: "30", barWidth: "4", barSpacing: "1", barColor: "#ffffff", negBarColor: "#eeeeee"})
        }
    }
});
jQuery(document).ready(function (a) {
    a(".todo-actions > a").click(function () {
        if (a(this).find("i").attr("class") == "icon-check-empty") {
            a(this).find("i").removeClass("icon-check-empty").addClass("icon-check");
            a(this).parent().parent().find("span").css({opacity: 0.25});
            a(this).parent().parent().find(".desc").css("text-decoration", "line-through")
        } else {
            a(this).find("i").removeClass("icon-check").addClass("icon-check-empty");
            a(this).parent().parent().find("span").css({opacity: 1});
            a(this).parent().parent().find(".desc").css("text-decoration", "none")
        }
        return false
    });
    a(function () {
        a(".todo-list").sortable();
        a(".todo-list").disableSelection()
    })
});