<%-- Page footer --%>
				<ja:if test="${pageType}" value="page"></article></ja:if>
				<ja:if test="<%= facebookCommenting != void && facebookCommenting && !splashVertical %>"><div class="fb-comments" id="fb-comments" data-num-posts="${facebookCommentingPosts}" data-width="${galleryWidth}" data-colorscheme="${likeBtnTheme}"></div></ja:if>
				<%-- Index page footer --%>
				<% getFooterLinks(); %>
				<ja:if test="<%= pageFooter != void && !isEmpty(pageFooter) ||
					promotion != void && !isEmpty(promotion) ||
					footerLinks != void && !isEmpty(footerLinks) %>">
				<footer><div class="wrap">
					<ja:if exists="pageFooter"><div class="custom-footer">${pageFooter}</div></ja:if>
					<ja:if exists="promotion"><div class="promotion">${promotion}</div></ja:if>
					<ja:if exists="footerLinks"><div class="footer-links">${footerLinks}</div></ja:if>
				</div></footer>
				</ja:if>
			</div>
		</div>
		<ja:if test="<%= facebookCommenting != void && facebookCommenting && splashVertical %>"><div class="comments"><div class="fb-comments" id="fb-comments" data-num-posts="${facebookCommentingPosts}" data-width="${folderImageWidth}" data-colorscheme="${likeBtnTheme}"></div></div></ja:if>
		<ja:if exists="pageHeader"><div class="header hidden">${pageHeader}</div></ja:if>
	</div></div>
	<div class="hook"><span class="hook-b">&nbsp;</span><span class="hook-c">&nbsp;</span></div>

	<%-- Background audio --%>
	<ja:if exists="backgroundAudio">
	<div id="bgaudio"<%= data("file", stripQuot(backgroundAudio)) + data("folder", useAlbumAudioAsBackground? "" : resPath) %>></div>
	</ja:if>
	
	<%-- Extra JavaScript libraries --%>
	<ja:if test="${locationCount}" not value="0"><script src="http://maps.google.com/maps/api/js?sensor=false"></script></ja:if>
	<ja:if test="${googlePlus}"><script src="http://apis.google.com/js/plusone.js">{ <ja:if test="${lang}" not value="en">"lang": "${lang}", </ja:if>"parsetags": "explicit" }</script></ja:if>
	<ja:if test="${tumblrButton}"><script src="http://platform.tumblr.com/v1/share.js"></script></ja:if>
	
	<%-- jQuery library :: Google CDN first --%>
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery${min}.js"></script>
	<script>window.jQuery || document.write('<script src="${resPath}/jquery-1.7.2.min.js"><\/script>')</script>
	
	<%-- Page initialization scripts --%>
	<ja:include page="script-starter.inc" />
	
	<%-- Facebook commenting --%>
	<ja:if test="${facebookCommenting}">
	<div id="fb-root"></div>
	<script>(function(d, s, id) {
		if (location.protocol.substr(0,4)==='file') return;
		var u = window.location.href;
		if (u.indexOf('?fb_comment_id=')===-1) {
			u = u.split('#')[0];
			if (u[u.length-1]==='/') u += '${pageName}';
		} else
			u = u.split('?')[0];
		d.getElementById('fb-comments').setAttribute('data-href', u); 
		var js, fjs = d.getElementsByTagName(s)[0];
		if (d.getElementById(id)) return;
		js = d.createElement(s); js.id = id; js.src = '//connect.facebook.net/${locale}/all.js#xfbml=1&appId=${facebookAppId}';
		fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));
	</script>
	</ja:if>
	
	<%-- Fotomoto script --%>
	<ja:if test="${useFotomoto}"><ja:if exists="fotomotoID"><script src="http://widget.fotomoto.com/stores/script/${fotomotoID}.js?api=true${fotomotoAid}"></script></ja:if></ja:if>
	
	<%-- Widget inclusion relocated above the Google Analytics script --%>
	<ja:widget pageType="index" />

	<%-- User defined BODY code --%>
	<ja:if exists="bodyHook">${bodyHook}</ja:if>
	
<%
	// Closing the actual page
	closePage();
%>
</body>
</html>
