{{if is_array($aBanners) && count($aBanners) > 0}}
	{{$iWidth = 0}}
	{{$iHeight = 0}}
	{{foreach from=$aBanners item=aBanner}}
		{{if $aBanner.iWidth > $iWidth}}{{$iWidth = $aBanner.iWidth}}{{/if}}
		{{if $aBanner.iHeight > $iHeight}}{{$iHeight = $aBanner.iHeight}}{{/if}}
	{{/foreach}}
	<div class="banners_container" style="width: {{$iWidth}}px; max-width: 100%;">
		<ul id="banners{{$iType}}" style="padding-bottom: {{$iHeight/$iWidth*100}}%; max-width: {{$iWidth}}px; max-height: {{$iHeight}}px;">
			{{foreach from=$aBanners item=aBanner}}
				<li id="banner{{$aBanner.iBanner}}" {{if count( $aBanners ) == 1}}class="activeSlide"{{/if}}>
					{{if !empty($aBanner.sText)}}
						<div class="text">{{$aBanner.sText}}</div>
					{{/if}}
					{{if !empty($aBanner.sLink)}}
						<a href="{{$aBanner.sBannerLink}}" target="{{if $aBanner.iTargetBlank}}_blank{{else}}_self{{/if}}">
					{{/if}}
					<img src="{{$config.dir_files}}{{$aBanner.sFile}}" alt="{{$aBanner.sLink}}" style="width:100%; max-width: {{$aBanner.iWidth}}px; max-height: {{$aBanner.iHeight}}px;" {{if $aBanner.iStatus == 0}}class="admin"{{/if}}/>
					{{if !empty($aBanner.sLink)}}
						</a>
					{{/if}}
				</li>
			{{/foreach}}
		</ul>
		{{if count( $aBanners ) > 1 }}<div class="pages" id="banners{{$iType}}-pages">{{foreach from=$aBanners item=aBanner}}<a href="#banner{{$aBanner.iBanner}}"></a>{{/foreach}}</div>{{/if}}
	</div>
{{/if}}