$(function(){
	$(".clscap").click(function(){
					var cap    = $(this).attr("href");
					$("li.current").each(function() {
												$(this).attr("class", "");
											});
					$(this).parent().attr("class", "current");
					cap = cap.slice(-4);
					cap = cap.slice(0, 3);
					var isHide = false;
					$(".di-table").each(function() {
												$(this).hide();
											});
					$(".di-table tr").each(function() {
												var id = $(this).find("a").attr("id");
												if(id != ""){
													if( id == "aaa" || id == "kkk" || id == "sss" || id == "ttt" || id == "nnn" ||
														id == "hhh" || id == "mmm" || id == "yyy" || id == "rrr" || id == "www"){
														if(id == cap){
															isHide = false;
														}else{
															isHide = true;
														}
													}
													if(isHide && cap != "all"){
														$(this).hide();
													}else{
														$(this).show();
													}
												}
											});
					$(".di-table").each(function() {
												$(this).fadeIn("normal");
											});
					return false;
				});
	var val = $("#rowCapKey").attr("value");
	if(val.length > 0){
		$("#cap_" + val).click();
	}

	$("li[class*='search-']").click(function(){
					var cap    = $(this).attr("class");
					cap = cap.slice(-1);
					cap = cap + cap + cap;
					$("#cap_" + cap).click();
					return false;
				});

});
