var presentation = ["Atlantis: The Lost Empire<\/word>","animated science-fantasy action-adventure film<\/word>","guide him<\/word>","crew of mercenaries<\/word>","lost city<\/word>","Atlantis<\/word>","Walt Disney Feature Animation<\/word>","first science-fiction film<\/word>","film<\/word>","young man<\/word>","gains possession<\/word>","sacred book<\/word>","Atlantis: The Lost Empire<\/strong> is a 2001 American animated science-fantasy action-adventure film<\/strong> created by Walt Disney Feature Animation<\/strong> and is Disney's first science-fiction film<\/strong>. Set in 1914, the film<\/strong> tells the story of a young man<\/strong> who gains possession<\/strong> of a sacred book<\/strong>, which he believes will guide him<\/strong> and a crew of mercenaries<\/strong> to the lost city<\/strong> of Atlantis<\/strong>.<\/phrase>","threatens to drown the island<\/word>","Atlantis<\/word>","evacuation from the capital city<\/word>","Queen of Atlantis<\/word>","caught<\/word>","lifted up into the Heart of Atlantis<\/word>","crystal protecting the city<\/word>","crystal consumes her<\/word>","protects the city<\/word>","leaves behind her husband<\/word>","King of Atlantis<\/word>","island sinks beneath the ocean<\/word>","massive tidal wave<\/word>","distant explosion<\/word>","hypnotic blue light<\/word>","dome barrier<\/word>","young daughter<\/word>","Princess Kida<\/word>","A massive tidal wave<\/strong>, triggered by a distant explosion<\/strong>, threatens to drown the island<\/strong> kingdom of Atlantis<\/strong>. In the midst of an evacuation from the capital city<\/strong>, the Queen of Atlantis<\/strong> is caught<\/strong> by a strange, hypnotic blue light<\/strong> and lifted up into the Heart of Atlantis<\/strong>, a powerful crystal protecting the city<\/strong>. The crystal consumes her<\/strong> and creates a dome barrier<\/strong> that protects the city<\/strong>'s innermost district. She leaves behind her husband<\/strong>, the King of Atlantis<\/strong>, and her young daughter<\/strong>, Princess Kida<\/strong>, as the island sinks beneath the ocean<\/strong>.<\/phrase>","thousand years later<\/word>","Milo Thatch<\/word>","cartographer<\/word>","linguist<\/word>","Smithsonian Institution<\/word>","marginalized<\/word>","his research on Atlantis<\/word>","The Shepherd's Journal<\/word>","ancient manuscript<\/word>","directions to the lost island<\/word>","rejected<\/word>","Helga<\/word>","introduces Milo to Preston B. Whitmore<\/word>","funded a successful effort<\/word>","retrieve the Journal<\/word>","recruits Milo<\/word>","lead an expedition<\/word>","Atlantis<\/word>","found<\/word>","his proposal<\/word>","search<\/word>","Journal<\/word>","museum board<\/word>","mysterious woman<\/word>","eccentric millionaire<\/word>","Several thousand years later<\/strong>, in 1914, Milo Thatch<\/strong>-a cartographer<\/strong> and linguist<\/strong> at the Smithsonian Institution<\/strong> who is marginalized<\/strong> for his research on Atlantis<\/strong>-believes that he has found<\/strong> The Shepherd's Journal<\/strong>, an ancient manuscript<\/strong> allegedly containing directions to the lost island<\/strong>. After his proposal<\/strong> to search<\/strong> for the Journal<\/strong> is rejected<\/strong> by the museum board<\/strong>, a mysterious woman<\/strong>, Helga<\/strong> Sinclair, introduces Milo to Preston B. Whitmore<\/strong>, an eccentric millionaire<\/strong>. Whitmore has already funded a successful effort<\/strong> to retrieve the Journal<\/strong> as repayment of a debt to Milo's grandfather and recruits Milo<\/strong> to lead an expedition<\/strong> to Atlantis<\/strong> as soon as he deciphers it.<\/phrase>","team of specialists<\/word>","led by Commander Rourke<\/word>","Journal recovery expedition<\/word>","demolitions expert<\/word>","geologist<\/word>","Dr. Sweet<\/word>","mechanic<\/word>","Mrs. Packard<\/word>","attacked by the monstrous Leviathan<\/word>","guards Atlantis' entrance<\/word>","The Ulysses is destroyed<\/word>","crew escape<\/word>","cavern<\/word>","described in the Journal<\/word>","entrance to Atlantis<\/word>","also led<\/word>","Vinny<\/word>","Mole<\/word>","medical officer<\/word>","Audrey<\/word>","radio operator<\/word>","Cookie<\/word>","mess cook<\/word>","Ulysses<\/word>","massive submarine<\/word>","The expedition departs with a team of specialists<\/strong> led by Commander Rourke<\/strong>, who also led<\/strong> the Journal recovery expedition<\/strong>. The crew includes Vinny<\/strong>, a demolitions expert<\/strong>; Mole<\/strong>, a geologist<\/strong>; Dr. Sweet<\/strong>, a medical officer<\/strong>; Audrey<\/strong>, a mechanic<\/strong>; Mrs. Packard<\/strong>, a radio operator<\/strong>; and Cookie<\/strong>, a mess cook<\/strong>. They set out in the Ulysses<\/strong>, a massive submarine<\/strong>, but are soon attacked by the monstrous Leviathan<\/strong>, a robotic lobster-like creature that guards Atlantis' entrance<\/strong>. The Ulysses is destroyed<\/strong> but Milo, Rourke, and part of the crew escape<\/strong> and make their way to a cavern<\/strong>, described in the Journal<\/strong> as the entrance to Atlantis<\/strong>.<\/phrase>","Atlantis<\/word>","greeted by Kida<\/word>","Atlantean language<\/word>","basis of many existing languages<\/word>","Kida enlists Milo in helping her<\/word>","decipher the Atlantean writing<\/word>","long forgotten by the natives<\/word>","Milo helps Kida uncover<\/word>","nature of the Heart of Atlantis<\/word>","supplies the Atlanteans with power<\/word>","longevity<\/word>","this is not mentioned in the Journal<\/word>","page is missing<\/word>","discover<\/word>","After traveling through a network of caves and a dormant volcano, the team reaches Atlantis<\/strong>. They are greeted by Kida<\/strong>, and discover<\/strong> that the Atlantean language<\/strong> is the basis of many existing languages<\/strong>. Kida enlists Milo in helping her<\/strong> decipher the Atlantean writing<\/strong>, which was long forgotten by the natives<\/strong>. By swimming deep within the city's submerged ruins and translating underwater murals, Milo helps Kida uncover<\/strong> the nature of the Heart of Atlantis<\/strong>, it supplies the Atlanteans with power<\/strong> and longevity<\/strong> through the crystals worn around their necks. He is surprised this is not mentioned in the Journal<\/strong>, but upon examination realizes a page is missing<\/strong>.<\/phrase>","Rourke has the missing page<\/word>","Rourke and the crew betray Milo<\/word>","bring the crystal to the surface<\/word>","sell it<\/word>","Rourke mortally wounds the King of Atlantis<\/word>","crystal detects a threat<\/word>","merges with Kida<\/word>","lock Kida in a crate<\/word>","prepare to leave the city<\/word>","when the crystal is gone<\/word>","Atlanteans will die<\/word>","Milo berates his friends<\/word>","convinces them to leave Rourke<\/word>","remain in Atlantis<\/word>","crystal has developed a consciousness<\/word>","find a royal host<\/word>","Atlantis is in danger<\/word>","he dies<\/word>","gives his crystal to Milo<\/word>","telling him to save Atlantis and Kida<\/word>","Milo rallies the crew<\/word>","stop Rourke<\/word>","Returning to the surface with Kida, Milo discovers Rourke has the missing page<\/strong>. Rourke and the crew betray Milo<\/strong>, intending to bring the crystal to the surface<\/strong> and sell it<\/strong>. Rourke mortally wounds the King of Atlantis<\/strong> while trying to extract information about the crystal's location, but finds its location for himself hidden beneath the King's throne room. The crystal detects a threat<\/strong> and merges with Kida<\/strong>. Rourke and the mercenaries lock Kida in a crate<\/strong> and prepare to leave the city<\/strong>, knowing that when the crystal is gone<\/strong> the Atlanteans will die<\/strong>. Milo berates his friends<\/strong> for betraying their consciences and ultimately convinces them to leave Rourke<\/strong> and remain in Atlantis<\/strong>. The King explains to Milo that the crystal has developed a consciousness<\/strong>; it will find a royal host<\/strong> when Atlantis is in danger<\/strong>. As he dies<\/strong> he gives his crystal to Milo<\/strong>, telling him to save Atlantis and Kida<\/strong>. Encouraged by Sweet, Milo rallies the crew<\/strong> and the Atlanteans to stop Rourke<\/strong>.<\/phrase>","battle inside the volcano<\/word>","Helga<\/word>","other mercenaries are defeated<\/word>","including Rourke<\/word>","killed<\/word>","fly the crystal back to the city<\/word>","volcano erupts<\/word>","Kida rises into the air<\/word>","creates a protective shield<\/word>","restored Atlantis<\/word>","crystal returns Kida to Milo<\/word>","crew members return to the surface<\/word>","keep the discovery of Atlantis a secret<\/word>","Milo, in love with Kida<\/word>","stays behind<\/word>","help her rebuild the lost empire<\/word>","promise<\/word>","In a battle inside the volcano<\/strong>, Helga<\/strong> and the other mercenaries are defeated<\/strong>, including Rourke<\/strong>, killed<\/strong> when Milo slashes his arm with a crystal shard. As Milo and the others fly the crystal back to the city<\/strong>, the volcano erupts<\/strong>. With lava flowing towards the city, Kida rises into the air<\/strong> and creates a protective shield<\/strong>. The lava breaks away harmlessly, showing a restored Atlantis<\/strong>, and the crystal returns Kida to Milo<\/strong>. The surviving crew members return to the surface<\/strong> and promise<\/strong> to keep the discovery of Atlantis a secret<\/strong>. Milo, in love with Kida<\/strong>, stays behind<\/strong> to help her rebuild the lost empire<\/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':2287, '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':2287, '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':2287, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }