

$().ready(function(){
	//changeTarif('ru');
	var url = $("input[name='url']").val();
	
	$("#pr-block").hide();
	$("#tiz-block").hide();
	
	$.post("/ajax/avto_pr_update.php", {url: url} , function(data){
			//if (data == 'code') return(alert_error('code'));
			$("#loading_pr").hide();
			$("#pr-block").html(data);
			$("#pr-block").show();
		});
	$.post("/ajax/avto_tiz_update.php", {url: url} , function(data){
			//if (data == 'code') return(alert_error('code'));
			$("#loading_tiz").hide();
			$("#tiz-block").html(data);
			$("#tiz-block").show();
		});
	//$("#loading_pr").hide();
	//$("#loading_tiz").hide();
	
	

/*
	$("#feedback").click(function ()
	{
		alert('Действие доступно только участникам персональной методики похудения');
		return false;
	});

	$("#start").click(function ()
	{
		$("#hello").hide();
		show_question(current_question);
		$("#test-block").show();
		return false;
	});


	$("#next-button").click(function ()
	{
		if (current_question == questions.length)
		{
			$("#test-block").html('<ul class="statuses"></ul>');
			show_status();
			return false;
		}
		else
		{
			
			if ($("input[name='answer']:checked").val() == undefined)
			{
				alert('Выберите вариант ответа.');
				return false;
			}
			
			show_question(current_question);
		}
		return false;
	});

	$("#codeForm").submit(function(){ return false; });
	$("#codeForm input[type='button']").click(function(){
		var code = $("input[name='code']").val();
		if (!/.{1,10}/.test(code)) return(alert_error('code'));
		$.get("/ajax/code.php", {code: code} , function(data){
			if (data == 'code') return(alert_error('code'));
			$("#auth").hide();
			$("#test-block").html(data);
			$("#test-block").show();
		});

		return false;
	});
	*/
});