
jQuery(document).ready(
	function ()
	{
		jQuery(".td-foto img, .ludi-table img").css('opacity', '1.0')
			.mouseover(
				function ()
				{
					jQuery(this).animate({opacity:0.8}, "fast");
				}
			)
			.mouseout(
				function ()
				{
					jQuery(this).animate({opacity:1.0}, "slow");
				}
			);
		
		//новые лица
		jQuery("#l_new").click(
			function ()
			{
				if (jQuery('#t_new').css('display') != 'none')
					return false;
				
				jQuery("#kn-ludi").attr("class", "kn-ludi-green");
				jQuery("#krug").attr("class", "krug-green");
				jQuery("#online_text").html('новые лица').attr('href', 'http://my.amur.net/index.php?option=com_community&view=search&task=peopleSearch&sorting=new');
				jQuery(".na-saite").css("top", "148px");
				
				jQuery(".ludi-kn-text-1 a").css("color", "#b55400")
				.mouseover(
					function()
					{
						jQuery(this).css("color", "#fff");
					})
				.mouseout(
					function()
					{
						jQuery(this).css("color", "#b55400");
					}
				);
				jQuery(".ludi-kn-text-2 a").css("color", "#fff").unbind("mouseover").unbind("mouseout");
				
				jQuery("#t_online").fadeOut('normal',
					function ()
					{
						jQuery('#t_new').fadeIn('normal');
					}
				);
			
				return false;
			}
		);
		
		//онлайн
		jQuery('#l_online').click(
			function ()
			{
				if (jQuery('#t_online').css('display') != 'none')
					return false;
				
				jQuery("#kn-ludi").attr("class", "kn-ludi-orange");
				jQuery("#krug").attr("class", "krug-orange");
				jQuery("#online_text").html('на сайте').attr('href', 'http://my.amur.net/index.php?option=com_community&view=search&task=peopleSearch&sorting=online');
				jQuery(".na-saite").css("top", "145px");
				jQuery(".ludi-kn-text-2 a").css("color", "#196c00")
				.mouseover(
					function()
					{
						jQuery(this).css("color", "#fff");
					})
				.mouseout(
					function()
					{
						jQuery(this).css("color", "#196c00");
					});
				jQuery(".ludi-kn-text-1 a").css("color", "#fff").unbind("mouseover").unbind("mouseout");
				
				jQuery("#t_new").fadeOut('normal',
						function ()
						{
							jQuery('#t_online').fadeIn('normal');
						}
					);
				
				return false;
			}
		);
		
		//новые альбомы
		jQuery("#l_album").click(
			function ()
			{
				if (jQuery('#t_album').css('display') != 'none')
					return false;
				
				jQuery("#kn-ft-al").attr("class", "kn-albom-on");
				jQuery(".foto-text a").css("color", "#6d6e70")
				.mouseover(
					function()
					{
						jQuery(this).css("color", "red");
					})
				.mouseout(
					function()
					{
						jQuery(this).css("color", "#6d6e70");
					});
				
				jQuery(".albom-text a").css("color", "#fff").unbind("mouseover").unbind("mouseout");
				
				jQuery("#t_photo").fadeOut('normal',
						function ()
						{
							jQuery('#t_album').fadeIn('normal');
						}
					);
				
				return false;
			}
		);
		
		//новые фото
		jQuery("#l_photo").click(
			function ()
			{
				if (jQuery('#t_photo').css('display') != 'none')
					return false;
				
				jQuery("#kn-ft-al").attr("class", "kn-foto-on");
				jQuery(".albom-text a").css("color", "#6d6e70")
				.mouseover(
					function()
					{
						jQuery(this).css("color", "red");
					})
				.mouseout(
					function()
					{
						jQuery(this).css("color", "#6d6e70");
					});
				jQuery(".foto-text a").css("color", "#fff").unbind("mouseover").unbind("mouseout");
				
				jQuery("#t_album").fadeOut('normal',
						function ()
						{
							jQuery('#t_photo').fadeIn('normal');
						}
					);
				
				return false;
			}
		);
		
		//прямой эфир для форума
		jQuery("#l_forum").click(
			function ()
			{
				if (jQuery('#t_forum').css('display') != 'none')
					return false;
				
				jQuery("#pr-efir").attr("class", "kn-efir-forum");
				
				
				jQuery(".efir-v-bl a").css("color", "#6c6c6e")
				.mouseover(
					function()
					{
						jQuery(this).css("color", "red");
					})
				.mouseout(
					function()
					{
						jQuery(this).css("color", "#6c6c6e");
					});
				
				jQuery(".efir-na-fr a").css("color", "#00A043").unbind("mouseover").unbind("mouseout");
				
				jQuery("#t_blog").fadeOut('normal',
						function ()
						{
							jQuery('#t_forum').fadeIn('normal');
						}
					);
				
				return false;
			}
		);
		
		jQuery("#l_blog").click(
			function ()
			{
				if (jQuery('#t_blog').css('display') != 'none')
					return false;
				
				jQuery("#pr-efir").attr("class", "kn-efir-blog");
				
				
				jQuery(".efir-na-fr a").css("color", "#6c6c6e")
				.mouseover(
					function()
					{
						jQuery(this).css("color", "red");
					})
				.mouseout(
					function()
					{
						jQuery(this).css("color", "#6c6c6e");
					});
				
				jQuery(".efir-v-bl a").css("color", "#00A043").unbind("mouseover").unbind("mouseout");
				
				jQuery("#t_forum").fadeOut('normal',
						function ()
						{
							jQuery('#t_blog').fadeIn('normal');
						}
					);
				
				return false;
			}
		);
		
	}
);
//Новости
jQuery(document).ready(
		function ()
		{
			jQuery("#newsList a").click(
				function()
				{
					jQuery("#newsList li").removeClass();
					jQuery(this).parent().addClass('vibor');
					jQuery("#news_content").fadeOut('normal');
					jQuery.get('/?option=com_ajax&task=news&view='+jQuery(this).attr("name"),'',
							function(data,textStatus)
							{
								jQuery("#news_content").html(data);

								jQuery('#news_content').fadeIn('normal');
							},
							'html'
					);
					return false;
				}
			);
		}
	);