﻿$(function () {
    // wow初始化
    new WOW().init();
    ys.phNavInit(4);
    // navFixed();
    // navHovered();
    load1();
});
// 导航不在顶部时加类名isfixed
function navFixed(){
    ys.isFixed(".ys_hd_pc");
    ys.isFixed(".ys_hd_ph");
}
// 鼠标经过导航时加类名ishovered
function navHovered(){
    ys.isHovered(".ys_hd_pc");
}
$('.mod_head_other_wx').hover(function(){
    $(this).addClass('on');
},function(){
    $(this).removeClass('on');
});
$(window).scroll(function(){
    load1();
})
function load1(){
    $('.mod_loadup').each(function(){
        if($(window).scrollTop()>$(this).offset().top-$(window).height()){
            $(this).addClass('active');
        }
    });
    $('.mod_load1up').each(function(){
        if($(window).scrollTop()>$(this).offset().top-$(window).height()){
            $(this).addClass('active');
        }
    });
}
$('.inside_mode7').each(function(){
    if($(this).next('.inside_mode3').length>0){
        $(this).addClass('std_bot');
    }
});
$('.inside_mode3').each(function(){
    if($(this).next('.inside_mode7').length>0){
        $(this).addClass('std_bot');
    }
});
$('.inside_mode3_cry').each(function(){
    if($(this).find('.inside_mode3_cry_right').length<1){
        $(this).parents('.inside_mode3').addClass('on1')
    }
});
setFullHeight();
function setFullHeight() {
    var screenHeight = window.innerHeight;
    var screenWidth = window.innerWidth;
    $('.home_page').css('--height-num',screenHeight+'px');
    $('.mode_page').css('--height-num',screenHeight+'px');
    $('.home_page').css('--width-num',screenWidth+'px');
    $('.mode_page').css('--width-num',screenWidth+'px');
}