{% extends widget.get_base_template %}

{% load i18n %}
{% load thumbnail %}

{% block content %}
<div id="{{ widget.fe_identifier }}-links">
	{% for object in widget.list.link_set.all %}
	<a href="{{ object.web_address }}" class="{% if object.target == '_modal' %}ajax-modal modal{% endif %} {% if object.target == '_blank' %}blank{% endif %}">
		{% thumbnail object.image.file "2600x450" format="PNG" as image %}
		<img src="{{ image.url }}" alt="icon" /><br />
		{% endthumbnail %}
	</a>
	{% endfor %}
</div>
<script type="text/javascript">
$(document).ready(function() {
	$("#{{ widget.fe_identifier }} a.modal").colorbox();
	$("#{{ widget.fe_identifier }} a.blank").bind('click', function() {
		window.open($(this).attr('href'));
		return false;
	});
	$('#{{ widget.fe_identifier }}-links').cycle({ 
		fx: 'fade', 
		speed: 'slow', 
		timeout: {{ widget.rotation_speed|default:"4000" }}, 
	});
});
</script>
{% endblock %}