//start
$(document).ready(function(){
	$(".sj a,.cus a,.expect").css("margin-right","0px");
	$(".safestar_1 ul li:first,,.safestar_2 ul li:first,.safestar_3 ul li:first,.safestar_4 ul li:first,.safestar_5 ul li:first").css("margin-left","10px");
	$(".i-title:last,.i-status:last,.i-opera:last,.i-title-b:last,.i-infos:last,#main").css("border-bottom","none");
	$(".help a").css("cursor","help");
	//$(".fourmanlist li:last").css("margin-right","0px");
	$(".news li a").each(function(){
        var maxwidth=17;
        if($(this).text().length>maxwidth){
            $(this).text($(this).text().substring(0,maxwidth));
            $(this).html($(this).html()+'...');
        }
    });

	//
//	$("#bg").hide();
//	$(".ShowYInfo").hide();
	//
	$(".sy-myinput1 input").focusin(mak1).focusout(unmak1);
	$(".sy-myinput2 input").focusin(mak2).focusout(unmak2);
	$(".sy-myinput3 input").focusin(mak3).focusout(unmak3);
	//
	$(".Cop1").show();
	$(".Cop2,.Cop3,.Cop4").hide();
	$(".Gop1").css({
			"cursor":"default",
			"border-bottom":"2px #ff7800 solid"
		});
	$(".Gop2,.Gop3").css("cursor","pointer");
	$(".Gop1,.Gop2,.Gop3,.Gop4").mouseover(getMM);
	//
	$(".sc-normal1").mouseover(ChangeBg1).mouseout(unChangeBg1);
	$(".sc-normal2").mouseover(ChangeBg2).mouseout(unChangeBg2);
	$(".sc-normal3").mouseover(ChangeBg3).mouseout(unChangeBg3);
	$(".sc-normal4").mouseover(ChangeBg4).mouseout(unChangeBg4);
	$(".sc-normal5").mouseover(ChangeBg5).mouseout(unChangeBg5);
	
	/* write by wanglian */
	
	// 显示/隐藏通行证账号
	$("#sorh").toggle(function(){
		if ($(this).html() == '显示') {
			$("#username_all").show();
			$("#username_blurred").hide();
			$(this).html('隐藏');
		}
	},function(){
		 if ($(this).html() == '隐藏') {
			$("#username_all").hide();
			$("#username_blurred").show();
			$(this).html('显示');
		}
	});
	
	/* write by wanglian @end */
	
;});
//end
function mak1() {
	$(".sy-myinput1 input").addClass("sy-in");
}
function unmak1() {
	$(".sy-myinput1 input").removeClass("sy-in");
}
function mak2() {
	$(".sy-myinput2 input").addClass("sy-in");
}
function unmak2() {
	$(".sy-myinput2 input").removeClass("sy-in");
}
function mak3() {
	$(".sy-myinput3 input").addClass("sy-in");
}
function unmak3() {
	$(".sy-myinput3 input").removeClass("sy-in");
}
//
function getMM() {
	var server = "Gop1";
	server = $(this).attr("class");
	for ( var j = 1; j <= 3; j++) {
		if (("Gop" + j) == server) {
			$(".Gop" + j).css({
			"cursor":"default",
			"border-bottom":"2px #ff7800 solid"
		});
			$(".Cop" + j).show();
		} else {
			$(".Gop" + j).css({
			"cursor":"default",
			"border-bottom":"0px #ff7800 solid"
		});
			$(".Cop" + j).hide();
		}
	}//for end
}
//
function ChangeBg1() {
	$(".sc-normal1").css({"background":"#ccc","border":"3px #ccc solid"});
}
function unChangeBg1() {
	$(".sc-normal1").css({"background":"#d4dde6","border":"3px #d4dde6 solid"});
}
//
function ChangeBg2() {
	$(".sc-normal2").css({"background":"#ccc","border":"3px #ccc solid"});
	$(".sc-d-name2").css({"background":"url(images/safe/2b.jpg) no-repeat center bottom"});
}
function unChangeBg2() {
	$(".sc-normal2").css({"background":"#d4dde6","border":"3px #d4dde6 solid"});
	$(".sc-d-name2").css({"background":"url(images/safe/2b-1.jpg) no-repeat center bottom"});
}
//
function ChangeBg3() {
	$(".sc-normal3").css({"background":"#ccc","border":"3px #ccc solid"});
	$(".sc-d-name3").css({"background":"url(images/safe/2c.jpg) no-repeat center bottom"});
}
function unChangeBg3() {
	$(".sc-normal3").css({"background":"#d4dde6","border":"3px #d4dde6 solid"});
	$(".sc-d-name3").css({"background":"url(images/safe/2c-1.jpg) no-repeat center bottom"});
}
//
function ChangeBg4() {
	$(".sc-normal4").css({"background":"#ccc","border":"3px #ccc solid"});
	$(".sc-d-name4").css({"background":"url(images/safe/2d.jpg) no-repeat center bottom"});
}
function unChangeBg4() {
	$(".sc-normal4").css({"background":"#d4dde6","border":"3px #d4dde6 solid"});
	$(".sc-d-name4").css({"background":"url(images/safe/2d-1.jpg) no-repeat center bottom"});
}
//
function ChangeBg5() {
	$(".sc-normal5").css({"background":"#ccc","border":"3px #ccc solid"});
	$(".sc-d-name5").css({"background":"url(images/safe/2e.jpg) no-repeat center bottom"});
}
function unChangeBg5() {
	$(".sc-normal5").css({"background":"#d4dde6","border":"3px #d4dde6 solid"});
	$(".sc-d-name5").css({"background":"url(images/safe/2e-1.jpg) no-repeat center bottom"});
}









