﻿$(document).ready(function () {




    fucWidthimg(".security-tad img", 1920, 670);
    fucWidthimg(".security-img img", 959, 559);
    fucWidthimg(".commercial-tad img", 1920, 670);
    fucWidthimg(".people-tad img", 1920, 670);
    fucWidthimg(".commercialmana-tad img", 1920, 670);
    fucWidthimg(".capital-tad  img", 1920, 670);
    fucWidthimg(".property-tad img", 1920, 670);
    fucWidthimg(".realEstate-tad img", 1920, 670);
    fucWidthimg(".people-tad img", 1920, 670);


    $(window).resize(function (event) {

        fucWidthimg(".security-tad img", 1920, 670);
        fucWidthimg(".security-img img", 959, 559);
        fucWidthimg(".commercial-tad img", 1920, 670);
        fucWidthimg(".people-tad img", 1920, 670);
        fucWidthimg(".commercialmana-tad img", 1920, 670);
        fucWidthimg(".capital-tad  img", 1920, 670);
        fucWidthimg(".property-tad img", 1920, 670);
        fucWidthimg(".realEstate-tad img", 1920, 670);
        fucWidthimg(".people-tad img", 1920, 670);
    });






    $('#anfang').hover(function () {
        // 鼠标移入时添加hover类
        $(this).attr('src', '/assets/images/industry/anfang1.jpg');
    }, function () {
        // 鼠标移出时移出hover类
        $(this).attr('src', '/assets/images/industry/anfang2.jpg');
    });

    $('#jiqiren').hover(function () {
        // 鼠标移入时添加hover类
        $(this).attr('src', '/assets/images/industry/jiqiren1.jpg');
    }, function () {
        // 鼠标移出时移出hover类
        $(this).attr('src', '/assets/images/industry/jiqiren2.jpg');
    });

    $('#renfang').hover(function () {
        // 鼠标移入时添加hover类
        $(this).attr('src', '/assets/images/industry/renfang1.jpg');
    }, function () {
        // 鼠标移出时移出hover类
        $(this).attr('src', '/assets/images/industry/renfang2.jpg');
    });





    initUpDown(".commercial-tad");
    initUpDown(".commercialmana-tad");
    initUpDown(".capital-tad");
    initUpDown(".property-tad");
    initUpDown(".realEstate-tad");
    initUpDown(".people-tad");



    $('.security-tad .arrows-other .down').click(function () {
        $(".security-img").slideDown();
        $("html, body").animate({
            scrollTop: $(".security-img").offset().top
        }, { duration: 500, easing: "swing" });

    })

    //    $('.commercial-tad .arrows-other .down').click(function () {
    //        $(".commercial-img").slideDown();
    //        $("html, body").animate({
    //            scrollTop: $(".commercial-img").offset().top
    //        }, { duration: 500, easing: "swing" });


    //    })
    //    $('.commercialmanagement-tad .arrows-other .down').click(function () {
    //        $(".commercialmanagement-info").slideDown();
    //        $("html, body").animate({
    //            scrollTop: $(".commercialmanagement-info").offset().top
    //        }, { duration: 500, easing: "swing" });


    //    })
    //    $('.property-tad .arrows-other .down').click(function () {n
    //        $(".property-img").slideDown();
    //        $("html, body").animate({
    //            scrollTop: $(".property-img").offset().top
    //        }, { duration: 500, easing: "swing" });


    //    })



    //    $(".wid ul li").mouseover(function () {
    //        $(this).addClass('active').siblings('li').removeClass('active');
    //        $(this).children('div').fadeIn().parent().siblings('li').children('div').fadeOut();

    //    })
    //    $(".wid ul li").mouseout(function () {
    //        $(this).parent().children('li').children('div').fadeOut();
    //    });

    $(".wid ul li").hover(function () {
        $(this).addClass('active').siblings('li').removeClass('active');
        $(this).children('div.none').attr("class", "companytitle no-none").fadeIn().parent().siblings('li').children('div').attr("class", "companytitle none").fadeOut();
    }, function () {
        $(this).children('div').attr("class", "companytitle none").fadeOut();
    });



    $(".property-num #two").click(function () {
        $('.property-info1').fadeOut();
        $('.property-info2').fadeIn();
        $(this).attr("class", "twotab_active")
        $(".property-num #one").attr("class", "onetab")
    })

    $(".property-num #one").click(function () {
        $('.property-info1').fadeIn();
        $('.property-info2').fadeOut();
        $(this).attr("class", "onetab_active")
        $(".property-num #two").attr("class", "twotab")
    })


});