var presentation = ["1989<\/word>","mother<\/word>","previous signs of pregnancy.<\/word>","Sir Reginald Hargreeves<\/word>","save the world<\/word>","Number Five<\/word>","forty-three children<\/word>","same day<\/word>","Number Five<\/strong> is one of the forty-three children<\/strong> who were all born on the same day<\/strong> in 1989<\/strong> to a mother<\/strong> without any previous signs of pregnancy.<\/strong> The baby was one of seven adopted by Sir Reginald Hargreeves<\/strong> with the intention of training them to save the world<\/strong>.<\/phrase>","The Umbrella Academy<\/word>","world was due to end in eight days<\/word>","Number Five<\/word>","time travel<\/word>","eventually returned<\/word>","Number Five<\/strong> has the ability to time travel<\/strong>, and ended up trapped in the future as a boy, where he discovered that the world was in ruins. He eventually returned<\/strong> to The Umbrella Academy<\/strong> years later with a message that the world was due to end in eight days<\/strong>.<\/phrase>","his body regressed<\/word>","his mind stayed the same<\/word>","prideful<\/word>","Number Five<\/word>","apocalyptic future<\/word>","found<\/word>","13-year-old self<\/word>","genius intellect<\/word>","often dismissing<\/word>","his family<\/word>","personal affairs<\/word>","impulsive behavior<\/word>","time-traveling powers<\/word>","Reginald Hargreeves<\/word>","At age 13, Number Five<\/strong> became trapped in the apocalyptic future<\/strong> for more than 60 years. When he found<\/strong> a way back, his body regressed<\/strong> to that of his 13-year-old self<\/strong>, while his mind stayed the same<\/strong>. As a result, he has the personality of a 60-year-old and is frustrated at being trapped in the body of a child. He is shown to have a genius intellect<\/strong>, often dismissing<\/strong> others, including his family<\/strong>, as stupid or inferior, and expressing disinterest in their personal affairs<\/strong>. He is also shown to be sarcastic, pragmatic, and incredibly prideful<\/strong>. He also exhibits impulsive behavior<\/strong> due to his prideful<\/strong> nature, which is seen when he brazenly uses his time-traveling powers<\/strong> as a boy despite Reginald Hargreeves<\/strong>' warnings that he was not fully prepared to wield them.<\/phrase>","stop the apocalypse<\/word>","gained fame<\/word>","agent<\/word>","part of his contract<\/word>","get back home to the present<\/word>","Number Five<\/word>","efficient fighter<\/word>","not enjoy<\/word>","innocent people<\/word>","Temps Commission<\/word>","his success<\/word>","Number Five<\/strong> is also shown to be a ruthless and incredibly efficient fighter<\/strong>. While he does not enjoy<\/strong> killing, he seems to have no qualms about the people he has killed and is more than willing to eliminate anyone, even innocent people<\/strong>, whose deaths may stop the apocalypse<\/strong> from happening. He gained fame<\/strong> in his times as an agent<\/strong> of the Temps Commission<\/strong> for his success<\/strong> on missions, which he did as part of his contract<\/strong> in order to get back home to the present<\/strong>. Overall, Number Five<\/strong> has shown to be perfectly willing to eliminate anyone who stands in the way of his goals.<\/phrase>","compassion<\/word>","cares deeply<\/word>","prevent the apocalypse<\/word>","fear they would die<\/word>","antisocial behavior<\/word>","his family<\/word>","devoted member<\/word>","Despite his antisocial behavior<\/strong>, he does have compassion<\/strong> and cares deeply<\/strong> for his family<\/strong>. He works tirelessly both in the past and future to prevent the apocalypse<\/strong> and is seemingly the most devoted member<\/strong> of the family in stopping it. He even refuses to involve his family<\/strong> most of the time out of fear they would die<\/strong>.<\/phrase>","his attempts to avert the apocalypse<\/word>","midst<\/word>","another nuclear apocalypse<\/word>","The Umbrella Academy<\/word>","come with him if he wants to live<\/word>","caused the apocalypse<\/word>","save the world<\/word>","the Swedes<\/word>","Five finds<\/word>","Dallas<\/word>","nuclear explosion<\/word>","Hazel<\/word>","Five obliges<\/word>","explain<\/word>","Following his attempts to avert the apocalypse<\/strong>, Five finds<\/strong> himself transported to Dallas<\/strong>, 1963, in the midst<\/strong> of another nuclear apocalypse<\/strong>. He witnesses his siblings, The Umbrella Academy<\/strong>, fight the Russians prior to a nuclear explosion<\/strong> that ends the world. Moments before the world ends, however, Hazel<\/strong> arrives and tells him to come with him if he wants to live<\/strong>; Five obliges<\/strong> and Hazel<\/strong> takes him back in time to before the apocalypse and explains that he caused the apocalypse<\/strong> by bringing his siblings back in the timeline. Hazel<\/strong> tells him to save the world<\/strong> one more time but is unable to explain<\/strong> more before he is assassinated by the Swedes<\/strong>.<\/phrase>","save the world<\/word>","prevent the assassination of President JFK<\/word>","his attempt<\/word>","second time<\/word>","Luther<\/word>","Diego<\/word>","Vanya<\/word>","Five tries to get his siblings on board with his attempt<\/strong> to save the world<\/strong> for the second time<\/strong>, but is instantly rebuked by both Luther<\/strong> - who has built a life for himself - and Diego<\/strong>, who is attempting to prevent the assassination of President JFK<\/strong>. Five is later able to convince Diego<\/strong> to help him save the world<\/strong>, and the two try and talk with the 1963 version of their father about his involvement in the assassination of JFK. Five is able to convince Vanya<\/strong> to his side shortly after after he offers insight into her past, which she is happy to receive due to her amnesia.<\/phrase>","get all of his family back together<\/word>","only option<\/word>","exchange for a briefcase<\/word>","The Umbrella Academy<\/word>","rightful place within the timeline<\/word>","shocking discovery<\/word>","adoptive daughter<\/word>","the Commission<\/word>","work<\/word>","Handler<\/word>","Temps Commission<\/word>","allow<\/word>","travel<\/word>","Lila Pitts<\/word>","After Five is able to get all of his family back together<\/strong>, and on his side, he realizes that his only option<\/strong> is to work<\/strong> with the Handler<\/strong> in exchange for a briefcase<\/strong> from the Temps Commission<\/strong> that will allow<\/strong> him to travel<\/strong> back with The Umbrella Academy<\/strong> back to their rightful place within the timeline<\/strong>. Five makes a shocking discovery<\/strong> along the way that Lila Pitts<\/strong> is actually the Handler<\/strong>'s adoptive daughter<\/strong>. The Handler<\/strong> offers Five a proposition: she will give him a briefcase if he agrees to eliminate the members of the Commission<\/strong> board; he agrees.<\/phrase>","forced to abandon the briefcase<\/word>","only option<\/word>","face a previous version<\/word>","hand over the briefcase<\/word>","convince him<\/word>","correct math<\/word>","return him to 2019<\/word>","his family<\/word>","fail<\/word>","Luther<\/word>","Five's attempts to get his family<\/strong> back to their timeline fail<\/strong>, and he is forced to abandon the briefcase<\/strong> before it is activated. Five explains to Luther<\/strong> that the only option<\/strong> is to go face a previous version<\/strong> of himself in the same timeline and plead with him to hand over the briefcase<\/strong>. Older, previous Five is initially reluctant to give Five the briefcase, but Five is able to convince him<\/strong> in exchange for the correct math<\/strong> that would return him to 2019<\/strong> in his original body; Five is annoyed to find that the briefcase is destroyed in the process, however.<\/phrase>","The Umbrella Academy<\/word>","save Vanya<\/word>","destroying the world for a second time<\/word>","face off<\/word>","the Commission<\/word>","travel back in time<\/word>","prevent the Handler from killing his siblings<\/word>","return his family<\/word>","rightful place within the timeline<\/word>","Handler<\/word>","Scared<\/word>","Herb<\/word>","allow<\/word>","After the members of The Umbrella Academy<\/strong> are able to save Vanya<\/strong> from destroying the world for a second time<\/strong>, Five and the other members of the Academy face off<\/strong> against the Handler<\/strong> and the Commission<\/strong>. They are successful in succeeding against the agents sent after them, but all of the members of the Academy - except for Five - are shot to death by the Handler<\/strong>. Scared<\/strong>, Five remembers advice given to him from Reginald about traveling back in time minutes, rather than decades. He is able to travel back in time<\/strong> and prevent the Handler from killing his siblings<\/strong>, and makes a deal with Herb<\/strong> to allow<\/strong> him to take a briefcase and return his family<\/strong> to their rightful place within the timeline<\/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':1745, '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':1745, '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':1745, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }