var pla=this.ismobile(1);
if(pla == 0){
$('.tanbm').css({'position':'absolute'});
var height = $('.form').height();
height = ($('.form').height()/$(window).height())/2;
$('.form').css({'margin-top':((height)*100).toFixed(2)+'%'});
if($(window).width()<400){
$('.tanbm .form .input_group').css({'padding-top':'0.25rem'});
$('.vcode_btn').css({'margin-top':'-5.4%'});
} else{
$('.tanbm .form .input_group').css({'padding-top':'0.25rem'});
$('.vcode_btn').css({'margin-top':'-6.5%'});
}
}
$(document).bind('mousewheel DOMMouseScroll MozMousePixelScroll', function(event) {
event = event || window.event;
if($(".tanbm").is(":visible")){
return false;
}
});
$(document).bind('touchmove', function(event) {
event = event || window.event;
if($(".tanbm").is(":visible")){
return false;
}
});
ismobile:function(test){
var u = navigator.userAgent, app = navigator.appVersion;
if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){
if(window.location.href.indexOf("?mobile")<0){
try{
if(/iPhone|mac|iPod|iPad/i.test(navigator.userAgent)){
return '0';
}else{
return '1';
}
}catch(e){}
}
}else if( u.indexOf('iPad') > -1){
return '0';
}else{
return '1';
}
}
var utils = {
ua: navigator.userAgent,
isAndroid: function () {
// Android
return
this.ua.match(/Android/i);
},
isIos: function () {
// IOS
return
this.ua.match(/iPhone|iPod|iPad/i);
},
}
if (utils.isIos()) {
$('.bm_box').css('position','absolute');
$('body').css('height','100%');
}