function getHash(){ var hash = location.href.split("#")[1]; if(hash){ setScroll("#"+hash); } }; var scnum=113; function setScroll(anchorCur){ if(isMobile){ scnum=84; }else{ scnum=113; } jQuery("html,body").delay(300).animate({ scrollTop: jQuery(anchorCur).offset().top-scnum},800,'easeInOutExpo'); }; jQuery(function(){ $('#nav-btn').on('click',function(){ $(this).toggleClass('active'); $('#nav').toggleClass('act').slideToggle(); if (!$('#nav').hasClass('act')) { $('#nav').removeClass("hover"); }else{ $('#nav').addClass("hover"); } }) $('#nav').find('span').on('click',function(){ if ($(this).hasClass('show-div')) { $(this).removeClass().siblings('div').slideUp(); }else{ $('#nav').find('.show-div').removeClass().siblings('div').slideUp(); $(this).addClass('show-div').siblings('div').slideDown(); } }) $('#nav').find('dt').on('click',function(){ if ($(this).hasClass('show-dd')) { $(this).removeClass().siblings('dd').slideUp(); }else{ $('#nav').find('.show-dd').removeClass().siblings('dd').slideUp(); $(this).addClass('show-dd').siblings('dd').slideDown(); } }) $("a.tab").click(function () { $(this).parent().find("a.current").removeClass("current"); $(this).addClass("current"); for(var i=0;i<$(this).parent().find("a").length;i++){ $("#"+$(this).parent().find("a:eq("+i+")").attr("rel")).hide(); } $("#"+$(this).attr("rel")).show(); return false; }); $('.footer-menu dl').each(function(index, el) { $(this).children('dt').click(function(event) { if($(this).hasClass('show')){ $(this).removeClass('show') $(this).siblings('dd').stop().slideUp(); } else { $(this).addClass('show'); $(this).siblings('dd').stop().slideDown(); } }); }); $('.goTop-btn').click(function(){ $('html,body').stop().animate({ scrollTop:0 }, 500,"easeInOutExpo"); }); function topPos(){ ST = $(window).scrollTop(); if( ST<1 ){ $('#goTop').removeClass('show'); }else{ $('#goTop').addClass('show'); } }; topPos(); jQuery(window).scroll(function () { topPos(); }); $(".lazy-img").wapLazyLoad({ effect: "fadeIn", threshold: 80 }); var orientLayer = $("#orientLayer"); //ÅжϺáÆÁÊúÆÁ function checkDirect() { if ($(window).height() >= $(window).width()) { return "portrait"; } else { return "landscape"; } } function orientNotice() { var orient = checkDirect(); if (orient == "portrait") { $("#orientLayer").hide(); } else { $("#orientLayer").show(); } } function initOrient() { orientNotice(); window.addEventListener("onorientationchange" in window ? "orientationchange": "resize", function() { setTimeout(orientNotice, 200); }) } initOrient(); }); //weixin setPopUp($('.show-weixin'), "¹Ù·½Î¢ÐÅ"); function setPopUp(obj, title) { obj.click(function () { var str = '