{% load staticfiles %}
<html>
<head>
<title>Test</title>
<script type="text/javascript" src="{% static 'remie/js/jquery.min.js' %}"></script>
<script type="text/javascript">
    $(document).ready(function(){
        var segments_single_url = "{% url 'remie_segments_single' %}",
          	segments_group_url = "{% url 'remie_segments_group' %}",
        	markers_url = "{% url 'remie_markers' %}",
        	markers_teacher_url = "{% url 'remie_markers_teacher' %}",
            teacher_url = "{% url 'remie_teacher' %}",
            segments_preview_url = "{% url 'remie_segments_preview' %}",
            markers_preview_url = "{% url 'remie_markers_preview' %}",
            scenario_url = "",
            final_url = "",
            hash = document.location.hash;
        scenario_queryarg = "{{scenario}}";
        switch(scenario_queryarg){
            case "segments_single":
        	      scenario_url = segments_single_url;
        	      break;
            case "segments_group":
                  scenario_url = segments_group_url;
        	      break;
            case "teacher":
          	      scenario_url = teacher_url;
        	      break;
            case "markers":
          	      scenario_url = markers_url;
        	      break;
            case "segments_preview":
          	      scenario_url = segments_preview_url;
        	      break;
            case "markers_preview":
    			  scenario_url = markers_preview_url;    	    
        	      break;
        }
        final_url = scenario_url+"?project_id={{project_id}}"+hash;
        $("#remie_workunit_iframe").attr("src", final_url);
    });
</script>
</head>
<body>
<div>
<h3>Passing hash to iframe</h3>
</div>
<iframe id="remie_workunit_iframe" width="{{iframe_width}}" height="{{iframe_height}}" src=""></iframe>

</body>
</html>