					$(function () {
						var tabContainers = $('div.menu_tabs > div');
						tabContainers.hide();
						tabContainers.filter('#m0').show();
						$('ul.menu li').attr('id', '');
						tname3 = $('a[@name=m0]').parent();
						$(tname3).attr('id', 'active');

						$('div.menu_tabs').bind("mouseleave",function() {
							tabContainers.hide();
							tabContainers.filter('#m0').show();
							$('ul.menu li').attr('id', '');
							tname2 = $('a[@name=m0]').parent();
							$(tname2).attr('id', 'active');
						});

						$('ul.menu li a').bind("mouseenter",function() {
							tabContainers.hide();
							tname = $(this).attr('name');
							tname = '#'+tname;
							tabContainers.filter(tname).show();
							$('ul.menu li').attr('id', '');
							$(this).parent('li').attr('id', 'active');
							return false;
						});

						/*
						$('ul.menu li').bind("mouseenter",function() {
							tabContainers.hide();
							tname = $(this).children('a').attr('name');
							tname = '#'+tname;
							tabContainers.filter(tname).show();
							$('ul.menu li').attr('id', '');
							$(this).attr('id', 'active');
							return false;
						});
						*/
					});

function select_click(item)
		{
			if (item==1) $(".select_div").text("На всём сайте");
			else if (item==2) $(".select_div").text("Новость");
			else if (item==3) $(".select_div").text("Объявление");
			else if (item==4) $(".select_div").text("На форуме");
			else if (item==5) $(".select_div").text("Организацию");
			else if (item==6) $(".select_div").text("В справочниках");
			else if (item==7) $(".select_div").text("В документах");
			else if (item==8) $(".select_div").text("В выставках");
			$("#search_parts").val(item);
			$("#option_div").css(
  			{
    			top: " -200px",
    			left: " -200px"
  			}
			);
			return false;
		}
	$(document).ready(function(){
		var f=0;
		
		
		$(".select_div").click(function(){
			var sel = $(".select_div");
			if (f==0){
			f=1;
			var offset = sel.offset();
            //alert(offset.left+'__'+offset.top);
            t=offset.top+25;
            t=t+"";
            $("#option_div").css(
  			{
    			top: " "+t+"px",
    			left: " "+offset.left+"px"
  			}
			);
			}
			else
			{
				f=0;
			$("#option_div").css(
  			{
    			top: " -200px",
    			left: " -200px"
  			}
			);
			}
            
    	});   
    	$(".point").click(function(){
			var sel = $(".select_div");
			if (f==0){
			f=1;
			var offset = sel.offset();
            //alert(offset.left+'__'+offset.top);
            t=offset.top+25;
            t=t+"";
            $("#option_div").css(
  			{
    			top: " "+t+"px",
    			left: " "+offset.left+"px"
  			}
			);
			}
			else
			{
				f=0;
			$("#option_div").css(
  			{
    			top: " -200px",
    			left: " -200px"
  			}
			);
			}
            
    	});  
  });
