var browser=navigator.appName; var b_version=navigator.appVersion; var version=b_version.split(";"); if (!version[1]) {$('.loadingBg').fadeOut(300)}; var trim_Version=version[1].replace(/[ ]/g,""); var isIE = function(){ if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE6.0") { return true; } else if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE7.0") { return true; } else if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE8.0") { return true; } else if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE9.0") { return false; } } $(window).on("load",function(){ if (isIE()){ $('.loadinglg').hide(); $('html,body').css({"overflow":"hidden"}); $('body').html($('
')); }else{ $('.loadingBg').fadeOut(300); } }) $(function(){ $('.header .nav ul li').hover(function(){ $(this).find('.details').stop().slideDown(500); },function(){ $(this).find('.details').stop().slideUp(500); }) $('.footer .foot .box .guanzhu').hover(function(){ $('.footer .foot .box .tipimg').stop().fadeToggle(); }) $('.header-phone .serch .lines').on('click',function(){ if ($(this).hasClass('cur')) { $(this).removeClass('cur'); $('.header-phone .tip-nav').stop().slideUp(); }else{ $(this).addClass('cur'); $('.header-phone .tip-nav').stop().slideDown(); } }) $('.header-phone .tip-nav li .title').on('click',function(){ var _this=$(this).parent('li'); if ($(_this).hasClass('on')) { $(_this).removeClass('on'); $(_this).find('.details').stop().slideUp(); }else{ $(_this).addClass('on').siblings('li').removeClass('on');; $(_this).find('.details').stop().slideDown().parent('li').siblings('li').find('.details').stop().slideUp(); } }) $('.header-phone .serch .ser').on('click',function(){ $('.header-phone .serch .lines').removeClass('cur'); $('.header-phone .tip-nav').stop().slideUp(); $('.header-phone .tip-bg').stop().slideDown(); $('.header-phone .tip-serch').stop().slideDown(); }) $(' .header-phone .tip-serch .close').on('click',function(){ $('.header-phone .tip-serch').stop().slideUp(); $('.header-phone .tip-bg').stop().slideUp(); }) $('.base-title .warp a').hover(function(){ $('.base-title .warp a').removeClass('on').eq($(this).index()).addClass('on'); }) $('.base-title .mian a').on('click',function(){ if ($(this).hasClass('cur')) { $('.base-title .mian a').removeClass('cur'); } else{ $('.base-title .mian a').addClass('cur'); }; }) $('.base-title .warp a').eq(0).addClass('on'); $('.base-title .mian a').eq(0).addClass('on'); $(window).resize(function(){ mtop(); }) $('.footer .foot .right').hover(function(){ $('.footer .foot .right .ttip').stop().slideToggle(); }) $('.phone-fot .bg').on('click',function(){ $('.phone-fot .box').stop().slideToggle(); }) }); function mtop(){ var _hei=parseInt($('.base-ban .warp').css('height')); $('.base-ban .warp').css('margin-top',-_hei/2); }