$(function(){ var ss=$(window).scrolltop(); var oheader = $('.header').height(); $(window).scroll(function(){ var s=$(window).scrolltop(); if (s > oheader){ $('.header').addclass('headtop_s1'); }else { $('.header').removeclass('headtop_s1'); } if (s > ss){ $('.header').removeclass('headtop_s0'); }else { $('.header').addclass('headtop_s0'); } ss=$(window).scrolltop(); }); var os=$(document).height(); var owe=$('.welcome'); var onoff=true; $('.headbtn').click(function(){ var w=$(window).width(); if(onoff){ $(this).css('transform','rotate(-90deg)') if(w<1000){ owe.slidedown(600); } }else{ $(this).css('transform','rotate(0deg)') owe.slideup(600); } onoff=!onoff; }); $('.selpos').mouseover(function(){ $('.selbox').stop().slidedown(); }); $('.sellist a').click(function(){ $(".sellist a").removeclass("active"); $(this).addclass("active"); $('.selbox').stop().slideup(); }); $('.selpos').mouseout(function(){ $('.selbox').stop().slideup(); }); $('.wellist .selact2s').click(function(){ $('.headbtn').css('transform','rotate(0deg)') owe.slideup(600); }) $('.wellist .selactives').click(function(){ $(".comelist").slidetoggle("slow"); }) $(".comelist").click(function(){ $('.headbtn').css('transform','rotate(0deg)') owe.slideup(600); }) $('.our_s').click(function(){ var end = $('.our_box').position().top; $('html,body').animate({ scrolltop:end },'slow'); }); $('.our_2s').click(function(){ var end = $('.our_box').position().top; $('html,body').animate({ scrolltop:end },'slow'); }); $('.ewms').mouseover(function(){ $('.ewmbox').stop().slidedown(); }) $('.ewms').mouseout(function(){ $('.ewmbox').stop().slideup(); }) $('.tels').mouseover(function(){ $('.telbox').stop().slidedown(); }) $('.tels').mouseout(function(){ $('.telbox').stop().slideup(); }) })