function ratings_toggle(){
	// todo: optimize this script and markup
	var parent = $(this).parents(".b-rating-main");
	$("ul", parent).hide(); // hide all blocks
	$(".s-" + this.className.split("-")[2], parent).show(); // show needed block
	$(".title", $(this).parent()).hide(); // hide all control "title" spans
	$("a", $(this).parent()).show(); // show all control links
	$(this).hide(); // hide clicked link
	$(this).next().show(); // show "title" span instead of clicked link
	return false;
}

$(function(){
	$(".b-rating-main [class^='s-trigger']").click(ratings_toggle);
});


/* Yandex sitesearch search form script */
(function(Lego){ if (!Lego) Lego = window.Lego = {}; Lego.clean = function(a) { var p = a.previousSibling; if (p) { a.onblur = function() { if (!a.value) { p.style.top = ""; } }; p.style.top = "-9999px"; } }; Lego.cleanIfNotEmpty = function(ids) { var e = []; for (var i = 0; i < ids.length; i++) { e[i] = document.getElementById(ids[i]); }; var f = function() { for (var i = 0; i < e.length; i++) { if (e[i].value) { Lego.clean(e[i]); } } }; setInterval(f, 100); }; })(window.Lego);