{% load i18n %}

{% if show %}
    <div class="podcast-episode mod">
        <h2>
            <a href="{{ show.episode_set.current.get_absolute_url }}">
                {{ show.episode_set.current.title }}
            </a>
        </h2>
        <div class="meta">
            <span class="date">
                {{ show.episode_set.current.published|date:"F j, Y" }}
            </span>
            {% for enclosure in show.episode_set.current.enclosure_set.all %}
                {% if enclosure.mime == 'mp3' %}
                    <span class="sep">
                        <a href="{{ enclosure.url }}" class="tiptip download"
                            title="{% trans "to download right click and select 'save link as'" %}">
                            {% trans "Download / Stream" %}
                        </a>
                    </span>
                {% endif %}
            {% endfor %}
            {% if show.episode_set.current.tracklist %}
                <span class="sep">
                    <a href="#tracklist" rel="facebox" class="list">{% trans "Tracklist" %}</a>
                </span>
                <div id="tracklist" class="hidden">
                    <h3>{{ show.episode_set.current.title }} :: {% trans "Tracklist" %}</h3>
                    <div class="tracklist">
                        {{ show.episode_set.current.tracklist|linenumbers|linebreaksbr }}
                    </div>
                </div>
            {% endif %}
        </div>
        <div class="episode-details">
            <a href="{{ show.episode_set.current.img_episode_lg.url }}" rel="facebox" class="episode-thumb">
                <img src="{{ show.episode_set.current.img_episode_sm.url }}"
                    alt="{{ show.episode_set.current.img_episode_sm.name }}"
                    width="{{ show.episode_set.current.img_episode_sm.width }}"
                    height="{{ show.episode_set.current.img_episode_sm.height }}"
                    class="left" />
            </a>
            <h6>{{ show.episode_set.current.subtitle }}</h6>
            {% if show.episode_set.current.description %}
                <p><a href="#details" rel="facebox">{% trans "read more" %}</a></p>
                <div id="details" class="hidden">
                    <div>{{ show.episode_set.current.description }}</div>
                </div>
            {% endif %}
        </div>
    </div>
{% else %}
    <h2 class="coming-soon">{% trans "Coming soon..." %}</h2>
{% endif %}