<?php
// Copyright 1999-2023. Plesk International GmbH. All rights reserved.
?>
<?php if ($this->tabs) : ?>
    <script type="text/javascript">
    //<![CDATA[
    (function () {
        var renderTo = '<?php echo $this->renderTo; ?>' || 'main';
        var renderTabs = function () {
            new Jsw.bar.Tabs({
                cls: 'tabs',
                renderTo: renderTo,
                <?php if ($this->renderMode): ?>
                    renderMode: '<?php echo $this->renderMode; ?>',
                <?php endif; ?>
                items: <?php echo is_array($this->tabs) ? Zend_Json::encode($this->tabs) : $this->tabs; ?>
            });
        };

        if (document.getElementById(renderTo)) {
            renderTabs();
        } else {
            Jsw.onReady(renderTabs);
        }
    })();
    //]]>
    </script>
<?php endif; ?>
