$(document).ready(function(){
	/* Подсветка кнопок */
	var MenuItemOpc = 0.2;
	$("#topmenu a").hover(function(){
		if ($(this).hasClass("selected")) {
			MenuItemOpc = "0.6";
		} else {
			MenuItemOpc = "0.4";
		}
		$(this).find(".overlay").stop().animate({"opacity":MenuItemOpc},200);
	},function(){
		if ($(this).hasClass("selected")) {
			MenuItemOpc = "0.5";
		} else {
			MenuItemOpc = "0.2";
		}
		$(this).find(".overlay").stop().animate({"opacity":MenuItemOpc},200);
	});
	/* Удаление рамки-фокуса в FireFox и IE */
	$("#topmenu a").focus(function(){
		$(this).blur();
	});
	/* Удаление всплывающих подсказок */
	$("#topmenu a").each(function(){
		$(this).removeAttr("title");
	});
	/* Удаление фокуса */
	$("#logo a").addClass("nofocus");
	$(".nofocus").focus(function(){
		$(this).blur();
	});
	// Поиск
	var SearchDef = "введите текст";
	var SearchTxt = $("#col-search .txt");
	SearchTxt.val(SearchDef).addClass("inactive");
	SearchTxt.focus(function(){
		if ($.trim(this.value)==SearchDef) {
			this.value="";
			this.className="txt active search-suggest";
		}
	}).blur(function (){
		if ($.trim(this.value)=="") {
			this.value=SearchDef;
			this.className="txt inactive search-suggest";
		}
	});
	$("#col-search form").submit(function(){
		SearchTxt = $.trim($("#col-search .txt").val());
		if (SearchTxt == SearchDef || SearchTxt == "") {
			return false;
		} else {
			return true;
		}
	});
});
