var presentation = ["West Indies<\/word>","Hamilton's father left him<\/word>","fever<\/word>","Alexander Hamilton<\/word>","Caribbean<\/word>","Alexander Hamilton<\/strong> was born in the West Indies<\/strong> region of the Caribbean<\/strong>. According to the musical, Hamilton's father left him<\/strong> and his mother, who died from a fever<\/strong> when he was 12.<\/phrase>","book passage on a New York-bound ship<\/word>","New York<\/word>","Aaron Burr<\/word>","Aaron Burr, Sir<\/word>","The Story of Tonight<\/word>","George Washington's secretary<\/word>","hurricane<\/word>","his town<\/word>","time<\/word>","need<\/word>","brilliant intelligence<\/word>","Alexander Hamilton<\/word>","American revolution<\/word>","revolutionary friends<\/word>","his oratory<\/word>","My Shot<\/word>","revolution<\/word>","Right Hand Man<\/word>","When he became older, a hurricane<\/strong> destroyed his town<\/strong>. In others' time<\/strong> of need<\/strong>, and due to his exceedingly brilliant intelligence<\/strong>, the citizens of the town collected funds so that Hamilton could book passage on a New York-bound ship<\/strong> (\"Alexander Hamilton<\/strong>\"). When Hamilton arrived in New York<\/strong> he became interested in the up-and-coming American revolution<\/strong>. There he first meets Aaron Burr<\/strong> in New York<\/strong> City (\"Aaron Burr, Sir<\/strong>\") and is then introduced to the rest of Burr's revolutionary friends<\/strong> and impresses them with his oratory<\/strong> skills (\"My Shot<\/strong>\"). He has long dreamed of laying down his life for a cause such as the revolution<\/strong> (\"The Story of Tonight<\/strong>\") and studied furiously before joining the revolution<\/strong>, and becoming George Washington's secretary<\/strong> during the war. (\"Right Hand Man<\/strong>\").<\/phrase>","winter ball<\/word>","A Winter's Ball<\/word>","letters<\/word>","Angelica<\/word>","Eliza<\/word>","Elizabeth Schuyler<\/word>","talk<\/word>","marry<\/word>","Helpless<\/word>","satisfied<\/word>","Hamilton then attends a winter ball<\/strong> (\"A Winter's Ball<\/strong>\"), where he meets Elizabeth Schuyler<\/strong>. They talk<\/strong> to each other through letters<\/strong> for two weeks and eventually marry<\/strong> (\"Helpless<\/strong>\"). Her sister also had feelings for him, but Angelica<\/strong> allows Eliza<\/strong> to marry<\/strong> Hamilton, knowing that she would never be satisfied<\/strong> if she were his wife. (\"satisfied<\/strong>\").<\/phrase>","Washington<\/word>","disobeying direct orders<\/word>","duel<\/word>","summoned back<\/word>","Guns And Ships<\/word>","Yorktown (The World Turned Upside Down)<\/word>","General Charles Lee<\/word>","Meet Me Inside<\/word>","Battle of Yorktown<\/word>","General George Washington<\/strong> sends Hamilton home during the war for disobeying direct orders<\/strong> and engaging in a duel<\/strong> with General Charles Lee<\/strong> (\"Meet Me Inside<\/strong>\"). However, soon after he was summoned back<\/strong>, (\"Guns And Ships<\/strong>\") to finish the war at the Battle of Yorktown<\/strong>. (\"Yorktown (The World Turned Upside Down)<\/strong>\").<\/phrase>","Eliza<\/word>","Philip Hamilton<\/word>","Dear Theodosia<\/word>","After the war, Eliza<\/strong> gives birth to a baby boy, Philip Hamilton<\/strong>, whose innocent brilliance leaves him astounded (\"Dear Theodosia<\/strong>\").<\/phrase>","New York<\/word>","law career<\/word>","delegate<\/word>","Madison<\/word>","The Federalist Papers<\/word>","Aaron Burr<\/word>","Washington<\/word>","Eliza<\/word>","Constitutional Convention<\/word>","John Jay<\/word>","Secretary of Treasury<\/word>","Non-Stop<\/word>","Hamilton returns to New York<\/strong> to finish his studies and pursue a law career<\/strong>. Hamilton is then chosen as a delegate<\/strong> to the Constitutional Convention<\/strong> in the summer of 1787. Hamilton enlists James Madison<\/strong> and John Jay<\/strong> to write The Federalist Papers<\/strong> after Aaron Burr<\/strong> refuses. The newly elected President Washington<\/strong> enlists Hamilton for the job of Secretary of Treasury<\/strong>, despite Eliza<\/strong>'s pleas. (\"Non-Stop<\/strong>\").<\/phrase>","Jefferson<\/word>","financial plan<\/word>","Cabinet meeting<\/word>","Washington<\/word>","compromise<\/word>","Congress<\/word>","Cabinet Battle #1<\/word>","France<\/word>","After Thomas Jefferson<\/strong> returns from France<\/strong> in 1789, Jefferson<\/strong> and Hamilton debate over the merits of Hamilton's financial plan<\/strong> during a Cabinet meeting<\/strong>. Washington<\/strong> pulls Hamilton aside and tells him to figure out a compromise<\/strong> to win over Congress<\/strong>. (\"Cabinet Battle #1<\/strong>\").<\/phrase>","Angelica<\/word>","England<\/word>","sway Jefferson<\/word>","Congress<\/word>","New York<\/word>","Take A Break<\/word>","back<\/word>","work<\/word>","Hamilton's son turns nine, and he corresponds with Angelica<\/strong> in England<\/strong>, where she advises him to sway Jefferson<\/strong> so that Congress<\/strong> accepts his plan. Angelica<\/strong> travels back<\/strong> to New York<\/strong> to go upstate with his family but he refuses insisting he has to work<\/strong>. (\"Take A Break<\/strong>\").<\/phrase>","seduces<\/word>","mistreats her<\/word>","affair<\/word>","blackmails<\/word>","Eliza<\/word>","Say No To This<\/word>","Maria Reynolds<\/word>","James Reynolds<\/word>","return<\/word>","While alone, Maria Reynolds<\/strong> visits Hamilton, who seduces<\/strong> him by claiming that her husband mistreats her<\/strong>. They continue to have an affair<\/strong> for a month until Maria's husband James Reynolds<\/strong> blackmails<\/strong> Hamilton into paying him money. In return<\/strong>, Reynolds will not tell Eliza<\/strong> about the affair<\/strong>. Hamilton agrees to pay Reynolds and continues the affair<\/strong>. (\"Say No To This<\/strong>\").<\/phrase>","Jefferson<\/word>","Madison<\/word>","Compromise of 1790<\/word>","financial plan<\/word>","United States capital<\/word>","New York<\/word>","Washington, D.C.<\/word>","The Room Where It Happens<\/word>","support<\/word>","Virginia<\/word>","Hamilton discusses his plan with Jefferson<\/strong> and Madison<\/strong> over a private dinner, which results in the Compromise of 1790<\/strong>, giving support<\/strong> to Hamilton's financial plan<\/strong> in exchange for moving the United States capital<\/strong> from New York<\/strong> to Washington, D.C.<\/strong>, a site much closer to Jefferson<\/strong>'s home in Virginia<\/strong> (\"The Room Where It Happens<\/strong>\").<\/phrase>","Cabinet meeting<\/word>","Jefferson<\/word>","Washington<\/word>","neutrality<\/word>","Cabinet Battle #2<\/word>","argue<\/word>","United States<\/word>","France<\/word>","revolution<\/word>","In another Cabinet meeting<\/strong>, Jefferson<\/strong> and Hamilton argue<\/strong> over whether the United States<\/strong> should assist France<\/strong> in their revolution<\/strong>. Washington<\/strong> ultimately agrees with Hamilton's argument of neutrality<\/strong> (\"Cabinet Battle #2<\/strong>\").<\/phrase>","Washington<\/word>","farewell address<\/word>","One Last Time<\/word>","As Washington<\/strong> steps down from his presidential position, Hamilton drafts his farewell address<\/strong>. (\"One Last Time<\/strong>\").<\/phrase>","orphan<\/word>","weight<\/word>","Jefferson<\/word>","Madison<\/word>","perfect time to destroy him<\/word>","The Adams Administration<\/word>","John Adams<\/word>","Now having no political office since the election of John Adams<\/strong>, Hamilton is outraged by Adams's \"unprepared\" nature according to Hamilton. They get in a fight with Adams bashing Hamilton for being an orphan<\/strong>; Hamilton's response being very harsh to Adams's weight<\/strong>. Hamilton's reputation takes a blow from this, and his political enemies, Burr, Jefferson<\/strong>, and Madison<\/strong>, think that it is the perfect time to destroy him<\/strong> (\"The Adams Administration<\/strong>\").<\/phrase>","Jefferson<\/word>","Madison<\/word>","embezzling government money<\/word>","treason<\/word>","transactions from his affair<\/word>","affair<\/word>","begs them not to tell anyone<\/word>","We Know<\/word>","The Reynolds Pamphlet<\/word>","come clean about the affair<\/word>","save his political legacy<\/word>","Maria Reynolds<\/word>","hurricane<\/word>","Thinking they have discovered a scandal capable of destroying Hamilton, Jefferson<\/strong>, Madison<\/strong> and Burr accuse him of embezzling government money<\/strong> and committing treason<\/strong>. In reality, however, they found the transactions from his affair<\/strong> with Maria Reynolds<\/strong>. Hamilton, knowing that the truth is the only way out, tells them about his affair<\/strong> and begs them not to tell anyone<\/strong> (\"We Know<\/strong>\"). Still worried that they would, Hamilton thinks about how writing openly and honestly has saved him in the past (\"hurricane<\/strong>\"), and publicly writes \"The Reynolds Pamphlet<\/strong>\" to come clean about the affair<\/strong>, hoping to save his political legacy<\/strong> (\"The Reynolds Pamphlet<\/strong>\").<\/phrase>","duel<\/word>","dies from infection<\/word>","Eliza<\/word>","depressed<\/word>","move uptown<\/word>","It's Quiet Uptown<\/word>","Philip Hamilton<\/word>","George Eacker<\/word>","Blow Us All Away<\/word>","After his eldest child, Philip Hamilton<\/strong>, challenges George Eacker<\/strong> to a duel<\/strong>, he is mortally wounded and dies from infection<\/strong> (\"Blow Us All Away<\/strong>\"). Hamilton and Eliza<\/strong> become increasingly depressed<\/strong> after their loss and they move uptown<\/strong> (\"It's Quiet Uptown<\/strong>\").<\/phrase>","the Election of 1800<\/word>","promote for president<\/word>","Jefferson<\/word>","Burr has no beliefs<\/word>","Alexander Hamilton<\/word>","Shockingly<\/word>","As the Election of 1800<\/strong> approaches, Alexander Hamilton<\/strong> is frequently asked about who he will promote for president<\/strong>. Shockingly<\/strong>, Hamilton selects Jefferson<\/strong>, claiming that Burr has no beliefs<\/strong> and stands for himself. (\"the Election of 1800<\/strong>\").<\/phrase>","Jefferson<\/word>","duel<\/word>","Weehawken, New Jersey<\/word>","Your Obedient Servant<\/word>","aims his pistol at the sky<\/word>","dying soon after<\/word>","villain in history<\/word>","The World Was Wide Enough<\/word>","Alexander Hamilton<\/word>","Burr, angry at Hamilton's endorsement for Jefferson<\/strong>, challenges Hamilton to a duel<\/strong> in Weehawken, New Jersey<\/strong> (\"Your Obedient Servant<\/strong>\"). As a gunshot sounds, Hamilton soliloquizes on death, his relationships, and his legacy. He aims his pistol at the sky<\/strong> and is struck by Burr's shot, dying soon after<\/strong>. Burr laments that even though he survived, he's cursed to be the villain in history<\/strong>, remembered only as the man who killed Alexander Hamilton<\/strong> (\"The World Was Wide Enough<\/strong>\").<\/phrase>","Angelica<\/word>","Eliza<\/word>","Hamilton's memory<\/word>","Who Lives Who Dies Who Tells Your Story<\/word>","Trinity Church<\/word>","Hamilton's grave lies in Trinity Church<\/strong>, right near Angelica<\/strong>'s after she passed away. And Eliza<\/strong> expresses what she accomplished in Hamilton's memory<\/strong> after he died.(\"Who Lives Who Dies Who Tells Your Story<\/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':1645, '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':1645, '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':1645, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }