$(function(){ /* $('#header').mouseenter(function(){ $('.submenuBg').animate({height:280},'fast') }).mouseleave(function(){ $('.submenuBg').animate({height:100},'fast') }) */ /* ÅÇ ¸Þ´º Ŭ¸¯½Ã ³»¿ë ½½¶óÀÌµå ´Ù¿î */ $('.cmp_history_mobile li a').each(function(index){ $(this).attr('data-his',index+1); }) $('.cmp_history_mobile li div a').click(function(){ var his_num = parseInt($(this).attr('data-his')); $('.cmp_history_mobile li p').stop().slideUp(); $('.cmp_history_mobile li:nth-child('+his_num+') p').stop().slideDown(); return false; }) /* °ø°³Ã¤¿ë ¹öÆ° Ŭ¸¯ ½Ã º¹¸® ÈÄ»ý ³ªÅ¸³² */ $('#RECRUIT_mobile .btn_more').click(function(){ $('.cont_benf').css({'display':'block'}); $('.btn_close_lay').click(function(){ $('.cont_benf').css({'display':'none'}); }) }) //¸ð¹ÙÀϸ޴º Ãâ·Â $("a.open_m_menu").click(function(){ $(".mobile_menu").animate({left:"0px"},800,"easeOutQuart"); $(".submenu").css('display','block'); $('html').addClass('fix'); return false; }); $("a.close_m_menu").click(function(){ $(".mobile_menu").animate({left:"-250px"},800,"easeOutQuart"); $('html').removeClass('fix'); return false; }); //gnb setLayout(); //¸ð¹ÙÀϸ޴º $('.mobile_menu>ul>li>a').toggle(function(){ $(this).siblings(".submenu").slideDown("fast"); },function(){ $(this).siblings(".submenu").slideUp("fast"); }); //¸ð¹ÙÀϸ޴º ÇöÀç¸Þ´º ¿ÀÇ open_cur_m_menu(); //input file µðÀÚÀÎ $("input[type=file]").filestyle({ image: "/img/jquery/btn_inputfile.gif", imageheight : 34, imagewidth : 80, width : 215 }); //btn_top $(".go_scroll").click(function(e) { $('html, body').stop().animate({scrollTop:0}, 500, "easeInOutQuart"); return false; }); }); // /****************************************** / @ scroll ±âº» À̺¥Æ® *******************************************/ $(window).scroll(function(){ setLayout(); }) var actionflag=1; //all_menuÃâ·Â function setLayout(){ CurPos = $(window).scrollTop(); CurWidth = $(window).width(); if ( CurWidth < 768 ) return; if( CurPos > 100 ) { if( actionflag == 1 ) return; $('#gnb').css('padding-top',26); $('#gnb').css('height',65); $('#header_wrap').css('height',65); $('.logo').css('top',18); // $('.logo').css('width',130); $('.submenuBg').css('height',65); $('#header').mouseenter(function(){ $(this).stop(); $(this).animate({height:290},'fast',"easeOutQuart"); $('.submenuBg').stop().animate({height:280},'fast',"easeOutQuart"); $(".submenu", this).stop(); $(".submenu", this).animate({height:190},'fast',"easeOutQuart"); }).mouseleave(function(){ $(this).stop(); $(this).animate({height:65},'fast',"easeOutQuart"); $(".submenu", this).stop(); $(".submenu", this).animate({height:1},'fast',"easeOutQuart"); $('.submenuBg').stop().animate({height:65},'fast') }) actionflag = 1; } else { if( actionflag == 0 ) return; $('#gnb').css('padding-top',38); $('#gnb').css('height',90); $('#header_wrap').css('height',90); $('.logo').css('top',32); $('.logo').css('width',146); $('#header').mouseenter(function(){ $(this).stop(); $(this).animate({height:290},'fast',"easeOutQuart"); $('.submenuBg').stop().animate({height:280},'fast',"easeOutQuart"); $(".submenu", this).stop(); $(".submenu", this).animate({height:190},'fast',"easeOutQuart"); }).mouseleave(function(){ $(this).stop(); $(this).animate({height:90},'fast',"easeOutQuart"); $(".submenu", this).stop(); $(".submenu", this).animate({height:1},'fast',"easeOutQuart"); $('.submenuBg').stop().animate({height:90},'fast') }) actionflag = 0; } }