var qg_loc = Cookie.get('qg_cursor');
if(qg_loc == false) {
	qg_cursor = Cookie.set('qg_cursor', 0, {path: '/'});
}
var chapter_info = ['',
	'<h3>Chapter 1: Starting the Conversation<span class="timecode"> [5:02]</span></h3><div class="rule"></div><p class="player_blurb">When should adult children start "the conversation" with their aging parents?  Children and parents must consider a new way of communicating and a reversal of roles.</p>',
	'<h3>Chapter 2: Gender &amp; Money<span class="timecode"> [3:55]</span></h3><div class="rule"></div><p class="player_blurb">Women typically carry the burden of caregiving.  Financial realities and worries are often especially difficult to discuss.</p>',
	'<h3>Chapter 3: Medical Crises &amp; Advocacy  <span class="timecode">[2:47]</span></h3><div class="rule"></div><p class="player_blurb">What is the role of an adult child when a parent gets sick?  How do you advocate in a crisis situation, while allowing a parent his or her voice?</p>',
	'<h3>Chapter 4: Driving &amp; Decision-Making  <span class="timecode">[3:10]</span></h3><div class="rule"></div><p class="player_blurb">The driver\'s license dilemma: how do you allow an aging parent independence while minimizing risks?</p>',
	'<h3>Chapter 5: Making Legal Choices <span class="timecode">[5:10]</span></h3><div class="rule"></div><p class="player_blurb">It is important to establish parents\' legal status and preferences, and also to make your own desires clearly and legally known.</p>',
	'<h3>Chapter 6: The Challenges of Caregiving <span class="timecode">[5:10]</span></h3><div class="rule"></div><p class="player_blurb">Caregivers often put their own health at risk.  They need training, and they need support from their families and communities.</p>',
	'<h3>Chapter 7: Tough Housing Decisions <span class="timecode">[2:27]</span></h3><div class="rule"></div><p class="player_blurb">Changing a parent\'s living arrangement can be the hardest decision an adult child and parent have to make.</p>',
	'<h3>Chapter 8: The Joys of Caregiving <span class="timecode">[6:28]</span></h3><div class="rule"></div><p class="player_blurb">Caregiving can be a positive, transformative experience for children and parents.</p>'];

//qg_loc = Cookie.get('qg_cursor')[0];
qg_loc = Cookie.get('qg_cursor');

function init_chapter_nav() {
	var btns = $('vid_chap_nav').getElementsByTagName('a');
	chapter_info[0] = $('default-video-info').innerHTML;
	var test = '';
	if (btns.length > 0) {
	for (var i = 0; i < btns.length - 1; i++) {
		btns[i].onmouseover = function() {
					var x = this.innerHTML;
					var f = this.className;
/*					var chapter_family = [[],
																[],
																[],
																[],
																[],
																[],
																[],
																[],
																[],
																[]];
				//	for (var j = 0; j < chapter_family.length; j++) {
					var inf = chapter_family[x];
					for (var j = 0; j < inf.length; j++) {
						var links = $('vid_chap_nav').getElementsByTagName('a');
						if (inf[j] != x && !links[inf[j] -1].className.match(/_/)) {
							links[inf[j] -1].className += '_too';
							test += links[inf[j] -1].className + ' ';
					}
				} */
					$('default-video-info').innerHTML = chapter_info[x];
			};
			btns[i].onmouseout = function() {
					var links = $('vid_chap_nav').getElementsByTagName('a');
					for (var j = 0; j < links.length; j++) {
						links[j].className = links[j].className.replace(/(_too)+/g, '');
					}
					$('default-video-info').innerHTML = chapter_info[0];
			};
		}
	}
}

function qgGo() { return false; }

window.onload = function() { init_chapter_nav(); }