1;(function() { 2 var AccessibleNav = function() { 3 this.status = false; 4 this.anchor = []; 5 }; 6 7 AccessibleNav.prototype = { 8 initialize:function() { 9 var that = this; 10 that.hook = jQuery(that.options.hook); 11 that.listParent = that.options.listParent; 12 that._map(); 13 14 that.anchor.on('focus', function() { 15 that._focus.apply(that, [this, 'focus']); 16 }).on('focusout', function() { 17 that.status = false; 18 setTimeout(function() { 19 if(that.status === false) { 20 that._blur(); 21 } 22 }, 12); 23 }).on('focusin', function() { 24 that.status = true; 25 }).on('mouseenter', function() { 26 that._focus.apply(that, [this, 'mouseover']); 27 }); 28 29 that.hook.on('mouseleave', function() { 30 jQuery(this).find(that.listParent).removeClass(that.options.mouseoverClass); 31 that.hook.removeClass(that.options.selectClass); 32 }); 33 }, 34 _map:function() { 35 var that = this; 36 37 that.hook.find('a').each(function() { 38 that.anchor = jQuery.merge(jQuery(this), that.anchor); 39 }); 40 }, 41 _focus:function(el, type) { 42 var that = this, 43 _class = type === 'focus' ? that.options.focusClass : that.options.mouseoverClass; 44 45 jQuery(el).closest(that.hook).addClass(that.options.selectClass); 46 47 jQuery(el).closest(that.listParent).addClass(_class) 48 .siblings().removeClass(_class); 49 }, 50 _blur:function() { 51 var that = this; 52 53 that.hook.removeClass(that.options.selectClass) 54 .find(that.listParent).removeClass(that.options.focusClass); 55 } 56 }; 57 58 var gnb = new AccessibleNav(); 59 60 return { 61 load:function() { 62 var that = this; 63 jQuery(window).on('load', function() { 64 gnb.options = { 65 hook:'.nav-menu', 66 listParent:'li.nav-item', 67 selectClass:'selected', 68 focusClass:'focus', 69 mouseoverClass:'over' 70 }; 71 72 gnb.initialize(); 73 }); 74 } 75 }; 76})().load(); 77 78 79$(document).ready(function () { 80 // ¸ÞÀκñÁÖ¾ó 81 $('.bxslider').bxSlider({ 82 mode: 'fade', 83 auto: true, 84 autoControls: false, 85 controls: false, 86 speed: 3000, 87 pager : true 88 }); 89 // ¼ºêºñÁÖ¾ó 90 $('.bxslider2').bxSlider({ 91 mode: 'fade', 92 auto: true, 93 autoControls: false, 94 controls: false, 95 speed: 3000, 96 pager : false 97 }); 98 //footer rolling banner 99 $('.bx_banner').bxSlider({ 100 mode: 'horizontal', 101 auto: true, 102 autoControls: false, 103 controls: true, 104 speed: 500, 105 pager : false 106 }); 107 108 gnb_type(); 109 mainBbs(); // notice 110 m_gnb() ; 111 sub_mob(); 112}); 113 114 115function sub_mob() { 116 $(".sub_mob").toggle( 117 function(){ 118 $(this).addClass('selected'); 119 $(".l_sidemenu").addClass('selected'); 120 $(".sub_mob a").text("[ ¸Þ´º´Ý±â ]"); 121 122 }, 123 function(){ 124 $(this).removeClass('selected'); 125 $(".l_sidemenu").removeClass('selected'); 126 $(".sub_mob a").text("[ ¸Þ´º¿±â ]"); 127 } 128 ); 129} 130 131/* »ó´Ü Á¢±Ù¼º ¹Ù·Î°¡±â */ 132function gnb_nav() { 133 $('.skiptoContent').focusin(function () { 134 $('.skiptoContent').animate({ 135 top: 0, 136 height: 30, 137 opacity: 1 138 }, 0); 139 }); 140 $('.top_nav').focusin(function () { 141 $('.skiptoContent').animate({ 142 top: -30, 143 height: 0, 144 opacity: 0 145 }, 150); 146 }); 147} 148//Notice 149function mainBbs() { 150 var oldIndex = 0; 151 $('.bbs_list li').mouseenter(function () { //alert($('div').index(this)); 152 var thisIndex = $('.bbs_list li').index(this); 153 $('div.bbs_cont').removeClass('selected'); 154 $('.bbs_list li').removeClass('selected'); 155 $('div.bbs_cont').eq(thisIndex).addClass('selected'); 156 $('.bbs_list li').eq(thisIndex).addClass('selected'); 157 return false; 158 }); 159}; 160//Gallery 161function mainBbs2() { 162 var oldIndex = 0; 163 $('.bbs_list2 li').mouseenter(function () { //alert($('div').index(this)); 164 var thisIndex = $('.bbs_list2 li').index(this); 165 $('div.bbs_cont2').removeClass('selected'); 166 $('.bbs_list2 li').removeClass('selected'); 167 $('div.bbs_cont2').eq(thisIndex).addClass('selected'); 168 $('.bbs_list2 li').eq(thisIndex).addClass('selected'); 169 return false; 170 }); 171}; 172 173 174//Bannerzone 175function mainRolling() { 176 jQuery.fn.roll = function () { 177 var hook = jQuery(this); 178 var UL = hook.find('.listwrap'); 179 var LI = UL.find('li'); 180 var ULwidth = LI.outerWidth() * LI.length; 181 var prev = jQuery('.b_prev a'); 182 var next = jQuery('.b_next a'); 183 var pause = jQuery('.b_pause a'); 184 var start = jQuery('.b_start a'); 185 var interval;
186 var intervalPosition = 'next'; 187 var nextEvent = function () { 188 clearInterval(interval); 189 intervalPosition = 'next'; 190 interval = setInterval(intervalFN, 3000); 191 LI = UL.find('li'); 192 UL.animate({ 193 left: -LI.outerWidth() 194 }, function () { 195 UL.css({ 196 left: 0 197 }); 198 var firstLI = LI.eq(0).remove(); 199 firstLI.appendTo(UL); 200 }); 201 return false; 202 }; 203 var prevEvent = function () { 204 clearInterval(interval); 205 intervalPosition = 'prev'; 206 interval = setInterval(intervalFN, 3000); 207 LI = UL.find('li'); 208 var lastLI = LI.eq(LI.length - 1).remove(); 209 lastLI.prependTo(UL); 210 UL.css({ 211 left: -LI.outerWidth() 212 }); 213 UL.animate({ 214 left: 0 215 }); 216 return false; 217 }; 218 var pauseEvent = function () { 219 clearInterval(interval); 220 return false; 221 }; 222 var startEvent = function () { 223 clearInterval(interval); 224 interval = setInterval(intervalFN, 3000); 225 return false; 226 }; 227 var intervalFN = function () { 228 if (intervalPosition == 'next') nextEvent(); 229 else prevEvent(); 230 }; 231 interval = setInterval(intervalFN, 3000); 232 UL.css({ 233 width: ULwidth 234 }); 235 next.bind('click', nextEvent); 236 prev.bind('click', prevEvent); 237 start.bind('click', startEvent); 238 pause.bind('click', pauseEvent); 239 } 240 jQuery('#bannerZone').roll(); 241} 242 243function gnb_type(){ 244 var gnbli = jQuery('#lnb .nav-menu > li ').length; 245 //console.log(gnbli ); 246 if ( gnbli == 5) { 247 jQuery('#lnb').addClass('five_type'); 248 } else if ( gnbli == 2){ 249 jQuery('#lnb').addClass('two_type'); 250 } else if ( gnbli == 3){ 251 jQuery('#lnb').addClass('three_type'); 252 } else if ( gnbli == 4){ 253 jQuery('#lnb').addClass('four_type'); 254 } else if ( gnbli == 7){ 255 jQuery('#lnb').addClass('seven_type'); 256 } else if ( gnbli == 8){ 257 jQuery('#lnb').addClass('eight_type'); 258 } else if ( gnbli == 9){ 259 jQuery('#lnb').addClass('nine_type'); 260 } else if ( gnbli == 10){ 261 jQuery('#lnb').addClass('ten_type'); 262 } else if ( gnbli == 11){ 263 jQuery('#lnb').addClass('eleven_type'); 264 } else { 265 jQuery('#lnb').addClass('six_type'); 266 } 267} 268 269 270/* 271function m_gnb() { 272 $('.m_open').click(function(){ 273 $(this).addClass('selected'); 274 $('.m_lnb').addClass('selected'); 275 //$('.m_nav-menu > li:first-child ').addClass('selected'); 276 //$('.m_nav-menu > li:first-child .m_sub-nav').addClass('selected'); 277 }); 278 $('.m_close').click(function(){ 279 $('.m_lnb').removeClass('selected'); 280 $('.m_lnb .m_nav-item').removeClass('selected'); 281 //$('.m_nav-menu > li:first-child .m_sub-nav').removeClass('selected'); 282 }); 283 284 $('.side_title > a').click(function(){ 285 $('.sidemenu').toggleClass('selected'); 286 }); 287 288 289 $('.m_nav-menu li span').click(function(){ 290 291 292 var thisIndex = $('.m_nav-menu li span').index(this); 293 294 295 $('.m_sub-nav').eq(thisIndex).toggleClass('selected'); 296 $('.m_nav-item').eq(thisIndex).toggleClass('selected'); 297 298 }); 299} 300 301*/ 302 303function m_gnb() { 304 305 //¸ð¹ÙÀϸ޴º¿ÀÇ ¾ÆÀÌÄÜ 306 $('.mobilemenu').toggle( 307 function() { 308 $(this).addClass('selected'); 309 $(".m_lnb").addClass('selected'); 310 311 312 }, 313 function() { 314 $(this).removeClass('selected'); 315 $(".m_lnb").removeClass('selected'); 316 $(".m_nav-item.selected").removeClass('selected'); 317 } 318 ); 319 320 //¸ð¹ÙÀÏ ¼ºê¸Þ´º 321 $('.m_nav-item span a').bind('click' , function() { 322 var thisIndex = jQuery('.m_nav-item span a').index(this); 323 324 jQuery('.m_nav-item').eq(thisIndex).toggleClass('selected'); 325 oldIndex = thisIndex; 326 327 return false; 328 }); 329 330} 331 332 333 334 335var $window = jQuery(window), 336 $document = jQuery(document), 337 $html = jQuery('html'), 338 339 fontIndex = jQuery.cookie('webFontSize') ? jQuery.cookie('webFontSize') : 1; 340 341/* font size */ 342function setFontSizeClass() { 343 $html.removeClass(function(index,class_list_str){ 344 var class_list = class_list_str.split(' '); 345 for(var i = 0 ; i < class_list.length ; i ++) { 346 var cls = class_list[i]; 347 if(cls.match(/websize\-[0-9]+/)) { 348 return cls; 349 } 350 } 351 }).addClass('websize-' + fontIndex); 352 jQuery.cookie('webFontSize', fontIndex, { path: '/' });
353} 354function js_font_plus(){ 355 if(fontIndex >= 5) return false; 356 fontIndex++; 357 setFontSizeClass(); 358} 359function js_font_minus(){ 360 if(fontIndex <= 1) return false; 361 fontIndex--; 362 setFontSizeClass(); 363} 364 365function js_font_base() { 366 fontIndex = 1; 367 setFontSizeClass(); 368} 369 370jQuery(function() { 371 $html.addClass('websize-' + fontIndex); 372}); 373 374/**/ 375
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.