<?php
defined( 'ABSPATH' ) || exit( 'No Access!' );

global $options;

$active = $image1 || $image2 || $image3 || $image4 || $image5;
?>
<div class="main-slider-container">
	<div class="<?php echo ( $ads_image1 || $ads_image2 ) ? 'row' : null; ?>">
		<?php if ( $active ): ?>
            <div class="main-slider <?php echo ( $ads_image1 || $ads_image2 ) ? 'col-12 col-lg-8' : null; ?>">
                <div class="main-carousel owl-carousel">
					<?php
					echo $image1 ? '<div class="item">' . irk_linked_image( $url1, $image1, $target1, $xfn1 ) . '</div>' : '';
					echo $image2 ? '<div class="item">' . irk_linked_image( $url2, $image2, $target2, $xfn2 ) . '</div>' : '';
					echo $image3 ? '<div class="item">' . irk_linked_image( $url3, $image3, $target3, $xfn3 ) . '</div>' : '';
					echo $image4 ? '<div class="item">' . irk_linked_image( $url4, $image4, $target4, $xfn4 ) . '</div>' : '';
					echo $image5 ? '<div class="item">' . irk_linked_image( $url5, $image5, $target5, $xfn5 ) . '</div>' : '';
					?>
                </div>
            </div>
		<?php endif; ?>
		<?php if ( $ads_image1 || $ads_image2 ): ?>
            <aside class="slider-sidebar col-12 <?php echo $active ? 'col-lg-4' : null; ?>">
				<?php if ( $ads_image1 ): ?>
                    <div class="widget widget-a_d_s">
						<?php echo irk_linked_image( $ads_url1, $ads_image1, $ads_target1, $ads_xfn1 ); ?>
                    </div>
				<?php endif; ?>
				<?php if ( $ads_image2 ): ?>
                    <div class="widget widget-a_d_s">
						<?php echo irk_linked_image( $ads_url2, $ads_image2, $ads_target2, $ads_xfn2 ); ?>
                    </div>
				<?php endif; ?>
            </aside>
		<?php endif; ?>
    </div>
</div>