$(document).ready(function(){
					   
	$('#vbox').hide();

});

var pvcount = 0;
var PVideo = function(){
	if(pvcount%2 == 0){
		$('#vbox').fadeIn(100);
		$('#playvideo').html("");
		$('#playvideo').append('<img src="http://www.capitolreef.org/images/Stop.png" width="120" height="25" alt="Stop" onclick="PVideo()" style="padding:12px 0 12px 0;" />');
	}else{
//		$('#vbox').html("");
		$('#vbox').hide();
		$('#playvideo').html("");
		$('#playvideo').append('<img src="http://www.capitolreef.org/images/Play.png" width="120" height="25" alt="Play" onclick="PVideo()" style="padding:12px 0 12px 0;" />');
	}
	pvcount++;
}

var vcount = 0;
var Video = function(){
	if(vcount%2 == 0){
		$('#vbox').html("");
		$("#vbox").append('<a href="http://www.capitolreef.org/media/Capitol-Reef-Utah-Country.mov.flv" style="display:block;width:640px;height:360px;" wmode="opaque" id="player"></a>');
		flowplayer("player", "flowplayer-3.2.5.swf");
		$('#vbox').fadeIn(100);
		$('#playvideo').html("");
		$('#playvideo').append('<h2><img src="http://www.capitolreef.org/images/Stop.png" width="120" height="25" alt="Stop" onclick="Video()" /></h2>');
		flowplayer("player", "flowplayer-3.2.5.swf");
	}else{
		$('#vbox').html("");
		$('#vbox').hide();
		$('#playvideo').html("");
		$('#playvideo').append('<h2><img src="http://www.capitolreef.org/images/Play.png" width="120" height="25" alt="Play" onclick="Video()" /></h2>');		
	}
	vcount++;
};

var StopVideo = function(){
	$('#vbox').html("");
	$('#vbox').hide();
	$('#playvideo').html("");
	$('#playvideo').append('<h2><img src="http://www.capitolreef.org/images/Play.png" width="120" height="25" alt="Play" onclick="Video()" /></h2>');
};

// TOGGLE SERVICES DROPDOWN
function toggle_visibility(id) {
   var e = document.getElementById(id);
   if(e.style.display == 'block')
	  e.style.display = 'none';
   else
	  e.style.display = 'block';
}

