var presentation = ["adopted and raised by a family of lemurs<\/word>","devastating meteor shower<\/word>","move out for their new home<\/word>","befriend a herd of dinosaurs<\/word>","journey<\/word>","Nesting Grounds<\/word>","hunted down by predators<\/word>","Carnotaurus<\/word>","Dinosaur<\/word>","computer-animated adventure film<\/word>","Walt Disney Feature Animation<\/word>","Secret Lab<\/word>","Iguanodon<\/word>","tropical island<\/word>","Dinosaur<\/strong> is a 2000 American computer-animated adventure film<\/strong> produced by Walt Disney Feature Animation<\/strong> and The Secret Lab<\/strong>. it follows a heroic young Iguanodon<\/strong> who was adopted and raised by a family of lemurs<\/strong> on a tropical island<\/strong>. After surviving a devastating meteor shower<\/strong>, the family move out for their new home<\/strong> and befriend a herd of dinosaurs<\/strong> along the way while on a journey<\/strong> to the Nesting Grounds<\/strong>. Unfortunately, they are being hunted down by predators<\/strong> such as Carnotaurus<\/strong>.<\/phrase>","Carnotaurus<\/word>","attacks a herd of dinosaurs<\/word>","destroying an Iguanodon nest<\/word>","landing on an island<\/word>","daughter of their patriarch<\/word>","Yar<\/word>","names the hatched baby<\/word>","raises him alongside her daughter<\/word>","interrupted by a meteor crashing<\/word>","destroys the island<\/word>","egg travels<\/word>","several terrains<\/word>","prehistoric lemurs<\/word>","Plio<\/word>","Aladar<\/word>","Suri<\/word>","Earth<\/word>","explosive shockwave<\/word>","family flee<\/word>","only survivors<\/word>","mourn<\/word>","A Carnotaurus<\/strong> attacks a herd of dinosaurs<\/strong>, destroying an Iguanodon nest<\/strong>. One surviving egg travels<\/strong> through several terrains<\/strong> before landing on an island<\/strong> inhabited by prehistoric lemurs<\/strong>. Plio<\/strong>; the daughter of their patriarch<\/strong> Yar<\/strong>, names the hatched baby<\/strong> Aladar<\/strong> and raises him alongside her daughter<\/strong> Suri<\/strong>, despite Yar<\/strong>'s initial objections. Several years later, a fully grown Aladar<\/strong> and the lemurs take part in a mating ritual, in which Plio<\/strong>'s brother Zini is unsuccessful. Moments after the ritual ends, they are interrupted by a meteor crashing<\/strong> into the Earth<\/strong>, creating an explosive shockwave<\/strong> which destroys the island<\/strong>. Aladar<\/strong> and Yar<\/strong>'s family flee<\/strong> across the sea to the mainland. Being the only survivors<\/strong>, they mourn<\/strong> the others, before moving on.<\/phrase>","attacked by a pack of Velociraptors<\/word>","Nesting Grounds<\/word>","retreat to the end of the line<\/word>","befriend the old Styracosaurus<\/word>","Eema<\/word>","pet Ankylosaur<\/word>","Url<\/word>","travel for days without water<\/word>","lake<\/word>","find it seemingly dried up<\/word>","Kron orders the herd to move on<\/word>","let the weakest perish<\/word>","Aladar stays behind with a sick Eema<\/word>","Kron's sister<\/word>","impressed by Aladar's compassion<\/word>","begins to grow closer to him<\/word>","burnt wasteland<\/word>","escape<\/word>","multi-species herd<\/word>","dinosaur refugees<\/word>","herd leader<\/word>","Kron<\/word>","elderly friend<\/word>","Baylene<\/word>","Brachiosaur<\/word>","some water<\/word>","Neera<\/word>","While crossing the burnt wasteland<\/strong>, they are attacked by a pack of Velociraptors<\/strong>. They escape<\/strong> by joining a multi-species herd<\/strong> of dinosaur refugees<\/strong> heading for the communal Nesting Grounds<\/strong>. Falling afoul of herd leader<\/strong> Kron<\/strong>, they retreat to the end of the line<\/strong> and befriend the old Styracosaurus<\/strong> Eema<\/strong>, her pet Ankylosaur<\/strong> Url<\/strong>, and her equally elderly friend<\/strong> Baylene<\/strong>, the only Brachiosaur<\/strong> in the group. They travel for days without water<\/strong> to the site of a lake<\/strong>, only to find it seemingly dried up<\/strong>. Kron orders the herd to move on<\/strong> and let the weakest perish<\/strong>, but Aladar stays behind with a sick Eema<\/strong>. He and Baylene<\/strong> dig until they find her some water<\/strong>. The rest of the herd follows suit, and Kron's sister<\/strong> Neera<\/strong>, impressed by Aladar's compassion<\/strong>, begins to grow closer to him<\/strong>, while Kron<\/strong> believes he wants to take over.<\/phrase>","Carnotaurus<\/word>","tracking the herd<\/word>","Kron's lieutenant<\/word>","reports the approaching predators<\/word>","attack<\/word>","ushers the herd away from the lake<\/word>","leaving Bruton, Aladar's family, and the elderly dinosaurs behind<\/word>","takes shelter in a cave<\/word>","predators catch up<\/word>","Bruton sacrifices his life<\/word>","Bruton<\/word>","Kron<\/word>","Meanwhile, two Carnotaurus<\/strong> have been tracking the herd<\/strong>. Kron's lieutenant<\/strong> Bruton<\/strong> reports the approaching predators<\/strong> after surviving an attack<\/strong> during a scouting mission, but Kron<\/strong> quickly ushers the herd away from the lake<\/strong>, leaving Bruton, Aladar's family, and the elderly dinosaurs behind<\/strong>. The group takes shelter in a cave<\/strong> as night falls, but the predators catch up<\/strong> to them and attack<\/strong>. Bruton sacrifices his life<\/strong> to cause a cave-in that kills one of the Carnotaurus<\/strong>, forcing the survivor to move on.<\/phrase>","reach a dead end<\/word>","Aladar briefly loses hope<\/word>","smash through the wall<\/word>","Nesting Grounds<\/word>","Eema<\/word>","landslide<\/word>","blocked off the usual entrance to the valley<\/word>","find Kron<\/word>","trying to lead the herd over the landslide<\/word>","Kron attacks Aladar<\/word>","taking Aladar's warning as a challenge to his leadership<\/word>","fed up<\/word>","Kron's illogical behavior<\/word>","intervenes<\/word>","Realizing Kron's selfishness<\/word>","herd follows Aladar<\/word>","tries to climb the rocks by himself<\/word>","Baylene<\/word>","arrive<\/word>","Aladar<\/word>","Neera<\/word>","Kron<\/word>","The group ventures deeper into the cave, but they reach a dead end<\/strong>. Though Aladar briefly loses hope<\/strong>, Baylene<\/strong> uses her strength to smash through the wall<\/strong>, and they arrive<\/strong> at the Nesting Grounds<\/strong> on the other side. Eema<\/strong> notices that a landslide<\/strong> has blocked off the usual entrance to the valley<\/strong>. Aladar<\/strong> rushes off alone to find Kron<\/strong> trying to lead the herd over the landslide<\/strong>, unaware of the sheer drop on the other side. Kron attacks Aladar<\/strong>, taking Aladar's warning as a challenge to his leadership<\/strong>, until Neera<\/strong>, fed up<\/strong> with Kron's illogical behavior<\/strong>, intervenes<\/strong>. Realizing Kron's selfishness<\/strong>, the herd follows Aladar<\/strong>, while Kron<\/strong> stubbornly tries to climb the rocks by himself<\/strong>.<\/phrase>","hungry Carnotaurus arrives<\/word>","Aladar rallies everyone<\/word>","stand together in defiance<\/word>","Carnotaurus is frightened off<\/word>","pursues Kron instead<\/word>","rush to save him<\/word>","Kron is killed by the Carnotaurus<\/word>","avenge Kron<\/word>","forcing the Carnotaurus over the sheer drop to its death<\/word>","leads the herd back<\/word>","Nesting Grounds<\/word>","new generation of dinosaurs hatches<\/word>","Aladar<\/word>","Neera<\/word>","The hungry Carnotaurus arrives<\/strong>, but Aladar rallies everyone<\/strong> to stand together in defiance<\/strong> against it. The Carnotaurus is frightened off<\/strong>, and pursues Kron instead<\/strong>. Aladar<\/strong> and Neera<\/strong> rush to save him<\/strong>, but fail to get there in time and Kron is killed by the Carnotaurus<\/strong>. However, they avenge Kron<\/strong> by forcing the Carnotaurus over the sheer drop to its death<\/strong>. Aladar<\/strong> then leads the herd back<\/strong> to the Nesting Grounds<\/strong>. Sometime later, a new generation of dinosaurs hatches<\/strong>, among them Aladar<\/strong> and Neera<\/strong>'s children<\/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':2285, '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':2285, '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':2285, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }