$(document).ready(function(){ $(".nw_mvs > li").css('display', 'block'); $(".bnn_sl > li").css('display', 'block'); // start: ºÎ¼­, µ¿ function ymc_clo(){ $(".ht_lef .ym").removeClass('on'); $(".bs_dz").slideUp(100); } $(".ht_lef .ym > a").click(function(){ if ($(this).parent('li').hasClass('on')){ $(this).attr("title",'ÆîÃ帱â(Á¢Èù »óÅÂ)');//Á¢±Ù¼º Ãß°¡ ymc_clo(); }else{ msmb_clo(); $(this).parent('li').addClass('on'); $(this).next(".bs_dz").slideDown(200); $(this).attr("title",'ÆîÃ帱â(ÆîÃÄÁø »óÅÂ)');//Á¢±Ù¼º Ãß°¡ } }); // ÆîħÈÄ ÇØ´ç ¿µ¿ª ¿Ü¿¡ ¸¶¿ì½º Æ÷ÀÎÆ®°¡ ¹þ¾î³ª¸é ¸Þ´º ´Ý´Â ±â´É Ãß°¡ // $(".ht_lef .ym > div").mouseleave(function(){ // if ($(this).parent('li').hasClass('on')){ // $(this).attr("title",'ÆîÃ帱â(Á¢Èù »óÅÂ)');//Á¢±Ù¼º Ãß°¡ // ymc_clo(); // } // }); // ºÎ¼­¡¤µ¿ ÆîħÈÄ ÇØ´ç ¿µ¿ª ¿Ü¿¡ Ŭ¸¯À̺¥Æ®°¡ ¹ß»ýÇÏ¸é ´Ý´Â ±â´É Ãß°¡ $(document).mouseup(function(e){ var container = $(".ht_lef"); if (!container.is(e.target) && container.has(e.target).length === 0){ ymc_clo(); } }); $('.bs_dz a:first, .ht_lef .ym a:last').focusout(function(){ setTimeout(function(){ if($('.ht_lef .ym a:focus').length < 1){ ymc_clo(); } },100); }); // end: ºÎ¼­, µ¿ // start: ÁÖ¿ä»çÀÌÆ® function msmb_clo(){ $(".ht_lef .msmb").removeClass('on'); $(".ms_mb").slideUp(100); } $(".ht_lef .msmb > a").click(function(){ if ($(this).parent('li').hasClass('on')){ $(this).attr("title",'ÆîÃ帱â(Á¢Èù »óÅÂ)');//Á¢±Ù¼º Ãß°¡ msmb_clo(); }else{ ymc_clo(); $(this).parent('li').addClass('on'); $(this).next(".ms_mb").slideDown(200); $(this).attr("title",'ÆîÃ帱â(ÆîÃÄÁø »óÅÂ)');//Á¢±Ù¼º Ãß°¡ } }); // ÁÖ¿ä»çÀÌÆ® ÆîħÈÄ ÇØ´ç ¿µ¿ª ¿Ü¿¡ Ŭ¸¯À̺¥Æ®°¡ ¹ß»ýÇÏ¸é ´Ý´Â ±â´É Ãß°¡ $(document).mouseup(function(e){ var container = $(".ht_lef"); if (!container.is(e.target) && container.has(e.target).length === 0){ msmb_clo(); } }); $('.ms_mb a:first, .ht_lef .msmb a:last').focusout(function(){ setTimeout(function(){ if($('.ht_lef .msmb a:focus').length < 1){ msmb_clo(); } },100); }); // end: ÁÖ¿ä»çÀÌÆ® $('.lang_tg > a').click(function(){ if ($(this).hasClass('on')){ $(this).removeClass('on'); $(this).attr("title",'ÆîÃ帱â(Á¢Èù »óÅÂ)');//Á¢±Ù¼º Ãß°¡ $('.lang_tg > ul').slideUp(200); }else{ $(this).addClass('on'); $(this).next('ul').slideDown(200); $(this).attr("title",'ÆîÃ帱â(ÆîÃÄÁø »óÅÂ)');//Á¢±Ù¼º Ãß°¡ } }); $('.lang_tg a').focusout(function(){ setTimeout(function(){ if($('.lang_tg a:focus').length < 1){ $('.lang_tg > a').removeClass('on'); $('.lang_tg > ul').slideUp(200); } },100); }); /*menu*/ $(".mdp_tbv > li > p").each(function(){ $(this).addClass("po" + ($(this).parents('li').index() + 1)); }); $(".depth1 > li:last .mdp_tbv > li:last > p > a").addClass('fc'); $(".depth1 > li > a").bind('focus mouseover',function(){ if ($(window).width() > 1024 ){ if ($(".depth1 > li").hasClass('on')){ $(".depth1 > li").removeClass('on'); $(".dp2_bk").hide(); $(this).next(".dp2_bk").show(); $(this).parents('li').addClass('on'); }else{ $('.lang_tg > a').removeClass('on'); $('.lang_tg > ul').slideUp(200); ymc_clo(); $(this).parents('li').addClass('on'); $(this).next(".dp2_bk").slideDown(200); } // $(".mdp_tbv > li > p.po1 > a").mouseover(); } }); $(".head_md").mouseleave(function(){ if ($(window).width() > 1024){ $(".depth1 > li").removeClass('on'); $(".dp2_bk").slideUp(200); } }); $('.depth1 a:last, .depth1 a:first').focusout(function(){ if ($(window).width() > 1024){ setTimeout(function(){ if($('.depth1 a:focus').length < 1 ){ $(".depth1 > li").removeClass('on'); $(".dp2_bk").slideUp(200); } },100); } }); $('.depth1 a.fc').focusout(function(){ if (!$(this).parents('.mdp_tbv > li').hasClass('on') && $(window).width() > 1024){ setTimeout(function(){ if($('.depth1 a:focus').length < 1){ $(".depth1 > li").removeClass('on'); $(".dp2_bk").slideUp(200); }; },100); } }); if ($(window).width() > 1024 ){ $(".mdp_tbv > li > p > a").bind('focus mouseover',function(){ if ($(window).width() > 1024){ $(this).parents(".mdp_tbv").children('li').removeClass('on'); $(this).parents('li').find(".mdp2_ls").hide(); $(this).parent('p').next(".mdp2_ls").show(); $(this).parents('.mdp_tbv > li').addClass('on'); }else{ if ($(this).parents('li').hasClass('on')){ $(".mdp_tbv > li").removeClass('on'); $(".mdp_tbv .mdp2_ls").slideUp(200); }else{ $(".mdp_tbv > li").removeClass('on'); $(".mdp_tbv .mdp2_ls").slideUp(200); $(this).parent('p').next(".mdp2_ls").slideDown(200); $(this).parents('.mdp_tbv > li').addClass('on'); } } }); } else { $(".mdp_tbv > li > p > a").click(function(){ if ($(window).width() > 1024){ $(this).parents(".mdp_tbv").children('li').removeClass('on'); $(this).parents('li').find(".mdp2_ls").hide(); $(this).parent('p').next(".mdp2_ls").show(); $(this).parents('.mdp_tbv > li').addClass('on'); }else{ if ($(this).parents('li').hasClass('on')){ $(".mdp_tbv > li").removeClass('on'); $(".mdp_tbv .mdp2_ls").slideUp(200); }else{ $(".mdp_tbv > li").removeClass('on'); $(".mdp_tbv .mdp2_ls").slideUp(200); $(this).parent('p').next(".mdp2_ls").slideDown(200); $(this).parents('.mdp_tbv > li').addClass('on'); } } }); } $(".mdp2_ls > li > strong > a").click(function(){ if ($(window).width() <= 1024){ if ($(this).parents('.mdp2_ls > li').hasClass('on')){ $(".mdp2_ls > li").removeClass('on'); $(".mdp2_ls > li > ul").slideUp(200); }else{ $(".mdp2_ls > li").removeClass('on'); $(".mdp2_ls > li > ul").slideUp(200); $(this).parent('strong').next("ul").slideDown(200); $(this).parents('.mdp2_ls > li').addClass('on'); } } }); $(".alm_bk").click(function(){ if ($(window).width() <= 1024){ $(".menu_box").css("left","-280px").animate({"left": "0"},300).show(); $(".mdp_tbv > li").removeClass('on'); $(".mdp_tbv .mdp2_ls").hide(); $("html").addClass("openGnb"); $(".mo_mbg").show(); } }); $(".mo_mclo").click(function(){ $(".menu_box").css("left","0").animate({"left": "-280px"},300, function(){$(this).hide()}); $("html").removeClass("openGnb"); $(".mo_mbg").hide(); }); $(".depth1 > li > a").click(function(){ if ($(window).width() <= 1024){ if ($(this).parents('li').hasClass('m_act')){ $(".depth1 > li").removeClass('m_act'); $(".dp2_bk").slideUp(200); }else{ $(".depth1 > li").removeClass('m_act'); $(".dp2_bk").slideUp(200); $(this).next(".dp2_bk").slideDown(200); $(this).parents('li').addClass('m_act') } } }); /* menu end */ /*2018/10/15*/ $(".search_sw > a").click(function(){ if ($(this).hasClass('on')){ $(this).removeClass('on'); $(".head_bm").slideUp(200); }else{ $(this).addClass('on'); $(".head_bm").slideDown(200); } }); /* //2018/10/15*/ /* main */ $(".nw_mvs").bxSlider({ auto: true, pause: 4000, pagerType: "short", autoControls: true, }); $(".ntc_mbk > li > p > a").click(function(){ $(".ntc_mbk > li > div").hide(); $(".ntc_mbk > li").removeClass('on'); $(this).parents('li').addClass('on'); $(this).parents('li').find('div').show(); }); $(".bnn_sl").bxSlider({ auto: true, pause: 3000, pagerType: "short", autoControls: true, }); $(".mcb_bk > li > p > a").click(function(){ $(".mcb_bk > li > div").hide(); $(".mcb_bk > li").removeClass('on'); $(this).parents('li').addClass('on'); $(this).parents('li').find('div').show(); }); $(".oslk_ls").bxSlider({ auto: true, autoReload: true, infiniteLoop : true, hideControlOnEnd: false, pause: 5000, pager: false, controls: true, autoControls: true, minSlides: 2, maxSlides: 100, moveSlides: 1, slideWidth: 100, slideMargin: 10, }); //Á¢±Ù¼º ÀÛ¾÷ Ãß°¡ $("#navi_slideUp").focus(function(){ //$('.lang_tg > a').removeClass('on'); //$('.lang_tg > ul').slideUp(200); $(".depth1 > li").removeClass('on'); $(".dp2_bk").slideUp(200); }); }); $(window).on('load resize', function () { if ($(window).width() > 1024 ){ $(".menu_box").show(); $(".mdp2_ls > li > ul").show(); $(".search_sw > a").removeClass('on'); //2018/10/15 $(".head_bm").addClass('pcv'); //2018/10/15 $(".mdp_tbv > li").each(function(){ if ($(this).index() == 0){ $(this).addClass('on'); $(this).children(".mdp2_ls").show(); } }); $("html").removeClass("openGnb"); $(".mo_mbg").hide(); } if ($(window).width() <= 1024 ){ $(".head_bm").removeClass('pcv'); } }); //·Ñ¸µ¹è³Ê $(function(){ $("#carouselInner").css("margin-left","-110px"); $("#carouselInner ul li:last").prependTo("#carouselInner ul"); $("#carouselPrev").click(function(){ if(!($("#carouselInner").is(":animated"))){ way = "right"; clearInterval(timerID); $("#carouselInner").animate({ marginLeft : "0px" },350,"swing" , function(){ $("#carouselInner").css("margin-left","-110px") $("#carouselInner ul li:last").prependTo("#carouselInner ul"); start(); }); } }); $("#carouselNext").click(function(){ if(!($("#carouselInner").is(":animated"))){ way = "left"; clearInterval(timerID); $("#carouselInner").animate({ marginLeft : "-220px" },350,"swing" , function(){ $("#carouselInner").css("margin-left","-110px"); $("#carouselInner ul li:first").appendTo("#carouselInner ul"); start(); }); } }); var way = "left"; var timerID var lolling ="start" start(); function start(){ if(lolling =="stop"){ return; }else{ timerID = setInterval(function(){ if(way == "left"){ $("#carouselNext").click(); }else{ $("#carouselPrev").click(); } },5000); } } $("#carouselPrev img,#carouselNext img").click(function(){ if(lolling == "stop"){ lolling="start"; $("#stop").attr("title","Ŭ¸¯ ÇÏ¸é ¹è³Ê°¡ Á¤Áö ÇÕ´Ï´Ù"); $("#stop").find("img").attr("alt","Á¤Áö"); } clearInterval(timerID); }); $("#stop").click(function(){ if(lolling == "start"){ lolling="stop"; $(this).attr("title","Ŭ¸¯ ÇÏ¸é ¹è³Ê°¡ Àç»ý µË´Ï´Ù"); $(this).find("img").attr("alt","Àç»ý"); clearInterval(timerID); }else{ lolling="start"; $(this).attr("title","Ŭ¸¯ ÇÏ¸é ¹è³Ê°¡ Á¤Áö ÇÕ´Ï´Ù"); $(this).find("img").attr("alt","Á¤Áö"); start(); } }); }); //·Ñ¸µ¹è³Ê ³¡