// ´º½º ¸®½ºÆ® $(function(){ $(".tab_news > a").each(function(){ var $num = $(this).index()+1; $(this).attr("id","tab"+$num); $(".tab_news > a#tab1").siblings("a").hide(); }); $(".tab_news .btn_more a").click(function(){ var $view = $(".tab_view").css("display"); if($view == "none"){ $(".tab_news > a[id^=tab]").show(); $(".news_list").hide(); $(".tab_view").slideDown(); $(this).find("img").attr("src","/img/new/view_off.png"); } else { $(".tab_news > a#tab1").siblings("a").hide(); $(".news_list").show(); $(".tab_view").slideUp(); $(this).find("img").attr("src","/img/new/view_on.png"); $(".tab_news > a").removeClass("on"); $(".tab_news > a#tab1").addClass("on"); } }); $(".tab_news > a").click(function(){ $(this).siblings("a").removeClass("on"); $(this).addClass("on"); var $T = $(this).index()+1; $(".tab_view ul").hide(); $(".tab_view ul#list"+$T).show(); }); var $news = 1; var $newsMax = $(".news_list li").size(); $(".news_list li").each(function(){ var $i = $(this).index()+1; $(this).attr("id","news"+$i); $(".news_list li#news1").siblings().hide(); }); $(".tab_view > ul").each(function(){ var $v = $(this).index()+1; $(this).attr("id","list"+$v); $(".tab_view ul#list1").siblings().hide(); }); function autoNews(){ $(".news_list li#news"+$news).hide(); $news++; if ($news > $newsMax) { $news = 1; } $(".news_list li#news"+$news).show(); } var z = setInterval(autoNews, 2000); // ÅÇ 01 $(".tab_common div").click(function(){ var $tab = $(this).index()+1; $(".tab_common div").removeClass("on"); $(this).addClass("on"); $("div[class^=view_warp]").hide(); $(".view_warp"+$tab).show(); }); // ¸ÞÀÎ °øÁö»çÇ× $(".btn_notice a").click(function(){ var $notice = $(".mainNotice .notice_view").css("display"); if($notice == "none"){ $(this).find("img").attr("src","/img/new/view_off.png"); $(".mainNotice .notice_view").slideDown(); $(".noticeList").hide(); $(".mainNotice .titWrap .tit").show(); $(".mainNotice .titWrap").css("background","#fafafa"); $("#issue_pop").hide(); } else { $(this).find("img").attr("src","/img/new/view_on.png"); $(".mainNotice .notice_view").slideUp(); $(".noticeList").show(); $(".mainNotice .titWrap .tit").hide(); $(".mainNotice .titWrap").css("background","#fff"); $("#issue_pop").show(); } }); // header search $(".sch_btn").click(function(){ var $srch = $(".headerSearch").css("display"); if($srch == "none"){ $(".headerSearch").show(); $("#container").animate({marginTop: "58px"}); } else { $(".headerSearch").hide(); $("#container").animate({marginTop: "0px"}); } }); // left Menu var $menuH = 700; function mask_on() { $("body").append($("
")); //var docH = $(document).height(); $(".mask").css({"height": $menuH, "z-index": 8000}).fadeIn(1000); } $(".allmenu_btn").click(function(){ //var docH = $(document).height(); mask_on(); $("#menu").css({height: $menuH, marginLeft: "-100%", display: "block", "z-index": 9000}); $("#menu").animate({marginLeft: "0"}); $("#wrap").css({height: $menuH, overflow: "hidden"}); $("#miz_header").fadeOut(); }); $(".btn_menuClose").click(function(){ $("#menu").animate({marginLeft: "-100%"}).css("display","none"); $(".mask").fadeOut(500).remove() ; $("#wrap").css({height: "auto", overflow: "visible"}); $("#miz_header").fadeIn(); }); //scroll event /* var $scrollE = 0; $(document).scroll(function(){ var $scrollS = $(this).scrollTop(); if( $scrollS > $scrollE && $scrollS > 110){ $("header").slideUp(500); } if( $scrollS < $scrollE && $scrollS < 100){ $("header").slideDown(300); } if( $scrollS > $scrollE){ $("#bottom_fixed").hide(); } else { $("#bottom_fixed").show(); } if( $scrollS > 600){ $(".btnGoTop").fadeIn(); } else { $(".btnGoTop").fadeOut(); } $scrollE = $scrollS; }); */ $(".btnGoTop a").click(function(){ $("html, body").stop().animate({scrollTop:0}); }); //talk category $(".menuall_btn").click(function(){ var $cateShow = $(".tit_category").css("display"); if ($cateShow == "none"){ $(".tit_category").slideDown(300); $(this).find("img").attr("src","/img/new/icon_arrTit_up.png"); } else { $(".tit_category").slideUp(); $(this).find("img").attr("src","/img/new/icon_arrTit_down.png"); } }); })