{if('{servers}' == '0')}
	<div class="r_block">
		<div class="r_block_head">
	 Покупка услуг
		</div> 
		<div class="r_block_c">
			center>Услуг не найдено</center>
		</div>
	</div>
</div>
{else}
	{if('{discount}' != '0')}
	<div class="bs-callout bs-callout-success transition_h_2">
		<h4>Внимание! Действует скидка!</h4>
		На все услуги действует скидка в размере {discount}%
	</div><br>
	{/if}
	<div class="r_block w50_1">
		<div class="r_block_head">
			<span class="glyphicon glyphicon-plus"></span> Покупка услуг
		</div> 
		<div class="r_block_c" id="buy_service_area">
			<script>
			function local_change_serv() {
				var server = $('#store_server option:selected').val();
				get_services(server);
				get_server_store(server);
			}
			function local_change_service() {
				var service = $('#store_services option:selected').val();
				get_tarifs(service);
			}
			function local_change_type() {
				var type = $('#store_type option:selected').val();
				change_store_bind_type(type);
			}
			</script>
			<h4 class="c-45688E"><span class="glyphicon glyphicon-tasks"></span> Выберите сервер:</h4>
			<select class="form-control h-70" id="store_server" onchange="local_change_serv();">
				{servers}
			</select>

			<h4 class="c-45688E"><span class="glyphicon glyphicon-shopping-cart"></span> Выберите услугу:</h4>
			<select class="form-control" id="store_services" onchange="local_change_service();"></select>

			<h4 class="c-45688E"><span class="glyphicon glyphicon-calendar"></span> Выберите тариф:</h4>
			<select class="form-control" id="store_tarifs"></select>
			
			<h4 class="c-45688E"><span class="glyphicon glyphicon-link"></span> Выберите тип привязки:</h4>
			<select class="form-control" id="store_type" onchange="local_change_type();">
				<option value="0">Выберите способ привязки</option>
				<option value="1">Ник + пароль</option>
				<option value="2">STEAM ID</option>
				<option value="3">STEAM ID + пароль</option>
			</select>

			<input type="text" class="form-control mt-10 disp-n" maxlength="32" id="player_nick" placeholder="Введите свой ник" value="{nick}">
			<input type="text" class="form-control mt-10 disp-n" maxlength="32" id="player_steam_id" placeholder="Введите свой STEAM ID" value="{steam_id}">
			<input type="text" class="form-control mt-10 disp-n" maxlength="32" id="player_pass" placeholder="Придумайте пароль">

			{if(is_auth())}
			<h4 class="c-45688E"><span class="glyphicon glyphicon-fire"></span> Условия:</h4>
			<input id="store_checbox" data-status="2" type="checkbox" onclick="on_buying();"> Я ознакомлен с <a target="_blank" href="../pages/rules">правилами</a> сервера и согласен с ними

			<div id="buy_result" class="mt-10"></div>
			<div id="button">
				<button id="store_buy_btn" class="btn2 btn-big mt-10 disabled">Купить</button>
				<button id="store_answer_btn" class="btn2 btn-cancel btn-big mt-10 disp-n">Нет</button>
			</div>
			{else}
			<div class="bs-callout bs-callout-error mt-10">
				<p>Авторизуйтесь, чтобы приобрести услугу</p>
			</div>
			{/if}
		</div>
	</div>
	<div class="r_block w50_2">
		<div class="r_block_head">
		 Сервер
		</div> 
		<div class="r_block_c">
			<div id="store_server_info">
			</div>
		</div>
	</div>
	<div class="r_block w50_2">
		<div class="r_block_head">
			 Информация о услуге
		</div> 
		<div class="r_block_c">
			<div id="store_service_info" class="with_code"></div>
			<div class="clearfix"></div>
		</div>
	</div>
	<script> local_change_serv(); </script>
</div>
{/if}
<div class="right_block">
	{include file="/home/right_col.tpl"}
</div>