var presentation = ["animated musical historical drama film<\/word>","loosely based on<\/word>","Native American woman Pocahontas<\/word>","Englishman<\/word>","John Smith<\/word>","Jamestown settlers<\/word>","Pocahontas<\/word>","fictionalized account<\/word>","historical encounter<\/word>","Virginia Company<\/word>","Walt Disney Feature Animation<\/word>","Pocahontas<\/strong> is a 1995 American animated musical historical drama film<\/strong> loosely based on<\/strong> the life of the Native American woman Pocahontas<\/strong>. It portrays a fictionalized account<\/strong> of her historical encounter<\/strong> with Englishman<\/strong> John Smith<\/strong> and the Jamestown settlers<\/strong> that arrived from the Virginia Company<\/strong>. The film was produced by Walt Disney Feature Animation<\/strong>.<\/phrase>","sails from London<\/word>","North Atlantic storm<\/word>","John Smith<\/word>","dreams about adventure<\/word>","from drowning<\/word>","talk of adventure<\/word>","finding gold<\/word>","fighting Indians<\/word>","potentially settling in the new land<\/word>","Susan Constant<\/word>","New World<\/word>","English settlers<\/word>","Virginia Company<\/word>","inexperienced crewmate<\/word>","Thomas<\/word>","In 1607, the Susan Constant<\/strong> sails from London<\/strong> to the New World<\/strong>, carrying English settlers<\/strong> from the Virginia Company<\/strong>. Along the way, the Susan Constant<\/strong> is caught in a North Atlantic storm<\/strong> and Captain John Smith<\/strong>, who dreams about adventure<\/strong>, saves young, inexperienced crewmate<\/strong> Thomas<\/strong> from drowning<\/strong>. As they approach the New World<\/strong>, the settlers, including John, talk of adventure<\/strong>, finding gold<\/strong>, fighting Indians<\/strong> and potentially settling in the new land<\/strong>.<\/phrase>","Powhatan tribe<\/word>","Tsenacommacah, North America<\/word>","fears being possibly wed<\/word>","Kocoum<\/word>","she sees as too serious<\/word>","for her own free-spirited personality<\/word>","her mother's necklace<\/word>","raccoon<\/word>","hummingbird<\/word>","spiritual talking willow tree<\/word>","involving a spinning arrow<\/word>","Grandmother Willow then alerts Pocahontas to the arriving English<\/word>","Pocahontas<\/word>","beautiful daughter<\/word>","Chief Powhatan<\/word>","brave warrior<\/word>","present<\/word>","Meeko<\/word>","Flit<\/word>","visit<\/word>","Grandmother Willow<\/word>","dream<\/word>","In the Powhatan tribe<\/strong> in Tsenacommacah, North America<\/strong>, Pocahontas<\/strong>, the beautiful daughter<\/strong> of Chief Powhatan<\/strong>, fears being possibly wed<\/strong> to Kocoum<\/strong>, a brave warrior<\/strong> whom she sees as too serious<\/strong> for her own free-spirited personality<\/strong>. Powhatan gives Pocahontas<\/strong> her mother's necklace<\/strong> as a present<\/strong>. Pocahontas<\/strong>, along with her friends, the raccoon<\/strong> Meeko<\/strong> and hummingbird<\/strong> Flit<\/strong>, visit<\/strong> Grandmother Willow<\/strong>, a spiritual talking willow tree<\/strong> and speaks of a dream<\/strong> involving a spinning arrow<\/strong> and her confusion regarding what her path in life should be. Grandmother Willow then alerts Pocahontas to the arriving English<\/strong>.<\/phrase>","seeks gold<\/word>","crewmen dig for gold<\/word>","John departs<\/word>","explore the wilderness<\/word>","encounters Pocahontas<\/word>","end up falling in love<\/word>","Kocoum<\/word>","engage them in a fight<\/word>","Meeko meets Percy<\/word>","Ratcliffe's pet pug<\/word>","bane of his existence<\/word>","John tells Pocahontas<\/word>","he and his men are here to find gold<\/word>","she tells him that there is no gold<\/word>","Pocahontas introduces John<\/word>","Pocahontas's best friend<\/word>","discovers her relationship with John<\/word>","warns Kocoum<\/word>","Ratcliffe also learns of John's encounters with Pocahontas<\/word>","greedy leader<\/word>","Governor Ratcliffe<\/word>","plan<\/word>","Jamestown<\/word>","other warriors<\/word>","Grandmother Willow<\/word>","Nakoma<\/word>","The voyage's greedy leader<\/strong> Governor Ratcliffe<\/strong>, who seeks gold<\/strong> as part of his plan<\/strong> to bring him wealth and status, has Jamestown<\/strong> built in a wooded clearing and immediately has the crewmen dig for gold<\/strong>. John departs<\/strong> to explore the wilderness<\/strong> and encounters Pocahontas<\/strong>. They quickly bond, fascinated by each other's worlds, and end up falling in love<\/strong>, despite Powhatan's orders to stay away from the Englishmen after Kocoum<\/strong> and the other warriors<\/strong> engage them in a fight<\/strong>. Meanwhile, Meeko meets Percy<\/strong>, Ratcliffe's pet pug<\/strong>, and becomes the bane of his existence<\/strong>. When John tells Pocahontas<\/strong> that he and his men are here to find gold<\/strong>, she tells him that there is no gold<\/strong>. Pocahontas introduces John<\/strong> to Grandmother Willow<\/strong> and avoids two other crewmen, but Pocahontas's best friend<\/strong> Nakoma<\/strong> discovers her relationship with John<\/strong> and warns Kocoum<\/strong>. Ratcliffe also learns of John's encounters with Pocahontas<\/strong> and angrily warns John against sparing any natives he comes across on pain of death.<\/phrase>","John and Pocahontas meet with Grandmother Willow<\/word>","plan to bring peace between the colonists and the tribe<\/word>","John and Pocahontas share a kiss<\/word>","Kocoum<\/word>","witness from afar<\/word>","Kocoum, screaming a battle cry, attacks and attempts to kill John<\/word>","Thomas intervenes<\/word>","kills Kocoum<\/word>","destroys Pocahontas's necklace<\/word>","John orders Thomas to leave<\/word>","capture John<\/word>","Powhatan declares war on the English<\/word>","beginning with John's execution at sunrise<\/word>","Thomas<\/word>","Later, John and Pocahontas meet with Grandmother Willow<\/strong> and plan to bring peace between the colonists and the tribe<\/strong>. John and Pocahontas share a kiss<\/strong>, while Kocoum<\/strong> and Thomas<\/strong>, sent by Ratcliffe to spy on John, witness from afar<\/strong>. Furious, Kocoum, screaming a battle cry, attacks and attempts to kill John<\/strong>, but Thomas intervenes<\/strong> with his musket and kills Kocoum<\/strong>, who destroys Pocahontas's necklace<\/strong> in the process. John orders Thomas to leave<\/strong> before the tribesmen arrive, capture John<\/strong>, and retrieve Kocoum<\/strong>'s body. Enraged at Kocoum<\/strong>'s death, Powhatan declares war on the English<\/strong>, beginning with John's execution at sunrise<\/strong>.<\/phrase>","warns the English settlers of John's capture<\/word>","Ratcliffe then rallies his men to battle<\/word>","excuse to annihilate the tribe<\/word>","find their non-existent gold<\/word>","Powhatan also orders his men to prepare for battle<\/word>","hands her John's compass<\/word>","Pocahontas realizes John's compass was the spinning arrow<\/word>","leads to her destiny<\/word>","Just as Powhatan is about to execute John<\/word>","Pocahontas intervenes<\/word>","convinces him to end the fighting<\/word>","spare John's life<\/word>","John is released<\/word>","Ratcliffe orders his men to attack<\/word>","they refuse<\/word>","Ratcliffe fires a musket at Powhatan<\/word>","John shields him<\/word>","hit instead<\/word>","livid at Ratcliffe<\/word>","turn on him<\/word>","arrest him<\/word>","Thomas<\/word>","Jamestown<\/word>","Pocahontas<\/word>","Grandmother Willow<\/word>","Meeko<\/word>","Thomas<\/strong> reaches Jamestown<\/strong> safely at night and warns the English settlers of John's capture<\/strong>. Ratcliffe then rallies his men to battle<\/strong>, using this as an excuse to annihilate the tribe<\/strong> and find their non-existent gold<\/strong>. That same night, Powhatan also orders his men to prepare for battle<\/strong>. A desperate Pocahontas<\/strong> visits Grandmother Willow<\/strong>, where Meeko<\/strong> hands her John's compass<\/strong>. Pocahontas realizes John's compass was the spinning arrow<\/strong> from her real-life encounter, which leads to her destiny<\/strong>. Morning comes, and Powhatan and his tribe drag John to a cliff overlooking a clearing for execution. Meanwhile, Ratcliffe leads the armed colonists to the cliff to fight Powhatan's warriors. Just as Powhatan is about to execute John<\/strong>, Pocahontas intervenes<\/strong> and finally convinces him to end the fighting<\/strong> between the two groups and spare John's life<\/strong>. Everyone accepts gratefully, and John is released<\/strong>; when the unmoved Ratcliffe orders his men to attack<\/strong>, they refuse<\/strong> to. Enraged, Ratcliffe fires a musket at Powhatan<\/strong>, but John shields him<\/strong> and is hit instead<\/strong>. The settlers, livid at Ratcliffe<\/strong>, turn on him<\/strong> and arrest him<\/strong> for hurting their comrade.<\/phrase>","John is nursed back to health<\/word>","must return to England for further treatment to survive<\/word>","Ratcliffe is also sent back to England<\/word>","face punishment<\/word>","John asks Pocahontas to come with him<\/word>","chooses to stay<\/word>","give Pocahontas her mother's necklace completely fixed<\/word>","John leaves without Pocahontas<\/word>","with Powhatan's blessing to return anytime he likes<\/word>","watching the ship carrying John depart<\/word>","Meeko<\/word>","Percy<\/word>","Pocahontas<\/word>","John is nursed back to health<\/strong> by the tribe but must return to England for further treatment to survive<\/strong>. Ratcliffe is also sent back to England<\/strong> to face punishment<\/strong> for his crimes against the settlement. John asks Pocahontas to come with him<\/strong>, but she chooses to stay<\/strong> with her tribe to help keep the peace. Meeko<\/strong> and Percy<\/strong>, now friends, give Pocahontas her mother's necklace completely fixed<\/strong>. John leaves without Pocahontas<\/strong>, but with Powhatan's blessing to return anytime he likes<\/strong>. The film ends with Pocahontas<\/strong> standing atop a cliff, watching the ship carrying John depart<\/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':2279, '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':2279, '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':2279, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }