$(document).ready(function(){ $(".sub02_tab01 .sub02_tab01_sub h4 a").click(function(){ $(".sub02_tab01 .sub02_tab01_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".sub02_tab01 .sub02_tab01_sub h4 a").focusin(function(){ $(".sub02_tab01 .sub02_tab01_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".sub02_tab02 .sub02_tab02_sub h4 a").click(function(){ $(".sub02_tab02 .sub02_tab02_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".sub02_tab02 .sub02_tab02_sub h4 a").focusin(function(){ $(".sub02_tab02 .sub02_tab02_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".sub04_tab01 .sub04_tab01_sub h4 a").click(function(){ $(".sub04_tab01 .sub04_tab01_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".sub04_tab01 .sub04_tab01_sub h4 a").focusin(function(){ $(".sub04_tab01 .sub04_tab01_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".sub01_01_tab01 .sub01_01_sub h4 a").click(function(){ $(".sub01_01_tab01 .sub01_01_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".sub01_01_tab01 .sub01_01_sub h4 a").focusin(function(){ $(".sub01_01_tab01 .sub01_01_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".sub04_tab02 .sub04_tab02_sub h4 a").click(function(){ $(".sub04_tab02 .sub04_tab02_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".sub04_tab02 .sub04_tab02_sub h4 a").focusin(function(){ $(".sub04_tab02 .sub04_tab02_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".hospital_view .hospital_sub h4 a").click(function(){ $(".hospital_view .hospital_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".hospital_view .hospital_sub h4 a").focusin(function(){ $(".hospital_view .hospital_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".tab_type_03 .tab_type_sub h4 a").click(function(){ $(".tab_type_03 .tab_type_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".tab_type_03 .tab_type_sub h4 a").focusin(function(){ $(".tab_type_03 .tab_type_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".tab_type_04 .tab_type_sub h4 a").click(function(){ $(".tab_type_04 .tab_type_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".tab_type_04 .tab_type_sub h4 a").focusin(function(){ $(".tab_type_04 .tab_type_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".tab_type_02 .tab_type_sub h4 a").click(function(){ $(".tab_type_02 .tab_type_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".tab_type_02 .tab_type_sub h4 a").focusin(function(){ $(".tab_type_02 .tab_type_sub").removeClass("on"); $(this).parent().parent().addClass("on"); return false; }); $(".chnImg li").hover(function(){ // 전체 이미지 off $(this).parents(".chnImg").find("img").each(function(){ $(this).attr("src",$(this).attr("src").replace("_on","_off")); }); // this 이미지 on var imgChnName = $(this).find("img").attr("src"); $(this).find("img").attr("src",imgChnName.replace("_off","_on")); },function(){ $(this).parents(".chnImg").find("img").each(function(){ $(this).attr("src",$(this).attr("src").replace("_on","_off")); }); }); })