$(function(){ $(window).load(function(){ $('.loadingbg').fadeout(); }) $("header .right .nav").on('click',function() { var $p = $(this).find("p"); if($p.hasclass('cur')){ $p.removeclass('cur'); $('.tipbg').slideup(); }else{ $p.addclass('cur'); $('.tipbg').slidedown(); } }) $("header nav ul li .tit").on('click',function() { var _this = $(this).parent("li"); if($(_this).hasclass('cur')) { $(_this).removeclass('on'); $(_this).removeclass('cur'); $(_this).find('.child').stop().slideup(); } else{ $(_this).addclass('on').siblings('li').removeclass('on'); $(_this).addclass('cur').siblings('li').removeclass('cur'); $(_this).find('.child').stop().slidedown().parent('li').siblings('li').find('.child').stop().slideup(); } }) $('header .right .nav').on('click',function(){ $('header nav').stop().slidetoggle(); }) $('.serbg i').on('click',function(){ $('.serbg').slideup(); }) $('header .right .serch').on('click',function(){ $('.serbg').slidedown(); $('.tipbg').slideup(); $('header nav').slideup(); $("header .right .nav p").removeclass('cur'); }) $('.tipbg').on('click',function(){ $('.tipbg').slideup(); $('header nav').slideup(); $("header .right .nav p").removeclass('cur'); }) $('header nav ul li .phone-nav').on('click',function(){ $('.tipbg').slideup(); $('header nav').slideup(); $("header .right .nav p").removeclass('cur'); }) $(".navv").on('click',function() { var $p = $(this).find("p"); if($p.hasclass('cur')){ $p.removeclass('cur'); }else{ $p.addclass('cur'); } }) $(".float-box .bot").on('click',function() { settimeout(function(){ $('.header-warp').addclass('on'); },500) $('.header').addclass('on'); $('.header-left').addclass('on'); settimeout(function(){ $('.header .nav1').addclass('on'); },600); settimeout(function(){ $('.header .nav2').addclass('on'); var _mll=$('.header .nav2 li').eq(0).offset().left; var _ewl=$(window).width()*0.25; var _widl=parseint($('.header .nav2 li').eq(0).css('width')); $('.header .nav2 i').stop().animate({'width':_mll-_ewl+_widl}) },800); settimeout(function(){ $('.header .language').addclass('on'); },1000); }) $(".header .navv").on('click',function() { $('.header-warp').removeclass('on'); $('.header').removeclass('on'); $('.header .nav1').removeclass('on'); $('.header .nav2').removeclass('on'); $('.header .language').removeclass('on'); $('.header-left').removeclass('on'); }) $('.header .nav2 li a').on('click',function(){ $(".navv").find('p').removeclass('cur'); $('.header').removeclass('on'); $('.header .nav1').removeclass('on'); $('.header .nav2').removeclass('on'); $('.header .language').removeclass('on'); $('.header-left').removeclass('on'); }) $('.header .nav1 a').on('click',function(){ $(".navv").find('p').removeclass('cur'); $('.header').removeclass('on'); $('.header .nav1').removeclass('on'); $('.header .nav2').removeclass('on'); $('.header .language').removeclass('on'); $('.header-left').removeclass('on'); }) var isie = function(){ if ((navigator.appname == "microsoft internet explorer" && navigator.appversion.match(/7./i)=="7.") || (navigator.appname == "microsoft internet explorer" && navigator.appversion.match(/8./i)=="8.")) { return true; }else{ return false; } } $(window).on("load",function(){ if (isie()){ $('.loadinglg').hide(); $('html,body').css({"overflow":"hidden"}); $('body').html($('
')); }else{ $('.loadingbg').fadeout(300,function(){ $('.hdpd').addclass('on'); $('header').addclass('on'); $('.body-wrap').addclass('on'); }); } }) $('.fy a').on('click',function(){ $(this).addclass('on').siblings().removeclass('on'); }) $('.fy a').on('click',function(){ if ($(window).width()>970) { $("body,html").animate({ scrolltop: $('#face-tit').offset().top },400); }else{ $("body,html").animate({ scrolltop: $('#face-tit').offset().top-$('header').height() },400); } }) fullbg($(".header-left"), $(".header-left .bimg")); });