$(document).ready(function(){
	$("#spec table tr:odd, .cart tr:odd, .order tr:odd, #products_no_image tr:even").addClass("odd");
	$("#remember_txt, #auth_form img").click(function(){
		if ($("#remember").val() == "1") {
			$("#remember").val("0");
			$("#auth_form img").css("background-position", "0px 0px");
		} else {
			$("#remember").val("1");
			$("#auth_form img").css("background-position", "0px -13px");
		}
	});
	$(".wsub").click(function(){
		$("#catalog .body div:visible").slideUp("fast");
		if (!$(this).hasClass("o")) {
			$(".wsub.o").removeClass("o");
			$(this).next("div").slideDown("fast");
			$(this).addClass("o");
		} else {
			$(".wsub.o").removeClass("o");
		}
		return false
	});
	function resize_overlay() {
		$("#overlay").height($(document).height());
	}
	resize_overlay();
	function scroll_mwindow() {
		$("#mwindow").css("top", ($(document).scrollTop() + 200));
	}
	scroll_mwindow();
	
	$(".tocart1111").click(function(){
		$("#overlay").show();
		$("#mwindow").show();
		return false
	});
	$("#overlay").click(function(){
		$("#overlay").hide();
		$("#mwindow").hide();
	});
	$(window).resize(function(){resize_overlay();});
	$(window).scroll(function(){scroll_mwindow();});
});
