$(document).ready(
			function ()
				{
					$("#topmenu a").hover(function(){
						$(this).css({"backgroundColor":"#fdfdfd","color":"#2393b0"});
						$(this).next("ul").slideDown(100);
						$(this).parents("li").hover(function(){},
							function(){
								$(this).find("a").css({"backgroundColor":"#eeeeee","color":"#CA0B1C"});
								$(this).find("ul").slideUp(10);
							}
						)
					}
					);
					$("#navmenu-v a").hover(function(){
						$(this).next("ul").slideDown(100*Math.pow($(this).next("ul").find("li").length,1/4));
						$(this).css({"backgroundColor":"#b2e0e8","color":"#ca0b1c"});
						$(this).parents("li").hover(function(){},
								function()
								{
									$(this).find("ul").slideUp(10);
									$(this).find("a").css({"backgroundColor":"transparent","color":"#004284"});
								}
							)
						}
					);
					$("#search .search_txt").focus(function()
					{
						if($(this).attr("value")=="поиск по сайту")
						{
							$(this).attr({"value":""});
						}
					}
					
					);
					$("#search .search_txt").blur(function()
					{
						if($(this).attr("value")=="")
						{
							$(this).attr({"value":"поиск по сайту"});
						}
					}
					);
					
					$("#search .search_submit").click(function()
					{
						if($("#search .search_txt").attr("value")=="поиск по сайту")
						{
							$("#search .search_txt").attr({"value":""});
						}
						$(this).closest("form").submit();
						return false;
					}
					);
					
					$("#feedback_formdiv textarea#text").focus(function()
					{
						if($("textarea#text").attr("value")=="Введите свой вопрос")
						{
							$("textarea#text").attr({"value":""});
							$("textarea#text").css({"color":"#000000"});
						}
					}
					);
					$("#feedback_formdiv textarea#text").blur(function()
					{
						if(trim($("textarea#text").attr("value"))=="")
						{
							$("textarea#text").attr({"value":"Введите свой вопрос"});
							$("textarea#text").css({"color":"#aaaaaa"});
						}
					}
					);
					
					$("#feedback_formdiv input#submit").click(function()
					{
						var errortext=new Array();
						var txt="";
						var exp="";
						txt=trim($("#feedback_formdiv [name=name]").attr("value"));
						if(!txt)
						{
							errortext[errortext.length]="Укажите, пожалуйста, Ваше имя.";
						}
						txt=trim($("#feedback_formdiv [name=email]").attr("value"));
						exp= new RegExp("^[A-Za-z0-9\-_\.]+@[A-Za-z0-9\-_\.]+$");
						if(!txt)
						{
							errortext[errortext.length]="Укажите, пожалуйста, адрес Вашей электронной почты.";
						}
						else if(!txt.match(exp))
						{
							errortext[errortext.length]="Адрес электронной почты указан некорректно.";
						}
						txt=trim($("textarea#text").attr("value"));
						if(txt=="" || txt=="Введите свой вопрос")
						{
							errortext[errortext.length]="Введите, пожалуйста, Ваш вопрос.";
						}
						if(errortext.length)
						{
							alert(implode("\r\n",errortext));
							return false;
						}
					}
					);
					
					
					
				}
			);			
