jQuery(function(){
	jQuery('form').submit(function(){
		if ((jQuery('input:eq(3)', this).val().length == 0)||(jQuery('input:eq(3)', this).val() == 'Ваше имя')) {
			alert('Пожалуйста, укажите Ваше имя.');
			jQuery('input:eq(3)', this).focus();
			return false;
		}

		else if ((jQuery('input:eq(4)', this).val().length == 0)||(jQuery('input:eq(4)', this).val() == 'Ваш номер телефона')) {
			alert('Пожалуйста, укажите Ваш номер телефона.');
			jQuery('input:eq(4)', this).focus();
			return false;
		}

		else if ((jQuery('input:eq(5)', this).val().length == 0)||(jQuery('input:eq(5)', this).val() == 'Email')) {
			alert('Пожалуйста, укажите Ваш номер телефона.');
			jQuery('input:eq(5)', this).focus();
			return false;
		}
		else if (jQuery('textarea:eq(0)', this).val().length == 0) {
			alert('Пожалуйста, укажите Ваше сообщение.');
			jQuery('textarea:eq(0)', this).focus();
			return false;
		}
	});

	jQuery('#menu a').hover(function(){
		jQuery(this).parent().addClass('hover');
	}, function(){
		jQuery(this).parent().removeClass('hover');
	});

	jQuery('#menu span').hover(function(){
		jQuery(this).parent().addClass('hover');
	}, function(){
		jQuery(this).parent().removeClass('hover');
	});


	jQuery('#content_vacancy li div').hide();
	jQuery('#content_vacancy .show_div').show();
	jQuery('#content_vacancy .display_none').hide();
	
	jQuery('#content_vacancy ul li a:first-child').click(function(){
		jQuery(this).nextAll('div').eq(0).toggle();
		return false;
	});

	jQuery('#content_vacancy ul .show_div').click(function(){
		jQuery(this).nextAll('div').eq(0).toggle();
		return false;
	});

	jQuery('#content_vacancy p .show_div').click(function(){
		jQuery(this).parent().nextAll('div').eq(0).toggle();
		return false;
	});

	jQuery('#content_vacancy .show_div_a').click(function(){
		jQuery(this).parent().nextAll('div').eq(0).toggle();
		return false;
	});
	
});
