$(function () { $(".support").each(function () { var jszc = " "; if ($(this).find("p.jszc").length > 0) { $(this).find("p.jszc").append(jszc); } else if ($(this).find("p").length > 0) { $(this).find("p").eq(0).append(jszc); } else { $(this).html($(this).html() + "

" + jszc + "

"); } }); $(".navcon li, .fastmenu .weixin").hover(function () { $(this).addclass("over"); }, function () { $(this).removeclass("over"); }); $(".tabtitle li").each(function () { var first = $(this).closest(".tabbox").find("li").eq(0); if (!first.hasclass("no")) { first.addclass("no"); $(".tabcontent").eq(0).show(); } }).hover(function () { if (!$(this).hasclass("last")) { $(this).addclass("no").siblings("li").removeclass("no"); $(this).closest(".tabbox").find(".tabcontent").hide().eq($(this).closest("ul").find("li").index($(this))).show(); } }); $(".tabcontent").each(function () { $(this).closest(".tabbox").find(".tabcontent").eq(0).show(); }); $(".job li .jobtitle").click(function () { var _this = $(this).closest("li"); if (_this.find(".hidemenu").length > 0) { if (_this.find(".hidemenu").hasclass("open")) { _this.removeclass("no").find(".hidemenu").removeclass("open").slideup(600); } else { if (_this.siblings().find(".open").length > 0) { _this.siblings().removeclass("no").find(".open").removeclass("open").slideup(600, function () { _this.addclass("no").find(".hidemenu").addclass("open").slidedown(600); }); } else { _this.addclass("no").find(".hidemenu").addclass("open").slidedown(600); _this.siblings().removeclass("no"); } } return false; } else { _this.addclass("no").siblings().removeclass("no").find(".hidemenu").removeclass("open").slideup(600); } }); $(".searchbtn").click(function () { var key = ""; if ($(".searchbox").val() != "" && $(".searchbox").val() != $(".searchbox").attr("keyword")) { key = "?keyword=" + escape($(".searchbox").val()); } location.href = "/news/search" + key; }); $(".newspicswitch .newscon ul li .pic img,.hidenews dl dt img,.newspic ul.newspicbox img").error(function () { $(this).attr("src", "/images/noimg.gif"); }); $("#ddlgov").each(function () { $.getjson("/friendlylink", { typeid:1,r: math.random() }, function (result) { if ($(result.issuccess)) { var html = ""; for (var i = 0; i < result.maindata.length; i++) { html += ""; } $("#ddlgov").html(html); } }, "json"); }).change(function () { if ($(this).val() != "0") { window.open($(this).val()); } }); $("#ddlcompany").each(function () { $.getjson("/friendlylink", { typeid: 2, r: math.random() }, function (result) { if ($(result.issuccess)) { var html = ""; for (var i = 0; i < result.maindata.length; i++) { html += ""; } $("#ddlcompany").html(html); } }, "json"); }).change(function () { if ($(this).val() != "0") { window.open($(this).val()); } }); });