/*******************************/ /* Publisher olibu. Front-js.js */ /*******************************/ //GNB Mouse on,oveer $(document).ready(function() { // gnb ¸Þ´º $(".gnb nav > ul > li > a").on("mouseover focusin",function(){ if($(this).parent("li").hasClass("on")){ $(this).removeClass("on"); }else{ $(".gnb nav > ul > li.on").each(function() { $(this).removeClass("on"); }); } $(this).parent("li").addClass("on"); //$(".two-depth-bg").show(); }); $(".two-depth").mouseleave(function(){ $(".gnb nav > ul > li").removeClass("on"); //$(".two-depth-bg").hide(); }); $(".gnb nav > ul > li.off > a").on("mouseleave focusin",function(){ $(".gnb nav > ul > li").removeClass("on"); }); $(".m-gnb nav > ul > li > a").on("mouseover focusin",function(){ if($(this).parent("li").hasClass("on")){ $(this).removeClass("on"); }else{ $(".m-gnb nav > ul > li.on").each(function() { $(this).removeClass("on"); }); } $(this).parent("li").addClass("on"); //$(".two-depth-bg").show(); }); $(".two-depth").mouseleave(function(){ $(".m-gnb nav > ul > li").removeClass("on"); //$(".two-depth-bg").hide(); }); $(".m-gnb nav > ul > li.off > a").on("mouseleave focusin",function(){ $(".m-gnb nav > ul > li").removeClass("on"); }); /* sub */ $(".s-gnb nav > ul > li > a").on("mouseover focusin",function(){ if($(this).parent("li").hasClass("on")){ $(this).removeClass("on"); }else{ $(".s-gnb nav > ul > li.on").each(function() { $(this).removeClass("on"); }); } $(this).parent("li").addClass("on"); //$(".two-depth-bg").show(); }); $(".two-depth").mouseleave(function(){ $(".s-gnb nav > ul > li").removeClass("on"); //$(".two-depth-bg").hide(); }); $(".s-gnb nav > ul > li.off > a").on("mouseleave focusin",function(){ $(".s-gnb nav > ul > li").removeClass("on"); }); /* sub end */ //ÇÏÀ§¸Þ´º ¾øÀ»½Ã Ãß°¡ //$(".gnb nav > ul > li.off > a").on("mouseover focusin",function(){ //$(".two-depth").hide(); //}); //ÇÏÀ§¸Þ´º ¾øÀ»½Ã Ãß°¡ end $(".gnb nav ul > li").each(function(){ if ($(this).children("a").text() == $(".visual-tit").text() ){ $(this).children("a").css("color","#a76fc3"); $(this).children("a").css("border-bottom","1px solid #a76fc3"); } }); $(".m-gnb nav ul > li").each(function(){ if ($(this).children("a").text() == $(".visual-tit").text() ){ $(this).children("a").css("color","#fff"); $(this).children("a").css("border-bottom","1px solid #fff"); } }); $(".s-gnb nav ul > li").each(function(){ if ($(this).children("a").text() == $(".visual-tit").text() ){ $(this).children("a").css("color","#a76fc3"); } }); //GNB Mouse on,oveer end // ½ºÅ©·Ñ ¾ÞÄ¿À̵¿ $('a.ps').click(function(){ $('html, body').animate({ scrollTop: $( $.attr(this, 'href') ).offset().top - 70 }, 500); return false; }); /* À§·Î ½ºÅ©·ÑÀÌ Æ¯Á¤ À§Ä¡·Î À̵¿Çϸé À§·Î¹öÆ°ÀÌ ³ªÅ¸³­´Ù. À§·Î¹öÆ°À» Ŭ¸¯ÇÏ¸é »ó´ÜÀ¸·Î À̵¿ */ function btn_mv_up(oj) { if(!oj) return false; var o = $(oj); var p = $(window).scrollTop(); if(p > 300){ o.fadeIn('slow'); } // À§·Î¹öÆ°ÀÌ ³ªÅ¸³ª´Â À§Ä¡ ÁöÁ¤ else if(p < 300){ o.fadeOut('slow'); } // À§·Î¹öÆ°À» ¼û±â´Â À§Ä¡ ÁöÁ¤ } // À§·Î ¹öÆ° $(document).scroll(function() { btn_mv_up('.btn_up_layer'); }).on('click', '.btn_up_layer', function() { $("html, body").animate({scrollTop:0}, 'slow'); }); /* */ /* ¸ð¹ÙÀÏ ¹Ùµð ½ºÅ©·Ñ¹æÁö */ var posY; $(".mOpener").on("click", function(e){ posY = $(window).scrollTop(); $("html, body").addClass("not_scroll"); $(".mMenu").css("display","block"); //$(".cont").css("top",-posY); }); $(".closer").on("click", function(){ $("html, body").removeClass("not_scroll"); // $(".mMenu").css("display","none"); posY = $(window).scrollTop(posY); }); $(".mask").on("click", function(){ $("html, body").removeClass("not_scroll"); // $(".mMenu").css("display","none"); posY = $(window).scrollTop(posY); }); /* ¸ð¹ÙÀÏ ¹Ùµð ½ºÅ©·Ñ¹æÁö end */ /** ½ºÅ©·ÑÀÌ ¼³Á¤ÇÑ ³ôÀÌ ÀÌ»ó ³»·Á°¬À»¶§ ½ºÅ¸ÀÏÃß°¡Çϱâ*/ if (jQuery(window).width() > 0) { jQuery(window).on("scroll",function(ev){ if(jQuery(window).scrollTop() > 100 ) { /**³ôÀÌ Çȼ¿ Á¶Á¤**/ $("#header").show(); $("#header").show(); $("#m-header").hide(); $("#m-header").hide(); $("#s-header").hide(); $("#s-header").hide(); } else{ $("#m-header").show(); $("#m-header").show(); $("#s-header").show(); $("#s-header").show(); $("#header").hide(); $("#header").hide(); } return false; }); } /* ½ºÅ©·ÑÀÌ ¼³Á¤ÇÑ ³ôÀÌ ÀÌ»ó ³»·Á°¬À»¶§ ½ºÅ¸ÀÏÃß°¡Çϱâ end */ /* slide bigmain ver */ $('.slider').slick({ //fade: true, autoplay: false, autoplaySpeed: 6000, speed: 800, lazyLoad: 'progressive', arrows: true, dots: true, pauseOnHover:false, // ¸¶¿ì½º ¿À¹ö½Ã ½½¶óÀ̵å À̵¿ ¸ØÃã }).slickAnimation(); /* *********************** ¼­ºêÆäÀÌÁö ON ************************ */ setTimeout(function () { $("#visual").addClass("active"); }); /* Toggle */ $('.submenuM').on('click', function(){ $(this).siblings('.submenu_toggle').stop().slideToggle(); }) // file var fileTarget = $('.filebox_s .upload-hidden'); fileTarget.on('change', function(){ if(window.FileReader){ var filename = $(this)[0].files[0].name; } else { var filename = $(this).val().split('/').pop().split('\\').pop(); } // $(this).siblings('#nfile1_Text').val(filename); $(document).on("change", "#sfile1", function () { $('#sfile1_Text').val($('#sfile1').val()); }); $(document).on("change", "#sfile2", function () { $('#sfile2_Text').val($('#sfile2').val()); }); }); /* tab */ //Default Action $(".tab_contentA").hide(); //Hide all content $("#business li:first").addClass("active").show(); //Activate first tab $(".tab_contentA:first").show(); //Show first tab content //On Click Event $("#business li").click(function() { $("#business li").removeClass("active"); //Remove any "active" class $(this).addClass("active"); //Add "active" class to selected tab $(".tab_contentA").hide(); //Hide all tab content var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content $(activeTab).fadeIn(); //Fade in the active content return false; }); //Default Action $(".tab_contentB").hide(); //Hide all content $("#product01 li:first").addClass("active").show(); //Activate first tab $(".tab_contentB:first").show(); //Show first tab content //On Click Event $("#product01 li").click(function() { $("#product01 li").removeClass("active"); //Remove any "active" class $(this).addClass("active"); //Add "active" class to selected tab $(".tab_contentB").hide(); //Hide all tab content var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content $(activeTab).fadeIn(); //Fade in the active content return false; }); /* tab end */ });