$(function(){ // wowInt(); phoneTargetSelf(); if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){ window.sr = ScrollReveal(); sr.reveal('.wow',config); }; $('.nav_indicator').stop().animate({ 'top':$('.nav_child_layout li').eq(0).position().top+$('.nav_child_layout li').eq(0).outerHeight()/2 }); $('.nav_child_layout li').hover(function(){ $('.nav_indicator').stop().animate({ 'top':$(this).position().top+$(this).outerHeight()/2 },250); },function(){ $('.nav_indicator').stop().animate({ 'top':$('.nav_child_layout li').eq(0).position().top+$('.nav_child_layout li').eq(0).outerHeight()/2 },250); }); $(document).on('click','.nav_phone_btn,.nav_phone_tit .button',function(e){ e.stopPropagation(); $('.nav_phone_btn').toggleClass('visible_nav'); $('body').toggleClass('body_nav_phone'); $('.boxa').toggle(); $('.boxa1').toggle(); }); $('.nav_phone_tit .button').click(function(){ }) $(document).on('click','.nav_phone_con>ul>li',function(){ $(this).addClass('on'); }); $(document).on('click','.nav_phone_con>ul>li ul>li:first-child',function(e){ $('.nav_phone_con>ul>li').removeClass('on'); e.stopPropagation(); }); //鍔犲叆婊戝姩浜嬩欢 var mouseX = 0, touchStartY = 0, touchStartX = 0, touchEndY=0, touchEndX=0; $(document).on('mousedown touchstart','.nav_phone',function(e){ if (e.originalEvent.touches){ touchStartY = e.originalEvent.touches[0].clientY; touchStartX = e.originalEvent.touches[0].clientX; }else{ touchStartY = e.clientY; touchStartX = e.clientX; } }); $(document).on('mouseup touchend','.nav_phone',function(e){ if (e.originalEvent.touches){ touchEndY = e.originalEvent.changedTouches[0].clientY; touchEndX = e.originalEvent.changedTouches[0].clientX; }else{ touchEndY = e.clientY; touchEndX = e.clientX; } var yDiff = touchStartY - touchEndY; var xDiff = touchStartX - touchEndX; if ( Math.abs( xDiff ) > Math.abs( yDiff ) ) { if ( xDiff < 5 ) { $('.nav_phone_btn').toggleClass('visible_nav'); $('body').toggleClass('body_nav_phone'); } } }) try{ numbeat($(".abstract03"),$(".abstract03 ul li:nth-child(1) span")); numbeat($(".abstract03"),$(".abstract03 ul li:nth-child(2) span")); numbeat($(".abstract03"),$(".abstract03 ul li:nth-child(3) span")); // numbeat($(".case_info2"),$(".case_info2 ul li:nth-child(4) span")); }catch(e){ //TODO handle the exception } }) function select(){ $(".language dt").click(function (e) { e.preventDefault(); e.stopPropagation(); $(".language dd").slideToggle(200); $(".search_wrap").slideUp(200); $(".header_search").removeClass("on"); }) } function search(){ $(".header_search").click(function (e) { e.preventDefault(); e.stopPropagation(); $(this).toggleClass("on"); $(".search_wrap").slideToggle(200); $(".language dd").slideUp(200) }) $(".search_box_text").click(function (e) { e.preventDefault(); e.stopPropagation(); }) } // $(document).click(function(){ // $(".search_wrap").slideUp(200); // $(".language dd").slideUp(200); // $(".header_search").removeClass("on"); // }) function wowInt(){ if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){ var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset: -100, mobile: true, live: true }); wow.init(); }; } /*鎵嬫満绔摼鎺ユ敼涓烘湰绐楀彛鎵撳紑*/ function phoneTargetSelf(context){ if ($(window).width()<1024) { if(context==undefined){ context=$(document); } $('a',context).each(function(){ var target=$(this); var link=target.attr('target'); target.attr('target','_self'); }) } } /*鐢佃瘽閾炬帴鍙栨秷榛樿浜嬩欢骞舵坊鍔犳牱寮?/ function findTel(context){ if ($(window).width()>1024) { var condition = /^tel\:([0-9\-]+)|tel\:\+([0-9\-]+)$/; if(context==undefined){ context=$(document); } $('a',context).each(function(index, el) { var target=$(this); var href=target.attr('href'); if (condition.test(href)) { target.addClass('tel_link'); target.on('click',function(event){ event.preventDefault(); }) } }); } } // 鍦板浘 function mapInt(mapTitle,mapAdress,mapx,mapy){ var map = new BMap.Map("map"); var point = new BMap.Point(mapx,mapy); var point2 = new BMap.Point(mapx,mapy); //鍧愭爣鍋忕Щ var point2 = new BMap.Point(mapx+0.05,mapy); var myIcon = new BMap.Icon("../images/map_noprint.png", new BMap.Size(39,53));// icon鎸夐挳 var marker2 = new BMap.Marker(point2,{icon:myIcon}); // 鍒涘缓鏍囨敞 map.addOverlay(marker2); // 灏嗘爣娉ㄦ坊鍔犲埌鍦板浘涓 map.centerAndZoom(point, 20); var opts = { width : 200, // 淇℃伅绐楀彛瀹藉害 height: 100, // 淇℃伅绐楀彛楂樺害 title : mapTitle // 淇℃伅绐楀彛鏍囬 } var infoWindow = new BMap.InfoWindow(mapAdress, opts); marker2.addEventListener("click", function(){ map.openInfoWindow(infoWindow,point); }); map.enableScrollWheelZoom(); //鍚敤婊氳疆鏀惧ぇ缂╁皬锛岄粯璁ょ鐢 map.enableContinuousZoom(); //鍚敤鍦板浘鎯€ф嫋鎷斤紝榛樿绂佺敤 } window.onload = function(){ setTimeout(function(){ $(window).scroll(); },300) } $(function(){ $('.header_search span').click(function(e){ e.stopPropagation(); $('.search_wrap').show(); }) $('.search_wrap input , .search_box_button').click(function(e){ e.stopPropagation(); $('.search_wrap').show(); }) $(document).click(function(){ $('.search_wrap').hide(); }) }) function numbeat(wraper,target){ //淇濊瘉鏁板瓧璺冲姩鍙墽琛屼竴娆 var flag = true; var spacenum = 1; var arr = 0; var max = parseFloat(target.attr("rel")); //淇濊瘉鏁版嵁缁撴潫鐨勭粺涓€鎬 if(max>20){ spacenum = parseInt(max/20); } if($(window).scrollTop() > wraper.offset().top-$(window).height()/1.2){ flag = false; var timer = setInterval(function() { arr = arr + spacenum; arr < max ? arr : clearInterval(timer); if(arr>=max){ target.html(max); }else{ target.html(arr); } }, 100); } $(window).scroll(function(){ if(flag){ if($(window).scrollTop() > wraper.offset().top-$(window).height()/1.2){ flag = false; var timer = setInterval(function() { arr = arr + spacenum; arr < max ? arr : clearInterval(timer); if(arr>=max){ target.html(max); }else{ target.html(arr); } }, 100); } } }) } var config = { reset: false, // 婊氬姩榧犳爣鏃讹紝鍔ㄧ敾寮€鍏?榛樿鏄痜alse娌℃湁鎵撳紑榧犳爣婊氬姩鐨勫姩鐢诲紑鍏? origin: 'top', // 鍔ㄧ敾寮€濮嬬殑鏂瑰悜 duration: 1000, // 鍔ㄧ敾鎸佺画鏃堕棿 delay: 100, // 寤惰繜 rotate: {x:0, y:0, z:0}, // 杩囧害鍒?鐨勫垵濮嬭搴 opacity: 0.2, // 鍒濆閫忔槑搴 (0.2鍒?鐨勬晥鏋? scale:0.9, //缂╂斁 easing: 'ease-in-out', mobile: false,//鍔ㄧ敾鏁堟灉// 缂撳姩'ease', 'ease-in-out'锛?linear'... // 鍥炶皟鍑芥暟 //褰撳姩鐢诲紑濮嬩箣鍓嶄細琚Е鍙 beforeReveal: function(domEl){ console.log('鍔ㄧ敾鎵ц浜?); }, //榧犳爣婊氳疆婊氬姩涔嬪墠浼氳瑙﹀彂 beforeReset: function(domEl){ console.log('婊氳疆寮€濮?--'); }, //鍔ㄧ敾寮€濮嬩箣鍚庝細琚Е鍙 afterReveal: function(domEl){ console.log('鍔ㄧ敾缁撴潫浜?); }, //婊氳疆婊氬姩涔嬪悗浼氳瑙﹀彂 afterReset: function(domEl){ console.log('婊氳疆缁撴潫浜?); } }; $(function(){ if($(".human_cont li").length>0){ for(var i=0; i<$(".human_cont li").size(); i++){ lc_lightbox('.elem'+i, { wrap_class: 'lcl_fade_oc', thumbs_nav: false, carousel: false, cmd_position : 'inner', nav_btn_pos : 'middle', mousewheel : false, open_close_time : 0, radius: 0, padding : 0, border_w: 0, show_title: true, show_descr: true, data_position : 'under', fading_time:0, //鍒囨崲鍔犺浇鐨勬椂闂 }); } } // history_tab($('.abstract04-list li').eq(0)) $(document).on("click",".abstract04-list li",function(){ // var $_this=$(this); // history_tab($_this) // $_this.addClass("on").siblings().removeClass("on"); // imgratio(); // $(".blank50").show(); // $(".touch01-box1").show(); $(this).find('.msgDiv_ul').show().parents("li").siblings("li").find(".msgDiv_ul").hide(); $(this).addClass("on").siblings().removeClass("on"); }) $(".touch01-box1 .close").click(function(){ $(".blank50").hide(); $(".touch01-box1").hide(); }) }) $(document).click(function(event){ var _con = $('.abstract04-list li'); 聽 聽 聽if(!_con.is(event.target) && _con.has(event.target).length === 0){ 聽 聽 聽 聽 聽$('.msgDiv_ul').hide(); $('.abstract04-list li').removeClass("on"); } }) // function history_tab($_this){ // var url=$_this.data("src"); // if(url==null)return false; // $.ajax({ // url:url, // type:"GET", // success: function (msg) { // $(".parBd").html(msg); // imgratio(); // } // }); // }; $(function() { $(".weixin").click(function(){ $(".blank_40,.weixin_box").fadeIn().show(); }) $(".weixin_close,.blank_40").click(function(){ $(".blank_40,.weixin_box").fadeOut().hide(); }) })