$(document).ready(function(){
						   
	$(".top_menu li:first").css({
		"-webkit-border-top-left-radius": "8px",
		"moz-border-radius-topleft": "8px",
		"border-top-left-radius": "8px"
	});
	
	$(".top_menu li:last").css({
		"-webkit-border-top-right-radius": "8px",
		"-moz-border-radius-topright": "8px",
		"border-top-right-radius": "8px"
	});
	
	$(".top_menu").css({
		"-webkit-border-top-left-radius": "8px",
		"moz-border-radius-topleft": "8px",
		"border-top-left-radius": "8px",
		"-webkit-border-top-right-radius": "8px",
		"-moz-border-radius-topright": "8px",
		"border-top-right-radius": "8px"
	});
	
	var H_hieght = $("#wrapper").height();
	$("#out").css({
		"hieght": H_hieght
	});
	
	
		$(".cont_menu li a p img").each(function(){
												 $(".cont_menu li a p img").load(function(){
			  $(this).css({
				  "margin-top": (118-$(this).height())/2,
				  "margin-left": ((168-$(this).width())/2),
				  "margin-right": ((168-$(this).width())/2)
			  });
		});
  	});
	
	
		$(".min_menu ul li a img").each(function(){
												 $(".min_menu ul li a img").load(function(){
			  $(this).css({
				  "margin-top": (53-$(this).height())/2,
				  "margin-left": ((75-$(this).width())/2),
				  "margin-right": ((75-$(this).width())/2)
			  });
		});
  	});
	
	
	if($('.mnTab a').size()>1){
		if(window.location.hash){
			$('.mnTab a').removeClass('active');
			$('.mnTab a[href='+window.location.hash+']').addClass('active');
			$(window).scrollTop(0);
		}
		
		if(!$('.mnTab a.active').size()){$('.mnTab a').eq(0).addClass('active');};
		$('.mnTab a').each(function(index, element) {
			h=	$(this).attr('href');
			$(this).attr('b',h).attr('href','javascript:;');
			if(!$(this).hasClass('active')){
				$($(this).attr('b')).hide();
			}
		});
		$('.mnTab a').click(function(e) {
			if(!$(this).hasClass('active')){
				$($('.mnTab a.active').attr('b')).hide();
				$('.mnTab a.active').removeClass('active');
				$(this).addClass('active');
				$($(this).attr('b')).show();
			}
		});
	}
	
	if($('#anketa-form').length > 0)
	{
		$('#anketa-form').submit(function(){
			$.post('/rmhc_anketa.php', $('#anketa-form').serialize(), function(){
				$('#anketa-ok').show();
			});
			
			return false;
		});
	}
});
