if (typeof(Slider) === "undefined") {
    Slider = {};
}
Slider.Detector = {
    getAgent: function() {
        return navigator.userAgent.toLowerCase();
    },
    isMac: function(M) {
        var U = M || this.getAgent();
        return !! U.match(/mac/i);
    },
    isWin: function(M) {
        var U = M || this.getAgent();
        return !! U.match(/win/i);
    },
    isWin2k: function(M) {
        var U = M || this.getAgent();
        return this.isWin(U) && (U.match(/nt\s*5/i));
    },
    isWinVista: function(M) {
        var U = M || this.getAgent();
        return this.isWin(U) && (U.match(/nt\s*6/i));
    },
    isWebKit: function(M) {
        var U = M || this.getAgent();
        return !! U.match(/AppleWebKit/i);
    },
    isOpera: function(M) {
        var U = M || this.getAgent();
        return !! U.match(/opera/i);
    },
    isIE: function(M) {
        var U = M || this.getAgent();
        return !! U.match(/msie/i);
    },
    isIEStrict: function(M) {
        var U = M || this.getAgent();
        return U.match(/msie/i) && !this.isOpera(U);
    },
    isFirefox: function(M) {
        var U = M || this.getAgent();
        return !! U.match(/firefox/i);
    },
    isMobile: function(M) {
        var U = M || this.getAgent();
        return this.isWebKit(U) && U.match(/Mobile/i);
    },
    isiPhone: function(M) {
        return this.isMobile(M);
    }
};
