function openhide(){
$('.hide_sett_passive').addClass('hide_sett_active');
$('.hide_sett_passive').removeClass('hide_sett_passive');
};
function closehide(){
$('.hide_sett_active').addClass('hide_sett_passive');
$('.hide_sett_active').removeClass('hide_sett_active');
};
function openprebook(){
$('.preblock_passive').addClass('preblock_active');
$('.preblock_passive').removeClass('preblock_passive');
};
function closeprebook(){
$('.preblock_active').addClass('preblock_passive');
$('.preblock_active').removeClass('preblock_active');
};
function open_prebooksItems1(){
$('.preblock_hs_itm1_passive').addClass('preblock_hs_itm1_active');
$('.preblock_hs_itm1_passive').removeClass('preblock_hs_itm1_passive');
};
function close_prebooksItems1(){
$('.preblock_hs_itm1_active').addClass('preblock_hs_itm1_passive');
$('.preblock_hs_itm1_active').removeClass('preblock_hs_itm1_active');
};
function open_prebooksItems2(){
$('.preblock_hs_itm2_passive').addClass('preblock_hs_itm2_active');
$('.preblock_hs_itm2_passive').removeClass('preblock_hs_itm2_passive');
};
function close_prebooksItems2(){
$('.preblock_hs_itm2_active').addClass('preblock_hs_itm2_passive');
$('.preblock_hs_itm2_active').removeClass('preblock_hs_itm2_active');
};
function open_prebooksItems3(){
$('.preblock_hs_itm3_passive').addClass('preblock_hs_itm3_active');
$('.preblock_hs_itm3_passive').removeClass('preblock_hs_itm3_passive');
};
function close_prebooksItems3(){
$('.preblock_hs_itm3_active').addClass('preblock_hs_itm3_passive');
$('.preblock_hs_itm3_active').removeClass('preblock_hs_itm3_active');
};
function close_when_all_close(){
$('.cl').click(function(){
closehide();
closeprebook();
close_prebooksItems1();
close_prebooksItems2();
close_prebooksItems3();
});
};
function MakeActive_hide_sett_passive(){
$('.shesterenki').click(function(){openhide();});};
function click_hs_itm1(){
$('.hs_itm1').click(function(){
openprebook();
open_prebooksItems1();
close_prebooksItems2();
close_prebooksItems3();
});
};
function click_hs_itm2(){
$('.hs_itm2').click(function(){
openprebook();
open_prebooksItems2();
close_prebooksItems1();
close_prebooksItems3();
});
};
function click_hs_itm3(){
$('.hs_itm3').click(function(){
openprebook();
open_prebooksItems3();
close_prebooksItems1();
close_prebooksItems2();
});
};
$(document).ready(function(){
close_when_all_close();
MakeActive_hide_sett_passive();
click_hs_itm1();
click_hs_itm2();
click_hs_itm3();
});
Спасибо)