+<script type="application/javascript">
+$(document).ready(function() {
+ $('#add-button').show();
+ $('#filegroupnew').hide();
+ $('#add-button a').bind('click', function() {
+ $('#add-button').before("{% filter escape('js') %}
+ {% include 'edit-file.htm' with {'file': '', 'fileid': '###'} %}
+ {% endfilter %}"
+ .replace(/###/g, $('.filegroup').length)
+ );
+ return false;
+ });
+});
+</script>