<?php
defined("_JEXEC") or die();

$doc = JFactory::getDocument();

require_once(dirname(__FILE__).'/helper.php');

$listimages = array();


if($params->get('imagefolder') != '-1') {
	$folderimages = mod_elastslideHelper::getImagesFromFolder($params);
	
	foreach ($folderimages as $img) {
		array_push($listimages, $img);
	}
}
else {
	$listimages = mod_elastslideHelper::getImages($params);
}

$doc->addStyleSheet(JUri::base().'modules/mod_elastslide/assets/css/elastislide.css');
$doc->addScript(JUri::base().'modules/mod_elastslide/assets/js/jquery.elastislide.js');

require jModuleHelper::getLayoutPath('mod_elastslide',$params->get('layout','default'));
?>