
        $(document).ready(function () {
            $('.banner').slick({
                autoplay: true,      // 自动播放
                autoplaySpeed: 3000, // 播放间隔
                dots: true           // 开启轮播图圆点
            });
        });
    

  //数字增加动画
    $.fn.countTo = function(options) {
        options = $.extend({}, $.fn.countTo.defaults, options || {});
        var loops = Math.ceil(options.speed / options.refreshInterval),
            increment = (options.to - options.from) / loops;

        return $(this).each(function() {
            var _this = this,
                loopCount = 0,
                value = options.from,
                interval = setInterval(updateTimer, options.refreshInterval);

            function updateTimer() {
                value += increment;
                loopCount++;
                $(_this).html(value.toFixed(options.decimals));

                if (typeof(options.onUpdate) == 'function') {
                    options.onUpdate.call(_this, value);
                }

                if (loopCount >= loops) {
                    clearInterval(interval);
                    value = options.to;

                    if (typeof(options.onComplete) == 'function') {
                        options.onComplete.call(_this, value);
                    }
                }
            }
        })
    };

    $(function(){
        $('.ibanner').slide({mainCell:".bd",effect:"leftLoop",autoPlay:true,delayTime:500,interTime:5000});
        $('.icustom-list').slide({mainCell:".bd",effect:"topLoop",vis:5});


      function countadd(){
        var count = 0;
        count++;
      $('.ibrand-num.ani li').each(function(){
        dataperc = $(this).attr('data-perc'),
        $(this).find('.num').delay(6000).countTo({
        from: 0,
        to: dataperc,
        speed: 2500,
        refreshInterval: 150
        });
      });
      }
      function scrolltop(){
        var top = $(window).scrollTop();
      var htop = $('.ibrand-wrap').offset().top - $(window).height()/3;
      if(top>=htop){
        countadd();
        $('.ibrand-num').removeClass('ani');
      }
      }
      scrolltop();
    $(window).scroll(function(){
      scrolltop();
  
    }); 
    })


    $(".m_cpfl li").hover(function(){
                $(this).addClass("cur");
                },function(){
                    $(this).removeClass("cur");
                    })
  

              $(".m_zs").slide({
                  titCell: ".zshd li",
                  mainCell: ".zsbd",
                  autoPlay: true,
                  titOnClassName: "on",
                  effect: "left",
                  vis: 1
              });
        

      $(".g_ys").slide({
          titCell: ".yshd li",
          mainCell: ".ysbd",
          autoPlay: true,
          titOnClassName: "on",
          effect: "fold",
          vis: 1
      });

jQuery(".m_news").slide({ titCell: ".newhd li",
           mainCell:".conWrap", targetCell:".more a", effect:"left"});   

  if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){
    new WOW().init();
  };
  

        $(function() {
            var time;
            //var winHeight = top.window.document.body.clientHeight || $(window.parent).height();
            $('.client-2').css({
                'marginTop': -($('.client-2').height() / 2)
            });
            $('#client-2 li').on({
                'mouseenter': function() {
                    var scope = this;
                    time = setTimeout(function() {
                        var divDom = $(scope).children('div');
                        var maxWidth = divDom.width();
                        $(scope).stop().animate({
                            left: 77-maxWidth}, 'normal', function() {
                            var pic = $(scope).find('.my-kefu-weixin-pic');
                            if (pic.length > 0) {
                                pic.show();
                            }
                        });
                    }, 100)
                },
                'mouseleave': function() {
                    var pic = $(this).find('.my-kefu-weixin-pic');
                    var divDom = $(this).children('div');
                    var maxWidth = divDom.width();
                    if (pic.length > 0) {
                        pic.hide();
                    }
                    clearTimeout(time);
                    var divDom = $(this).children('div');
                    $(this).stop().animate({
                        left: 0
                    }, "normal", function() {});
                }
            });
            //返回顶部
            $(window).scroll(function() {
                var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
                var eltop = $("#client-2").find(".my-kefu-ftop");
                if (scrollTop > 0) {
                    eltop.show();
                } else {
                    eltop.hide();
                }
            });
            $("#client-2").find(".my-kefu-ftop").click(function() {
                var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
                if (scrollTop > 0) {
                    $("html,body").animate({
                        scrollTop: 0
                    }, "slow");
                }
            });
        });
    
