<?php global $imageinfo, $module_settings; ?>

<div class="image-module">
<?php if($module_settings['image']['show image title'] == 1) { ?><h2 class="image-module-headline"><?php echo $imageinfo['title']; ?></h2><?php } ?>
<img src="<?php echo $imageinfo['file']; ?>" width="<?php echo $imageinfo['width']; ?>" height="<?php echo $imageinfo['height']; ?>" style="-ms-interpolation-mode: bicubic" alt="<?php echo strip_tags($imageinfo['description']) == '' ? $imageinfo['basename'] : strip_tags($imageinfo['description']); ?>" title="<?php echo strip_tags($imageinfo['title']); ?>">
<?php if($module_settings['image']['show image description'] == 1) { ?><div class="image-module-text"><?php echo $imageinfo['description']; ?></div><?php } ?>
</div>

<?php connector('image frontend output'); ?>

<?php if(is_file($imageinfo['file'])) { ?>
    <!-- JS ACTIONS -->
    <script type="text/javascript">
   		// Comments
   		var commentsXMLfile = '<?php echo $imageinfo['xml file']; ?>';
   		if(document.getElementById('load_comments')) document.getElementById('load_comments').click();
   		if(document.getElementById('current_url')) document.getElementById('current_url').value = top.location.href;
   		
   		// EXIF
   		window.onload = function() {
   			imagePath = '<?php echo $imageinfo['file']; ?>';
   			if(typeof loadEXIF != 'undefined') loadEXIF('<?php echo $imageinfo['file']; ?>');
   		};
	</script>
<?php } ?>