<div id="search-path">
	<?php if(isset($this->category) && ($this->appSettings->offer_search_type != 1)) { ?>
			<ul class="category-breadcrumbs">
				<li>
					<a class="search-filter-elem" href="<?php echo JRoute::_('index.php?option=com_jbusinessdirectory&view=events&resetSearch=1') ?>"><?php echo JText::_('LNG_ALL_CATEGORIES') ?></a>
				</li>
				<?php 
				if(isset($this->searchFilter["path"])) {
					foreach($this->searchFilter["path"] as $path) {
						if($path[0]==1)
							continue;
					?>
						
						<li>
							<a class="search-filter-elem" href="<?php echo JBusinessUtil::getEventCategoryLink($path[0], $path[2]) ?>"><?php echo $path[1]?></a>
						</li>
					<?php } ?>
				<?php } ?>
				
				<li>
					<?php if(!empty($this->category)) echo $this->category->name ?>
				</li>
			</ul>
		<?php } ?>
		
        <?php if(!empty($this->selectedParams) && !empty( $this->selectedParams['selectedParams']) || !empty($this->typeSearch)
            || !empty($this->countrySearch) || !empty($this->regionSearch) || !empty($this->citySearch) || !empty($this->provinceSearch)
            || !empty($this->age) || !empty($this->startTime) || !empty($this->endTime) 
            || !empty($this->startDate) || !empty($this->endDate)
            || !empty($this->searchkeyword) || !empty($this->zipCode) || !empty($this->location) ){ ?>

            <ul class="selected-criteria">
                <?php if(!empty($this->selectedParams["type"]) && !empty($this->searchFilter["types"])) {?>
                    <li>
                        <a class="filter-type-elem" onclick="jbdUtils.removeFilterRule('type', <?php echo $this->selectedParams["type"][0] ?>)"><?php echo $this->searchFilter["types"][$this->selectedParams["type"][0]]->typeName; ?> x</a>
                    </li>
                <?php $showClear++; } ?>

                <?php if(!empty($this->typeSearch) && empty($this->searchFilter["types"])) { ?>
                    <li>
                        <a class="filter-type-elem"
                        onclick="jbdUtils.removeSearchRule('type')"><?php echo $this->typeSearchName; ?> x</a>
                    </li>
                    <?php $showClear++;
                } ?>

                <?php if(!empty($this->age)) { ?>
                    <li>
                        <a class="filter-type-elem"
                        onclick="jbdUtils.removeSearchRule('age')"><?php echo JText::_("LNG_AGE").": ".$this->age."&nbsp;&nbsp;"; ?> x </a>
                    </li>
                    <?php
                    $showClear++;
                } ?>

                <?php if(!empty($this->startTime)) { ?>
                    <li>
                        <a class="filter-type-elem"
                        onclick="jbdUtils.removeSearchRule('start-time')"><?php echo JText::_("LNG_START_TIME").": ".$this->startTime."&nbsp;&nbsp;"; ?> x </a>
                    </li>
                    <?php
                    $showClear++;
                } ?>

                <?php if(!empty($this->endTime)) { ?>
                    <li>
                        <a class="filter-type-elem"
                        onclick="jbdUtils.removeSearchRule('end-time')"><?php echo JText::_("LNG_END_TIME").": ".$this->endTime."&nbsp;&nbsp;"; ?> x </a>
                    </li>
                    <?php
                    $showClear++;
                } ?>

                <?php if(!empty($this->selectedParams["country"]) && !empty( $this->searchFilter["countries"])) {?>
                    <li>
                        <a  class="filter-type-elem" onclick="jbdUtils.removeFilterRule('country', <?php echo $this->selectedParams["country"][0] ?>)"><?php echo $this->searchFilter["countries"][$this->selectedParams["country"][0]]->countryName; ?> x</a>
                    </li>
                    <?php $showClear++; } ?>

                <?php if(!empty($this->countrySearch) && empty($this->searchFilter["countries"])) { ?>
                    <li>
                        <a class="filter-type-elem"
                        onclick="jbdUtils.removeSearchRule('country')"><?php echo $this->country->country_name; ?> x</a>
                    </li>
                    <?php $showClear++;
                } ?>

                <?php if(!empty($this->selectedParams["region"]) && !empty( $this->searchFilter["regions"])) {?>
                    <li>
                        <a class="filter-type-elem" onclick="jbdUtils.removeFilterRule('region', <?php echo "&quot;".$this->selectedParams["region"][0]."&quot;" ?>)"><?php echo $this->searchFilter["regions"][$this->selectedParams["region"][0]]->regionName; ?> x</a>
                    </li>
                <?php $showClear++; } ?>

                <?php if(!empty($this->regionSearch) && empty($this->searchFilter["regions"])) { ?>
                    <li>
                        <a class="filter-type-elem"
                        onclick="jbdUtils.removeSearchRule('region')"><?php echo $this->regionSearch; ?> x</a>
                    </li>
                    <?php $showClear++;
                } ?>

                <?php if(!empty($this->selectedParams["city"]) && !empty($this->searchFilter["cities"]) && isset( $this->searchFilter["cities"][$this->selectedParams["city"][0]])) {?>
                    <li>
                        <a class="filter-type-elem" onclick="jbdUtils.removeFilterRule('city', <?php echo "&quot;".$this->selectedParams["city"][0]."&quot;" ?>)"><?php echo $this->searchFilter["cities"][$this->selectedParams["city"][0]]->cityName; ?> x</a>
                    </li>
                <?php $showClear++; } ?>

                <?php if(!empty($this->citySearch) && empty($this->searchFilter["cities"])) { ?>
                    <li>
                        <a class="filter-type-elem"
                        onclick="jbdUtils.removeSearchRule('city')"><?php echo $this->citySearch; ?> x</a>
                    </li>
                    <?php $showClear++;
                } ?>

                <?php if(!empty($this->provinceSearch) && empty($this->searchFilter["provinces"])) { ?>
                    <li>
                        <a class="filter-type-elem"
                        onclick="jbdUtils.removeSearchRule('province')"><?php echo $this->provinceSearch; ?> x</a>
                    </li>
                    <?php $showClear++;
                } ?>

                <?php if(!empty($this->searchkeyword)) { ?>
                    <li>
                        <a class="filter-type-elem"
                        onclick="jbdUtils.removeSearchRule('keyword')"><?php echo $this->searchkeyword; ?> x</a>
                    </li>
                    <?php $showClear++;
                } ?>

                <?php if(!empty($this->zipCode)) { ?>
                    <li>
                        <a class="filter-type-elem"
                        onclick="jbdUtils.removeSearchRule('zipcode')"><?php echo $this->zipCode; ?> x </a>
                    </li>
                    <?php
                    $showClear++;
                } ?>
                
                <?php if(!empty($this->location) && !empty($this->geoLatitude) && empty($this->zipCode)) { ?>
                    <li>
                        <a class="filter-type-elem"
                        onclick="jbdUtils.removeSearchRule('location')"><?php echo JText::_("LNG_GEO_LOCATION") ?> x </a>
                    </li>
                    <?php
                    $showClear++;
                } ?>
                
                <?php if(!empty($this->startDate)) { ?>
                    <li>
                        <a class="filter-type-elem"
                        onclick="jbdUtils.removeSearchRule('startDate')"><?php echo "Start: ". JBusinessUtil::getShortDate($this->startDate); ?> x </a>
                    </li>
                    <?php
                    $showClear++;
                } ?>

                <?php if(!empty($this->endDate)) { ?>
                    <li>
                        <a class="filter-type-elem"
                        onclick="jbdUtils.removeSearchRule('endDate')"><?php echo "End: ". JBusinessUtil::getShortDate($this->endDate); ?> x </a>
                    </li>
                    <?php
                    $showClear++;
                } ?>

                <?php if(!empty($this->selectedParams["area"]) && !empty( $this->searchFilter["areas"]) && isset($this->searchFilter["areas"][$this->selectedParams["area"][0]])) {?>
                    <li>
                        <a class="filter-type-elem" class="remove" onclick="jbdUtils.removeFilterRule('area', <?php echo "&quot;".$this->selectedParams["area"][0]."&quot;" ?>)"> <?php echo $this->searchFilter["areas"][$this->selectedParams["area"][0]]->areaName; ?> x</a>
                    </li>
                    <?php $showClear++; } ?>
                <?php if($showClear > 1) { ?>
                    <span class="filter-type-elem reset"><a href="javascript:jbdUtils.resetFilters(true)" style="text-decoration: none;"><?php echo JText::_('LNG_CLEAR_ALL'); ?></a></span>
                <?php } ?>
            </ul>
        <?php } ?>
	<div class="clear"></div>
</div>