$(document).ready(function() {
	var scrollToTopBtn = document.getElementById("btn-back-to-top");
	
	if(scrollToTopBtn) {
		scrollToTopBtn.addEventListener("click", function(event) {
			sendClickCommand("backToTop");
		})
	}
	
	function sendClickCommand(command) {
		var iframe = document.getElementById("framecontent");
		if(iframe && iframe.contentWindow) {
			iframe.contentWindow.postMessage(command, "*")
		}
	}
});