$(document).ready(function() {

	$("#top2 .menu span, .models_menu a")
		.hover(function(){
			$(this).addClass("showhidden").removeClass("showshow");
		},
		function(){
			$(this).addClass("showshow").removeClass("showhidden");
		});

	if ($.fn.flash.hasFlash("8.0.0")) {
		$(".sifr-content-header")
		.find("span").remove().end()
		.sifr({
			path: "/bitrix/templates/.default/js/fonts/",
			font: "neosansproregular",
			textAlign: "left",
//			width: 500,
			fontSize: "18px"
		});
	}	

	if (!(document.all && !window.opera && !window.XMLHttpRequest && $.browser.msie)) {
		$("#top2 .links > a, #top1 .links > a, #search_form > a").hover(
			function (){
				$("img", this)
					.attr("tmp", $("img", this).attr("src"))
					.attr("src", $("img", this).attr("hsrc"));
			},
			function (){
				$("img", this)
					.attr("src", $("img", this).attr("tmp"));
			}
		)
	}


	$(".ddown a").hover(
		function (){
			$("img", this)
				.attr("tmp", $("img", this).attr("src"))
				.attr("src", $("img", this).attr("hsrc"));
		},
		function (){
			$("img", this)
				.attr("src", $("img", this).attr("tmp"));
		}
	)


});

function open_win(pg){
	var res = window.open(pg, "", "width=550,height=350,scrollbars=yes");
	return false;
}

function checkboxCheck(obj){

	if ($(obj).parent().attr("class")=="checkbox1" || $(obj).parent().attr("class")=="checkbox2") {

		if ($(obj).is(":checked")) setClass = "checkbox2";
		else setClass = "checkbox1";

		$(obj).parent().attr("class", setClass);
	}

	if ($(obj).parent().attr("class")=="checkbox1_yellow" || $(obj).parent().attr("class")=="checkbox2_yellow") {

		if ($(obj).is(":checked")) setClass = "checkbox2_yellow";
		else setClass = "checkbox1_yellow";

		$(obj).parent().attr("class", setClass);
	}
}

$(document).ready(function(){
	$("span > input[type=checkbox]").each(function(){

	$(this).click(function(){
								if (this.checked)
									this.checked = "checked";
								else
									this.checked = "";
								checkboxCheck(this);
							});
	checkboxCheck(this);
	})
})