/* 수정, 삭제금지 ************************************************** deletion of the current branch prohibited 제작사 : http://www.nnin.com *****************************************************************/ /*jslint browser: true*/ /*global $, jQuery*/ $(function () { /*상단고정*/ /*$(window).scroll(function () { var wrap = $('.gnb'); if ($(this).scrollTop() > 40) { wrap.addClass('fixed'); } else { wrap.removeClass('fixed'); } });*/ // 상단고정2 // $(window).scroll(function () { var gnb = $('.gnb'); if ($(this).scrollTop() > 0) { gnb.addClass('on'); gnb.find('.mainmenu').addClass('on'); } else { gnb.removeClass('on'); gnb.find('.mainmenu').removeClass('on'); } }); $('.mainmenu ul li').on({ mouseover : function () { $(this).find('.submenu').stop().slideDown(200); }, mouseout : function () { $(this).find('.submenu').stop().slideUp(200); }, click: function () { if ($(window).width() < 768) { $(this).find('> a').attr('href', '#none'); } $(this).toggleClass('s_on'); if ($(this).hasClass('s_on')) { $(this).find('.submenu').slideDown(); $(this).siblings().removeClass('s_on'); } else { $(this).find('.submenu').slideUp(); } } }); $('.quick_menu').on({ mouseover : function () { $(this).find('ul').stop().slideDown(200); }, mouseout : function () { $(this).find('ul').stop().slideUp(400); } }); /*$(window).scroll(function () { var quick_menu = $('.quick_menu'); if ($(this).scrollTop() > 300) { quick_menu.css({display: 'none'}); } else { quick_menu.css({display: 'block'}); } });*/ $('.logoArea p').click(function () { $(this).toggleClass('on'); if ($(this).hasClass('on')) { $('.mainmenu').slideDown(); } else { $('.mainmenu').slideUp(); } }); $('.logoArea .logo').on({ mouseenter: function () { $(this).find('.logo_off').stop().animate({ opacity: 0, left: 20 }, 300); $(this).find('.logo_on').stop().animate({ opacity: 1, left: 0 }, 300); }, mouseleave: function () { $(this).find('.logo_off').stop().animate({ opacity: 1, left: 0 }, 300); $(this).find('.logo_on').stop().animate({ opacity: 0, left: 20 }, 300); } }); /* $('nav .logo p span').click(function(){ var logoH = $('nav .logo').height(); //alert(logoH); $(this).toggleClass('on'); if($(this).hasClass('on')){ $('nav .navmenu').css({top:logoH}).slideDown(); } else{ $('nav .navmenu').slideUp(); } }); */ /*scrolltop*/ //Check to see if the window is top if not then display button $(window).scroll(function () { if ($(this).scrollTop() > 100) { $('.scrollToTop').fadeIn(); } else { $('.scrollToTop').fadeOut(); } }); //Click event to scroll to top $('.scrollToTop').click(function () { $('html, body').animate({ scrollTop: 0 }, 800); return false; }); $('.n_swap').each(function () { var $this = $(this); $this.bind('mouseenter', function () { var srcArr = $(this).attr('src').split('.'); $(this).attr('src', srcArr[0] + '_on.' + srcArr[1]); $(this).addClass('on'); }).bind('mouseleave', function () { $(this).attr('src', $(this).attr('src').replace('_on', '')); $(this).removeClass('on'); }); }); //툴팁 $(function () { $('[data-toggle="tooltip"]').tooltip(); }); //이미지 확대,축소 $('.scaleUp').on({ mouseover: function () { $(this).addClass('on'); }, mouseout: function () { $(this).removeClass('on'); } }); $('.scaleDown').on({ mouseover: function () { $(this).addClass('on'); }, mouseout: function () { $(this).removeClass('on'); } }); /* 효과01 */ $('.effect01').each(function () { $(this).on({ mouseenter : function () { $(this).find('.scaleUp, .overlay_00').addClass('on'); $(this).find('.description').stop().animate({ bottom: 0, opacity: 1 }, 200); }, mouseleave : function () { $(this).find('.scaleUp, .overlay_00').removeClass('on'); $(this).find('.description').stop().animate({ bottom: -50, opacity: 0 }, 200); } }); $(this).css({cursor: 'pointer'}); }); /* 효과02 */ $('.de17 .effect02').each(function () { $(this).on({ mouseenter : function () { $(this).find('.scaleDown, .overlay_00').addClass('on'); $('.de17 .description').stop().animate({opacity: 0.2, top: 20}, 100); $(this).find('.description').stop().animate({top: 0, opacity: 1.0}, 200); }, mouseleave : function () { $(this).find('.scaleDown, .overlay_00').removeClass('on'); $('.de17 .description').stop().animate({opacity: 0.6, top: 10}, 100); $(this).find('.description').stop().animate({top: 10, opacity: 0.6}, 200); } }); $(this).css({cursor: 'pointer'}); }); /* 효과03 */ $('.effect03').each(function () { $(this).on({ mouseenter : function () { $(this).find('.scaleUp, .overlay_01').addClass('on'); $(this).find('.description').stop().animate({ top: '50%', opacity: 1 }, 200); }, mouseleave : function () { $(this).find('.scaleUp, .overlay_01').removeClass('on'); $(this).find('.description').stop().animate({ top: '40%', opacity: 0 }, 200); } }); $(this).css({cursor: 'pointer'}); }); /*지도*/ $(document).bind('em_maps_location_hook', function (e, map, infowindow, marker) { map.scrollwheel = false; }); /**/ $('.copyright').append(' powered by nnin'); $('.copyright span').css({display: 'inline-block', marginBottom: '5px'}); $('.copyright span a').attr('target', '_blank'); /* 게시판 ******************************************************************************/ /*게시판:공통*/ $('.n_board_txt table[border="1"]').attr('border', '0'); $('.n_board_txt table:last-child table:last-child').css({border: '0px solid #f00'}); /*게시판 목록 'tr' 선택*/ $('.n_board_txt .bbsno').parent('tr').addClass('tr_line'); /*임시소스*/ $('.n_board_txt table[width="650"]').attr('width', '100%');/*임시소스:게시판*/ $('.n_form table[width="670"]').attr('width', '100%');/*임시소스:폼메일*/ /*임시소스 end*/ /*일반게시판:목록*/ $('.n_board_txt table[width="98%"]').attr('width', '100%'); $('.n_board_txt .att_title').find('font').attr('style', ''); $('.n_board_txt .att_title:first-child').css({width: '70', border: '0px solid #f00'}); $('.n_board_txt .bbsno').parent().siblings('tr:first-child').css({backgroundColor: '#e8e8e8', borderBottom: 'hidden'}); $('.n_board_txt .bbsno').parent().siblings('tr:first-child').find('font').css({fontSize: '1.0em', border: '0px solid #f00'}); $('.n_board_txt .bbsno').parent().find('td').css({paddingTop: '10px', paddingBottom: '10px', color: '#888'}); /*일반게시판:목록:확장소스*/ // $('.n_board_txt .bbsno').parent().siblings('tr:last-child').find('td').css({borderBottom: 'none'}); $('.n_board_txt img').css({verticalAlign: 'middle'}); $('.n_board_txt .bbsno').parent().siblings('tr').find('td a').css({fontFamily: 'Noto Sans KR', fontWeight: 400}); /*제목*/ $('.n_board_txt .bbsno').parents('table').prev().find('td').addClass('board_top_line'); // $('.n_board_txt a img').parents('table').prev('table').css({border: '1px solid #fff'}); $('.n_board_txt .bbsno').parents('table').next().next().find('td').css({height: 0, backgroundColor: '#f00', border: '0px solid #f00'});/*1px 라인삭제*/ $('.n_board_txt #ext_search').parent().children('table').last().find('tr:last-child').remove();/*1px 라인삭제*/ /*카테고리*/ $('.n_board_txt').find('form[name=com_board_form]').parent('table').css({margin: '10px 0'}); $('.n_board_txt').find('form[name=com_board_form]').parent('table').find('b, img').remove(); $('.n_board_txt').find('select[name=com_board_category_code]').css({marginLeft: '0px', width: '200px'}); $('.n_board_txt .paging').parent().find('td').css({paddingTop: '20px'}); /*일반게시판:글쓰기*/ $('.n_board_txt input').css({width: '100%', border: '1px solid #ccc', backgroundColor: '#fff'}); $('.n_board_txt input[type=image],[type=checkbox]').css({width: '', border: 'none', verticalAlign: 'middle'});/*버튼:확인*/ $('.n_board_txt img').parents('td').siblings('td[width="62"]').attr('width', '20%').css({textAlign: 'left', border: '0px solid #f00'});/*버튼:목록보기*/ $('.n_board_txt .seLayout').css({border: '1px solid #ddd'}); /*일반게시판:글쓰기:확장소스*/ $('.n_board_txt .board_bgcolor').parent('tr').css({borderBottom: '1px solid #ddd'}); $('.n_board_txt .board_bgcolor').parent('tr:last-child').css({borderBottom: '0px solid #ddd'}); $('.n_board_txt .board_bgcolor').css({width: '20%', padding: '10px 0'}); $('.n_board_txt .board_bgcolor').find('font, span').css({fontSize: '1.0em', color: '#666', fontFamily: '"Noto Sans KR", sans-serif'}); $('.n_board_txt .board_desc').css({paddingLeft: '5px', color: '#666'}); //글보기화면과 충돌:최상단 컬러가로라인 $('.n_board_txt .board_bgcolor').offsetParent().find('td').first().css({backgroundColor: '#5b95c9'}); $('.n_board_txt input[type=image]').parent().parent('tr').css({paddingTop: '20px', display: 'block'}); $('.n_board_txt input[type=image]').parent().css({width: '80%', textAlign: 'right', border: '0px solid #fff'}); $('.n_board_txt input[type=image]').parent().find('a').css({verticalAlign: 'middle', border: '0px solid #f00', display: 'inline-block'}); /*일반게시판:보기*/ $('.n_board_txt .board_description').css({textAlign: 'left', padding: '20px 20px 100px 20px', border: '1px solid #ddd'}); $('.n_board_txt .board_description').parents('tr').css({backgroundColor: '#fff'}); /*일반게시판:보기:댓글*/ $('.n_board_txt .board_comment_bgcolor').css({backgroundColor: '#fff'}); $('.n_board_txt .board_comment_bgcolor').find('textarea').css({width: '80%'}); $('.n_board_txt .board_comment_bgcolor').find('input[type=text]').css({width: '50px'}); $('.n_board_txt .board_comment_bgcolor .comment_txt').css({padding: '10px 0'}); /*포토게시판:추출*/ $('.board_output_imgs').attr('width', '100%').attr('height', 'auto').css({ display: 'block', padding: '5px' }); $('.board_output_gallery_img').css({fontSize: 0}); $('.board_output_gallery_subject').parents('td').addClass('ft_reset').css({ textAlign: 'center', verticalAlign: 'top' }); /*포토게시판:게시판*/ $('.board_admin_bgcolor').parent().css({ margin: '20px 0', display: 'block', borderTop: '0px solid #f00' }); $('.gallery_subject').find('span').parents('tbody').addClass('ft_reset'); $('.n_board_photo .bbsnewf5 input[type=image]').css('vertical-align', 'middle'); $('.n_board_photo .bbsnewf5').parent().parent().parent().css({marginTop: '10px', border: '0px solid #f00'}); /*게시판공통 : 검색*/ $('#ext_search input[name=com_board_search_value]').css({ border: '1px solid #ccc', width: '120px' }); $('#ext_search').css({ marginTop: 10 }); $('#ext_search table').css({ width: 'auto' }); /* 폼메일 ******************************************************************************/ /*폼메일:공통*/ $('.n_form').css({textAlign: 'left'}); $('.n_form .formmail_title_bgcolor font').css({color: '#555', fontFamily: '"Noto Sans KR", sans-serif'}); $('.n_form .formmail_title_bgcolor').css({fontSize: '1.0em'}); /*폼메일:확장소스*/ $('.n_form .formmail_cell_bgcolor').attr('style', ''); $('.n_form .formmail_cell_bgcolor').find('input[name=com_formmail_check_safe]').parent('td').css({padding: '10px', display: 'block'}); $('.n_form').find('input[type=file]').css({display: 'inline-block'}); $('.n_form').find('textarea').css({border: '1px solid #ccc', marginTop: '1px'}); $('.n_form').find('textarea:last-child').css({fontSize: '0.875em', color: '#888'}); $('.n_form').find('div:last-child').css({border: '0px solid #ccc', marginTop: '30px'}); });