<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/**
 * 公用  
 */
$(function(){


    publicFn();
    function publicFn(){
        // 导航吸顶
        $(window).scroll(function(){
            var _scrollTop = $(window).scrollTop();
            if(_scrollTop&gt;=38){
                $('.header-nav').addClass('header-nav-fixed');
            }
            else {
                $('.header-nav').removeClass('header-nav-fixed');
            }
        });

        // 分享弹框
        $('.hd-share').on('mouseenter', function(){
            $('.share-popup', this).fadeIn(200);
        }).on('mouseleave', function(){
            $('.share-popup', this).hide();
        });

        // 查看服务地区
        $('#fuwu-diqu').on('click', function(){
            $('#bg-black, .pop-fuwudiqu').removeClass('none');
        });
        // 咨询我
        $('#wen-me').on('click', function(){
            $('#bg-black, .pop-lrfuwu').removeClass('none'); 
        });
        $('#bg-black, .popup-bar .pop-close').on('click', function(){
            $('#bg-black, .popup-bar').addClass('none'); 
        });

        // tab切换
        $('.tab-bar').on('click', '.tabs_nav li', function () {
            $(this).addClass('cur').siblings().removeClass('cur');
            var _i = $(this).index();
            $(this).parent().next('.tabs_cont').find('.tabs_item').eq(_i).removeClass('none').siblings().addClass('none');
        });

        // 右侧漂浮
        $('.r-fixed-bar').on('click','.nv li', function(){
            $('.pop', this).show().stop().animate({'right': 68}, 200);
        }).on('mouseleave','.nv li', function(){
            $('.pop', this).hide().css('right', 75);
        });
        $('#go_top').on('click', function(){
            $('html, body').stop().animate({'scrollTop': 0}, 500);
        });
    };

    
    // 展开收起 js
    $.fn.unfoldFn = function(t){
        var $parent = $(this);
        $parent.each(function(i, el){
            var $ovh = $('.un-ovh', el),
                $nr  = $('.un-nr', el),
                $btn = $('.un-btn', el);
            var _h = $ovh.height(),
                _allH = $nr.height(),
                _t = $btn.html();
            if (_allH&lt;=_h) {
                $btn.hide();
            };
            $btn.on('click', function(){
                if ($(el).hasClass('show')) {
                    $(el).removeClass('show');
                    $ovh.animate({'height': _h},200);
                    $btn.html(_t);
                } else {
                    $(el).addClass('show');
                    $ovh.animate({'height': _allH},200);
                    $btn.html(t);
                }
            });
        });
    };

    















});</pre></body></html>