javascript

javascript file
$(document).ready(function(){
    //서브메뉴
    $('.gnb > ul > li').mouseover(function(){
        $('.gnb > ul > li').children('.sub_menu').stop().fadeOut();
        $(this).children('.sub_menu').stop().fadeIn();
    })
    $('.gnb').mouseleave(function(){
        $('.gnb > ul > li').children('.sub_menu').stop().fadeOut();
    })
    //슬라이드
    $('.slide_wrap >li').hide();
    $('.slide_wrap >li:first-of-type').show();

    setInterval(function(){
        $('.slide_wrap >li:first-of-type').fadeOut().next().fadeIn().end().appendTo('.slide > ul');
    },3000)

    //공지사항tab

    $('.tab_btn .b02').click(function(){
        $('.tab_btn > h3').removeClass('on');
        $(this).addClass('on');
        $('.notice').stop().hide();
        $('.gallery').stop().show();
    })
    $('.tab_btn .b01').click(function(){
        $('.tab_btn > h3').removeClass('on');
        $(this).addClass('on');
        $('.gallery').stop().hide();
        $('.notice').stop().show();
    })
 
    //모달창
    $('.notice > ul > li:first-of-type').click(function(){
        $('.modal_bg').stop().show();
    })
    $('.modal > button').click(function(){
        $('.modal_bg').stop().hide();
    })

})