$(document).ready( function() {
	// PNG;

$("#exit").click(function () {

/*$("#message_text").hide( 10, function () { $("#window").animate( { width:"0px", height:"0px" }, 500, function(){$('#opaco').toggleClass('hidden').removeAttr('style')} ).hide() } );*/

$("#opaco").css("display","none");
$("#window").css("display","none");


});


	$(".toTop").scrollToTop({speed:700});

	// Karusel;
			$('.b-news UL').jcarousel({ scroll: 1 });	
			$('.b-news2 UL').jcarousel({ scroll: 1 });				
			
	// Flash;
	$("#flash1").flash({
		src: "/templates/flash/euromed_1.swf",
		width: "670",
		height: "300",
		wmode: "transparent"
	});
	
		$("#flash2").flash({
		src: "/templates/flash/euromed.swf",
		width: "500",
		height: "700",
		wmode: "transparent"
	});


	$("#logo").flash({
		src: "/templates/flash/logo_euromed.swf",
		width: "400",
		height: "300",
		wmode: "transparent"
	});


	$("#logo2").flash({
		src: "/templates/flash/Logo_stiledent.swf",
		width: "150",
		height: "150",
		wmode: "transparent"
	});




$(".rekom").mouseover( function() {

$("div",this).css("backgroundColor","#CDE8FB");

});

$(".rekom").mouseout( function() {

$("div",this).css("backgroundColor","#EDF7FD");

});



$(".punkt").mouseover( function() {
$(".img_na",this).hide();
$(".img_a",this).show();
});

$(".punkt" ).mouseout( function() {
$(".img_a",this).hide();
$(".img_na",this).show();
});


$(".topmenu ul li").mouseover( function() {
	$(".img_a").hide();
	$(".img_na").show();
	$(".topmenu ul li").css("backgroundColor","#ffffff");
	$(".img_na",this).hide();
	$(".img_a",this).show();
	$(this).css("backgroundColor","#cde8fb");
});

$(".rrr ul li ").mouseover( function() {
	$(".rrr ul li").css("backgroundColor","#ffffff");
	$(this).css("backgroundColor","#cde8fb");


$(".topmenu").mouseout( function() {
	$(".img_a").hide();
	$(".img_na").show();
	$(".topmenu ul li").css("backgroundColor","#ffffff");

});


});


/*$(".topmenu ul li").mouseout( function() {
	$(".img_a",this).hide();
	$(".img_na",this).show();
});*/


	$(".punkt").mouseover(function(){		
		$(".spa",this).css({ background: "url(/templates/images/gr.jpg) bottom center repeat-x" } )
		return false;
	});
	
	$(".punkt").mouseout(function(){		
		$(".spa",this).css({background: "" } )
		return false;
	});


    $('.topmenu ul li').hover(
        function() {

            $(this).find('ul:first').stop(true, true);
            $(this).find('ul:first').show();
        },
        function() {
            $(this).find('ul:first').hide('fast');
        }
    );


});

<!--var partners = Number($('#count2').val());-->

function price() {
	// ;
$("#price").slideToggle('fast');	
}

function part(x) {
	// ;
$("#pic1"+x).show();	
$("#pic2"+x).hide();

}

function partout(x) {
	// ;
$("#pic1"+x).hide();	
$("#pic2"+x).show();

}







function Busc()
{
  var b = document.getElementById("search");

  if (b!=null)
  {
    if(b.value=="Поиск по названию")
    { 
      b.value=""; 
    }
  }
}



var flag = 1;

function mouseout(f){

	flag = f;
	if (flag == 0) {
	myTimer2 = setTimeout("mouseout('1')", 300);
	
	}
		
}

// Random bags;
function randbags() {
	$('#randbags').load('/systems/includes/php/randbags.php');
}

function plus() {
	var count = Number($('#count').val());
	var price = Number($('#price').val());
	if (count < 1000 ){
		count = count + 1;
		$('#count').val(count);
		var allb = price * count; 
		$('#summa').val(allb);
		$('#allb').html(allb);
	}
}


function minus() {
	var count = Number($('#count').val());
	var price = Number($('#price').val());
	if (count > 0 ){
		count = count - 1;
		$('#count').val(count);
		var allb = price * count;
		$('#allb').html(allb);
	}
}

function cvetover(x,y,z,w) {

$("#den"+y+x).css({background: "red" }).css({color: "white" });
$("#time"+x+z+y+w).css({background: "red" }).css({color: "white" });
$("#name"+w+z).css({background: "red" }).css({color: "white" }).css("fontSize","13px");

}


function cvetout(x,y,z,w) {

$("#den"+y+x).css({background: "white" }).css({color: "#a0b2b8" });
$("#time"+x+z+y+w).css({background: "#EDF7FD" }).css({color: "#12474d" });
$("#name"+w+z).css({background: "white" }).css({color: "#044471" }).css("fontSize","11px");

}

function cvetallover(x) {

$("#timeall"+x).css({background: "red" }).css({color: "white" }).css("fontSize","13px");
$("#name"+x).css({background: "red" }).css({color: "white" }).css("fontSize","13px");

}


function cvetallout(x) {

$("#timeall"+x).css({background: "#EDF7FD" }).css({color: "#12474d" }).css("fontSize","10px");
$("#name"+x).css({background: "white" }).css({color: "#044471" }).css("fontSize","11px");

}

function equip(x) {
	// ;
$('.off').hide();
$('.equip'+x).show();
$('.off2').css({color: "#205981" }).css({background: "#ffffff" });
$('.equip2'+x).css({color: "#ffffff" }).css({background: "#044471" });


}

function equipall() {
	// ;
$('.off').show();
$('.off2').css({color: "#205981" }).css({background: "#ffffff" });
$('.equip2all').css({color: "#ffffff" }).css({background: "#044471" });

}

function obor(x) {
	// ;
	//alert(x);
	$('#flash2').hide();
	$('#about').hide();
	$('#about2').hide();	
	$('.text2').hide();
	$('#oborud'+x+'qq').show();
}


var count = 0;
function wind(x) {
	if (count == 0) {
	
	$("#window").show().animate( { width:"400px", height:"350px", left:"450px", top:"170px" }, 500, function () { $('div#opaco').height($(document).height()).toggleClass('hidden').fadeTo(0, 0.3 , function() {$("#message_text").show('fast'); }); });
	$("#opaco").css("display","block");
	$('#namedoc').html(x);
	$('#namedoctor').val(x);
	}
	x=0;
}





