/* 
SmartPhone detection

This script called in cardloan top page.
SmartPhone pages are supported iPhone and Android.
1. iPhone device detection.
2. Android device detection.
3. Exclude unsupported device.
*/
//alert("1:" + navigator.userAgent);
// iPhone Detect
if (WebKitDetect.isMobile_iPhone()) {
    function is_mobile_iphone_excluded() {
        var pattern = new RegExp(iphone_ver_useragents.join('|'), 'i');
        if (WebKitDetect.isMobile_iPhone_ver()) {
            return pattern.test(WebKitDetect.isMobile_iPhone_ver()); // Match or not match in blacklist
        } else {
            return false; // Not match in blacklist.
        }
    }
    if (is_mobile_iphone_excluded()) {
    }else{
        location.href='/s/';
    }
} else // Android Detect
if (WebKitDetect.isMobile_Android()) {
    function is_mobile_android_excluded() {
        var pattern = new RegExp(android_useragents.join('|'), 'i');
        return pattern.test(WebKitDetect.isMobile_android_dev_name());
    }
    if (is_mobile_android_excluded()){
    }else{
        location.href='/s/';
    }
}
