{% load sekizai_tags %}


{% if testimonials %}

    {% addtoblock "css" %}
        <link rel="stylesheet" href="{{ STATIC_URL }}/jquery-simplyscroll/jquery.simplyscroll.css" media="all" type="text/css">
    {% endaddtoblock %}

    {% addtoblock "js" %}
        <script type="text/javascript" src="{{ STATIC_URL }}/jquery-simplyscroll/jquery.simplyscroll.js"></script>
    {% endaddtoblock %}

    {% addtoblock "js" %}
        <script type="text/javascript">
            (function($) {
                $(function() {
                    $("#testimonial_{{ instance.pk }}").simplyScroll({
                        orientation:'vertical',
                        //direction:'backwards',
                        customClass:'vert'});
                });
            })(jQuery);
        </script>
    {% endaddtoblock %}

    {% spaceless %}
        <div class="quotes">
            <span>{{ instance.block }}</span>
            <ul id="testimonial_{{ instance.pk }}">
                {% for testimonial in testimonials %}
                    <li>
                        <p><span class="hanginquote">"</span>{{ testimonial.testimony }}"</p>
                        <div class="quoteauthor">
                            {{ testimonial.author }}
                        </div>
                    </li>
                {% endfor %}
            </ul>
        </div>
    {% endspaceless %}

{% endif %}