<div class="slider-container ">
    
	<div class="slide-loading"></div>
    <div id="plaza-slider" class="plaza-slider">
        {% set config = slider[0] %}
        {% set i = 1 %}
        {% for slider in ptsliders %}
            {% set i = i + 1 %}
            <a href="{{ slider.link }}" ><img style="display: none;" src="{{ slider['image'] }}" alt="" title="#slide-caption{{ i }}"  /></a>
        {% endfor %}
    </div>
    {% set i = 1 %}
    {% for slider in ptsliders %}
        {% set class = "" %}
		{% if slider['type'] == 1 %}
			{% set class = 'slider-1' %}
		{% endif %}
		
		{% if slider['type'] == 2 %}
			{% set class = 'slider-2' %}
		{% endif %}
		
		{% if slider['type'] == 3 %}
			{% set class = 'slider-3' %}
		{% endif %}
		{% set i = i + 1 %}
        <div id="slide-caption{{ i }}" class="slide-caption nivo-html-caption nivo-caption">
            <div class="slider-content {{ class }}">
				<div >
					<div class="inner">
						<div class="content">
							<div class="slide-title">
								{% if slider.title %}
									<h3>{{ slider.title }}</h3>
								{% endif %}
							</div>
							<div class="sub-title">
								{% if slider.sub_title %}
									<h3>{{ slider.sub_title }}</h3>
								{% endif %}
							</div>
							<div class="slide-description">
								{{ slider.description }}
							</div>
							{% if slider.link %}
								<div class="slide-readmore">
									<a href="{{ slider.link }}" title="{{ text_link_button }}">{{ text_link_button }}</a>
								</div>
							{% endif %}
						</div>
					</div>
				</div>
			</div>
        </div>
    {% endfor %}
</div>
<script >
    $(window).load(function() {
        $('#plaza-slider').nivoSlider({
            slices: 15,
            boxCols: 8,
            boxRows: 4,
            animSpeed: 500,
            manualAdvance: {% if config.auto and config.auto == '1' %} false {% else %} true {% endif %} ,
            pauseTime: {% if config.delay %} {{ config.delay }} {% else %} 3000 {% endif %} ,
            controlNav: {% if config.contrl and config.contrl == '1' %} true {% else %} false {% endif %} ,
            directionNav: {% if config.nextback and config.nextback == '1' %} true {% else %} false {% endif %} ,
            pauseOnHover: {% if config.hover and config.hover == '1' %} true {% else %} false {% endif %} ,
            controlNavThumbs: false,
            effect: 'random',
            startSlide: 0,
            prevText: 'Prev',
            nextText: 'Next'
        });
    });
</script>