function updateVideo(show,vidId) {
	<!-- show: If set to 1, Kaleidoscope chapters will be viewable.  If set to 0 they will not. //-->
	document.getElementById('movieDiv').innerHTML = "<object width='340' height='300'><param name='movie' value='http://www.youtube.com/v/" + vidId + "&h1=en&fs=1&color1=0x5d1719&color2=0xcd311b'></param><param name='wmode' value='opaque'></param><embed src='http://www.youtube.com/v/" + vidId + "' type='application/x-shockwave-flash' wmode='opaque' width='340' height='300'></embed></object>";

	if(show == "1") {
		$("#vetparkopenvid").css('display','none');
		$("#chapters").css('display','block');
	}
	else if(show == "2") {
		$("#chapters").css('display','none');
		$("#vetparkopenvid").css('display','block');
	}
	else {
		$("#chapters").css('display','none');
		$("#vetparkopenvid").css('display','none');
	}	 
	 document.title="The City of Fayetteville, NC - Official Website"; 
}


function tdHover() {
	$('.chapterTd').hover(function() {
									 $(this).css({'background-color':'#F7F7F7','border':'1px solid #666'});
									 }, function() {
									$(this).css({'background-color':'#FFF','border':'1px solid #FFF'});
									 });
					}

function previous() {
		$('.prev').click(function() {
								position = position-500;
								x=x-1;
								$('#chaptersSub').animate({ 
										        right: position}, 1500 );

							});
						}
						
function next() {
		$('.next').click(function() {
								position = position+500;
								x=x+1;
								$('#chaptersSub').animate({ 
										        right: position}, 1500 );

								});
						}						
							  
							  
$(document).ready(function () {	 
						
  tdHover(); 
  previous();
  next();
  i=$('div.videoMonth').length;
  x=i;
  position = $('#chaptersSub').scrollLeft();
  start = curntvideo; <!-- When linking to a direct video, adjust the value of this variable in the URL.  ie: start=[videoId] for the City Song video.
  
document.getElementById('movieDiv').innerHTML = "<object width='340' height='300'><param name='movie' value='http://www.youtube.com/v/" + start + "&h1=en&fs=1&color1=0x5d1719&color2=0xcd311b'></param><param name='wmode' value='opaque'></param><embed src='http://www.youtube.com/v/" + start + "' type='application/x-shockwave-flash' wmode='opaque' width='340' height='300'></embed></object>";

  });
