1/*************************************************** 2 * ê³µíµ ì ì¸ë¶ë¶ * 3 - ê³µíµì¼ë¡ íë²ë§ ì ì¸í©ëë¤. 4 - ì£¼ë¡ common.js ì ì ì¸í´ëë©´ ì¢ìµëë¤. 5 - ì¤ë³µì¼ë¡ ì ì¸ëì§ ìëë¡ ì£¼ìíì¸ì. 6****************************************************/ 7 8// ì ê·¼ì± ì ì© ì íìë¡ ë¤ì´ê°ì¼ í ì½ë : ë§ì°ì¤/í¤ë³´ë ì´ë²¤í¸ êµ¬ë¶ 9var is_event_mouse = false; 10var is_event_keyboard = false; 11$(function() { 12 $(document).mousedown(function() { 13 is_event_mouse=true; 14 is_event_keyboard=false; 15 }); 16 $(document).keydown(function() { 17 is_event_mouse=false; 18 is_event_keyboard=true; 19 }); 20}); 21//---------------------------------------------------- 22 23// Swiper Slider ê³µíµ ì¬ì© í¨ì ì ì¸ 24var swiper_slider = []; 25function fn_slider(mycode, option) { 26 if(swiper_slider[mycode] != null) { 27 swiper_slider[mycode].destroy(true, true); 28 swiper_slider[mycode] = null; 29 $("."+mycode+" .stop").off('click'); 30 $("."+mycode+" .play").off('click'); 31 } 32 33 var i_autoplay = false; 34 var i_effect = 'slide'; 35 var i_pagination = false; 36 var i_slidesPerView = 1; 37 var i_breakpoints = false; 38 var i_spaceBetween = 0; 39 var i_loop = false; 40 41 if(typeof(option.autoplay) != "undefined") i_autoplay = option.autoplay; 42 if(typeof(option.effect) != "undefined") i_effect = option.effect; 43 if(typeof(option.pagination) != "undefined") i_pagination = option.pagination; 44 if(typeof(option.slidesPerView) != "undefined") i_slidesPerView = option.slidesPerView; 45 if(typeof(option.breakpoints) != "undefined") i_breakpoints = option.breakpoints; 46 if(typeof(option.spaceBetween) != "undefined") i_spaceBetween = option.spaceBetween; 47 if(typeof(option.loop) != "undefined") i_loop = option.loop; 48 49 if($("."+mycode+" .swiper-slide").length > 0) { 50 swiper_slider[mycode] = new Swiper("."+mycode+" .slider .swiper-container", { 51 navigation: {prevEl: "."+mycode+" .prev", nextEl: "."+mycode+" .next"}, 52 pagination: i_pagination, 53 slidesPerView: i_slidesPerView, 54 spaceBetween: i_spaceBetween, 55 effect: i_effect, 56 autoplay: i_autoplay, 57 breakpoints: i_breakpoints, 58 loop: i_loop, 59 on: { 60 init:function() { 61 /* ì ê·¼ì±ì ìí ì¶ê° ì½ë. ìëì ë´ì©ë¤ì ì ì© ì ì ê·¼ì±ì ìë°°ëì§ ìëë¤. (HTML / CSS íì¸) */ 62 $("."+mycode+" .swiper-container .swiper-slide *").on('focus', function() {if(is_event_keyboard) { if(!$("."+mycode).hasClass('view-all')) $("."+mycode).addClass('fix-scroll');} else { if(!$("."+mycode).hasClass('view-all')) $("."+mycode).removeClass('fix-scroll');}}); 63 $("."+mycode+" .goto-control").on('focus', function() {$("."+mycode).removeClass('fix-scroll');}); 64 $("."+mycode+" .control *").on('focus', function() {$("."+mycode).removeClass('fix-scroll');}); 65 } 66 } 67 }); 68 if(i_autoplay != false) { 69 $("."+mycode+" .stop").click(function(){ swiper_slider[mycode].autoplay.stop(); $("."+mycode+" .stop").hide(); $("."+mycode+" .play").show().focus(); }); 70 $("."+mycode+" .play").click(function(){ swiper_slider[mycode].autoplay.start(); $("."+mycode+" .play").hide(); $("."+mycode+" .stop").show().focus(); }); 71 } 72 } else { 73 $("."+mycode+" .control").hide(); 74 } 75} 76 77//ì¬ë¼ì´ë ì 체보기 : ì¬ë¬ê° ì¬ë¼ì´ëê° ìì ê²½ì°, íëë§ ì ì¸í´ì¤ëë¤. 78function fn_popup_all_show(obj) { 79 // ì ì²´ íì ìì ìëì§ ì²´í¬ 80 var popup = $(obj).closest('.pop-view-box').find('.popup-slide-view'); 81 if(popup.length > 0) { 82 // ì ì²´ íì ììì´ ìì ê²½ì° 83 var pannel = $(obj).closest('.pop-view-box'); 84 var list = pannel.find('.slider').find('ul').clone(); 85 var total_count = list.find('li').length; 86 var popup_list = popup.find('.list'); 87 88 // í´ëì¤ ë° ì¤íì¼ ë¨¹í ìë ê² ëª¨ë ì ê±° 89 list.removeAttr('class').removeAttr('style').find('*').removeAttr('class').removeAttr('style'); 90 popup_list.empty().append(list); 91 popup.attr('tabIndex', '0').show().focus(); 92 popup.find('.pop-title').find('i').text(total_count); 93 } else { 94 alert("ì 체보기 ììì ì°¾ì ì ììµëë¤."); 95 } 96} 97//ì¬ë¼ì´ë ì 체보기 ë«ê¸° 98function fn_popup_all_close(obj) { 99 // ì ì²´ íì ìì ìëì§ ì²´í¬ 100 $(obj).closest('.pop-view-box').find('.popup-slide-view').hide(); 101 $(obj).closest('.pop-view-box').find('button.total').focus(); 102} 103 104 105function fn_tabs_content(obj) { 106 var target = $(obj).attr('data-tab'); 107 var parents = $(obj).closest('.tab-group'); 108 var now_content = $('.tab-con[data-content="'+target+'"]', parents); 109 110 parents.find('.on').removeClass('on'); 111 parents.find('.selected').remove(); 112 parents.find('.tab-active').removeClass('tab-active'); 113 $(obj).addClass('on').closest('li').addClass('tab-active'); 114 $(obj).append($('<span class="selected">ì íë¨</span>')); 115 now_content.addClass('on'); 116
117 if(typeof(fn_tabs_event_content) == 'function') { 118 fn_tabs_event_content(obj); 119 } 120} 121 122 123// íì ë«ê¸° 124function fn_popup_close(obj) { 125 var pop_parent = $(obj).closest('.layerPopup'); 126 var target = pop_parent.attr('id'); 127 var checkObj = $(obj).closest('.layerPopup').find('.dayCloseCheck'); 128 if(checkObj.length > 0 && checkObj.is(':checked')) { 129 // ì¤ë í루 ì´ì§ ìê¸°ê° ì²´í¬ ëì´ ìì ê²½ì°, ì¿ í¤ê°ì ì ì¥ 130 var value = checkObj.val(); 131 var days = 1; // ì´ì§ ì기 ì 보를 ì ì¥í ë ì§ ì 132 // ì¿ í¤ ì ì¥í기 133 var exdate = new Date(); 134 exdate.setDate(exdate.getDate() + days); 135 var cookie_value = escape(value) + ((days == null) ? '' : '; expires=' + exdate.toUTCString()); 136 document.cookie = target + '=' + cookie_value; 137 } 138 pop_parent.hide(); 139} 140 141// íì ì´ê¸° 142function fn_popup_open(obj) { 143 var target = $(obj).attr('data-target'); 144 145 if($('#' + target).find('.dayCloseCheck').length > 0) { 146 // ì¤ë í루 ì´ì§ ìê¸°ê° ìì ê²½ì°, ì¿ í¤ ë¦¬ì 147 document.cookie = target + '=; expires=Thu, 01 Jan 1999 00:00:10 GMT;'; 148 } 149 $('#' + target).show(); 150} 151 152// ì¿ í¤ê° ìì ê²½ì° ìëì¼ë¡ LayerPopup ëì°ê¸° 153// ë§ì½ ìëì¼ë¡ ëì°ê³ ì¶ì§ ìì íì ì ê²½ì°, layerPopup ì off í´ëì¤ë¥¼ ì¶ê°íë¤. 154$(function() { 155 $('.layerPopup').each(function() { 156 if(!$(this).hasClass('off')) { 157 if($(this).find('.dayCloseCheck').length > 0) { 158 var cookie_name = document.cookie.match('(^|;) ?' + $(this).attr('id') + '=([^;]*)(;|$)'); 159 cookie_name = cookie_name ? cookie_name[2] : false; 160 if(!cookie_name) { 161 $(this).show(); 162 } 163 } else { 164 $(this).show(); 165 } 166 } 167 }); 168}); 169 170 171/************************************** 172 Step Flow 173***************************************/ 174function set_stepflow() { 175 $('.stepflow *').removeAttr('style'); 176 $('.stepflow').each(function() { 177 var max_tit_height = 0; 178 var max_con_height = 0; 179 var max_total_height = 0; 180 var e_width = $(this).outerWidth(); 181 var e_count = $(this).children('li').length; 182 var li_count = 0; 183 var min_width = typeof($(this).attr('data-min')) != 'undefined' ? $(this).attr('data-min') * 1 : 0; 184 //min_width = min_width ? min_width : 300; 185 186 for(let i = e_count; i > 0; i--) { 187 let check_value = e_width/i; 188 if(check_value >= min_width && li_count == 0) { 189 li_count = i; 190 } 191 } 192 193 $(this).children('li').children('.item').each(function() { 194 let _tit_height = $(this).find('.tit').outerHeight(); 195 let _con_height = $(this).find('.con').outerHeight(); 196 let _total_height = (_tit_height*1) + (_con_height * 1); 197 198 max_tit_height = max_tit_height < _tit_height ? _tit_height : max_tit_height; 199 max_con_height = max_con_height < _con_height ? _con_height : max_con_height; 200 max_total_height = max_total_height < _total_height ? _total_height : max_total_height; 201 202 if($(this).find('.tit').length < 1 || $(this).find('.con').length < 1) { 203 $(this).addClass('single'); 204 } 205 }); 206 207 if(min_width > 0) $(this).children('li').css('width', (100/li_count)+"%"); 208 $(this).children('li').children('.item').find('.tit').css('height', max_tit_height + "px"); 209 $(this).children('li').children('.item').find('.con').css('height', max_con_height + "px"); 210 $(this).children('li').children('.item.single').find('.tit').css('height', max_total_height + "px"); 211 $(this).children('li').children('.item.single').find('.con').css('height', max_total_height + "px"); 212 }); 213 setTimeout(function(){$('.box-stepflow').addClass('complate');},500); 214} 215$(function() {set_stepflow();}); 216$(window).resize(function(){set_stepflow();}); 217 218 219/************************************** 220 Real Name Wrap Setting 221***************************************/ 222$(function() { 223 if($('.realNameWrap').length > 0) { 224 set_realname_layout(); 225 setTimeout(function(){$('.realNameWrap').addClass('complate');},300); 226 } 227}); 228function set_realname_layout() { 229 var max_desc_height = 0; 230 $('.realNameWrap *').removeAttr('style'); 231 $('.realNameWrap .item .desc').each(function() { 232 max_desc_height = max_desc_height < $(this).outerHeight() ? $(this).outerHeight() : max_desc_height; 233 });
234 $('.realNameWrap .item .desc').css('height', max_desc_height + "px"); 235} 236$(window).resize(function(){set_realname_layout();}); 237 238 239/************************************** 240 QnA Flip Script 241***************************************/ 242 243function qna_flip_list(obj) { 244 $(obj).closest('li').toggleClass('on').slblings().removeClass('on'); 245} 246 247 248 249/************************************** 250 Image Responsive 251***************************************/ 252$(function() { 253 if($('.box-image.big-view').length > 0) { 254 $('.box-image.big-view').each(function() { 255 if($(this).find('.btn-big-view').length == 0) { 256 let src = $(this).find('img').attr('src'); 257 let btn = $("<a>").addClass('btn-big-view').attr('href', src).attr('target', '_blank').text("ì´ë¯¸ì§ í¬ê²ë³´ê¸°"); 258 $(this).append(btn); 259 } 260 261 }); 262 } 263}); 264 265 266 267 268
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.