/* Common */ jQuery(function ($) { /* Gnb */ $(window).scroll(function () { if ($(this).scrollTop() > 0) { $("#header").addClass("fixed"); } else { $("#header").removeClass("fixed"); }; }); /* Tab */ $(".tab_wrap > ul > li > a").click(function () { var idx = $('.tab_wrap > ul > li > a').index(this); $('.tab_wrap > ul > li > a').parent('.tab_wrap > ul > li').removeClass('on').eq(idx).addClass('on'); }); /* search */ $(".search_btn").click(function () { $(".search_wrap").slideToggle('600', function () { $(this).parent(".search_area").toggleClass("on"); }); }) /*search_checkbox*/ $('.search_wrap input').iCheck({ checkboxClass: 'icheckbox_flat', }); $(".chk_all").click(function () { $(".chk_all").parent().children("input").removeAttr("checked", "checked"); $(".chk_other").parent().children("input").removeAttr("checked", "checked"); }) $(".chk_other").click(function () { $(".chk_all").parent().children("input").removeAttr("checked", "checked"); }) /* footer */ $("nav .btn_nav.open").click(function () { $(this).parent().addClass("on"); }); $("nav .btn_nav.closed").click(function () { $(this).parent().parent().removeClass("on"); }) }); /* Top Button */ $(document).ready(function () { //Scroll Top Button Fade In/Out $(window).scroll(function () { var scrollPosition = $(this).scrollTop(); if (scrollPosition > 50) { $('.top-btn').fadeIn(); } else { $('.top-btn').fadeOut(); } }); // Scroll to top $('.top-btn').click(function () { $('body,html').animate({ scrollTop: 0 }, 500); }); $(".top-btn").hover(function () { $(this).css("background-color", "#00afe6"); }, function () { $(this).css("background-color", "#484848"); scroll_top() }); }); /* Madia */ jQuery(function ($) { // Made var lastWidth = 0; var resize = function () { var currentWidth = $(this).width(); /* Gnb */ $(".menu_wrap > ul > li > a").click(function () { $(this).parent().toggleClass("on"); }); /* footer */ $(".foot_util > ul > li > span").click(function () { $(this).parent().toggleClass("on"); }); // PC /* Gnb */ $(".menu_wrap > ul > li > a").unbind("click"); /* footer */ $(".foot_util > ul > li > span").unbind("click"); lastWidth = currentWidth; } $(window).resize(function () { resize(); }).triggerHandler('resize'); /* Gnb */ $(".menu_wrap > ul > li > a").click(function () { $(this).parent().toggleClass("on"); }); /* footer */ $(".foot_util > ul > li > span").click(function () { $(this).parent().toggleClass("on"); }); /* Gnb */ $(".menu_wrap > ul > li > a").unbind("click"); }); /* *풋터 location_wrap 셋팅 *@param String ("a,b,c,d") */ function locationWrapSet(str) { var htmlStr = '
'; for (i = 0; i < str.split(",").length; i++) { if (i == str.split(",").length - 1) { htmlStr += '