$(function(){ // GNB $(".depth1 > li.on").addClass('origin'); $(".depth1 > li").bind({ 'mouseenter':function(){ $(".depth1 > li").removeClass("on"); }, 'mouseleave':function(){ $(".depth1 > li.origin").addClass("on"); }, }); // °øÅë ÅÇ ¸Þ´º $('.tabs_active').each(function(){ var active, content, links = $(this).find('a'); if(links.parents('li.on').length > 0){ active = links.parents('li.on'); }else{ active = links.first().parents('li').addClass('on'); } content = $(active.children('a').attr('href')); links.not(':first').each(function () { $($(this).attr('href')).hide(); }); $(this).on('click', 'a', function(e){ active.removeClass('on'); content.hide(); active = $(this).parents('li'); content = $($(this).attr('href')); active.addClass('on'); content.show(); e.preventDefault(); }); }); // °ÔÀÓÇ÷¹ÀÌ Àü¿ë ÅÇ $('.tabs_visible_active').each(function(){ var active, content, links = $(this).find('a'); active = links.first().parents('li').addClass('on'); content = $(active.children('a').attr('href')); $(this).on('click', 'a', function(e){ active.removeClass('on'); content.removeClass('visible').addClass('hidden'); active = $(this).parents('li'); content = $($(this).attr('href')); active.addClass('on'); content.removeClass('hidden').addClass('visible'); e.preventDefault(); }); }); // ÃÖ±Ù ÇÑ °ÔÀÓ µû¶ó´Ù´Ï±â var wrapperTop; $(window).bind('load scroll', function(){ var wrapperTop = $('#gnb').offset().top + 104; if($(".game_play_wrap").length > 0) { wrapperTop = 900; // $(".game_play_wrap").height(); } if( $(this).scrollTop() >= wrapperTop ){ if( $('.recent_game').hasClass('move') ) return; $('.recent_game').addClass('move'); }else{ if( !$('.recent_game').hasClass('move') ) return; $('.recent_game').removeClass('move'); }; }); $('#recent_game').slides({ slideSpeed: 0, preload: false, generateNextPrev: false, prev: 'btn_prev', next: 'btn_next', pagination: true, generatePagination: true, autoHeight: true }); // ÆäÀÌ¡ °¹¼ö üũ var paginationLeng = $('#recent_game .pagination li').length; $('#recent_game .pagination').append('
  • /'+paginationLeng+'
  • '); });