var presentation = ["The Lion King<\/word>","animated musical drama film<\/word>","Simba<\/word>","succeed his father<\/word>","Mufasa<\/word>","Pride Lands<\/word>","Simba's paternal uncle<\/word>","murders Mufasa<\/word>","Simba is manipulated into thinking he was responsible<\/word>","flees into exile<\/word>","his childhood friend<\/word>","returning to challenge Scar<\/word>","rightful King<\/word>","Walt Disney Feature Animation<\/word>","Walt Disney Pictures<\/word>","young lion<\/word>","Scar<\/word>","carefree outcasts<\/word>","Timon<\/word>","Pumbaa<\/word>","valuable perspective<\/word>","Nala<\/word>","his shaman<\/word>","Rafiki<\/word>","end<\/word>","his tyranny<\/word>","his place<\/word>","Circle of Life<\/word>","The Lion King<\/strong> is a 1994 American animated musical drama film<\/strong> produced by Walt Disney Feature Animation<\/strong> and released by Walt Disney Pictures<\/strong>. The Lion King<\/strong> tells the story of Simba<\/strong>, a young lion<\/strong> who is to succeed his father<\/strong>, Mufasa<\/strong>, as King of the Pride Lands<\/strong>; however, after Simba's paternal uncle<\/strong> Scar<\/strong> murders Mufasa<\/strong>, Simba is manipulated into thinking he was responsible<\/strong> and flees into exile<\/strong>. After growing up in the company of the carefree outcasts<\/strong> Timon<\/strong> and Pumbaa<\/strong>, Simba<\/strong> receives valuable perspective<\/strong> from his childhood friend<\/strong>, Nala<\/strong>, and his shaman<\/strong>, Rafiki<\/strong>, before returning to challenge Scar<\/strong> to end<\/strong> his tyranny<\/strong> and take his place<\/strong> in the Circle of Life<\/strong> as the rightful King<\/strong>.<\/phrase>","Pride Lands<\/word>","pride of lions rule<\/word>","Pride<\/word>","Mufasa<\/word>","Sarabi<\/word>","Simba<\/word>","presented<\/word>","kingdom's shaman and advisor<\/word>","animal kingdom<\/word>","Rock<\/word>","newborn son<\/word>","gathering animals<\/word>","Rafiki<\/word>","In the Pride Lands<\/strong> of Africa, a pride of lions rule<\/strong> over the animal kingdom<\/strong> from Pride<\/strong> Rock<\/strong>. King Mufasa<\/strong>'s and Queen Sarabi<\/strong>'s newborn son<\/strong>, Simba<\/strong>, is presented<\/strong> to the gathering animals<\/strong> by Rafiki<\/strong> the mandrill, the kingdom's shaman and advisor<\/strong>.<\/phrase>","Mufasa<\/word>","Simba<\/word>","Pride Lands<\/word>","explains to him the responsibilities of kingship<\/word>","connects all living things<\/word>","covets the throne<\/word>","plots to end Mufasa and Simba<\/word>","he may become king<\/word>","tricks Simba<\/word>","exploring a forbidden elephants' graveyard<\/word>","attacked by hyenas<\/word>","Mufasa is alerted<\/word>","rescues the cubs<\/word>","explains that the great kings of the past watch over them<\/word>","he will one day watch over Simba<\/word>","Scar visits the hyenas<\/word>","convince them to help him overthrow Mufasa<\/word>","exchange for hunting rights<\/word>","Circle of Life<\/word>","younger brother<\/word>","Scar<\/word>","best friend<\/word>","Nala<\/word>","Shenzi<\/word>","his assistant<\/word>","Zazu<\/word>","night sky<\/word>","Mufasa<\/strong> shows Simba<\/strong> the Pride Lands<\/strong> and explains to him the responsibilities of kingship<\/strong> and the Circle of Life<\/strong>, which connects all living things<\/strong>. Mufasa<\/strong>'s younger brother<\/strong>, Scar<\/strong>, covets the throne<\/strong> and plots to end Mufasa and Simba<\/strong>, so he may become king<\/strong>. He tricks Simba<\/strong> and his best friend<\/strong> Nala<\/strong> into exploring a forbidden elephants' graveyard<\/strong>, where they are attacked by hyenas<\/strong> led by the ruthless Shenzi<\/strong>. Mufasa is alerted<\/strong> about the incident by his assistant<\/strong>, the hornbill Zazu<\/strong>, and rescues the cubs<\/strong>. Though upset with Simba<\/strong>, Mufasa<\/strong> forgives him and explains that the great kings of the past watch over them<\/strong> from the night sky<\/strong>, from which he will one day watch over Simba<\/strong>. Meanwhile, Scar visits the hyenas<\/strong> and manages to convince them to help him overthrow Mufasa<\/strong> in exchange for hunting rights<\/strong> in the Pride Lands<\/strong>.<\/phrase>","Scar sets a trap for his brother and nephew<\/word>","luring Simba into a gorge<\/word>","wildebeest<\/word>","stampede<\/word>","will trample him<\/word>","informs Mufasa of Simba's peril<\/word>","king will rush to save his son<\/word>","Mufasa saves Simba<\/word>","hanging perilously from the gorge's edge<\/word>","Scar refuses to help Mufasa<\/word>","instead<\/word>","sending him falling to his death<\/word>","convinces Simba<\/word>","tragedy was Simba's own fault<\/word>","advises him to leave the kingdom<\/word>","never return<\/word>","orders the hyenas to kill the cub<\/word>","Simba escapes<\/word>","Pride<\/word>","both Mufasa and Simba were killed in the stampede<\/word>","steps forward as the new king<\/word>","allowing Shenzi's clan to live in the Pride Lands<\/word>","hyenas drive<\/word>","large herd<\/word>","Scar<\/word>","Scar sets a trap for his brother and nephew<\/strong>, luring Simba into a gorge<\/strong> and having the hyenas drive<\/strong> a large herd<\/strong> of wildebeest<\/strong> into a stampede<\/strong> that will trample him<\/strong>. He informs Mufasa of Simba's peril<\/strong>, knowing that the king will rush to save his son<\/strong>. Mufasa saves Simba<\/strong> but ends up hanging perilously from the gorge's edge<\/strong>. Scar refuses to help Mufasa<\/strong>, instead<\/strong> sending him falling to his death<\/strong>. He then convinces Simba<\/strong> that the tragedy was Simba's own fault<\/strong> and advises him to leave the kingdom<\/strong> and never return<\/strong>. He orders the hyenas to kill the cub<\/strong>, but Simba escapes<\/strong>. Scar<\/strong> tells the Pride<\/strong> that both Mufasa and Simba were killed in the stampede<\/strong> and steps forward as the new king<\/strong>, allowing Shenzi's clan to live in the Pride Lands<\/strong>.<\/phrase>","Simba collapses in a desert<\/word>","rescued by Timon and Pumbaa<\/word>","meerkat<\/word>","warthog<\/word>","Simba grows up in the oasis<\/word>","living a carefree life<\/word>","motto<\/word>","hakuna matata<\/word>","means no worries in Swahili<\/word>","Simba collapses in a desert<\/strong> and is rescued by Timon and Pumbaa<\/strong>, a meerkat<\/strong> and warthog<\/strong>. Simba grows up in the oasis<\/strong> with his two new friends and other animals in their oasis, living a carefree life<\/strong> under the motto<\/strong> hakuna matata<\/strong>, which means no worries in Swahili<\/strong>.<\/phrase>","Simba rescues Timon and Pumbaa<\/word>","hungry lioness<\/word>","turns out to be Nala<\/word>","She and Simba reunite<\/word>","fall in love<\/word>","urges him to return home<\/word>","Pride Lands have become a drought-stricken wasteland<\/word>","under Scar's reign<\/word>","Simba refuses<\/word>","encounters Rafiki<\/word>","tells him that Mufasa's spirit lives on in Simba<\/word>","Simba is visited by the ghost of Mufasa<\/word>","he must take his rightful place as king<\/word>","he can no longer run from his past<\/word>","Simba<\/word>","Pride Lands<\/word>","night sky<\/word>","return<\/word>","Now a young adult, Simba rescues Timon and Pumbaa<\/strong> from a hungry lioness<\/strong>, who turns out to be Nala<\/strong>. She and Simba reunite<\/strong> and fall in love<\/strong>, and she urges him to return home<\/strong>, telling him that the Pride Lands have become a drought-stricken wasteland<\/strong> under Scar's reign<\/strong>. Feeling guilty over his father's death, Simba refuses<\/strong> and storms off. He then encounters Rafiki<\/strong>, who tells him that Mufasa's spirit lives on in Simba<\/strong>. Simba is visited by the ghost of Mufasa<\/strong> in the night sky<\/strong>, who tells him that he must take his rightful place as king<\/strong>. Realizing that he can no longer run from his past<\/strong>, Simba<\/strong> decides to return<\/strong> to the Pride Lands<\/strong>.<\/phrase>","Simba sneaks past the hyenas<\/word>","Pride<\/word>","confronts Scar<\/word>","about to fight Sarabi<\/word>","Scar taunts Simba over his role in Mufasa's death<\/word>","reveals to him that he murdered Mufasa<\/word>","Simba<\/word>","forces him to show the truth to the rest of the pride<\/word>","fend off the hyenas<\/word>","attempting to escape<\/word>","cornered by Simba<\/word>","Scar begs for mercy<\/word>","attempts to blame his crimes on the hyenas<\/word>","Simba spares his life<\/word>","orders him to leave the Pride Lands forever<\/word>","Scar refuses<\/word>","attacks his nephew<\/word>","Simba manages to throw him off the cliff<\/word>","Scar survives the fall<\/word>","attacked<\/word>","mauled to death by the hyenas<\/word>","Simba takes over the kingship<\/word>","makes Nala his queen<\/word>","Rock<\/word>","Enraged<\/word>","Timon<\/word>","Pumbaa<\/word>","Rafiki<\/word>","Zazu<\/word>","Scar<\/word>","Aided by his friends, Simba sneaks past the hyenas<\/strong> at Pride<\/strong> Rock<\/strong> and confronts Scar<\/strong>, who was about to fight Sarabi<\/strong>. Scar taunts Simba over his role in Mufasa's death<\/strong> and backs him to the edge of the Rock<\/strong>, where he reveals to him that he murdered Mufasa<\/strong>. Enraged<\/strong>, Simba<\/strong> forces him to show the truth to the rest of the pride<\/strong>. Timon<\/strong>, Pumbaa<\/strong>, Rafiki<\/strong>, Zazu<\/strong>, and the lionesses fend off the hyenas<\/strong> while Scar<\/strong>, attempting to escape<\/strong>, is cornered by Simba<\/strong> at a ledge near the top of Pride<\/strong> Rock<\/strong>. Scar begs for mercy<\/strong> and attempts to blame his crimes on the hyenas<\/strong>; Simba spares his life<\/strong> but orders him to leave the Pride Lands forever<\/strong>. Scar refuses<\/strong> and attacks his nephew<\/strong>, but Simba manages to throw him off the cliff<\/strong> after a brief fight. Scar survives the fall<\/strong> but is attacked<\/strong> and mauled to death by the hyenas<\/strong>, who overheard his attempt to betray them. Afterward, Simba takes over the kingship<\/strong> and makes Nala his queen<\/strong>.<\/phrase>","Pride Lands restored<\/word>","presents<\/word>","Simba and Nala's newborn cub<\/word>","assembled animals<\/word>","continuing the circle of life<\/word>","Rafiki<\/word>","With the Pride Lands restored<\/strong> to its usual state, Rafiki<\/strong> presents<\/strong> Simba and Nala's newborn cub<\/strong> to the assembled animals<\/strong>, continuing the circle of life<\/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':2277, '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':2277, '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':2277, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }