<?php
/**
 * @package    JBusinessDirectory
 *
 * @author CMSJunkie http://www.cmsjunkie.com
 * @copyright  Copyright (C) 2007 - 2021 CMSJunkie. All rights reserved.
 * @license   https://www.gnu.org/licenses/agpl-3.0.en.html
 */ 
defined('_JEXEC') or die('Restricted access');

$action = JFactory::getApplication()->input->get('action');
if(!empty($action) && $action=="print"){
    $document = JFactory::getDocument();
    $document->setMetaData('ROBOTS', 'NOINDEX, FOLLOW');
}


require_once BD_CLASSES_PATH.'/attributes/attributeservice.php';
?>

<?php
if($this->appSettings->event_view==2){
    echo $this->loadTemplate('style_2');
}else{
    echo $this->loadTemplate('style_1');
}
?>

<?php
jimport('joomla.application.module.helper');
// this is where you want to load your module position
$modules = JModuleHelper::getModules('dir-event');

if(isset($modules) && count($modules)>0){
    $fullWidth = false; ?>
    <div class="dir-event">
        <?php foreach($modules as $module) {
            echo JModuleHelper::renderModule($module, array("style"=>"xhtml"));
        } ?>
    </div>
<?php }
?>

<script>
// starting the script on page load
window.addEventListener('load', function(){
	jQuery("img.image-prv").click(function(e){
		jQuery("#image-preview").attr('src', this.src);	
	});

	jQuery(".chosen-select").chosen({width:"95%", placeholder_text_single: "<?php echo JText::_('LNG_SELECT_OPTION')  ?>" , placeholder_text_multiple: "<?php echo JText::_('LNG_SELECT_OPTION')  ?>"});
});
</script>