var ua=navigator.userAgent.toLowerCase();
var contains=function (a, b){
if(a.indexOf(b)!=-1){return true;}
};
var toMobileVertion = function(){
window.location.href = '/wap'+window.location.pathname;
}
if(contains(ua,"ipad")||(contains(ua,"rv:1.2.3.4"))||(contains(ua,"0.0.0.0"))||(contains(ua,"8.0.552.237"))){return false}
if((contains(ua,"android") && contains(ua,"mobile"))||(contains(ua,"android") && contains(ua,"mozilla")) ||(contains(ua,"android") && contains(ua,"opera"))
||contains(ua,"ucweb7")||contains(ua,"iphone")){toMobileVertion();}