
$(function () {
    $("#product .inner ul li a").hover(function () {
        // $(this).find(".search").css({"display": "none"})
        $(this).find(".search").stop(200).animate({"top": "50%", "opacity":1 })
        $(this).find(".pic_bg").stop(200).animate({"top": "0", "opacity": 1})
    },function(){
        $(this).find(".search").stop(200).animate({"top": "1300px", "opacity": 0})
        $(this).find(".pic_bg").stop(200).animate({"top": "-700px", "opacity": 0})
    });
    $("#footer .friendship a:last-child").css({"background":"none"})
    $(".list_images ul li .pic").height($(".list_images ul li").width()).width($(".list_images ul li").width())
    $(".list_images ul li .text").width($(".list_images ul li .pic").width());
    $(".list_images ul li a").hover(function () {
        // $(this).find(".search").css({"display": "none"})
        $(this).find(".search").stop(200).animate({"top": "50%", "opacity":1 });
        $(this).find(".pic_bg").stop(200).animate({"top": "0", "opacity": 1})
    },function(){
        $(this).find(".search").stop(200).animate({"top": "1300px", "opacity": 0});
        $(this).find(".pic_bg").stop(200).animate({"top": "-700px", "opacity": 0})
    });
    // var swiper = new Swiper('.swiper-container', {
    //     pagination: '.swiper-pagination',
    //     effect: 'cube',
    //     grabCursor: true,
    //     cube: {
    //         shadow: true,
    //         slideShadows: true,
    //         shadowOffset: 20,
    //         shadowScale: 0.94
    //     }
    // });
    var swiper = new Swiper('.swiper-container', {
        pagination: '.swiper-pagination',
        effect: 'cube',
        grabCursor: true,
        loop:true,//无缝衔接滚动
        cube: {
            shadow: true,
            slideShadows: true,
            shadowOffset: 20,
            shadowScale: 0.94
        }
    });
    $(window).scroll(function () {
        var scrollHeight = $(window).scrollTop();
        console.log(scrollHeight);
        if(scrollHeight>300){
            $("#Home").addClass("fadeInLeft animated");
        } if(scrollHeight>300){
            $(" #about .about_text").addClass("fadeInRight animated")
            $("#about .pics").addClass("fadeInLeft animated")
        }
        if(scrollHeight>1200){
            $("#news .box_title").addClass("fadeInUp animated");
            $(" #news .news_pic ").addClass("fadeInRight animated")
            $("#news .news_list").addClass("fadeInLeft animated")

        }
        if(scrollHeight>1600){
            $("#product").addClass("fadeInDown animated");
        }
        if(scrollHeight>2000){
            $("#product .inner li").addClass("fadeInDown animated");
        }
    });
})