/*메인 부분*/ /* 메인 상단 이미지 롤링*/ $(function() { var timer; moveSlider(0); // 메인 롤링 제어 function moveSlider(index) { var moveTop = (index * -500); var contLength = $('.rollControl a').length; $('.rollItem').animate({ top : moveTop }, 600); $('.rollControl a[data-index='+ index +'] img').attr('src', '/default/img/postweb/main/rolling_on.png'); $('.rollControl a[data-index!='+ index +'] img').attr('src', '/default/img/postweb/main/rolling_off.png'); timer = setTimeout(function(){ if ( index < contLength-1 ) { index++; } else { index= 0; } moveSlider( index ); }, 5000); } $('.rollItem').each(function(index) { $(this).attr('data-index', index); }); $('.rollControl a').each(function(index) { $(this).attr('data-index', index); $('.rollControl a img') .first() .attr('src' , '/default/img/postweb/main/rolling_on.png') }).click(function(e) { var index = $(this).attr('data-index'); clearTimeout(timer); e.preventDefault(); moveSlider(index); }); }); /* 메인 THEME STORY이미지 롤링*/ $(function() { var timer; moveSlider(0); // 메인 롤링 제어 function moveSlider(index) { var moveTop = (index * - 200); var contLength = $('.theme_dot a').length; $('.rollstory').animate({ top : moveTop }, 000); $('.theme_dot a[data-index='+ index +'] img').attr('src', '/default/img/postweb/main/rolling_on.png'); $('.theme_dot a[data-index!='+ index +'] img').attr('src', '/default/img/postweb/main/rolling_off.png'); timer = setTimeout(function(){ if ( index < 2 ) { index++; } else { index= 0; } moveSlider( index ); }, 4000); } $('.rollstory').each(function(index) { $(this).attr('data-index', index); }); $('.theme_dot a').each(function(index) { $(this).attr('data-index', index); $('.theme_dot a img') .first() .attr('src' , '/default/img/postweb/main/rolling_on.png') }).click(function(e) { var index = $(this).attr('data-index'); clearTimeout(timer); e.preventDefault(); moveSlider(index); }); }); /* //메인 스크립트 끝 */ /*서브 스크립트 */ /* webdesign tab */ /*gnb debth2 */ function gnbm(val,order,psize) { resetCookie() for (var i = 1; i < 9; i++) { $('.gnbm' + i + ' a').removeClass('on'); } $('.gnbm' + val + ' a').addClass('on'); switch (val) { case 1: location.href = ""//&orderby="+order+"&pagesize="+psize break; case 2: location.href = ""//&orderby="+order+"&pagesize="+psize break; case 3: location.href = ""//&orderby="+order+"&pagesize="+psize break; case 4: location.href = ""//&orderby="+order+"&pagesize="+psize break; case 5: location.href = ""//&orderby="+order+"&pagesize="+psize break; case 6: location.href = ""//&orderby="+order+"&pagesize="+psize break; case 7: location.href = ""//&orderby="+order+"&pagesize="+psize break; case 8: location.href = ""//&orderby="+order+"&pagesize="+psize break; } } /* list view count 메뉴 */ function list_vcnt(val) { $.cookie("pagesize",val); js_nowPage("",1,"") } function view_vcnt(val) { $.cookie("viewsize",val); location.reload(); } /* list 탭메뉴*/ function list_tab(val) { $.cookie("orderby",val); js_nowPage("",1,"") } $(function() { $('.keyword_more').mouseover(function() { $('.keyword_more_plus') .show(); }) $('.keyword_more_plus').mouseleave(function(){ $('.keyword_more_plus') .hide(); }); });