var presentation = ["Treasure Planet<\/word>","science fiction action adventure film<\/word>","Walt Disney Feature Animation<\/word>","Walt Disney Pictures<\/word>","science fiction adaptation<\/word>","Robert Louis Stevenson<\/word>","1883 adventure<\/word>","Treasure Island<\/word>","Treasure Planet<\/strong> is a 2002 American animated science fiction action adventure film<\/strong> produced by Walt Disney Feature Animation<\/strong> and released by Walt Disney Pictures<\/strong>. It is a science fiction adaptation<\/strong> of Robert Louis Stevenson<\/strong>'s 1883 adventure<\/strong> novel Treasure Island<\/strong>.<\/phrase>","planet Montressor<\/word>","enchanted by stories of the legendary pirate<\/word>","mysterious Treasure Planet<\/word>","12 years later<\/word>","Jim has grown into<\/word>","his father abandoning him and his mother<\/word>","helps his mother<\/word>","run the family's Benbow Inn<\/word>","Alponian solar cruising<\/word>","skysurfing<\/word>","Jim Hawkins<\/word>","Captain Nathaniel Flint<\/word>","isolated troublemaker<\/word>","Sarah<\/word>","rocket-powered sailboard<\/word>","On the planet Montressor<\/strong>, young Jim Hawkins<\/strong> is enchanted by stories of the legendary pirate<\/strong> Captain Nathaniel Flint<\/strong> and his ability to appear from out of nowhere, raid passing ships, and disappear in order to hide the loot on the mysterious Treasure Planet<\/strong>. 12 years later<\/strong>, Jim has grown into<\/strong> an aloof and isolated troublemaker<\/strong> due to his father abandoning him and his mother<\/strong>. He reluctantly helps his mother<\/strong> Sarah<\/strong> run the family's Benbow Inn<\/strong>, and derives amusement from Alponian solar cruising<\/strong>, skysurfing<\/strong> atop a rocket-powered sailboard<\/strong>.<\/phrase>","spaceship crashes near the inn<\/word>","gives Jim a sphere<\/word>","tells him to beware the cyborg<\/word>","gang of pirates<\/word>","raid and burn the inn<\/word>","Jim, his mother, and their dog-like friend Dr. Delbert Doppler flee<\/word>","sphere is a holographic projector<\/word>","leading to the location<\/word>","Sarah's reluctance<\/word>","travel to Treasure Planet<\/word>","gain the funds to rebuild the inn<\/word>","Billy Bones<\/word>","star map<\/word>","Treasure Planet<\/word>","One day, a spaceship crashes near the inn<\/strong>. The dying pilot, Billy Bones<\/strong>, gives Jim a sphere<\/strong> and tells him to beware the cyborg<\/strong>. Suddenly, a gang of pirates<\/strong> raid and burn the inn<\/strong> to the ground while Jim, his mother, and their dog-like friend Dr. Delbert Doppler flee<\/strong>. At Doppler's study, Jim discovers that the sphere is a holographic projector<\/strong> containing a star map<\/strong>, leading to the location<\/strong> of Treasure Planet<\/strong>. Despite Sarah's reluctance<\/strong>, Jim and Doppler decide to travel to Treasure Planet<\/strong> in order to gain the funds to rebuild the inn<\/strong>.<\/phrase>","find Treasure Planet<\/word>","commanded<\/word>","Mr. Arrow<\/word>","secretly led by the half-robot cook<\/word>","work in the galley<\/word>","supervised by Silver<\/word>","form a tenuous father-son relationship<\/word>","RLS Legacy<\/word>","Captain Amelia<\/word>","first mate<\/word>","motley bunch<\/word>","John Silver<\/word>","shape-shifting pet<\/word>","Morph<\/word>","Doppler commissions the ship RLS Legacy<\/strong> on a mission to find Treasure Planet<\/strong>. The ship is commanded<\/strong> by the feline Captain Amelia<\/strong> along with her stone-skinned and disciplined first mate<\/strong>, Mr. Arrow<\/strong>. The crew is a motley bunch<\/strong>, secretly led by the half-robot cook<\/strong> John Silver<\/strong>, whom Jim suspects is the cyborg he was warned about. Jim is sent down to work in the galley<\/strong>, where he is supervised by Silver<\/strong> and his shape-shifting pet<\/strong>, Morph<\/strong>. Despite Jim's mistrust of Silver, they soon form a tenuous father-son relationship<\/strong>.<\/phrase>","supernova<\/word>","secretly cuts Mr. Arrow's lifeline<\/word>","sucked away to his death<\/word>","black hole forms<\/word>","insectoid crew member<\/word>","Scroop<\/word>","shock<\/word>","During the voyage, the ship encounters a supernova<\/strong> and Jim secures lifelines of all crew members. As a black hole forms<\/strong> from the supernova<\/strong>, the ruthless insectoid crew member<\/strong> Scroop<\/strong> secretly cuts Mr. Arrow's lifeline<\/strong>, who is sucked away to his death<\/strong>. The ship manages to ride the shock<\/strong> waves to safety, and the crew mourns the loss of Arrow, suspecting Jim to be responsible.<\/phrase>","discovers they are indeed pirates led by Silver<\/word>","prepare to abandon the ship<\/word>","Jim retrieves the map<\/word>","Silver targets him<\/word>","allowing him to escape<\/word>","group are shot down during their escape<\/word>","injuring Amelia<\/word>","discover that the map<\/word>","actually Morph in disguise<\/word>","Treasure Planet<\/word>","mutiny erupts<\/word>","Morph<\/word>","As the ship reaches Treasure Planet<\/strong>, Jim overhears the crew and soon discovers they are indeed pirates led by Silver<\/strong>, and a mutiny erupts<\/strong>. Jim, Doppler, Amelia and Morph<\/strong> prepare to abandon the ship<\/strong>. Jim retrieves the map<\/strong> and Silver targets him<\/strong>, but hesitates, allowing him to escape<\/strong> with the others. The group are shot down during their escape<\/strong>, injuring Amelia<\/strong>, and they discover that the map<\/strong> was actually Morph in disguise<\/strong>.<\/phrase>","soon meet B.E.N.<\/word>","lost his primary memory<\/word>","Jim, Morph, and B.E.N. hijack a longboat<\/word>","fly back to the Legacy<\/word>","attempt to retrieve the map<\/word>","attacks<\/word>","artificial gravity is disabled<\/word>","Scroop attempts to cut Jim loose<\/word>","Jim succeeds in kicking him overboard<\/word>","obtain the map<\/word>","caught by Silver and his crew<\/word>","already captured Doppler and Amelia<\/word>","Treasure Planet<\/word>","navigational robot<\/word>","secret passage<\/word>","Scroop<\/word>","While exploring Treasure Planet<\/strong>'s forests, they soon meet B.E.N.<\/strong>, an abandoned navigational robot<\/strong> who has lost his primary memory<\/strong> and invites them to his home for shelter. The pirates corner the group there; using a secret passage<\/strong>, Jim, Morph, and B.E.N. hijack a longboat<\/strong> to fly back to the Legacy<\/strong> in an attempt to retrieve the map<\/strong>. Scroop<\/strong>, who is guarding the ship, becomes aware of their presence and attacks<\/strong>. When the artificial gravity is disabled<\/strong> during the struggle, Scroop attempts to cut Jim loose<\/strong> of the ship, but Jim succeeds in kicking him overboard<\/strong>. They obtain the map<\/strong>, but upon returning they are caught by Silver and his crew<\/strong>, who have already captured Doppler and Amelia<\/strong>.<\/phrase>","Silver forces Jim to use the map<\/word>","portal that opens into any location in the universe<\/word>","open the portal<\/word>","Flint commandeered to stow his treasure<\/word>","pirates prepare to collect the loot<\/word>","skeletal remains of Flint<\/word>","missing component to B.E.N.'s cognitive computer<\/word>","B.E.N. immediately recalls that Flint had rigged the planet to explode<\/word>","upon the treasure's discovery<\/word>","Silver attempts to escape<\/word>","Flint's ship<\/word>","eventually lets it go to save Jim's life<\/word>","survivors escape to the ship<\/word>","unable to leave the planet in time<\/word>","Jim rigs a makeshift rocket-powered sailboard<\/word>","Jim sets the portal to the Montressor Spaceport<\/word>","he and the crew safely clear the destruction<\/word>","Treasure Planet<\/word>","ancient machine<\/word>","Silver forces Jim to use the map<\/strong>, directing them to a portal that opens into any location in the universe<\/strong>, which Jim realizes is how Flint conducted his raids. They open the portal<\/strong> to the center of Treasure Planet<\/strong>, discovering that the planet is really an ancient machine<\/strong> that Flint commandeered to stow his treasure<\/strong>. As the pirates prepare to collect the loot<\/strong>, Jim finds the skeletal remains of Flint<\/strong>, holding the missing component to B.E.N.'s cognitive computer<\/strong>. He reinserts it, and B.E.N. immediately recalls that Flint had rigged the planet to explode<\/strong> upon the treasure's discovery<\/strong>. The planet soon begins to fall apart. Not wanting to go empty-handed, Silver attempts to escape<\/strong> on Flint's ship<\/strong> loaded with treasure, but eventually lets it go to save Jim's life<\/strong>. The survivors escape to the ship<\/strong>, but it gets damaged and is unable to leave the planet in time<\/strong>. Jim rigs a makeshift rocket-powered sailboard<\/strong>, and rides ahead of the ship towards the portal. At the last moment, Jim sets the portal to the Montressor Spaceport<\/strong>, and both he and the crew safely clear the destruction<\/strong>.<\/phrase>","Jim finds Silver below decks<\/word>","escape his impending judgment<\/word>","He allows him to go<\/word>","Silver asks him to keep Morph<\/word>","providing him a handful of the treasure<\/word>","rebuild the Benbow Inn<\/word>","party is hosted at the rebuilt inn<\/word>","Doppler and Amelia have married<\/word>","Jim has become an interstellar cadet<\/word>","Jim finds Silver below decks<\/strong> about to escape his impending judgment<\/strong>. He allows him to go<\/strong>, and Silver asks him to keep Morph<\/strong>, as well as providing him a handful of the treasure<\/strong> he managed to save to rebuild the Benbow Inn<\/strong>, believing Jim will rattle the stars. Sometime later, a party is hosted at the rebuilt inn<\/strong>; Doppler and Amelia have married<\/strong> and had children of their own, and Jim has become an interstellar cadet<\/strong>. Jim looks into the skies and sees an image of Silver in the clouds.<\/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':2289, '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':2289, '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':2289, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }