$(document).ready(function(){
	$(".parent a").hover(function () { $(this).toggleClass("active");
	});
	
});
	
function checkUs()
{
  var inputNik = $("#nik").val();
  var inputMail = $("#mail").val();
  var idRadio = $("#idRadioMail").val();
  var inputGo = null;
  
		$(function (){
			$("#mailDiv").load("ajax_php_radio.php", {butt : inputGo, nik : inputNik, mail : inputMail, id : idRadio}, function(result, status, xhr){
				if (status == "error") {
					$("#mailDiv").html("Now, we can not process your request.");
					}
				else
					{
						$("#mailDiv").html(result);
						$("#nik").val('');
						$("#mail").val('');
					}
			});
			
		});
}
	  

$(document).ready(function(){ 
	$("#rating_block a").click(function() {
//Смотрим ид номера дива и картинки которую будем передавать
		var productIDValSplitter 	= (this.id).split("_");
		var productIDVal 			= productIDValSplitter[1];
//Смотрим координаты продукта на который нажимаем для отправки
//		alert(""+ productIDVal );
		var productX 		= $("#href_" + productIDVal).offset().left;
		var productY 		= $("#href_" + productIDVal).offset().top;
//Смотрим координаты места приземления на который нажимаем для отправки
		var basketX 		= $("#rating").offset().left;
		var basketY 		= $("#rating").offset().top;
//непонятно что делается)
		
		var gotoX 			= basketX - productX;
		var gotoY 			= basketY - productY;
//изменения размера обекта при передаче в корзину)
		
		var newImageWidth 	= $("#href_" + productIDVal).width() / 2;
		var newImageHeight	= $("#href_" + productIDVal).height() / 2;
		
		
		$("#img_" + productIDVal)
		.clone()
		.prependTo("#href_" + productIDVal)
		.css({'position' : 'absolute'})
		.animate({opacity: 0.6}, 0 )
		.animate({opacity: 0.2, marginLeft: gotoX, marginTop: gotoY, width: newImageWidth, height: newImageHeight}, 1000, function() {
																																																																										  		$(this).remove();
	
		$("#rating").html("<img src='../images/loading.gif' width='18' height='18' />");
		//Прячем блок с оценками после нажатия
		$("#all_rating_block").html("<div style='margin:0 auto; width:32px; height:32px;'><img src='../images/loading.gif'  /></div>").animate({ "height": "32px"}, 500 );
		//После того как произойдет анимация)
		//Проверяем или есть ид радиостации - если есть то заносим в базу
		var idRadio = $("#idRadio").val();
		if(idRadio)
		{
			$(function (){
				$("#rating").load("ajax_php_radio.php", {go_voise : "", ocenka : productIDVal, id : idRadio}, function(result, status, xhr){
					if (status == "error") {
						$("#all_rating_block").html("Now your voice can not be accepted, please try again later.");
					}
					else
					{
						$("#all_rating_block").html("").animate({ "height": "20px"}, 500 );
						$("#all_rating_block").css({'font-size' : '14px'}).html("Thank you for your vote").animate({opacity: 0},2000, function() { 
						$("#all_rating_block").html("").animate({ "height": "0px"}, 500, function(){
						$("#all_rating_block").remove();
						});
						});
					}
				});
			});
		}
		
		//Проверяем или есть ид телеканала - если есть то заносим в базу
		var idTV = $("#idTV").val();
		if(idTV)
		{
			$(function (){
				$("#rating").load("ajax_php_tv.php", {go_voise : "", ocenka : productIDVal, id : idTV}, function(result, status, xhr){
					if (status == "error") {
						$("#all_rating_block").html("Now your voice can not be accepted, please try again later.");
					}
					else
					{
						$("#all_rating_block").html("").animate({ "height": "20px"}, 500 );
						$("#all_rating_block").css({'font-size' : '14px'}).html("Thank you for your vote").animate({opacity: 0},2000, function() { 
						$("#all_rating_block").html("").animate({ "height": "0px"}, 500, function(){
						$("#all_rating_block").remove();
						});
						});
					}
				});
			});
		}

		});
		
	});
	
});

$(document).ready(function(){
	$('.but_info').click(function(){
      $("#see_info").slideToggle("slow");
  	  $("#see_help, #see_inv, #see_list, #see_radio").slideUp(300);
	});

	$('.but_help').click(function(){
      $("#see_help").slideToggle("slow");
  	  $("#see_info, #see_inv, #see_list, #see_radio").slideUp(300);
	});

	$('.but_inv').click(function(){
      $("#see_inv").slideToggle("slow");
  	  $("#see_info, #see_help, #see_list, #see_radio").slideUp(300);
	});
	
	$('.but_list').click(function(){
      $("#see_list").slideToggle("slow");
  	  $("#see_help, #see_inv, #see_info, #see_radio").slideUp(300);
	});
	$('.but_radio').click(function(){
      $("#see_radio").slideToggle("slow");
  	  $("#see_help, #see_inv, #see_info, #see_list").slideUp(300);
	});

});	

/*Индекс кнопки*/
$(document).ready(function(){
	$('.index_but_radio').click(function(){
      $(".index_see_radio").slideToggle("slow");
  	  $(".index_see_list, .index_see_menu").slideUp(300);
	});
	
	$('.index_but_menu').click(function(){
      $(".index_see_menu").slideToggle("slow");
  	  $(".index_see_radio, .index_see_list").slideUp(300);
	});


	$('.index_but_list').click(function(){
      $(".index_see_list").slideToggle("slow");
  	  $(".index_see_radio, .index_see_menu").slideUp(300);
	});
});	

/*конец*/
function addPlayList(addId)
{
	$(function (){
		$("#allList").html("<div align='center'><img src='../images/loading.gif' width='36' height='36' /></div>");
		$(".addlist").remove();
		$("#allList").load("ajax_php_radio.php", {playlist: "", Newid : addId}, function(result, status, xhr){
			
			if (status == "error") {
				$("#allList").html("Now, we can not process your request.");
				}
		});
	});
}
		 
function delPlayList(delId)
{
	$(function (){
		$("#"+delId).load("ajax_php_radio.php", {dillist: "", del : delId}, function(result, status, xhr){
			if (status == "error") {
				alert("No load");
				}
				else
				{
					$("#"+delId).parent().parent().parent().remove();
				}
		});
		
	});
}

function checkUsTV()
{
	var inputNik = $("#nik").val();
	var inputMail = $("#mail").val();
	var idTV = $("#idTVMail").val();
	var inputGo = null;
	
	$(function (){
		$("#mailDiv").load("ajax_php_tv.php", {butt : inputGo, nik : inputNik, mail : inputMail, id : idTV}, function(result, status, xhr){
			if (status == "error") {
				$("#mailDiv").html("Now, we can not process your request.");
				}
			else
				{
					$("#mailDiv").html(result);
					$("#nik").val('');
					$("#mail").val('');
				}
		});
		
	});
}

<!--Обработчик регистрации-->
function SocialVoice(soc){
	$(function (){
		$("#rating").load("ajax_php_radio.php", { social : soc, station : $("#station").val(), lang : $("#lang").val() }, function(result, status, xhr){
		if (status == "error") {
			/*alert("Сейчас, мы не можем обработать Ваш запрос.");*/
			}
		else
			{
				$("#rating").html(result);
			}
		});
	});
}
 <!--Обработчик конец-->
