var Wick = Wick || {};
Wick.isTradeProAndroid = (function(){
    if (navigator.userAgent.match(/TradeProMobile_Android|DIYMobile_Android/i)) {
        return true;
    }
})();

Wick.isTradeProiOS = (function(){
    if (navigator.userAgent.match(/TradeProMobile_iOS|DIYMobile_iOS/i)) {
        return true;
    }
})();

Wick.isTradePro = (function(){
    if (navigator.userAgent.match(/TradeProMobile_iOS|TradeProMobile_Android|DIYMobile_iOS|DIYMobile_Android/i)) {
        return true;
    }
})();

$(document).ready(function () {
    if (navigator.userAgent.match(/TradeProMobile_iOS|TradeProMobile_Android|DIYMobile_iOS|DIYMobile_Android/i)) {
        $('body').addClass('tp-app');
    }
});

$(function() {
    if (Wick.isTradeProAndroid) {
        $('body').addClass('tp-android');
    }
    if (Wick.isTradeProiOS) {
        $('body').addClass('tp-ios');
        if (
          window.matchMedia('(min-width: 768px)').matches
        ) {
            $('body').addClass('tp-ios-notch');
        }
    }
});
