/* ---------- js ---------- */ jQuery(function($) { function mNav_open() { $(".btn-nav").addClass("mNav_open"); $("#header .navWrap").addClass("mNav_open"); $(".gnbMenuBg").fadeIn(); } function mNav_close() { $(".btn-nav").removeClass("mNav_open"); $("#header .navWrap").removeClass("mNav_open"); $(".gnbMenuBg").fadeOut(); } $(".btn-nav").click(function() { if (!$(this).hasClass("mNav_open")) { mNav_open(); } else { mNav_close(); } }); $(".gnbMenuBg,.mobile-header-close,.navWrap .navbar-nav > li > a,.header-go-to-top").click(function() { mNav_close(); }); $(window).resize(function() { if ($(window).width() > 991) { mNav_close(); }; }); $(window).scroll(function() { if ($(this).scrollTop() > 150) $('.go-to-top').fadeIn('slow'); else $('.go-to-top').fadeOut('slow'); }); $('.header-go-to-top').click(function() { $("html, body").animate({ scrollTop: 0 }, 500); return false; }); $('.go-to-top').click(function() { $("html, body").animate({ scrollTop: 0 }, 500); return false; }); }); jQuery(function($) { var getUrlParameter = function getUrlParameter(sParam) { var sPageURL = decodeURIComponent(window.location.search.substring(1)), sURLVariables = sPageURL.split('&'), sParameterName, i; for (i = 0; i < sURLVariables.length; i++) { sParameterName = sURLVariables[i].split('='); if (sParameterName[0] === sParam) { return sParameterName[1] === undefined ? true : sParameterName[1]; } } }; $(document).ready(function() { if ($('.photo_output').length) { var $subject = []; $('.photo_output table').each(function(i) { $subject[i] = $(this).find('.board_output_gallery_subject').text(); $(this).find('tr').not(':eq(0)').remove(); $(this).find('tr').eq(0).find('td.board_output_gallery_img > a').append('

' + $subject[i] + '

'); }); } $('td.board_output_gallery_img').each(function(i) { $(this).find('br').remove(); }); $('.photo_output > tbody > tr > td').addClass('wow fadeInUp'); // }); $(document).ready(function() { if ($('.photo_list').length) { var $subject = []; $('.photo_list .bbsnewf5').each(function(i) { $subject[i] = $(this).find('.gallery_title').text(); $(this).find('> table tr').not(':eq(0)').remove(); $(this).find('> table tr').eq(0).find('a').append('

' + $subject[i] + '

'); }); } }); $("img").each(function() { var src = $(this).attr('src'); if (src.indexOf('write.gif') > -1) { $(this).parent('a').addClass('btn btn-primary').text('write'); $(this).remove(); } if (src.indexOf('prev.gif') > -1) { $(this).parent('a').addClass('btn board-arrow board-prev').append(""); $(this).remove(); } if (src.indexOf('list.gif') > -1) { $(this).parent('a').addClass('display-block btn btn-small btn-color1 margin-60px-tb xs-margin-30px-tb margin-lr-auto width-100px').text('list'); $(this).remove(); } if (src.indexOf('move.gif') > -1) { $(this).parent('a').addClass('btn btn-small btn-light-gray').text('move'); $(this).remove(); } if (src.indexOf('copy.gif') > -1) { $(this).parent('a').addClass('btn btn-small btn-light-gray').text('copy'); $(this).remove(); } if (src.indexOf('modify.gif') > -1) { $(this).parent('a').addClass('btn btn-small btn-light-gray').text('modify'); $(this).remove(); } if (src.indexOf('delete.gif') > -1) { $(this).parent('a').addClass('btn btn-small btn-light-gray').text('delete'); $(this).remove(); } if (src.indexOf('next.gif') > -1) { $(this).parent('a').addClass('btn board-arrow board-next').append("");; $(this).remove(); } }); $(document).ready(function() { if ($('.board-category').length) { if ($('.board-category').find('select').length) { var $ca_link = []; var $ca_name = []; var $ca_current = getUrlParameter('com_board_category_code'); var $html = ''; $('.board-category').html($html); $('.board-category ul li').each(function() { if ($(this).find('a').attr('href').indexOf($ca_current) > -1 && $ca_current != '') $(this).addClass('active'); }); if (!$('.board-category .active').length) $('.board-category ul li:first-child').addClass('active'); } else { $('.board-category').remove(); } } }); });