//点击左侧切换效果
function addTabLeftUrl(obj, url) {
$(".content-left-list ul ul li p a").removeClass("active")
$(obj).addClass("active");
$.get(url, function (data) {
var html = "";
if (data == undefined || data == null || data.length < 1) { html = ""; return; }
html = data;
//var startIndex = html.indexOf("");
//var endIndex = html.indexOf("");
/*$("code").html(html.substr(startIndex + 6, endIndex - startIndex - 6));*/
$(".banner").html($(html).find(".banner").html());
$(".left").html($(html).find(".left").html());
$(".right").html($(html).find(".right").html());
$(".content-right").html($(html).find(".content-right").html());
$(".jb").html($(html).find(".jb").html());
//修改右侧href
$(".top_hengxiang_daohang").find(".right ul li a").each(function () {
var href = $(this).attr("href");
if (href.indexOf("addTabRightUrl") < 0) {
href = "javascript:addTabRightUrl('" + $(this).text() + "','" + href + "')";
$(this).attr("href", href);
}
});
//$(".content-right").find(".contentTab select").each(function () {
// $(this).attr("onchange", "addTabRightUrl(options[selectedIndex].value)");
//});
/* SheZhi_click()*/
return;
})
}
//点击右侧切换效果
function addTabRightUrl(e, url) {
$.get(url, function (data) {
var html = "";
if (data == undefined || data == null || data.length < 1) {
html = "";
return;
}
html = data;
//var startIndex = html.indexOf("");
//var endIndex = html.indexOf("");
/*$("code").html(html.substr(startIndex + 6, endIndex - startIndex - 6));*/
$(".banner").html($(html).find(".banner").html());
$(".top_hengxiang_daohang .left").html($(html).find(".top_hengxiang_daohang .left").html());
$(".left").html($(html).find(".left").html());
$(".right").html($(html).find(".right").html());
$(".content-left").html($(html).find(".content-left").html());
$(".content-right").html($(html).find(".content-right").html());
$(".jb").html($(html).find(".jb").html());
//修改右侧href
$(".top_hengxiang_daohang").find(".right ul li a").each(function () {
var href = $(this).attr("href");
if (href.indexOf("addTabRightUrl") < 0) {
href = "javascript:addTabRightUrl('" + $(this).text() + "','" + href + "')";
$(this).attr("href", href);
}
if (String(e) == $(this).text()) {
$(this).parent().addClass("active")
} else {
$(this).parent().removeClass("active")
}
});
//$(".content-right").find(".contentTab select").each(function () {
// $(this).attr("onchange", "addTabRightUrl(options[selectedIndex].value)");
//});
SheZhi_click()
return;
})
}
function SheZhi_click() {
$(".content-left-list>ul>li>p").click(function () {
if ($(this).siblings().is(':hidden')) {
$(".content-left-list>ul>li>p").removeClass("zuoceesjbs");
$(".content-left-list>ul>li>p").removeClass("zuoceesjbj");
$(this).addClass("zuoceesjbs");
$(this).addClass("zuoceesjbj");
/*$(this).siblings().show(200).siblings().children().text('v')*/
$(this).siblings().show(200).parent().children().find("img").remove()
$(this).parent().children().append("
")
} else {
$(this).removeClass("zuoceesjbs");
$(this).removeClass("zuoceesjbj");
/*$(this).siblings().hide(200).siblings().children().text('>')*/
$(this).siblings().hide(200).parent().children().find("img").remove()
$(this).parent().children().append("
")
}
});
$(".content-left-list>ul>li>ul>li:not(.li_sjzn)>p.content-left-list-p1").click(function () {
if ($(this).siblings().is(':hidden')) {
$(".content-left-list>ul>li>ul>li>p").removeClass("zuoceesjbs");
$(this).addClass("zuoceesjbs");
$(this).siblings().show(200).siblings().children().text('v')
} else {
$(this).siblings().hide(200).siblings().children().text('>')
}
});
$(".content-left-list>ul>li>ul>li.li_sjzn>p.content-left-list-p1").click(function () {
if ($(this).siblings().is(':hidden')) {
$(".content-left-list>ul>li>ul>li>p").removeClass("zuoceesjbs");
$(this).siblings().show(200).parent().children().find("img").remove()
$(this).parent().children().append("
")
} else {
$(this).siblings().hide(200).parent().children().find("img").remove()
$(this).parent().children().append("
")
}
});
$(".content-left-list>ul>li>ul>li>p.content-left-list-p1+ul>li>p").click(function () {
if ($(this).siblings().is(':hidden')) {
$(".content-left-list>ul>li>ul>li>p.content-left-list-p1+ul>li>p").removeClass("zuoceesjbs");
$(this).addClass("zuoceesjbs");
//$(this).siblings().show(200).parent().children().find("img").remove()
//$(this).parent().children().append("
")
} else {
//$(this).siblings().hide(200).parent().children().find("img").remove()
//$(this).parent().children().append("
")
}
});
$('.contentTab>p').click(function () {
$(this).addClass('pickOn').siblings().removeClass('pickOn')
});
}
//通过地址栏设置导航选中
function DaoHang_Active() {
$('.top_hengxiang_daohang .right> ul li a').each(
function () {
if ($($(this))[0].href == String(window.location))
$(this).parent().addClass('active')
});
}