
jQuery(".fullSlide").slide({ titCell:".hd ul", mainCell:".bd ul", effect:"fold",  autoPlay:true,autoPage:true,vis:1, interTime:3000});
jQuery(".fenl").slide({titCell:".fenl_t ul li",mainCell:".fenl_m",effect:"fade",autoPlay:false,delayTime:700});
jQuery(".five").slide({titCell:".five01",titOnClassName:"cur"});
jQuery(".ys_l").slide({ titCell:".ys_bot ul", mainCell:".ys_qie ul", effect:"fold",  autoPlay:true,autoPage:true,vis:1, interTime:2500 });
      

    jQuery(".jz").slide({
        mainCell: ".jz_m .jz_qie",
        autoPlay: true,
        delayTime: 200,
        vis: 1,
        prevCell: ".jz_lico",
        nextCell: ".jz_rico",
        effect: "leftLoop"
    });  


jQuery(".hz").slide({mainCell:".hz_m ul",autoPlay:true,effect:"leftMarquee",vis:4,interTime:35,trigger:"click"});
	

jQuery(".news").slide({titCell:".news_t ul li",mainCell:".news_m",effect:"fade",autoPlay:false,delayTime:700});


	if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){
		new WOW().init();
	};


	//数字增加动画
    $.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 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 = $('.yin').offset().top - $(window).height()/2;
			if(top>=htop){
				countadd();
				$('.ibrand-num').removeClass('ani');
				
			}
    	}
    	scrolltop();

		$(window).scroll(function(){
			scrolltop();
	
		});	


        $(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");
                }
            });
        });
    