function mainVisualSlide(){ $(".roll_img").bxSlider({ mode:'fade', controls:false, pager:true, auto:true,//ÀÚµ¿Àç»ý½Ã true·Î º¯°æ, ¾Æ´Ò½Ã(ÇÑ°³) false pause:6000, speed:800, autoControls:true, autoControlsCombine:false, nextText:"´ÙÀ½", prevText:"ÀÌÀü" }); } function popSlide(){ //Çϴܹè³Ê $(".Pop_img>ul").bxSlider({ mode:'fade', pager:true, controls:true, auto:true, pause:6000, speed:500, autoControls:true, autoControlsCombine:false, pagerType:'short', pagerShortSeparator:'/', pagerSelector:'#pager1', nextText:"´ÙÀ½", prevText:"ÀÌÀü" }); } function newsAccordion(){ //´º½ºaccordion $('.news_wrap .article:first').show(); $(".news_wrap h3").click(function(e){ e.preventDefault(); var article = $(this).next('.article1').find(".article"); if(!article.is(":visible")){ $(".news_wrap h3").removeClass('tab_on'); $('.news_wrap .article').slideUp(); $(this).addClass('tab_on'); $(this).next('.article1').find('.article').slideDown(); } }); } function mwTab(){ //ÀüÀڹοø tab $(".mw_tab dd:first").show(); $(".mw_tab dt>.tabtit").click(function(e){ e.preventDefault(); $(".mw_tab dt").removeClass("active") $(".mw_tab dd").hide(); $(this).parent().addClass('active'); $(this).parent().next().show(); }); /* $('.mw_tab dt>.tabtit').focus(function() { var i = $('.mw_tab dt>.tabtit').index(this); $('.mw_tab dt>.tabtit').parent().removeClass('active').eq(i).addClass('active'); }); */ } function sectionjs(){ if($(".mtab1").hasClass("active")){ mainVisualSlide(); popSlide(); newsAccordion(); } if($(".mtab2").hasClass("active")){ mwTab(); } } $(function(){ var firstUrl = $(".mtab1").find('a').attr("href"); $("#section1").load(firstUrl, function(){ var firstH = $(".maintab>dd:first").height(); $(".maintab").css("height", firstH + 74); sectionjs(); }); $(".maintab>dt>a").click(function(e) { e.preventDefault(); var url = $(this).attr("href"); var activeTab = $(this).parent().attr("rel"); var activeSection = $("#"+activeTab); $(".maintab .section").hide(); $(".maintab>dt").removeClass("active"); $(this).parent().addClass("active"); activeSection.fadeIn(function(){ activeSection.load(url, function(){ var mainTabH = $(".maintab"); var ddH = $(activeSection).height(); mainTabH.css("height", ddH + 74); sectionjs(); }); }); }); }); $(document).ready(function(){ if(window.navigator.userAgent.indexOf("Macintosh") != -1){ $("p.macKeyboard").hide(); } });