if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
  var msViewportStyle = document.createElement('style')
  msViewportStyle.appendChild(
    document.createTextNode(
      '@-ms-viewport{width:auto!important}'
    )
  )
  document.querySelector('head').appendChild(msViewportStyle)
}

$(function () {
  var nua = navigator.userAgent
  var isAndroid = (nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1 && nua.indexOf('Chrome') === -1)
  if (isAndroid) {
    $('select.form-control').removeClass('form-control').css('width', '100%')
  }
});

function tip(msg, isok)
{
    if (!msg){
         msg = '±£´æÖÐ...';
    }

    var icon = 'notched circle loading icon';
    var bg = 'ui small black message';
    if (isok){
        icon = 'thumbs up icon';
        bg = 'ui small green message';
    }

    $('#tipBoxBg').attr('class', bg);
    $('#tipBoxIcon').attr('class', icon);
    $('#tipBoxTitle').text(msg);
    $('#tipBox').transition('fly left');

    setTimeout(function(){
        $('#tipBox').transition('fly left');
    }, 2000);
}