var pagew = $(document).outerWidth(true) + (window.innerWidth - document.body.clientWidth); var pageh = $(window).innerHeight(); try { if (pagew > 1200) { $("body").on("click",".top_pos",function () { if ($(this).hasClass("on")) { $(this).removeClass("on"); } else { $(this).addClass("on"); } }); } else { $(".menu_click a").click(function () { if ($(this).hasClass("on")) { $(this).removeClass("on"); $(".menufr").css({ "display": "none" }); } else { $(this).addClass("on"); $(".menufr").css({ "display": "block" }); } }); } } catch (e) { } try { var cjwt_01_on = -1; $(".cjwt_01 ul li").each(function (i, e) { if ($(this).hasClass("on")) { cjwt_01_on = i; } $(this).mouseenter(function () { if (cjwt_01_on != i) { $(this).addClass("on"); if (cjwt_01_on != -1) { $(this).closest("ul").find("li").eq(cjwt_01_on).removeClass("on"); } cjwt_01_on = i; } }); }); } catch (e) { } try { $(".page5 .fr em").click(function () { if (navigator.userAgent.match(/mobile/i)) { window.open('http://api.map.baidu.com/geocoder?address=金沙集团186cc成色&output=html&src=webapp.baidu.openAPIdemo'); } else { window.open("http://api.map.baidu.com/geocoder?address=金沙集团186cc成色&output=html&src=webapp.baidu.openAPIdemo"); } }); $(".page5 .fr .lb1").click(function () { if (navigator.userAgent.match(/mobile/i)) { window.open('http://api.map.baidu.com/geocoder?address=上海市奉贤区高丰路706号A座1楼&output=html&src=webapp.baidu.openAPIdemo'); } else { window.open("http://api.map.baidu.com/geocoder?address=上海市奉贤区高丰路706号A座1楼&output=html&src=webapp.baidu.openAPIdemo"); } }); } catch (e) { } function countup1(_obj) { try { var settings = { 'time': 600, 'delay': 5 }; var $this = _obj; var $settings = settings; if (!$this.data('counterupTo')) { $this.data('counterupTo', $this.text()); } var time = parseInt($this.data("counter-time")) > 0 ? parseInt($this.data("counter-time")) : $settings.time; var delay = parseInt($this.data("counter-delay")) > 0 ? parseInt($this.data("counter-delay")) : $settings.delay; var divisions = time / delay; var num = $this.attr("data-counterupTo"); var nums = [num]; var isComma = /[0-9]+,[0-9]+/.test(num); num = num.replace(/,/g, ''); var isInt = /^[0-9]+$/.test(num); var isFloat = /^[0-9]+\.[0-9]+$/.test(num); var decimalPlaces = isFloat ? (num.split('.')[1] || []).length : 0; for (var i = divisions; i >= 1; i--) { var newNum = parseInt(Math.round(num / divisions * i)); if (isFloat) { newNum = parseFloat(num / divisions * i).toFixed(decimalPlaces); } if (isComma) { while (/(\d+)(\d{3})/.test(newNum.toString())) { newNum = newNum.toString().replace(/(\d+)(\d{3})/, '$1' + ',' + '$2'); } } nums.unshift(newNum); } $this.data('counterup-nums', nums); $this.text('0'); var f = function () { try { if ($this.data('counterup-nums') != "") { $this.text($this.data('counterup-nums').shift()); if ($(".zhaq_01_c").attr("class") == "zhaq_01_c") { if ($this.data('counterup-nums').shift() <= 20) { $(".zhaq_01_c").find(".img1").css({ "opacity": "1" }); $(".zhaq_01_c").find(".img2").css({ "opacity": "0" }); $(".zhaq_01_c").find(".img3").css({ "opacity": "0" }); } else if ($this.data('counterup-nums').shift() <= 60) { $(".zhaq_01_c").find(".img1").css({ "opacity": "0" }); $(".zhaq_01_c").find(".img2").css({ "opacity": "1" }); $(".zhaq_01_c").find(".img3").css({ "opacity": "0" }); } else if ($this.data('counterup-nums').shift() <= 100) { $(".zhaq_01_c").find(".img1").css({ "opacity": "0" }); $(".zhaq_01_c").find(".img2").css({ "opacity": "0" }); $(".zhaq_01_c").find(".img3").css({ "opacity": "1" }); } } } if ($this.data('counterup-nums').length) { setTimeout($this.data('counterup-func'), delay); } else { delete $this.data('counterup-nums'); $this.data('counterup-nums', null); $this.data('counterup-func', null); } } catch (e) { } }; $this.data('counterup-func', f); setTimeout($this.data('counterup-func'), delay); } catch (e) { } }