$(document).ready(
	function() 
	{
		// Динамическая навигация в шапке
		
		//$('#header_nav .area .menu:nth-child(2)').css({backgroundPosition:'-143px -80px'});
		//$('#header_nav .area .menu:nth-child(3)').css({backgroundPosition:'-282px -80px'});
		//$('#header_nav .area .menu:nth-child(4)').css({backgroundPosition:'-422px -80px'});
		//$('#header_nav .area .menu:nth-child(5)').css({backgroundPosition:'-561px -80px'});
		
		//$('#header_nav .menu div div div ul').slideUp('slow');
		//$('#header_nav .menu').hover(
		//	function()
		//	{
		//		$('ul', this).slideDown('slow');
		//	},
		//	function()
		//	{
		//		$('ul', this).slideUp('slow');
		//	}
		//);
		
		// Скрыть/показать комментарии
		
		$('.comments .collapse a').toggle(
			function()
			{
				$(this).parent().children('span').html('+');
				$(this).html('Показать комментарии');
				$(this).parent().parent().children('.list').slideToggle('slow');
			},
			function()
			{
				$(this).parent().children('span').html('-');
				$(this).html('Скрыть комментарии');
				$(this).parent().parent().children('.list').slideToggle('slow');
			}
		);
		
		// Скрыть/показать форму добавления комментариев
		
		$('.comments .add_comment form').css({display:'none'});
		$('.comments .add_comment p.add a').toggle(
			function()
			{
				$(this).parent().children('span').html('-');
				$(this).parent().parent().children('form').slideToggle('slow');
			},
			function()
			{
				$(this).parent().children('span').html('+');
				$(this).parent().parent().children('form').slideToggle('slow');
			}
		);
		
		// Скрыть/показать добавление альбома
		
		$('.add_album form').css({display:'none'});
		$('.add_album p.head a').toggle(
			function()
			{
				$(this).addClass('nobg');
				$(this).parent().parent().children('form').slideToggle('slow');
			},
			function()
			{
				$(this).removeClass('nobg');
				$(this).parent().parent().children('form').slideToggle('slow');
			}
		);
		
		// Скрыть/показать добавление фотграфий
		
		$('.add_photo form').css({display:'none'});
		$('.add_photo p.head a').toggle(
			function()
			{
				$(this).addClass('nobg');
				$(this).parent().parent().children('form').slideToggle('slow');
			},
			function()
			{
				$(this).removeClass('nobg');
				$(this).parent().parent().children('form').slideToggle('slow');
			}
		);
	}
);
