(function () {
    var e, d, i, r, n, o, v, t, c;
    e = window.devdet, window.devdet = {}, i = window.document.documentElement, c = window.navigator.userAgent.toLowerCase(), devdet.ios = function () {
        return devdet.iphone() || devdet.ipod() || devdet.ipad()
    }, devdet.iphone = function () {
        return r("iphone")
    }, devdet.ipod = function () {
        return r("ipod")
    }, devdet.ipad = function () {
        return r("ipad")
    }, devdet.android = function () {
        return r("android")
    }, devdet.androidPhone = function () {
        return devdet.android() && r("mobile")
    }, devdet.androidTablet = function () {
        return devdet.android() && !r("mobile")
    }, devdet.blackberry = function () {
        return r("blackberry") || r("bb10") || r("rim")
    }, devdet.blackberryPhone = function () {
        return devdet.blackberry() && !r("tablet")
    }, devdet.blackberryTablet = function () {
        return devdet.blackberry() && r("tablet")
    }, devdet.windows = function () {
        return r("windows")
    }, devdet.windowsPhone = function () {
        return devdet.windows() && r("phone")
    }, devdet.windowsTablet = function () {
        return devdet.windows() && r("touch")
    }, devdet.fxos = function () {
        return (r("(mobile;") || r("(tablet;")) && r("; rv:")
    }, devdet.fxosPhone = function () {
        return devdet.fxos() && r("mobile")
    }, devdet.fxosTablet = function () {
        return devdet.fxos() && r("tablet")
    }, devdet.meego = function () {
        return r("meego")
    }, devdet.mobile = function () {
        return devdet.androidPhone() || devdet.iphone() || devdet.ipod() || devdet.windowsPhone() || devdet.blackberryPhone() || devdet.fxosPhone() || devdet.meego()
    }, devdet.tablet = function () {
        return devdet.ipad() || devdet.androidTablet() || devdet.blackberryTablet() || devdet.windowsTablet() || devdet.fxosTablet()
    }, devdet.portrait = function () {
        return 90 !== Math.abs(window.orientation)
    }, devdet.landscape = function () {
        return 90 === Math.abs(window.orientation)
    }, devdet.noConflict = function () {
        return window.devdet = e, this
    }, r = function (e) {
        return -1 !== c.indexOf(e)
    }, o = function (e) {
        var d;
        return d = new RegExp(e, "i"), i.className.match(d)
    }, d = function (e) {
        return o(e) ? void 0 : i.className += " " + e
    }, t = function (e) {
        return o(e) ? i.className = i.className.replace(e, "") : void 0
    }, devdet.ios() ? devdet.ipad() ? d("ios ipad tablet") : devdet.iphone() ? d("ios iphone mobile") : devdet.ipod() && d("ios ipod mobile") : devdet.android() ? devdet.androidTablet() ? d("android tablet") : d("android mobile") : devdet.blackberry() ? devdet.blackberryTablet() ? d("blackberry tablet") : d("blackberry mobile") : devdet.windows() ? devdet.windowsTablet() ? d("windows tablet") : devdet.windowsPhone() ? d("windows mobile") : d("desktop") : devdet.fxos() ? devdet.fxosTablet() ? d("fxos tablet") : d("fxos mobile") : devdet.meego() ? d("meego mobile") : d("desktop"), n = function () {
        return devdet.landscape() ? (t("portrait"), d("landscape")) : (t("landscape"), d("portrait"))
    }, v = "onorientationchange" in window ? "orientationchange" : "resize", window.addEventListener ? window.addEventListener(v, n, !1) : window.attachEvent ? window.attachEvent(v, n) : window[v] = n, n()
}).call(this);