<?php
function joomlaposition_3() {
    $document = JFactory::getDocument();
    $view = $document->view;
    $isPreview  = $GLOBALS['theme_settings']['is_preview'];
    if (isset($GLOBALS['isModuleContentExists']) && false == $GLOBALS['isModuleContentExists'])
        $GLOBALS['isModuleContentExists'] = $view->containsModules('position-3') ? true : false;
?>
    <?php if ($isPreview || $view->containsModules('position-3')) : ?>

    <?php if ($isPreview && !$view->containsModules('position-3')) : ?>
    <!-- empty::begin -->
    <?php endif; ?>
    <div class="data-control-id-1334762 bd-joomlaposition-3 bd-page-width bd-imagescaling bd-imagescaling-1  clearfix" <?php echo buildDataPositionAttr('position-3'); ?>>
        <?php echo $view->position('position-3', 'block%joomlaposition_block_3', '3'); ?>
    </div>
    <?php if ($isPreview && !$view->containsModules('position-3')) : ?>
    <!-- empty::end -->
    <?php endif; ?>
    <?php endif; ?>
<?php
}