$(function () { //动画初始 var m = 0; var ti = 1000; var n = parseInt(location.href.split("n=")[1]) || 0; if (n == 1) { $(".index_nullBlock,.index_nullBlockB,.index_amblock").css({ "display": "none" }); ti = 0; } setInterval(function () { m += 2; if (m > 100) { m = 100; } $(".index_num span").html(m); }, 10) setTimeout(function () { $(".index_nullBlock").stop().animate({ height: 0 }, 1000, function () { $(".index_nullBlock,.index_amblock").css({ "display": "none" }) }); $(".index_nullBlockB").stop().animate({ height: 0 }, 1000, function () { $(".index_nullBlockB").css({ "display": "none" }) }); }, ti) var nK = 0; var max = $(".ba_block .In91_InBg").length; function showImg() { $(".In08_li").eq(nK).addClass("cur").siblings().removeClass("cur"); //$(".indA_n").text("0" + (nK+1)); $(".indA_li").eq(nK).stop(true, true).fadeIn(1000); $(".indA_li").eq(nK).siblings().stop(true, true).fadeOut(1000); $(".In91_InBg").eq(nK).stop(true, true).fadeIn(1000); $(".In91_InBg").eq(nK).siblings().stop(true, true).fadeOut(1000); $(".indA_n").html("0" + (nK + 1)); } $(".In08_li").on("mouseover", function () { nK = $(this).index(); showImg(); }) showImg(); function nextImg() { nK++; nK %= max; showImg(); } function prevImg() { nK--; if (nK < 0) { nK = max - 1; } showImg(); } $(".indA_ri").on("click", function () { nextImg(); }) $(".indA_le").on("click", function () { prevImg(); }) //全屏自适应 var wHeight = $(window).height(); var wWidth = $(window).width(); var textHeight = 0; function resize() { wHeight = $(window).height(); wWidth = $(window).width(); if (wHeight / (wWidth * 0.76) > 0.56168) { $("#ind_video").css({ "width": wHeight * 1.78038, "height": wHeight, "marginTop": 0, "marginLeft": ((wWidth * 0.76) - wHeight * 1.78038) / 2 }); } else { $("#ind_video").css({ "height": (wWidth * 0.76) * 0.56168, "width": (wWidth * 0.76) + 8, "marginTop": (wHeight - (wWidth * 0.76) * 0.56168) / 2, "marginLeft": 0 }); } $(".In91_li,.In91_InBg,.In_h2").css({ "height": wHeight }); $(".In95_bg").css({ "height": wHeight, "width": wWidth }); scrFun(); if (wHeight / wWidth > 0.5616) { $("#bl_video").css({ "width": wHeight * 1.780619, "height": wHeight, "marginTop": 0, "marginLeft": (wWidth - wHeight * 1.780619) / 2 }); } else { $("#bl_video").css({ "height": wWidth * 0.5616, "width": wWidth, "marginTop": (wHeight - wWidth * 0.5616) / 2, "marginLeft": 0 }); } } resize(); $(window).resize(function () { resize(); }); $(".canvas_block").click(function () { $(".canvas_block").stop(true, true).fadeOut(function () { $(".canvas_block").html(""); }); setTimeout(function () { $(".In08_li").eq(1).trigger("mouseover"); }, 12000) }) setTimeout(function () { $(".canvas_block").stop(true, true).fadeOut(1000); }, 7000) if (client.browser.ie < 9 && client.browser.ie > 5) { $(".canvas_block").css({ "display": "none" }); } var vidNo = document.getElementById("ind_video"); $("#animation_container").click(function () { vidNo.load(); $("#animation_container").stop(true, true).fadeOut(1000); showImg(); }) var scrTop = 0; //选择器,时间,小分 var ik = 0; function numFun(_node, tiN, nN) { var _nodes = $(_node); var ti = tiN || 100; var n = nN || 10; var ar = []; _nodes.each(function (i) { ar[i] = _nodes.eq(i).html(); var o = 0; var setInt = setInterval(function () { o += ar[i] / n; _nodes.eq(i).html(Math.round(o)); if (o > ar[i]) { _nodes.eq(i).html(ar[i]); } }, ti) }) } $("#header").addClass("cur") function scrFun() { scrTop = $("#header").offset().top; //if (scrTop > 300) { // $("#header").addClass("cur") //} else { // $("#header").removeClass("cur") //} var he = wHeight - scrTop + 200; if (he < 0) { he = 0; } $(".In91_bgLi").eq(0).css({ "height": he }) } $(window).scroll(function () { scrFun(); }) //$(".indA2_bu").on("mouseenter",function(){ // $(".indA_content").stop().animate({right:380}); // $(".indA2_close").stop(true,true).fadeIn(); // $(".ind6_right").stop(true,true).fadeOut(); //}) //$(".indA2_img").on("mouseleave",function(){ // $(".indA_content").stop().animate({right:0}); // $(".indA2_close").stop(true,true).fadeOut(); // $(".ind6_right").stop(true,true).fadeIn(); //}) var sw06 = new Swiper('.sw06', { pagination: '.pagination', loop: true, grabCursor: true, paginationClickable: true }) //数字动画 //选择器,时间,小分 $(".ind21_num span").html(); function numFun(_node, tiN, nN) { var _nodes = $(_node); var ti = tiN || 60; var n = nN || 30; var ar = []; _nodes.each(function (i) { ar[i] = _nodes.eq(i).html(); var o = 0; var setInt = setInterval(function () { o += ar[i] / n; _nodes.eq(i).html(Math.round(o)); if (o > ar[i]) { _nodes.eq(i).html(ar[i]); } }, ti) }) } //渐滚渐出 //var ik = 0; //function animPlay() { // function animFun() { // var hTop = $("#header").offset().top; // var b1 = $(".ind21_content").offset().top - $(window).height() / 1.5; // if (hTop > b1 && ik < 1) { // numFun(".ind21_num"); // ik++; // } // } // animFun(); // $(window).scroll(function () { // animFun(); // }) //} //渐滚渐出 var ik = 0; function animPlay(select) { $(select).addClass("animNode"); function animFun() { var hTop = $("#header").offset().top; var b1 = $(".ind21_content").offset().top - $(window).height() / 1.5; $(".animNode").each(function (i) { var _node = $(this); var he03 = $(window).height() / 1.5 if ($(window).width() < 750) { he03 = 1500; } var bTop = _node.offset().top - he03; if (bTop < hTop) { _node.addClass("animPlay"); } }) if (hTop > b1 && ik < 1) { numFun(".ind21_num span"); ik++; } } animFun(); $(window).scroll(function () { animFun(); }) } //IE下不播动画 if (client.browser.ie < 5) { animPlay(".indIn_conBlock"); } $(".touch_bl").mobileTouch({ isPageScroll: false, methods: [ ["left", 1], ["right", 1], ["up", 1], ["down", 1] ], leftCallBack: function () { nextImg(); }, rightCallBack: function () { prevImg(); }, upCallBack: function () { $("html,body").stop().animate({ scrollTop: $(".indA_content").offset().top - 60 }); }, downCallBack: function () { $("html,body").stop().animate({ scrollTop: 0 }); } }); //股票 var elements = v_hk06989.split("~"); $(".guu_name h2").html(elements[1]); //股票名称 $(".guu_name p").html(elements[3] + "港元"); })