var presentation = ["Angelica Schuyler<\/word>","first appearance<\/word>","Alexander Hamilton<\/word>","Eliza Schuyler<\/word>","Maria Reynolds\/Peggy Schuyler<\/word>","Angelica Schuyler<\/strong> makes her first appearance<\/strong> in \"Alexander Hamilton<\/strong>\" where she, her sister Eliza Schuyler<\/strong> and Maria Reynolds\/Peggy Schuyler<\/strong> state that they loved Alexander Hamilton<\/strong>.<\/phrase>","The Schuyler Sisters<\/word>","sing about the revolution<\/word>","hosted by her father<\/word>","A Winter's Ball<\/word>","immediate feelings<\/word>","conversation<\/word>","attracted to him<\/word>","hides her own feelings<\/word>","first singing role<\/word>","New York<\/word>","attend<\/word>","ball<\/word>","Philip Schuyler<\/word>","revolutionary allies<\/word>","Alexander Hamilton<\/word>","Helpless<\/word>","Satisfied<\/word>","Angelica's first singing role<\/strong> is in the \"The Schuyler Sisters<\/strong>\", where her sisters Eliza, Peggy and she sing about the revolution<\/strong> happening in New York<\/strong>. Later, she and her sisters attend<\/strong> a ball<\/strong> hosted by her father<\/strong>, Philip Schuyler<\/strong> (\"A Winter's Ball<\/strong>\"), in which she meets multiple revolutionary allies<\/strong>, including Alexander Hamilton<\/strong>. Eliza emerges with immediate feelings<\/strong> for Alexander once she sees him, but does not approach him; Angelica strikes a conversation<\/strong> with him in turn and is attracted to him<\/strong> both by looks and demeanor. Angelica then realizes her sister's extent of feelings for Hamilton (\"Helpless<\/strong>\") and hides her own feelings<\/strong> for the sake of her sister's happiness (\"Satisfied<\/strong>\"). As being a loyal and loving sister, Angelica attends and toasts Eliza's wedding to Alexander Hamilton<\/strong>, singing of how she will never be Satisfied<\/strong> but is happy for her sister.<\/phrase>","convince Jefferson<\/word>","financial plan<\/word>","plan to action<\/word>","travel upstate<\/word>","Take A Break<\/word>","she and Eliza try to convince Alexander to accompany them on vacation<\/word>","sisters travel upstate without him<\/word>","Congress<\/word>","accept<\/word>","arrive<\/word>","New York<\/word>","Albany<\/word>","While Hamilton works at home, Angelica tells Hamilton to convince Jefferson<\/strong> that his new financial plan<\/strong> will work, so that the Congress<\/strong> will accept<\/strong> it and put the plan to action<\/strong>. She also informs him that she will arrive<\/strong> at New York<\/strong> to travel upstate<\/strong> to her father's home in Albany<\/strong> (\"Take A Break<\/strong>\"). During this time, she and Eliza try to convince Alexander to accompany them on vacation<\/strong> to Albany<\/strong>. Alexander refuses, saying that he has to keep improving his plan for Congress<\/strong>, and the sisters travel upstate without him<\/strong>.<\/phrase>","affair with Maria Reynolds<\/word>","Say No To This<\/word>","support him<\/word>","openly writes about his affair to save himself<\/word>","The Reynolds Pamphlet<\/word>","heartbroken<\/word>","help redeem him<\/word>","stands by her sister's side<\/word>","Cut from the musical<\/word>","Eliza is the best thing in both of their lives<\/word>","Alexander Hamilton<\/word>","James Reynolds<\/word>","Aaron Burr<\/word>","Thomas Jefferson<\/word>","James Madison<\/word>","George Washington<\/word>","Washington On Your Side<\/word>","New York<\/word>","Congratulations<\/word>","Burn<\/word>","During his time alone, Alexander Hamilton<\/strong> has an affair with Maria Reynolds<\/strong> (\"Say No To This<\/strong>\"), and to keep the affair secret is forced to pay her husband, James Reynolds<\/strong>, an amount of money. Meanwhile, Aaron Burr<\/strong>, Thomas Jefferson<\/strong>, and James Madison<\/strong> recollect on how lucky he is that George Washington<\/strong> always happens to support him<\/strong> (\"Washington On Your Side<\/strong>\"). Alexander is afraid they will demise of his reputation and openly writes about his affair to save himself<\/strong> (\"The Reynolds Pamphlet<\/strong>\"), which shames and upsets Eliza, and leaves her heartbroken<\/strong>. Once Angelica hears about Hamilton's affair, she returns to New York<\/strong>. Hamilton is relieved, thinking that she has come to help redeem him<\/strong>, but Angelica replies that she did not come for him and stands by her sister's side<\/strong>. In the song Congratulations<\/strong> (Cut from the musical<\/strong>, set in between The Reynolds Pamphlet<\/strong>, and Burn<\/strong>) Angelica yells at Alexander stating how idiotic his actions were, and that \"Jefferson can do what he wants because he doesn't dignify school-yard taunts with a response.\" As Alexander tries to defend his action, Angelica gets overwhelmed with emotion and speaks of her loveless marriage, and how she lived to read his letters. Angelica leaves him after telling him Eliza is the best thing in both of their lives<\/strong>.<\/phrase>","duel against Aaron Burr<\/word>","supports her sister for the rest of her years<\/word>","Who Lives, Who Dies, Who Tells Your Story<\/word>","buried in Trinity Church<\/word>","near Alexander<\/word>","After Hamilton's death in a duel against Aaron Burr<\/strong>, Angelica returns with her sister. She supports her sister for the rest of her years<\/strong>, and Eliza sings about her reliance on her older sister until Angelica's death in 1814 (\"Who Lives, Who Dies, Who Tells Your Story<\/strong>\"), after which she is buried in Trinity Church<\/strong> near Alexander<\/strong>.<\/phrase>"]; var currentPosition = 0; var totalPositions = 0; var timePerWord = 1500; var timePerPhraseWord = 120 var readAheadPlayerTimer; var autoPlay = true; var setMinimized = false; var wordSpeedOptions = {'Slower':2000,'Moderate':1200,'Fast':800}; var phraseSpeedOptions = {'Slower':280,'Moderate':200,'Fast':80}; var defaultWordSpeedOption = 'Moderate'; var defaultPhraseSpeedOption = 'Moderate'; var logToLTI = false; $(window).load(function(){ totalPositions = presentation.length; if (totalPositions > 0){ $('body').prepend('
'); $('body').prepend('
'); $('#read_ahead_player').prepend('
'); initializeReadAheadControls(); initializeReadAheadSlider(); initializeReadAheadSpeedOptions(); currentReadAheadControls(); resumeReadAheadPlayback(); } }); $(document).keyup(function(e){ switch(e.which) { case 37: pauseReadAheadPresentation(); priorReadAheadPresentationItem(); break; case 39: pauseReadAheadPresentation(); nextReadAheadPresentationItem(); break; default: break; } }); function initializeReadAheadControls(){ var s = ''; s += ''; s += ''; s += ''; s += '
'; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += ''; s += '
'; $('#read_ahead_player').append(s); } function initializeReadAheadSlider(){ var s = ''; s += '
'; s += '
'; s += '
'; $('#read_ahead_controls').prepend(s); updateReadAheadSliderPosition(); } function initializeReadAheadSpeedOptions(){ var s = '
'; s += '
'; s += ' Word Speed
'; s += '
'; optionCount = 0; for (index in wordSpeedOptions) { optionCount++; } optionWidth = 100 / optionCount; for (index in wordSpeedOptions) { var option = wordSpeedOptions[index]; if (index == defaultWordSpeedOption) { s += ''; updateReadAheadWordSpeed(option); } else { s += ''; } } s += '
'; s += '
'; s += '
'; s += ' Phrase Speed
'; s += '
'; optionCount = 0; for (index in phraseSpeedOptions) { optionCount++; } optionWidth = 100 / optionCount; for (index in phraseSpeedOptions) { var option = phraseSpeedOptions[index]; if (index == defaultWordSpeedOption) { s += ''; updateReadAheadPhraseSpeed(option); } else { s += ''; } } s += '
'; s += '
'; s += '
'; $('#read_ahead_controls').append(s); } function updateReadAheadWordSpeed(microseconds,sender) { microseconds = microseconds != undefined && microseconds > 0 ? microseconds : 0; if (microseconds > 0) { timePerWord = microseconds; } if (sender!=undefined) { $('#slider_control_word_speed').find('a').removeClass('current_speed'); $(sender).addClass('current_speed'); } logReadAheadPlayerAction('updateReadAheadWordSpeed','Presentation',microseconds); } function updateReadAheadPhraseSpeed(microseconds,sender) { microseconds = microseconds != undefined && microseconds > 0 ? microseconds : 0; if (microseconds > 0 ) { timePerPhraseWord = microseconds; } if (sender!=undefined) { $('#slider_control_phrase_speed').find('a').removeClass('current_speed'); $(sender).addClass('current_speed'); } logReadAheadPlayerAction('updateReadAheadPhraseSpeed','Presentation',microseconds); } function updateReadAheadSliderPosition(){ var currentSliderBarWidth = 100 - (100 / totalPositions * (currentPosition + 1)); $('#readAheadSliderBar').css('width',currentSliderBarWidth+'%'); } function currentReadAheadControls(){ $('#read_ahead_player_pause_play').show(); if (currentPosition < totalPositions - 1) { $('#read_ahead_player_next_word').removeClass('disabled'); } else { $('#read_ahead_player_next_word').addClass('disabled'); } if (currentPosition > 0) { $('#read_ahead_player_previous_word').removeClass('disabled'); } else { $('#read_ahead_player_previous_word').addClass('disabled'); } } function restartReadAheadPresentation(){ currentPosition = 0; logReadAheadPlayerAction('restartReadAheadPresentation','Presentation',''); resumeReadAheadPlayback(); } function resumeReadAheadPlayback(){ $('.fa-repeat').removeClass('fa-repeat').addClass('fa-play'); $('#read_ahead_player_pause_play').each(function(){ $(this).find('.fa-play').removeClass('fa-play').addClass('fa-pause'); $(this).off('click'); $(this).attr('onclick','pauseReadAheadPresentation()'); }); logReadAheadPlayerAction('resumeReadAheadPlayback','Presentation',''); playReadAheadPresentation(); } function pauseReadAheadPresentation(){ $('#read_ahead_player_pause_play').each(function(){ $(this).find('.fa-pause').removeClass('fa-pause').addClass('fa-play'); $(this).off('click'); $(this).attr('onclick','resumeReadAheadPlayback()'); }); logReadAheadPlayerAction('pauseReadAheadPresentation','Presentation',''); read_ahead_pause(); } function endReadAheadPresentation(){ $('.fa-play').removeClass('fa-play').addClass('fa-repeat'); $('.fa-pause').removeClass('fa-pause').addClass('fa-repeat'); $('#read_ahead_player_pause_play').each(function(){ $(this).off('click'); $(this).attr('onclick','restartReadAheadPresentation()'); }); logReadAheadPlayerAction('endReadAheadPresentation','Presentation',''); logLTIEndPresentation(); } function playReadAheadPresentation(){ autoPlay=true; currentPosition--; logReadAheadPlayerAction('playReadAheadPresentation','Presentation',''); nextReadAheadPresentationItem(); } function startReadAheadStepper(timeDisplayWord){ clearInterval(readAheadPlayerTimer); readAheadPlayerTimer = setTimeout(function() { read_ahead_step(); },timeDisplayWord); } function stopReadAheadStepper(){ clearInterval(readAheadPlayerTimer); } function read_ahead_step(){ if (autoPlay) { nextReadAheadPresentationItem(); } } function read_ahead_pause(){ autoPlay=false; stopReadAheadStepper(); } function showReadAheadPresentationItem(index){ currentPosition = index; currentPresentationItem = presentation[currentPosition] != undefined ? presentation[currentPosition].trim() : ""; if (currentPresentationItem != "") { currentItemWordCount = presentation[currentPosition].replace("\n","").split(" ").length; if (currentPresentationItem.startsWith("")){ startReadAheadStepper(currentItemWordCount*timePerWord); $('#read_ahead_player_field').html('
'+currentPresentationItem+'
'); logReadAheadPlayerAction('showReadAheadPresentationItem','Word',currentPresentationItem); } else { startReadAheadStepper(currentItemWordCount*timePerPhraseWord); $('#read_ahead_player_field').html('
'+currentPresentationItem.replace("\n","
")+'
'); logReadAheadPlayerAction('showReadAheadPresentationItem','Phrase',''); } } else { if (currentPosition < totalPositions) { nextReadAheadPresentationItem(); } else { endReadAheadPresentation(); read_ahead_minimize(); } } currentReadAheadControls(); updateReadAheadSliderPosition(); saveReadAheadPosition(); } function priorReadAheadPresentationItem(){ stopReadAheadStepper(); logReadAheadPlayerAction('priorReadAheadPresentationItem','Controls',''); showReadAheadPresentationItem(currentPosition-1); } function nextReadAheadPresentationItem(){ stopReadAheadStepper(); logReadAheadPlayerAction('nextReadAheadPresentationItem','Controls',''); showReadAheadPresentationItem(currentPosition+1); } function read_ahead_playAgain(){ currentWordIndex = 0; logReadAheadPlayerAction('read_ahead_playAgain','Controls',''); playReadAheadPresentation(); } function read_ahead_minimize(){ setMinimized = true; logReadAheadPlayerAction('read_ahead_minimize','Controls',''); read_ahead_switch_min_max(); } function read_ahead_maximize(){ setMinimized = false; logReadAheadPlayerAction('read_ahead_maximize','Controls',''); read_ahead_switch_min_max(); } function read_ahead_switch_min_max(forceSwitch){ forceSwitch = forceSwitch != undefined ? forceSwitch : false; if (forceSwitch) { setMinimized = !setMinimized; } if (setMinimized) { $('#read_ahead_player_back').fadeOut(); $('#read_ahead_player').addClass('minimize'); $('.player-icons .fa-stack').removeClass('fa-lg').addClass('fa-sm'); $('.player-icons .fa-minus').removeClass('fa-minus').addClass('fa-expand'); logReadAheadPlayerAction('read_ahead_switch_min_max','Min',''); //$('#read_ahead_player_max_min').each(function(){ // $(this).off('click'); // $(this).attr('onclick','read_ahead_maximize()'); //}); } else { $('#read_ahead_player_back').fadeIn(); $('#read_ahead_player').removeClass('minimize'); $('.player-icons .fa-stack').removeClass('fa-sm').addClass('fa-lg'); $('.player-icons .fa-expand').removeClass('fa-expand').addClass('fa-minus'); logReadAheadPlayerAction('read_ahead_switch_min_max','Max',''); //$('#read_ahead_player_max_min').each(function(){ // $(this).off('click'); // $(this).attr('onclick','read_ahead_minimize()'); //}); } } function saveReadAheadPosition(){ $.ajax({ type:'POST', url:'/ajax/save_user_presentation_position.php', data: { 'id':1648, 'position': currentPosition } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); } function logLTIEndPresentation(action) { if (!logToLTI) { return; } $.ajax({ type:'POST', url:'/lti/presentationEnded.php', data: { 'documentId':1648, 'userId':0, } }) } function logReadAheadPlayerAction(action,area,details){ var d = new Date(); var t = d.getTime(); action = action != undefined ? action.trim() : 'UNKNOWN'; area = area != undefined ? area.trim() : ''; details = details != undefined ? details : ''; // If we are about to show a new word, increase the number of keywords // reinforced so we can log that for the Dashboard page. if (area == 'Word') { window.keywordCount++; } $.ajax({ type:'POST', url:'/logging/logPlayerAction.php', data: { 'documentId':1648, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }