  $(document).ready(function(){
  
//        updatecart();
//    $(".slider_all").css('display','none');
    var f = 0;
    $("td[type=menu_master]")
    .bind("mouseenter",
        function(){
        var id = $(this).attr('mid');
        var pos = $(this).offset();

        $("div[pid="+id+"]").show();
        $("div[pid="+id+"]").css({ left: pos.left });
        
    }
    ).bind("mouseover",
        function(){
        var id = $(this).attr('mid');
        
        $("div[pid="+id+"]").show();
        
    }
    ).bind("mouseleave",
    function () {
        if (!f) {
	var id = $(this).attr('mid');
	$("div[pid="+id+"]").hide();}
    }
    );
    $("div[type=menu_child]")
    .bind("mouseleave",
    function () {
        $(this).hide();
        f=0;
    }
    ).bind("mousenter",
    function () {
        f=1;
    }
    );   

    var f2 = 0;
    $("td[type=tovar_master]")
    .bind("mouseenter",
        function(){
        var id = $(this).attr('mid');
        var pos = $(this).offset();

        $("div[tpid="+id+"]").show();
        //$("div[tpid="+id+"]").css({ left: pos.left });
        
    }
    ).bind("mouseover",
        function(){
        var id = $(this).attr('mid');
        
        $("div[tpid="+id+"]").show();
        
    }
    ).bind("mouseleave",
    function () {
        if (!f2) {
	var id = $(this).attr('mid');
	$("div[tpid="+id+"]").hide();}
    }
    );
    $("div[type=tovarmenu_child]")
    .bind("mouseleave",
    function () {
        $(this).hide();
        f2=0;
    }
    ).bind("mousenter",
    function () {
        f2=1;
    }
    );   


 });

function valid_resume() {
if ($("#name").val() &&  $("#age").val() && $("#lastname").val() && $("#obl2").val() && $("#town2").val() && $("#street2").val() && $("#house2").val() && $("#phone").val() && $("#email").val()) {
//    alert('|'+$("#name").val() +  $("#age").val() + $("#lastname").val() + $("#address").val() + $("#phone").val() + $("#email").val()+'|');
//    return false;
	return true;
}
alert('Заполните обязательные поля!');//+$("#name").val() +  $("#age").val() + $("#lastname").val() + $("#address").val() + $("#phone").val() + $("#email").val()+'|');
return false;
}          

function getBrowserInfo() { var t,v = undefined; if (window.opera) t = 'Opera'; else if (document.all) {  t = 'IE';  var nv = navigator.appVersion;  var s = nv.indexOf('MSIE')+5;  v = nv.substring(s,s+1); } else if (navigator.appName) t = 'Netscape'; return {type:t,version:v};} function bookmark(a){ var url = window.document.location; var title = window.document.title; var b = getBrowserInfo(); if (b.type == 'IE' && 7 > b.version && b.version >= 4) window.external.AddFavorite(url,title); else if (b.type == 'Opera') {  a.href = url;  a.rel = "sidebar";  a.title = url+','+title;  return true; } else if (b.type == "Netscape") window.sidebar.addPanel(title,url,""); else alert("Нажмите CTRL-D, чтобы добавить страницу в закладки."); return false;}
