$(document).ready(function(){
	$("#subfooter div.gifts div.inner").corner("12px");
	$("#subfooter div.pakets div.inner").corner("tl 12px");
	$("#subfooter div.pakets div.inner").corner("bl 12px");
	
	$("#clients div.scroller_block").jCarouselLite({
        	btnNext: "div.right_scroller",
	        btnPrev: "div.left_scroller"
	});

	if($('div.scroller_block').length>0)
	{
	set_sizes();
	}
	

	$("#form_hidden1").dropShadow();


	$("#form_hidden form").validate({
		onclick : false,
		rules : {
			fio : {required : true, minlength: 3},
			phone : {required : true, minlength: 3},
			email : { required: true, email: true }
		},
		messages : {
			fio : {
				required : "Введите имя",
				minlength : "Введите не менее 3 символов."
			},
			phone : {
				required : "Введите телефон",
				minlength : "вВведите не менее 3 символов."
			},
			email : "Введите ваш e-mail"
		}
	});

	$("#form_hidden input:text").each(
		function()
		{
			$(this).click(
				function()
				{
					$(this).get(0).value = '';
				}
			)
		}
	)


	$("#page_top .right_text a").click(
	function()
	{
		$("#form_hidden").hide();
		$("#form_hidden").fadeIn();
		$("#form_hidden").css('visibility','visible');
		$("div.dropShadow").css('visibility','visible');
		return false;
	}
	)

	$("#form_hidden_close").click(
	function()
	{
		$("#form_hidden").fadeOut();
	}
	)
	
	$('.gifts').mouseover(
	function()
	{
		$('#content_left3').show();
	}
	)
	$('.gifts').mouseout(
	function()
	{
		$('#content_left3').hide();
	}
	)
	
	$('.pakets').mouseover(
	function()
	{
		$('#content_left2').show();
	}
	)
	$('.pakets').mouseout(
	function()
	{
		$('#content_left2').hide();
	}
	)
	
});

window.onresize = function()
{
	if($('div.scroller_block').length>0)
	{
	set_sizes();
	}
}

function set_sizes()
{
	a = $('div.scroller_block').get(0).parentNode.offsetWidth - 10 + 'px';
	$('div.scroller_block').get(0).style.width = a;
}

