{% extends "html/outer.html" %}

{% block title %}{{ title }}{% endblock %}

{% block header %}
	{{ super() }}
	<script>
	window.page_name = "{{ name }}";

	$(document).bind('app_ready', function() {
		var _page = new wn.views.Page(window.page_name);
	
		// page script
		{% block javascript %}
		{% endblock %}
	
		// trigger onload
		_page.trigger('onload');
	
		// activate page
		wn.container.change_to(window.page_name);
	});
	</script>
	
	{% block css %}
	{% if insert_style %}
	
	<style>{{ css }}</style>

	{% endif %}
	{% endblock %}
{% endblock %}

{% block content %}
	{{ content }}
{% endblock %}