var presentation = ["The Emperor's New Groove<\/word>","animated buddy comedy film<\/word>","self-centered<\/word>","Incan emperor<\/word>","Kuzco<\/word>","transformed into a llama<\/word>","change back into a human<\/word>","escorts him back to the palace<\/word>","Walt Disney Feature Animation<\/word>","Walt Disney Pictures<\/word>","young<\/word>","his ex-advisor<\/word>","Yzma<\/word>","emperor<\/word>","village leader<\/word>","Pacha<\/word>","The Emperor's New Groove<\/strong> is a 2000 American animated buddy comedy film<\/strong> produced by Walt Disney Feature Animation<\/strong> and distributed by Walt Disney Pictures<\/strong>. The Emperor's New Groove<\/strong> follows a young<\/strong> and self-centered<\/strong> Incan emperor<\/strong>, Kuzco<\/strong>, who is transformed into a llama<\/strong> by his ex-advisor<\/strong>, Yzma<\/strong>. For the emperor<\/strong> to change back into a human<\/strong>, he trusts a village leader<\/strong>, Pacha<\/strong>, who escorts him back to the palace<\/strong>.<\/phrase>","selfish<\/word>","Kuzco<\/word>","Inca Empire<\/word>","punishes those who displease him<\/word>","plans to demolish his hilltop family home<\/word>","build himself a lavish summer home<\/word>","Kuzco's treacherous advisor<\/word>","plans to poison him<\/word>","rule the empire<\/word>","muscular<\/word>","Kronk<\/word>","spikes Kuzco's drink<\/word>","turning him into a llama<\/word>","Yzma orders Kronk to dispose of him in a river<\/word>","crisis of conscience<\/word>","saves Kuzco<\/word>","Kuzco to end up on a cart belonging to Pacha<\/word>","young<\/word>","overly-pampered emperor<\/word>","man<\/word>","eighteenth birthday approaches<\/word>","Pacha<\/word>","kind peasant and village leader<\/word>","Kuzcotopia<\/word>","Yzma<\/word>","place<\/word>","clumsy henchman<\/word>","wrong potion<\/word>","young<\/strong>, selfish<\/strong>, and overly-pampered emperor<\/strong> Kuzco<\/strong> of the Inca Empire<\/strong> lives the high-life and routinely punishes those who displease him<\/strong>, such as having an elderly man<\/strong> thrown out a window for the crime of interrupting him. As his eighteenth birthday approaches<\/strong>, Kuzco<\/strong> meets with Pacha<\/strong>, a kind peasant and village leader<\/strong>, and tells him that he plans to demolish his hilltop family home<\/strong> to build himself a lavish summer home<\/strong> called Kuzcotopia<\/strong>. Pacha<\/strong> protests but is quickly dismissed. That evening at dinner, Kuzco's treacherous advisor<\/strong>, Yzma<\/strong>, plans to poison him<\/strong> and rule the empire<\/strong> in his place<\/strong>. However, due to a mislabeled vial, her muscular<\/strong> but clumsy henchman<\/strong> Kronk<\/strong> inadvertently spikes Kuzco's drink<\/strong> with the wrong potion<\/strong>, turning him into a llama<\/strong>. After knocking Kuzco<\/strong> out, Yzma orders Kronk to dispose of him in a river<\/strong>. However, after doing so, Kronk<\/strong> has a crisis of conscience<\/strong> at the last second and saves Kuzco<\/strong>, only for Kuzco to end up on a cart belonging to Pacha<\/strong>.<\/phrase>","does not tell his family<\/word>","Kuzco's decision<\/word>","Kuzco blames Pacha<\/word>","orders Pacha to return him to the palace<\/word>","Pacha agrees<\/word>","only if Kuzco agrees to build Kuzcotopia elsewhere<\/word>","Kuzco refuses<\/word>","chased through the jungle by a pack of black jaguars<\/word>","Pacha arrives to rescue him<\/word>","Kuzco seemingly accepts<\/word>","intended to renege on his promise<\/word>","spare Pacha's home<\/word>","survive many ordeals<\/word>","Kuzco<\/word>","underneath his selfishness<\/word>","Yzma takes the throne<\/word>","angered to learn from Kronk<\/word>","Kuzco is still alive<\/word>","Pacha<\/word>","his transformation<\/word>","his offer<\/word>","second time<\/word>","good side<\/word>","Upon returning home, Pacha<\/strong> does not tell his family<\/strong> about Kuzco's decision<\/strong>. After awakening from the bag on the cart and scaring Pacha<\/strong>, Kuzco blames Pacha<\/strong> for his transformation<\/strong> and orders Pacha to return him to the palace<\/strong>. Pacha agrees<\/strong>, but only if Kuzco agrees to build Kuzcotopia elsewhere<\/strong>. Kuzco refuses<\/strong> the offer and decides to go by himself against Pacha<\/strong>'s warnings, but quickly gets chased through the jungle by a pack of black jaguars<\/strong>. Pacha arrives to rescue him<\/strong> and extends his offer<\/strong> a second time<\/strong>, to which Kuzco seemingly accepts<\/strong>, though he reveals that he intended to renege on his promise<\/strong> to spare Pacha's home<\/strong>. The two survive many ordeals<\/strong> in the jungle, and Pacha<\/strong> finds that Kuzco<\/strong> has a good side<\/strong> to him underneath his selfishness<\/strong>. Meanwhile, Yzma takes the throne<\/strong> but is angered to learn from Kronk<\/strong> that Kuzco is still alive<\/strong>, so the two set out to find him.<\/phrase>","pairs arrive at a jungle diner<\/word>","Kuzco complains to the cook<\/word>","overhears Yzma's plan<\/word>","warn Kuzco<\/word>","he does not believe Pacha<\/word>","thinking he is beloved by his people<\/word>","angrily sends him away<\/word>","Kuzco<\/word>","overhears<\/word>","Kronk<\/word>","plot to kill him<\/word>","no one in his kingdom misses him<\/word>","Kuzco leaves the diner on his own<\/word>","rest of his life<\/word>","Pacha catches up<\/word>","still willing to help Kuzco return to normal<\/word>","Kuzco reconciles with him<\/word>","next day<\/word>","Pacha<\/word>","Yzma<\/word>","his selfishness<\/word>","normal llama<\/word>","The next day<\/strong>, the pairs arrive at a jungle diner<\/strong> simultaneously, unaware of each other's presence. While Kuzco complains to the cook<\/strong>, Pacha<\/strong> overhears Yzma's plan<\/strong> and attempts to warn Kuzco<\/strong> when he returns. Still, he does not believe Pacha<\/strong>, thinking he is beloved by his people<\/strong>, and angrily sends him away<\/strong>, believing Pacha<\/strong> still intends to not take him to the palace. However, Kuzco<\/strong> soon overhears<\/strong> Yzma<\/strong>'s and Kronk<\/strong>'s plot to kill him<\/strong> and learns that no one in his kingdom misses him<\/strong> due to his selfishness<\/strong>. Feeling guilty and unwanted, Kuzco leaves the diner on his own<\/strong>, planning on living out the rest of his life<\/strong> as a normal llama<\/strong>. Pacha catches up<\/strong>, still willing to help Kuzco return to normal<\/strong>, knowing there's still good in him. Kuzco reconciles with him<\/strong> before they set off to Pacha<\/strong>'s house for supplies.<\/phrase>","Pacha has his family delay Yzma<\/word>","Kuzco<\/word>","head-start back to the palace<\/word>","enter Yzma's lab<\/word>","find a potion to reverse the effects of the llama potion<\/word>","ambushed by Yzma and Kronk<\/word>","Yzma then orders Kronk<\/word>","kill the duo<\/word>","Kronk<\/word>","crisis of conscience<\/word>","cannot bring himself to do so<\/word>","Yzma insults him and his cooking<\/word>","prompting him to switch sides<\/word>","attempts to betray her<\/word>","she drops him down a trapdoor<\/word>","summons the palace guards<\/word>","claims that Pacha and Kuzco murdered the emperor<\/word>","cornered on the ledges<\/word>","left with two remaining vials<\/word>","Yzma and Kuzco struggle over the vials<\/word>","transforming Yzma into a small kitten<\/word>","She starts to take the potion herself<\/word>","unintentionally defeated by Kronk<\/word>","emerges from a previously unknown door<\/word>","Pacha retrieves the vial<\/word>","gives it to Kuzco<\/word>","expresses his gratitude to Pacha<\/word>","drinks the potion<\/word>","Yzma<\/word>","Pacha<\/word>","Upon arriving, Yzma<\/strong> is already there, searching for the two. Pacha has his family delay Yzma<\/strong>, giving him and Kuzco<\/strong> a head-start back to the palace<\/strong>, intending to enter Yzma's lab<\/strong> and find a potion to reverse the effects of the llama potion<\/strong>. However, they are ambushed by Yzma and Kronk<\/strong>, who somehow made it back ahead of Kuzco<\/strong> and Pacha<\/strong>. Yzma then orders Kronk<\/strong> to kill the duo<\/strong>, but Kronk<\/strong> has another crisis of conscience<\/strong> and cannot bring himself to do so<\/strong>. Yzma insults him and his cooking<\/strong>, prompting him to switch sides<\/strong>, and he attempts to betray her<\/strong>, but she drops him down a trapdoor<\/strong>. She then summons the palace guards<\/strong> and claims that Pacha and Kuzco murdered the emperor<\/strong>, forcing them to flee with an armful of vials containing various animal potions (Yzma<\/strong> deliberately knocked them all to the floor so that Kuzco<\/strong> and Pacha<\/strong> could not tell which one is correct), which they use to transform Kuzco<\/strong> during the chase. Pacha<\/strong> also knocks a table of flasks containing other animal potions into the pursuing guards, turning them into various animals. As they are cornered on the ledges<\/strong> of a giant wall structure, they are left with two remaining vials<\/strong>. Yzma and Kuzco struggle over the vials<\/strong>, accidentally crushing one and transforming Yzma into a small kitten<\/strong>. Pacha<\/strong> and Kuzco<\/strong> use teamwork to reach the other vial, but Yzma<\/strong> manages to intercept it in her kitten form. She starts to take the potion herself<\/strong> but is unintentionally defeated by Kronk<\/strong>, who emerges from a previously unknown door<\/strong>. Pacha retrieves the vial<\/strong> and gives it to Kuzco<\/strong>, who expresses his gratitude to Pacha<\/strong>, and drinks the potion<\/strong>.<\/phrase>","restored Kuzco<\/word>","reflected<\/word>","consequences of his selfishness<\/word>","takes Pacha's suggestion<\/word>","moving Kuzcotopia over<\/word>","neighboring and unoccupied hill<\/word>","Kuzco then joins Pacha and his family<\/word>","modest and smaller resort<\/word>","Kronk<\/word>","scout den leader<\/word>","his den including<\/word>","Pacha's kids<\/word>","Yzma<\/word>","Sometime later, a restored Kuzco<\/strong>, having reflected<\/strong> on the consequences of his selfishness<\/strong> and made amends, takes Pacha's suggestion<\/strong> of moving Kuzcotopia over<\/strong> to a neighboring and unoccupied hill<\/strong>. Kuzco then joins Pacha and his family<\/strong> at his modest and smaller resort<\/strong>. Meanwhile, Kronk<\/strong> becomes a scout den leader<\/strong>, his den including<\/strong> Pacha's kids<\/strong> and Yzma<\/strong>, still in kitten form.<\/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':2286, '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':2286, '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':2286, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }