<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
	<ul class="media-list">
  		<li class="media">
			<div class="media-body">
				<?if($arParams["DISPLAY_NAME"]!="N" && $arResult["NAME"]):?>
					<h2><?=$arResult["NAME"]?></h2>
				<?endif;?>
				<?if($arParams["DISPLAY_DATE"]!="N" && $arResult["DISPLAY_ACTIVE_FROM"]):
					$arr = ParseDateTime($arResult['ACTIVE_FROM'], FORMAT_DATETIME);
					$arResult["DISPLAY_ACTIVE_FROM"]=(int)$arr["DD"]." ".ToLower(GetMessage("MONTH_".intval($arr["MM"])."_S"))." ".$arr["YYYY"];?>
					<p class="date">
						<?=$arResult["DISPLAY_ACTIVE_FROM"]?>
					</p>
				<?endif;?>
				<?if($arParams["DISPLAY_PICTURE"]!="N" && is_array($arResult["DETAIL_PICTURE"])):?>
					<span class="pull-left"><img class="media-object detail_picture" border="0" src="<?=$arResult["DETAIL_PICTURE"]["SRC"]?>" width="<?=$arResult["DETAIL_PICTURE"]["WIDTH"]?>" height="<?=$arResult["DETAIL_PICTURE"]["HEIGHT"]?>" alt="<?=$arResult["DETAIL_PICTURE"]["ALT"]?>"  title="<?=$arResult["NAME"]?>" /></span>
				<?endif?>
				<?if($arParams["DISPLAY_PREVIEW_TEXT"]!="N" && $arResult["FIELDS"]["PREVIEW_TEXT"]):?>
					<p><?=$arResult["FIELDS"]["PREVIEW_TEXT"];unset($arResult["FIELDS"]["PREVIEW_TEXT"]);?></p>
				<?endif;?>
				<?if($arResult["NAV_RESULT"]):?>
					<?if($arParams["DISPLAY_TOP_PAGER"]):?><?=$arResult["NAV_STRING"]?><?endif;?>
						<?echo $arResult["NAV_TEXT"];?>
					<?if($arParams["DISPLAY_BOTTOM_PAGER"]):?>
						<?=$arResult["NAV_STRING"]?>
					<?endif;?>
				 	<?elseif(strlen($arResult["DETAIL_TEXT"])>0):?>
						<p><?echo ($arResult["DETAIL_TEXT"]);?></p>
				 	<?else:?>
						<p><?echo ($arResult["PREVIEW_TEXT"]);?></p>
					<?endif?>		
				<?if (!empty($arResult['MEDIA_VIDEO'])) {?>
			        <p>
						<a class="btn" rel="external" target="_blank" href="<?=$arResult['MEDIA_VIDEO']?>"><i class="icon-film"></i> <?=$arResult['MEDIA_VIDEO']?></a>
			    	</p>       
			    <?}?>
				    <?if (!empty($arResult['MEDIA_PHOTO'])) {?>
				        <ul class="thumbnails" data-permalink="/city/photogallery/9/">
				        <?$APPLICATION->IncludeComponent(
				    "bitrix:photogallery.detail.list",
				    "",
				    Array(
				        "THUMBS_SIZE" => "120",
				        "SHOW_PAGE_NAVIGATION" => "bottom",
				        "SHOW_CONTROLS" => "N",
				        "SHOW_RATING" => "N",
				        "SHOW_SHOWS" => "N",
				        "SHOW_COMMENTS" => "N",
				        "SHOW_TAGS" => "N",
				        "MAX_VOTE" => "5",
				        "VOTE_NAMES" => array("0","1","2","3","4"),
				        "DISPLAY_AS_RATING" => "rating",
				        "IBLOCK_TYPE" => "photogallery",
				        "IBLOCK_ID" => $arResult['MEDIA_PHOTO_IBLOCK'],
				        "BEHAVIOUR" => "SIMPLE",
				        "SET_TITLE" => "N",
				        "CACHE_TYPE" => "A",
				        "CACHE_TIME" => "3600",
				        "SECTION_ID" => $arResult['MEDIA_PHOTO'],
				        "ELEMENT_LAST_TYPE" => "none",
				        "ELEMENT_SORT_FIELD" => "SORT",
				        "ELEMENT_SORT_ORDER" => "asc",
				        "ELEMENT_SORT_FIELD1" => "",
				        "ELEMENT_SORT_ORDER1" => "asc",
				        "PROPERTY_CODE" => array(),
				        "DETAIL_URL" => $arResult['MEDIA_PHOTO_URL'] . "#SECTION_ID#/#ELEMENT_ID#/",
				        "DETAIL_SLIDE_SHOW_URL" => $arResult['MEDIA_PHOTO_URL'] . "#SECTION_ID#/#ELEMENT_ID#/",
				        "SEARCH_URL" => "",
				        "USE_PERMISSIONS" => "N",
				        "GROUP_PERMISSIONS" => array("1"),
				        "USE_DESC_PAGE" => "Y",
				        "PAGE_ELEMENTS" => "50",
				        "PAGE_NAVIGATION_TEMPLATE" => "",
				        "DATE_TIME_FORMAT" => "d.m.Y",
				        "ADDITIONAL_SIGHTS" => array(),
				        "PICTURES_SIGHT" => array()
				    ),
				false
				);?>		
				     </ul>
				    <?}?>
				    <?foreach($arResult["DISPLAY_PROPERTIES"] as $pid=>$arProperty):
							if($pid!="FILE"):?>
								<p><small>
								<?=$arProperty["NAME"]?>:&nbsp;
								<?if(is_array($arProperty["DISPLAY_VALUE"])):?>
									<?=implode("&nbsp;/&nbsp;", $arProperty["DISPLAY_VALUE"]);?>
								<?else:?>
									<?=$arProperty["DISPLAY_VALUE"];?>
								<?endif?>
								</small>
								</p>							
								<?endif?>
					<?endforeach;?>
					<?foreach($arResult["FIELDS"] as $code=>$value):
						if($code!="SHOW_COUNTER" || ($code=="SHOW_COUNTER" && showCounter()) ): ?>
						<p><small>
							<?=GetMessage("IBLOCK_FIELD_".$code)?>:&nbsp;<?=$value;?>
						</small></p>
						<?endif;
					endforeach;?>
			</div>
		</li>
	</ul>