{{if $aPage.iColumn && count( $aPage.aFilterProducts ) > 0}}
	<div id="filter_content">
		<h5>{{$lang.filter}}</h5>
		<script type="text/javascript">
			$(document).ready(function(){
				$("form#filter").validate();
				$("form#filter input#filter-price-from").rules("add", {required: false, number: true});
				$("form#filter input#filter-price-to").rules("add", {required: false, number: true});
			});
		</script>
		<form action="{{$aPage.sLinkName}}" method="get" id="filter">
			{{if isset( $aPage.sLinkName2 )}}
				<input type="hidden" name="{{$aPage.sLinkName2}}" />
			{{/if}}
			<ul>
				{{if !$config.prices_off}}
					<li>
						<label class="price" for="filter-price-from">{{$lang.price_from}}</label>
						<input type="text" name="fFilterPriceFrom" value="{{$_GET.fFilterPriceFrom}}" id="filter-price-from" class="input" />
						<label class="price" for="filter-price-to">{{$lang.price_to_to}}</label>
						<input type="text" name="fFilterPriceTo" value="{{$_GET.fFilterPriceTo}}" id="filter-price-to" class="input" />
					</li>
				{{/if}}
				{{foreach from=$aPage.aFilterProducts item=aAttribute}}
					<li {{if !$aAttribute.iFilterVisible}}class="attribute-hidden"{{/if}}>
						<span>{{$aAttribute.sName}}</span>
						{{if $aAttribute.iType == 0}}
							<ul class="checkboxes">
								{{foreach from=$aAttribute.aValues item=aValue}}
									<li {{if !$aValue.iFilterVisible}}class="value-hidden"{{/if}}><label><input class="checkbox" type="checkbox" value="1" name="aFilterAttributes[{{$aAttribute@key}}][{{$aValue.iValue}}]" {{if $aValue.bChecked}}checked="checked"{{/if}}/> <span>{{$aValue.sValue}} ({{$aValue.iProductsCount}})</span></label></li>
								{{/foreach}}
							</ul>
						{{elseif $aAttribute.iType == 1}}
							<ul class="radiobuttons">
								{{foreach from=$aAttribute.aValues item=aValue}}
									<li><label><input class="radio" type="radio" value="{{$aValue.iValue}}" name="aFilterAttributes[{{$aAttribute@key}}]" {{if $aValue.bChecked}}checked="checked"{{/if}} /> <span>{{$aValue.sValue}} ({{$aValue.iProductsCount}})</span></label></li>
								{{/foreach}}
							</ul>
						{{elseif $aAttribute.iType == 2}}
							<select name="aFilterSelectAttributes[{{$aAttribute@key}}][]" class="selectmenu">
								<option value="">{{$lang.Select}}</option>
								{{foreach from=$aAttribute.aValues item=aValue}}
									<option value="{{$aValue.iValue}}" {{if $aValue.bChecked}}selected="selected"{{/if}}>{{$aValue.sValue}} ({{$aValue.iProductsCount}})</option>
								{{/foreach}}
							</select>
						{{elseif $aAttribute.iType == 3}}
							<select name="aFilterSelectAttributes[{{$aAttribute@key}}][]" class="multiselect" multiple="multiple">
								{{foreach from=$aAttribute.aValues item=aValue}}
									<option value="{{$aValue.iValue}}" {{if $aValue.bChecked}}selected="selected"{{/if}}>{{$aValue.sValue}} ({{$aValue.iProductsCount}})</option>
								{{/foreach}}
							</select>
						{{elseif $aAttribute.iType == 4 || $aAttribute.iType == 5 || $aAttribute.iType == 6}}
							<div class="filter_attribute_slider{{if $aAttribute.iType == 5}} range{{elseif $aAttribute.iType == 6}}_special{{/if}}">
								<ul>
									{{$sFirst = ''}}{{$sLast = ''}}
									{{foreach from=$aAttribute.aValues item=aValue}}
										{{if $aValue.bChecked}}
											{{if $sFirst == ''}}
												{{$sFirst = $aValue.sValue}}
											{{/if}}
											{{$sLast = $aValue.sValue}}
										{{/if}}
										<li><label><input class="checkbox" type="checkbox" value="1" name="aFilterAttributes[{{$aAttribute@key}}][{{$aValue.iValue}}]" {{if $aValue.bChecked}}checked="checked"{{/if}}/> <span>{{$aValue.sValue}}</span></label></li>
									{{/foreach}}
								</ul>
								<p class="val">{{if $sFirst != ''}}{{$sFirst}}{{if $aAttribute.iType == 5}} - {{$sLast}}{{/if}}{{/if}}</p>
								<div class="slider"></div>
							</div>
						{{/if}}
					</li>
				{{/foreach}}
			</ul>
			<div class="actions">
				<input type="submit" class="submit submit-styled" rel="nofollow" title="{{$lang.apply}}" value="{{$lang.apply}}" />
				<a href="{{$aPage.sLinkName}}" class="reset" rel="nofollow" title="{{$lang.clear}}">{{$lang.clear}}</a>
			</div>
		</form>
		<div class="box_bottom"></div>
	</div>
{{/if}}