function MobileDetect(userAgent, maxPhoneWidth) {
        this.ua = prepareUserAgent(userAgent);
        this._cache = {};
        //600dp is typical 7" tablet minimum width
        this.maxPhoneWidth = maxPhoneWidth || 600;
    }
Constructor for MobileDetect object.
<br>
Such an object will keep a reference to the given user-agent string and cache most of the detect queries.<br>
<div style="background-color: #d9edf7; border: 1px solid #bce8f1; color: #3a87ad; padding: 14px; border-radius: 2px; margin-top: 20px">
    <strong>Find information how to download and install:</strong>
    <a href="https://github.com/hgoebl/mobile-detect.js/">github.com/hgoebl/mobile-detect.js/</a>
</div>

@example <pre>
    var md = new MobileDetect(window.navigator.userAgent);
    if (md.mobile()) {
        location.href = (md.mobileGrade() === 'A') ? '/mobile/' : '/lynx/';
    }
</pre>

@param {string} userAgent typically taken from window.navigator.userAgent or http_header['User-Agent']
@param {number} [maxPhoneWidth=600] <strong>only for browsers</strong> specify a value for the maximum
       width of smallest device side (in logical "CSS" pixels) until a device detected as mobile will be handled
       as phone.
       This is only used in cases where the device cannot be classified as phone or tablet.<br>
       See <a href="http://developer.android.com/guide/practices/screens_support.html">Declaring Tablet Layouts
       for Android</a>.<br>
       If you provide a value < 0, then this "fuzzy" check is disabled.
@constructor
@global