// JavaScript Document

// Show and hide video / gallery

// 1. hide slideshow on load, show all controls
function  hideSlideshowAndControls() {
	if (!document.getElementById) return;
	if (!document.getElementById("slideshow")) return;
	if (!document.getElementById("controls")) return;
	if (!document.getElementById("video-show")) return;

	var el = document.getElementById("slideshow");
		el.style.display = "none";
	var el = document.getElementById("controls");
		el.style.display = "block";
	// add a class of active to video-show on load
	document.getElementById('video-show').className='active';
}


// show slideshow
function showSlideshow(){
if (!document.getElementById("slideshow-show")) return;
var slideshowShow = document.getElementById("slideshow-show");
slideshowShow.onclick = function() {
	document.getElementById("slideshow").style.display = "block";
	document.getElementById("video").style.display = "none";
	document.getElementById('slideshow-show').className='active';
	document.getElementById('video-show').className='';
	}
}

// show Video
function showVideo(){
if (!document.getElementById("video-show")) return;


var videoShow = document.getElementById("video-show");
videoShow.onclick = function() {
	document.getElementById("video").style.display = "block";
	document.getElementById("slideshow").style.display = "none";
	document.getElementById('video-show').className='active';
document.getElementById('slideshow-show').className='';
	}
}



// Hide article on load
function hideFullArticle(){
	var el = document.getElementById("full-article");
		el.style.display = "none";
}


// show controls then allow those controls to show article
function showFullArticle(){
		var expand = document.getElementById("expand");
		expand.style.display = "block";
	
		var shower =  document.getElementById("full-article-show");
		shower.onclick = function(){
		document.getElementById("full-article").style.display = "block";
	expand.style.display = "none";

}

}


window.onload = function() {
		hideFullArticle();
		showFullArticle();
		hideSlideshowAndControls();
		showSlideshow();
		showVideo();
	
	
}




