$(document).ready(function(){ $(".header .an").click(function(){ $("html").addclass("on"); $("body").addclass("on"); $(".sj_bj").slidedown(0); $(".nav").find(".e_j").slideup(); $(this).addclass("n"); }); $(".sj_bj").click(function(){ $(".header .an").removeclass("n"); $(".sj_bj").slideup(0); $("html").removeclass("on"); $("body").removeclass("on"); $(".nav").find(".e_j").slideup(); }); $(".nav .y_j i").click(function(){ $(this).parent(".y_j").siblings(".e_j").slidetoggle(); $(this).parents("li").siblings().find(".e_j").slideup(); }); $(".product_tabtitle li").click(function(){ var index=$(".product_tabtitle li").index(this); $(this).addclass("on").siblings().removeclass("on"); $(".sy_cp .cp_zs").eq(index).addclass("dk").siblings().removeclass("dk"); }); $(".ny_cp .ny_lm .l_b").click(function(){ $(this).siblings("ul").slidetoggle(); }); $(".ny_cp .ny_lm a.e_j").click(function(){ $(this).parent("li").toggleclass("on"); }); $(".jr_bt").click(function() { $(this).toggleclass("on"); $(this).siblings(".jr_nr").slidetoggle(); $(this).parent().siblings().find(".jr_nr").slideup(); $(this).parent().siblings().find(".jr_bt").removeclass("on"); }); $(".w_x").click(function(){ $(".e_m").slidedown(); }); $(".e_m").click(function(){ $(this).slideup(); }); $(".fh").click(function(){ $("html,body").animate({scrolltop:0},500); }); }); $(window).scroll(function(){ var top = $(window).scrolltop(); var th = $(".top").height(); if(top>th){ $(".header").addclass("on"); }else{ $(".header").removeclass("on"); } });