function otz_open(n) {
    $(".a_open"+n).hide();
    $(".otz"+n).show();
}
function otz_close(n) {
    $(".a_open"+n).show();
    $(".otz"+n).hide();
}

function htb_over(n) {
    $(".htb1").addClass("htb1_"+n);
}
function htb_out(n) {
    $(".htb1").removeClass("htb1_"+n);
}
function htb_over2(n) {
    $(".htb2").addClass("htb2_"+n);
}
function htb_out2(n) {
    $(".htb2").removeClass("htb2_"+n);
}
function htb_over3(n) {
    $(".htb3").addClass("htb3_"+n);
}
function htb_out3(n) {
    $(".htb3").removeClass("htb3_"+n);
}
function m_op(n) {
    $(".d_top"+n).show()
}
function m_cl(n) {
    $(".d_top"+n).hide()
}


function com_op() {
    $(".comment").show();
    $(".comment_a").hide();
}
function com_cl() {
    $(".comment").hide();
    $(".comment_a").show();
}



function add_bg(obj) {
    $(obj).addClass("form_input_focus");
}
function remove_bg(obj) {
    $(obj).removeClass("form_input_focus");
}
function avt_reg() {
    if ($(".regist").is(':hidden')) {
        $(".avtoriz").hide();
        $(".regist").show();
    }
    else {
        $(".regist").hide();
        $(".avtoriz").show();
    }
}
function ch(n) {
        var field = $(".c"+n);
        var fl = document.getElementById("ch"+n);
            if (fl.checked) {
               $(field).hide();
            }
            else {
                $(field).show();
            }
}
function faq(n) {
     if ($(".faq_vl"+n).is(':hidden')) {
        $(".otvet").hide();
        $(".otvet"+n).show(800);
        $(".fu").removeClass("li_op");
        $(".faq_ul_vl").hide();
        $(".fu"+n).addClass("li_op");
        $(".faq_vl"+n).show();
    }
    else {
        $(".faq_ul_vl").hide();
        $(".otvet").hide();
        $(".fu"+n).removeClass("li_op");
        $(".faq_vl"+n).hide();
    }
}


$(document).ready(function(){

    $(".poisk_input").click(function () {
      $(".poisk_input").val("");
    });

});

function poisk_blur() {
    if ($(".faq_vl"+n).is(':hidden')) {}
}

function vac_open() {
    $(".popup").show();
}
function vac_close() {
    $(".popup").hide();
    $(".menu").css("z-index","15");
}

function sh_auth(id){
	if(id=='auth'){
		document.getElementById('auth').style.display = 'block';
		document.getElementById('reg').style.display = 'none';
		document.getElementById('forgot').style.display = 'none';
        $(".menu").css("z-index","5");
	}
	if(id=='reg'){
		document.getElementById('auth').style.display = 'none';
		document.getElementById('reg').style.display = 'block';
		document.getElementById('forgot').style.display = 'none';
        $(".menu").css("z-index","5");
	}
	if(id=='forgot'){
		document.getElementById('auth').style.display = 'none';
		document.getElementById('reg').style.display = 'none';
		document.getElementById('forgot').style.display = 'block';
        $(".menu").css("z-index","5");
	}
}

function img_checkb(n) {
     if ($(".img_checkb"+n).is(':hidden')) {
        $(".img_checkb_act"+n).hide();
        $(".img_checkb"+n).show();
        $(".c"+n).show();
        $(".ccn_top"+n).addClass("ccn_top_no_act");
        document.getElementById('price_'+n).style.display = 'none';
        document.getElementById('price_null_'+n).style.display = 'block';
        document.getElementById('quant_null_'+n).style.display = 'block';
        document.getElementById('upd_button').innerHTML = '<input type="submit" value="Обновить" name="BasketRefresh" class="upd_button">';
        document.getElementById('DELETE_'+n).checked = 'checked';
     }
     else {
        $(".img_checkb_act"+n).show();
        $(".img_checkb"+n).hide();
        $(".c"+n).hide();
        $(".ccn_top"+n).removeClass("ccn_top_no_act");
        document.getElementById('price_'+n).style.display = 'block';
        document.getElementById('price_null_'+n).style.display = 'none';
        document.getElementById('quant_null_'+n).style.display = 'none';
        document.getElementById('DELETE_'+n).checked = '';
     }
}
