
{if $data}
	<div id="slideshow_{$data.slider_id}"  class="{$params.class}" style="{$params.style}">
		<div class="slideshow-products">
			{foreach $data.slides as $k => $slide}
				<div class="product" style="display: {if $slide@first}block{else}none{/if};">
					<div class="product-image">
						{if $slide.slide_link}<a href="{$slide.slide_link}">{/if}
							<img alt="{$item.slide_alt_text|escape:'html'}" class="img-responsive lazyOwl" src="{img img=$slide.slide_image type=m_org path_only=true}" data-src="{img img=$slide.slide_image type=m_org path_only=true}">
						{if $slide.slide_link}</a>{/if}
					</div><!-- .product-image -->
				</div><!-- .product -->
            {/foreach}
		</div>
        <ul class="slideshow-controls hidden-xs">
            {foreach $data.slides as $k => $slide}
            <li class="{if $slide@first}active{/if}">
                <p class="product-name">{$slide.slide_alt_text}</p>
            </li>
            {/foreach}
        </ul><!-- .slideshow-controls -->
	</div>

<script type="text/javascript">

    jQuery(document).ready(function () {

            var resizeTimer_{$data.slider_id};
            $(window).on('resize', function (e)
            {
                clearTimeout(resizeTimer_{$data.slider_id});
                resizeTimer_{$data.slider_id} = setTimeout(function ()
                {
                    resizeSlideshow({$data.slider_id});
                }, 250);
            });// onresize

            setTimeout(
                function()
                {
        var teaserElement = jQuery('#slideshow_{$data.slider_id}');
        if (teaserElement.length != 0) {
            try {
                teaserElement.slideshow({
                    autoplay: 'enable',			//option:enable,disable
                                time_Interval: {if $data.slide_speed}{$data.slide_speed}{else}'3000'{/if}    //Milliseconds
                });
            }
                        catch (ex) {
                            console.log('#slideshow_{$data.slider_id} - init =>', ex);
            }
        }
                }, {if $data.auto_play_speed && $data.slide_speed}
                        {$data.auto_play_speed - $data.slide_speed}
                    {else}2000{/if}
            );// setTimeout


    });

</script>
{/if}