<?php
/** no direct access **/
defined('_WPLEXEC') or die('Restricted access');
?>
<script type="text/javascript">
(function($)
{
    $(function()
    {
        $('#wpl_gallery_container<?php echo $this->property_id; ?>').lightSlider(
        {
            pause : 4000,
            auto: <?php echo (($this->autoplay) ? 'true' : 'false'); ?>,
            mode: 'fade',
            item: 1,
            loop: true,
            autoWidth: true,
            adaptiveHeight: true,
            onSliderLoad: function(el)
            {
                $('#wpl_gallery_container<?php echo $this->property_id; ?> li').show();
                if($('#wpl_gallery_container<?php echo $this->property_id; ?>').find('.gallery_no_image').length == 0)
                {
                    el.lightGallery(
                    {
                        selector: '#wpl_gallery_container<?php echo $this->property_id; ?> .lslide'
                    });
                }
            }
        })<?php echo (($this->autoplay) ? '.play()' : ''); ?>;
    });
})(jQuery);
</script>