//瀵艰埅榧犳爣缁忚繃 var home_url = ''; var url = window.location.href; $(".nav > li a").each(function() { if ($(this).attr("href") == url) { $(this).parent().addClass("active"); }; }); //涓嶈禋閽 $(".floor03_con_ul ul li .txt").hover(function() { $(".floor03_con_ul ul li").removeClass("active"); $(this).parent().addClass("active"); }, function() {}); //妗堜緥 $(".floor04_nav li").eq(0).find("a").addClass("active"); $(".floor04_ul_c .floor04_ul_c01").show(); $(".floor04_nav ul li").hover(function() { //閫変腑鏁堟灉 $(".floor04_nav ul li a").removeClass("active"); $(this).find("a").addClass("active"); //褰撳墠妗堜緥杩炴帴 var hlink = $(this).find("a").attr("href"); $(".floor04_nav span.floor02_more").find("a").attr("href", hlink); //鎵€鏈夐殣钘 $(".floor04_ul_c0").hide(); //鎸囧畾鏄剧ず var i = $(this).index() + 1; $(".floor04_ul_c0" + i).stop().show("slow"); }, function() {}); //妗堜緥榧犳爣 $(".floor04_ul_c li").hover(function() { $(this).find(".floor04_ul_p").stop().animate({ top: "-243px" }); }, function() { $(this).find(".floor04_ul_p").stop().animate({ top: "1px" }); }); //6澶у姛鑳 $(".floor04_01cr_ul li .txt").hover(function() { $(this).parent().find(".txt").stop().animate({ fontSize: "18px" }, 100); $(this).parent().find("font").stop().animate({ fontSize: "22px" }, 100); }, function() { $(this).parent().find(".txt").stop().animate({ fontSize: "17px" }, 100); $(this).parent().find("font").stop().animate({ fontSize: "21px" }, 100); }); //5澶т紭鍔垮垵濮嬪寲 function init_ys_all(show) { if (show == 1) { $(".floor04_01cl .f4_ys1").stop().animate({ left: "125px", top: "0px" }, 200); $(".floor04_01cl .f4_ys2").stop().animate({ left: "320px", top: "3px" }, 400); $(".floor04_01cl .f4_ys3").stop().animate({ left: "22px", top: "93px" }, 600); $(".floor04_01cl .f4_ys4").stop().animate({ left: "420px", top: "100px" }, 800); $(".floor04_01cl .f4_ys5").stop().animate({ left: "290px", top: "75px" }, 1000); } } $(document).ready(function() { var howlist_int = 0; var ysall_int = 0; init_howlist(1); //init_ys_all(1); $(".howlist2 .btext").stop().animate({ left: "0px" }, 1000); $(window).scroll(function() { var top = $(window).scrollTop(); if (top > 2700 && top < 4100) { ysall_int = 2; //init_ys_all(1); } else if (top > 4200 && top < 5300) { howlist_int = 2; init_howlist(1); } else { if (ysall_int == 0 || ysall_int == 2) { ysall_int = 1; /* $(".floor04_01cl .f4_ys1").animate({ left: "0px", top: "0px" }); $(".floor04_01cl .f4_ys2").animate({ left: "0px", top: "0px" }); $(".floor04_01cl .f4_ys3").animate({ left: "0px", top: "0px" }); $(".floor04_01cl .f4_ys4").animate({ left: "0px", top: "0px" }); $(".floor04_01cl .f4_ys5").animate({ left: "0px", top: "0px" });*/ } if (howlist_int == 0 || howlist_int == 2) { howlist_int = 1; //鑺傜害鏃堕棿 $(".howlist1 dl").each(function() { var i = $(this).index(); $(this).stop().animate({ left: "0px" }); }); $(".howlist1 .ytext").stop().animate({ right: "100px" }); //灏戣蛋寮矾 $(".howlist2 dl").each(function() { var i = $(this).index(); $(this).stop().animate({ right: "0px" }); }); $(".howlist2 .btext").stop().animate({ left: "100px" }); } } }); }); //瑙e喅鏂规鍒濆鍖 function init_howlist(show) { if (show == 1) { //鑺傜害鏃堕棿 $(".howlist1 dl").each(function() { var i = $(this).index(); $(this).stop().animate({ left: (55 + 120 * i) + "px" }, 150 * (i + 1)); }); $(".howlist1 .ytext").stop().animate({ right: "0px" }, 1000); //灏戣蛋寮矾 $(".howlist2 dl").each(function() { var i = $(this).index(); $(this).stop().animate({ right: (90 + 120 * i) + "px" }, 150 * (i + 1)); }); $(".howlist2 .btext").stop().animate({ left: "0px" }, 1000); } } //閫夋嫨鎴戜滑 $(".floor05_con ul li").hover(function() { $(".floor05_con ul li").removeClass("active"); $(this).addClass("active"); var i = $(this).attr("dir"); if (i < 8) { $(".floor05_con_02").stop().animate({ top: "-" + (400 * (i - 1)) + "px" }, 1000); } }); //鏂规鎻愪氦 function ajaxMessage(div) { var m_url = url + '/ajax_message.php?action=saveadd'; var name = $(div).find('.names'), tel = $(div).find('.tels'), content = $(div).find('.content-s'), codes = $(div).find('.code-s'); website = $(div).find('.website'); switch (true) { case name.val() == '': alert("濮撳悕涓嶈兘涓虹┖锛?); name.focus(); return false; break; case tel.val() == '': alert("鐢佃瘽涓嶈兘涓虹┖锛?); tel.focus(); return false; break; case content.val() == '': alert("鍐呭涓嶈兘涓虹┖锛?); content.focus(); return false; break; case codes.val() == '': alert("楠岃瘉鐮佷笉鑳戒负绌猴紒"); codes.focus(); return false; break; case website.val() == '': alert("缃戝潃涓嶈兘涓虹┖锛?); website.focus(); return false; break; } var pattern = new RegExp(/^[0-9-+]+$/); if (!pattern.test(tel.val())) { alert('鎮ㄨ緭鍏ユ湁鏁堢數璇濆彿鐮侊紒'); tel.focus(); return false; } $.post(m_url, { name: name.val(), tel: tel.val(), content: content.val(), codes: codes.val(), website: website.val() }, function(data) { if (data) { if (data == 1) { alert('淇℃伅鎻愪氦鎴愬姛锛屾垜浠細灏藉揩缁欐偍鍥炲锛?); window.location.reload(); } else { alert(data); } } }); } //鏂伴椈鍒囨崲 $('#news-tab li').hover(function() { var _index = $(this).index(); $(this).addClass("cur").siblings("li").removeClass("cur"); $(".tab-news-list").eq(_index).stop().show().siblings(".tab-news-list").stop().hide(); }); /*$(".ys_con").find("li").hover(function() { $(this).find(".m_hide").stop(true, false).animate({ bottom: "-155px" }, 250, "linear"); $(this).find(".h_hide").delay(400).animate({ bottom: "155px" }, 200, "linear"); }, function() { $(this).find(".m_hide").stop(true, false).animate({ bottom: "0px" }, 250, "linear"); $(this).find(".h_hide").stop(true, false).animate({ bottom: "0px" }, 200, "linear"); });*/ $(".case_tog").hide(); $(".case_tog").eq(0).show(); $(".case_con").find("li").click(function() { var _index = ($(this).index()); $(".case_tog").hide(); $(".case_tog").eq(_index).show(); }) $(".case_text").find("li").hover(function() { $(this).find(".g_bc").show(); $(this).find(".er").show(); }, function() { $(this).find(".g_bc").hide(); $(this).find(".er").hide(); })