function buy_boost(boost)
{
	switch(boost)
	{
		case 'name_boost':
			site = 'url_boost';
			break;

		case 'name_boost':
			site = 'url_boost';
			break;

		case 'name_boost':
			site = 'url_boost';
	}

	$.ajax({
		url: home+'control/id/'+ctrl+'/server/'+server+'/section/boost/site/'+boost+'/service/'+$('#period_'+boost).val()+'/go',
		dataType: 'json',
		success: function(data)
		{
			$.each(data, function(i, val)
			{
				if(i == 'e' && val != '')
				{
					bootbox.dialog(val,
						[{
							"label" : "Продолжить",
							"class" : "btn-small btn-primary",
						}]
					);
				}

				if(i == 's')
				{
					bootbox.dialog('Вы успешно купили раскрутку.',
						[{
							"label" : "Продолжить",
							"class" : "btn-small btn-primary",
							callback: function() {
								location.href = home+'control/id/'+ctrl+'/server/'+server;
							}
						},{
							"label" : "Мониторинг",
							"class" : "btn-small btn-primary",
							callback: function() {
								location.href = site;
							}
						}]
					);
				}
			});
		}
	});

	return false;
}

function boost_rating(action, boost)
{
	$.get(home+'control/id/'+ctrl+'/server/'+server+'/section/boost/site/'+boost+'/rating/'+action+'/go', function(data)
	{
		if(data == 'err')
			return false;

		$('#'+boost+'_rating').html(data);
	});
}