	<%	
		////
		//// Setup variables for slide (casual slide ones)
		////
	%>


	<%   /*Navigation*/   %>
	<ja:if test="<%= (imageNum == totalImages) %>">
		var nextPageUrl = "<%= fileVariables.get( files[0] ).get("label") + "-orig" + engine.getPageExtension(); %>";
		var hasRealNextPage = false;
	</ja:if>
	<ja:else>
		var nextPageUrl = "<%= next.get("label") + "-orig" + engine.getPageExtension(); %>";
		var hasRealNextPage = true;
	</ja:else>

	<ja:if test="<%= (imageNum == 1) %>">
		var prevPageUrl = "<%= fileVariables.get( files[files.length-1] ).get("label") + "-orig" + engine.getPageExtension(); %>";
		var hasRealPrevPage = false;
	</ja:if>
	<ja:else>
		var prevPageUrl = "<%= previous.get("label") + "-orig" + engine.getPageExtension(); %>";
		var hasRealPrevPage = true;
	</ja:else>

	var firstPageUrl = "<%= fileVariables.get( files[0] ).get("label") + "-orig" + engine.getPageExtension(); %>";
	var lastPageUrl = "<%= fileVariables.get( files[files.length-1] ).get("label") + "-orig" + engine.getPageExtension(); %>";
	var upPageUrl = "$currentPage";


	function doSlidesPreloading()
	{
		<ja:if exists="next">
			nextimagepreload = new Image();
			nextimagepreload.src = "<%= next.get("originalPath") %>";
		</ja:if>
		<ja:if exists="previous">
			previmagepreload = new Image();
			previmagepreload.src = "<%= previous.get("originalPath") %>";
		</ja:if>
	}
