{% load i18n %}
{% load sekizai_tags %}
{% load goscale_tags %}
{% load url from future %}

{% goscale_addtoblock "css" %}
	<link rel="stylesheet" href="{{ STATIC_URL }}goscale/css/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
	<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}goscale/css/goscale.plugins.form.css" />
{% endaddtoblock %}

{% goscale_addtoblock "js" %}
	<script type="text/javascript" src="{{ STATIC_URL }}goscale/js/jquery.fancybox-1.3.4.pack.js"></script>
	<script type="text/javascript" src="{{ STATIC_URL }}goscale/js/jquery.easing.1.3.js"></script>
	<script type="text/javascript" src="{{ STATIC_URL }}goscale/js/goscale.plugins.form.js" data-callback="plugins.goscalePluginsForm"></script>
{% endaddtoblock %}

{% if posts %}
	<div class="goscale-plugins-form popup" data-ajax-handler="{% url 'goscale_form_handler' %}">
		<div class="form-button">
			<a>{{ title }}</a>
			<div class="form-lb-container">
				<h1 class="form-title">{{ title }}</h1>
				<form action="{{ posts.0.link }}" method="POST" class="ss-form" target="_blank">
					{% csrf_token %}
					<input type="hidden" name="url" value="{{ posts.0.link }}" />
					{{ posts.0.description|safe }}
				</form>
			</div>
		</div>
	</div>
{% endif %}