<script>
<!--
var milisec = 0;
var seconds = <?php echo (int)$additionalSettings['download_wait']; ?>;
var countdownTimer = null;
function display()
{
if(countdownTimer == null)
{
countdownTimer = setInterval('display()', 1000);
}
$('.btn-free').hide();
$('.download-timer').show();
if (seconds == 0)
{
$('.download-timer').html("<a href='<?php echo safeOutputToScreen($file->getNextDownloadPageLink()); ?>'><?php echo pluginHelper::pluginEnabled('mediaplayer') ? t("download_view_now", "download/view now") : t("download_now", "download now"); ?></a>");
}
else
{
$('.download-timer-seconds').html(seconds);
}
seconds--;
}
$(document).ready(function() {
$('.download-timer-seconds').html(<?php echo (int)$additionalSettings['download_wait']; ?>);
});
-->
</script>