<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
/** @var array $arParams */
/** @var array $arResult */
/** @global CMain $APPLICATION */
/** @global CUser $USER */
/** @global CDatabase $DB */
/** @var CBitrixComponentTemplate $this */
/** @var string $templateName */
/** @var string $templateFile */
/** @var string $templateFolder */
/** @var string $componentPath */
/** @var CBitrixComponent $component */
$this->setFrameMode(true);
?>
<?
	$special_offers_title = "Акции и скидки на ".mb_strtolower($arParams['SHORT_TITLE_ACCUSATIVE'])." в лизинг";

	if(isset($arParams['BRAND']))
	{
		if(isset($arParams['TYPE']))
		{
			$special_offers_title = "Акции и скидки на ".mb_strtolower($arParams['TYPE_PLURAL'])." ".$arParams['BRAND_NAME']." в лизинг";
		}
		else
		{
			$special_offers_title = "Акции и скидки на ".mb_strtolower($arParams['SHORT_TITLE_ACCUSATIVE'])." ".$arParams['BRAND_NAME']." в лизинг";
		}
	}
	elseif(isset($arParams['TYPE']))
	{
		$special_offers_title = "Акции и скидки на ".mb_strtolower($arParams['TYPE_PLURAL'])." в лизинг";
	}
	elseif(isset($arParams['GROUP']))
	{
		$special_offers_title = "Акции и скидки на ".mb_strtolower($arParams['GROUP_ACCUSATIVE'])." в лизинг";
	}
?>
<?/*<h2 class="h2">Спецпредложения и акции на тракторы в лизинг</h2>*/?>
<? if(is_array($arResult['OFFERS']) && count($arResult['OFFERS']) > 0): ?>
	<div class="container">
		<h2 class="h2"><?= $special_offers_title; ?></h2>
		<div class="special_list">
			<? foreach($arResult['OFFERS'] AS $offer): ?>
				<div class="special_item">
					<a href="/special/<?= $offer['CODE']; ?>">
						<span class="special_name"><?= $offer['NAME']; ?></span>
						<img src="<?= $offer['PREVIEW_PICTURE']; ?>" alt="<?= $offer['NAME']; ?>">
						<span class="speacial_text"><?= $offer['PREVIEW_TEXT']; ?></span>
					</a>
				</div>
			<? endforeach; ?>
		</div>
	</div>
<? endif; ?>