$(function(){ //浜岀骇瀵艰埅 if ($(window).width() > 800) { $(".header_aBlock").hover(function () { $(this).find(".nav_content").stop(true, true).fadeIn(); }, function () { $(".nav_content").stop(true, true).fadeOut(); }) } else { $(".header_aBlock").on("click",function () { $(this).find(".nav_content").stop(true, true).slideToggle(); $(this).siblings().find(".nav_content").stop(true, true).slideUp(); $(this).toggleClass("current").siblings().removeClass("current"); }) } //鍏ㄥ睆鑷€傚簲 var wHeight = $(window).height(); function resize(){ wHeight = $(window).height(); if(!$("body").hasClass("index_bodyer")){ $(".common_content").css({minHeight:wHeight-236}); } } resize(); $(window).resize(function(){ resize(); }); //涓€绾у鑸€変腑鐘舵€ var href = location.href; if (href.indexOf("/aboutUs/") > -1) { $(".header_aBlock").eq(1).addClass("current"); } else if (href.indexOf("/project/") > -1) { $(".header_aBlock").eq(2).addClass("current"); } else if (href.indexOf("/news/") > -1) { $(".header_aBlock").eq(3).addClass("current"); } else if (href.indexOf("/investor/") > -1) { $(".header_aBlock").eq(4).addClass("current"); } else if (href.indexOf("/brand/") > -1) { $(".header_aBlock").eq(5).addClass("current"); } else if (href.indexOf("/joinUs/") > -1) { $(".header_aBlock").eq(6).addClass("current"); } else if (href.indexOf("/contactUs/") > -1) { $(".header_aBlock").eq(7).addClass("current"); } else { $(".header_aBlock").eq(0).addClass("current"); } //浜岀骇瀵艰埅閫変腑鐘舵€ if (href.indexOf("/Introduction") > -1 || href.indexOf("/Video") > -1 || href.indexOf("/contactUs/Media") > -1 || href.indexOf("/ProjectNews") > -1 || href.indexOf("/Managed") > -1 || href.indexOf("/project/house") > -1 || href.indexOf("/investor/notice") > -1 || href.indexOf("/joinUs/activities") > -1 || href.indexOf("/joinUs/Inner") > -1 || href.indexOf("/development") > -1) { $(".navCo_aBlock").eq(1).addClass("cur"); } else if (href.indexOf("/Company") > -1 || href.indexOf("/media") > -1 || href.indexOf("/Honest") > -1 || href.indexOf("/news/Style") > -1 || href.indexOf("/project/office") > -1 || href.indexOf("/project/expand") > -1 || href.indexOf("/investor/regular") > -1 || href.indexOf("/recruitment") > -1) { $(".navCo_aBlock").eq(2).addClass("cur"); } else if (href.indexOf("/history") > -1 || href.indexOf("/protect") > -1 || href.indexOf("/project/hotel") > -1 || href.indexOf("/news/Media") > -1 || href.indexOf("/Inner") > -1) { $(".navCo_aBlock").eq(3).addClass("cur"); } else if (href.indexOf("/Honorary") > -1 || href.indexOf("/project/expand") >-1) { $(".navCo_aBlock").eq(4).addClass("cur"); } else { $(".navCo_aBlock").eq(0).addClass("cur"); } var pa = parseInt(href.split("pa=")[1]) || 0; if (pa > 0) { $(".navCo_aBlock").eq(pa).addClass("cur").siblings().removeClass("cur"); } //鑷姩鏍囬涓庨潰鍖呭睉 $(".this_span").html($(".navCo_aBlock.cur").text()); $(".ti_ti").html($(".navCo_aBlock.cur").text()); $(".ti_tEn").html($(".navCo_aBlock.cur").attr("ten")); $(".this_nav").html($(".header_aBlock.current .text").text()); $(".this_li").attr({ "href": $(".header_aBlock.current .text").attr("href")}) //瑙嗛 function videoResize() { var topV = 0 var wHeight = $(window).height() var videoHeight = $(".videoBl_conBlock video").height() if (videoHeight > wHeight) { topV = 0 $(".videoBl_conBlock video,.videoBl_clear").css({ "height": wHeight }) } else { topV = (wHeight - videoHeight) / 2; } $(".videoBl_conBlock video,.videoBl_clear").css({ "top": topV }) } $(".vid_button").on("click", function () { var src = $(this).attr("da-src"); if (src != "" && src != undefined) { $(".vidBl_content").stop(true, true).fadeIn(); $(".videoBl_conBlock").html(Videohtml(src, "100%", "auto")); document.getElementById("example_video_1").play(); setTimeout(function () { videoResize() },100) } }) $(".vidBl_bg,.videoBl_clear").on("click", function () { $(".vidBl_content").stop(true, true).fadeOut(); $(".videoBl_conBlock").html(""); }) $(".vidBl_content").bind('mousewheel', function (event, delta) { event.stopPropagation() return true; // 杩斿洖鍊煎湪杩 }); $(window).resize(function () { videoResize() }) /* 鍓嶇鑷€傚簲鍙屽浘澶勭悊锛岀被鍚嶇粦瀹氾紙img_node缁戝浘锛宐g_node缁戣儗鏅級锛寃-src(瀵瑰簲PC)锛宼-src锛堝搴斿井绔欙級 */ $(".img_node").each(function () { var _this = $(this); if ($(window).width() > 768) { _this.attr("src", $(this).attr("w-src")); } else { var src = $(this).attr("t-src") || $(this).attr("w-src"); _this.attr("src", src); } }) $(".bg_node").each(function () { var _this = $(this); if ($(window).width() > 768) { _this.css("background-image", "url(" + $(this).attr("w-src") + ")"); } else { var src = $(this).attr("t-src") || $(this).attr("w-src"); _this.css("background-image", "url(" + src + ")"); } }) /* * 鑷€傚簲寰珯瀵艰埅鏍忓鐞嗘柟妗 *
*
* * */ //touch function hideNav() { $(".ind6_nav").removeClass("cur"); $(".header_ulContent").css({ right: -220 }) $(".ind6_bgCol").stop(true, true).fadeOut(); } $(".ind6_nav").on("click", function () { if ($(".ind6_nav").hasClass("cur")) { hideNav(); } else { $(".ind6_nav").addClass("cur"); $(".header_ulContent").css({ right: 0 }) $(".ind6_bgCol").stop(true, true).fadeIn(); } }) $(".ind6_bgCol").on("click", function () { hideNav(); }) $(".after").on("click", function () { $(".nav_ul").stop(true, true).slideUp(300); $(this).siblings(".nav_ul").stop(true, true).slideDown(300); }) $(".navCo_content").addClass("m" + $(".navCo_aBlock").length); $(".foI_aBlock").on("click", function () { $(this).toggleClass("cur").find(".foI_content").stop().slideToggle(); $(this).siblings().removeClass("cur").find(".foI_content").stop().slideUp(); }) //鍏煎鑻规灉hover浜嬩欢 $("div").on("mouseover", function () { }); //鍒ゆ柇IE6銆?銆?鎻愮ず涓嬭浇鏂扮増IE function IEVersion() { var userAgent = navigator.userAgent; //鍙栧緱娴忚鍣ㄧ殑userAgent瀛楃涓 var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //鍒ゆ柇鏄惁IE<11娴忚鍣 var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //鍒ゆ柇鏄惁IE鐨凟dge娴忚鍣 var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; if (isIE) { var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); reIE.test(userAgent); var fIEVersion = parseFloat(RegExp["$1"]); if (fIEVersion == 7) { return 7; } else if (fIEVersion == 8) { return 8; } else if (fIEVersion == 9) { return 9; } else if (fIEVersion == 10) { return 10; } else { return 6;//IE鐗堟湰<=7 } } else if (isEdge) { return 'edge';//edge } else if (isIE11) { return 11; //IE11 } else { return -1;//涓嶆槸ie娴忚鍣 } } if (IEVersion() > 5 && IEVersion() < 9) { $("body").append('
鍓嶅線涓嬭浇锛歨ttps://support.microsoft.com/
') } if ($(window).width() < 800) { $("p img").css({ "height": "auto" }); } if ($(".swiper-container.comSwiper").length > 0) { $(".swiper-container.comSwiper").each(function (n) { if ($(this).find(".swiper-slide").length > 1) { var cl = "swiper" + n var m = parseInt($(this).attr("num")) || 1 var auto = parseInt($(this).attr("auto")) || 0 var lo = parseInt($(this).attr("lo")) || 0 $(this).addClass(cl); $(this).after('
') var swArr = []; console.log(auto) swArr[n] = new Swiper('.swiper-container.' + cl, { autoplay: auto, speed: 600, loop: lo, slidesPerView: m, autoplayDisableOnInteraction: false, pagination: '.comIco.' + cl, paginationClickable: true, watchActiveIndex: true,//閸楄櫕妞傞弴瀛樻煀缁便垹绱╅崐锟 calculateHeight: true,//鐠侊紕鐣荤€圭懓娅掓妯哄 resizeReInit: true,//缁愭褰涢崣妯哄闁插秵鏌婇崚婵嗩潗閸栵拷 updateOnImagesReady: true,//閸旂姾娴囩€瑰本鍨氶柌宥嗘煀閸掓繂顫愰崠鏍モ偓锟 }) $("body").on("click", ".sw_prev." + cl, function () { swArr[n].swipePrev(); }) $("body").on("click", ".sw_next." + cl, function () { swArr[n].swipeNext(); }) $("body").on("mouseenter", ".comIco." + cl + " span", function () { var on = $(this).index(); swArr[n].swipeTo(on); }) } }) } if ($(".swiper-container.comSwiper").length > 0) { function swiperSize() { $('.swiper-container.comSwiper img').imagesLoaded(function () { $(".swiper-container.comSwiper").each(function () { var he = $(this).find(".swiper-slide>div").eq(0).outerHeight();//鏉╂瑩鍣烽梽鎰暰娴滃敄wiper-slide娑撳绔寸€规俺顩﹂張澶屽煑div $(this).css({ "height": he }).find(".swiper-wrapper").css({ "height": he }).find(".swiper-slide").css({ "height": he }); }) }); } swiperSize(); $(window).resize(function () { swiperSize(); }) } }) function AutomaticTitle(pa) { $(".navCo_aBlock").eq(pa).addClass("cur").siblings().removeClass("cur"); //鑷姩鏍囬涓庨潰鍖呭睉 $(".this_span").html($(".navCo_aBlock.cur").text()); $(".ti_ti").html($(".navCo_aBlock.cur").text()); $(".ti_tEn").html($(".navCo_aBlock.cur").attr("ten")); $(".this_nav").html($(".header_aBlock.current .text").text()); $(".this_li").attr({ "href": $(".header_aBlock.current .text").attr("href") }) }