$(document).ready(function () { $(".tab-hd span").click(function () { var inds = $(this).index(); $(this).addClass("cur").siblings().removeClass("cur"); $(this).parent().siblings(".tab-bd").children(".bd").eq(inds).stop(false, true).fadeIn().siblings().hide(); }) $(".spewlc li").hover(function () { var ind = $(this).index(); $(this).stop(false, true).animate({ left: (ind * 19) + "%", width: "43%" }); $(this).addClass("on").siblings().removeClass("on"); $(this).prevAll("li").each(function (index, element) { var silc = $(this).index(); $(this).stop(false, true).animate({ left: (silc * 19) + "%", width: "19%" }); }); $(this).nextAll("li").each(function (index, element) { var cilc = $(this).index(); $(this).stop(false, true).animate({ left: ((cilc - 1) * 19 + 43) + "%", width: "19%" }); }); }) $(".denlsc li:nth-child(3n),.dcsenl li:nth-child(3n),.trewnl li:nth-child(2n),.dolsma li:nth-child(3n)").css({ marginRight: "0" }); $(".lbcs-cont li").each(function (index, element) { if ($(this).children("p").length > 0) { $(this).addClass("pick") } }); $(".lbcs-cont li p a.on").parent().show().siblings("a").addClass("cur"); $(".lbcs-cont li > a").click(function () { if ($(this).siblings("p").length > 0) { $(this).addClass("cur").siblings("p").stop(false, true).slideDown().parent().siblings().children("a").removeClass("cur").siblings("p").stop(false, true).slideUp();; } }); // $(".lenolsa li:eq(0)").children(".dolsca").addClass("on").siblings().show(); $(".dolsca").click(function () { if ($(this).siblings(".lourew").length > 0) { // $(this).addClass("on").siblings().stop(false, true).slideDown().parent().siblings().children(".dolsca").removeClass("on").siblings().stop(false, true).slideUp(); $(this).toggleClass('on').siblings(".lourew").stop(false, true).slideToggle().parent().siblings().children(".dolsca").removeClass("on").siblings().stop(false, true).slideUp(); } }) });