// JavaScript Document

 var broswer = (function () {
        var u = navigator.userAgent, app = navigator.appVersion;
		var sUserAgent= navigator.userAgent.toLowerCase(); 
		var bIsIpad= sUserAgent.match(/ipad/i) == "ipad"; 
		var bIsIphoneOs= sUserAgent.match(/iphone os/i) == "iphone os"; 
		var bIsMidp= sUserAgent.match(/midp/i) == "midp"; 
		var bIsUc7= sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4"; 
		var bIsUc= sUserAgent.match(/ucweb/i) == "ucweb"; 
		var bIsAndroid= sUserAgent.match(/android/i) == "android"; 
		var bIsCE= sUserAgent.match(/windows ce/i) == "windows ce"; 
		var bIsWM= sUserAgent.match(/windows phone/i) == "windows phone"; 
		var bIsXM= sUserAgent.match(/xiaomi/i) == "xiaomi"; 
        return {
            trident: u.indexOf('Trident') > -1, //IE core               
            presto: u.indexOf('Presto') > -1, //opera core                
            webKit: u.indexOf('AppleWebKit') > -1, //apple goggle                 
            gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //firfox                
            mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/), //mobile

            ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios terminate                
            android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android or uc browser  

            iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //iphone or qqmac browser    

            iPad: u.indexOf('iPad') > -1, //iPad?                
            webApp: u.indexOf('Safari') == -1 //是否web应该程序，没有头部与底部  
			,isMobile:function(){
				if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM || bIsXM){
					return true;
				}else{
					return false;
				}
			}
        }
    })();