var presentation = ["Cars 3<\/word>","comedy-adventure film<\/word>","third installment of the Cars film series<\/word>","Lightning McQueen<\/word>","prove to a new generation<\/word>","he is still the best racing car in the world<\/word>","Pixar Animation Studios<\/word>","Walt Disney Pictures<\/word>","film<\/word>","high tech race cars<\/word>","Cars 3<\/strong> is a 2017 American 3D computer-animated comedy-adventure film<\/strong> produced by Pixar Animation Studios<\/strong> and released by Walt Disney Pictures<\/strong>. It is the third installment of the Cars film series<\/strong>. In the film<\/strong>, Lightning McQueen<\/strong> sets out to prove to a new generation<\/strong> of high tech race cars<\/strong> that he is still the best racing car in the world<\/strong>.<\/phrase>","Lightning McQueen<\/word>","struggling to win against next-generation rookies<\/word>","utilize advanced technology<\/word>","other rookies to the series<\/word>","most of the veterans either retire or are fired<\/word>","McQueen desperately attempts to overtake Storm<\/word>","loses control<\/word>","suffers a violent crash<\/word>","veteran racers<\/word>","Piston Cup<\/word>","Jackson Storm<\/word>","modern training methods<\/word>","breakout success<\/word>","final race<\/word>","badly injured<\/word>","Lightning McQueen<\/strong> and the other veteran racers<\/strong> of the Piston Cup<\/strong> racing series suddenly find themselves struggling to win against next-generation rookies<\/strong> like Jackson Storm<\/strong>, who utilize advanced technology<\/strong> and modern training methods<\/strong>. As Storm's breakout success<\/strong> attracts other rookies to the series<\/strong>, most of the veterans either retire or are fired<\/strong> to make way for the new generation. In the final race<\/strong> of the season, McQueen desperately attempts to overtake Storm<\/strong> but loses control<\/strong> and suffers a violent crash<\/strong>, leaving him badly injured<\/strong>.<\/phrase>","McQueen is still recovering<\/word>","isolating himself<\/word>","spending his time watching footage of his late mentor<\/word>","receiving some encouragement<\/word>","McQueen decides to return to racing<\/word>","calls his sponsors from Rust-eze<\/word>","reveal that they have sold the team to a new owner<\/word>","McQueen to train under racing trainer Cruz Ramirez<\/word>","McQueen struggles to adapt<\/word>","modern methods<\/word>","fails to improve<\/word>","Sterling tries to force him into retirement<\/word>","if he can win the first race of the season<\/word>","he can continue racing as long as he wants<\/word>","otherwise, he will retire immediately<\/word>","assigns Cruz to join him<\/word>","Four months<\/word>","Radiator Springs<\/word>","Doc Hudson<\/word>","his girlfriend<\/word>","Sally<\/word>","Rusty<\/word>","Dusty<\/word>","Sterling<\/word>","state-of-the-art training center<\/word>","Four months<\/strong> later, McQueen is still recovering<\/strong> in Radiator Springs<\/strong>, isolating himself<\/strong> from his friends and spending his time watching footage of his late mentor<\/strong>, Doc Hudson<\/strong>. After receiving some encouragement<\/strong> from his girlfriend<\/strong> Sally<\/strong>, McQueen decides to return to racing<\/strong> and calls his sponsors from Rust-eze<\/strong>, Rusty<\/strong> and Dusty<\/strong>, who reveal that they have sold the team to a new owner<\/strong> named Sterling<\/strong>. In a new state-of-the-art training center<\/strong>, Sterling<\/strong> assigns McQueen to train under racing trainer Cruz Ramirez<\/strong>. McQueen struggles to adapt<\/strong> to Cruz's modern methods<\/strong> and fails to improve<\/strong>, damaging an expensive simulator in the process, so Sterling tries to force him into retirement<\/strong>. McQueen offers a deal: if he can win the first race of the season<\/strong>, he can continue racing as long as he wants<\/strong>; otherwise, he will retire immediately<\/strong>. Sterling<\/strong> is worried about damaging McQueen's marketability, but accepts the deal, and assigns Cruz to join him<\/strong>.<\/phrase>","McQueen tries to train on nearby Fireball Beach<\/word>","teaching Cruz how to drive on the sandy terrain<\/word>","attempts to join a race incognito<\/word>","inadvertently enters a figure-8-style demolition derby with Cruz<\/word>","which she wins<\/word>","McQueen's identity is also discovered<\/word>","apparent waste of training time<\/word>","Cruz reveals that she had wanted to be a racer<\/word>","never started a race due to her feeling intimidated<\/word>","She resigns as McQueen's trainer<\/word>","time<\/word>","famous dirt track<\/word>","Thunder Hollow<\/word>","his humiliation<\/word>","Distraught<\/word>","McQueen tries to train on nearby Fireball Beach<\/strong> but ends up spending most of his time<\/strong> teaching Cruz how to drive on the sandy terrain<\/strong>. McQueen then attempts to join a race incognito<\/strong> at a famous dirt track<\/strong> called Thunder Hollow<\/strong>, but inadvertently enters a figure-8-style demolition derby with Cruz<\/strong>, which she wins<\/strong>. McQueen's identity is also discovered<\/strong>, adding to his humiliation<\/strong>. Distraught<\/strong> at the apparent waste of training time<\/strong>, McQueen rages at Cruz and in the process accidentally breaks her trophy. Cruz reveals that she had wanted to be a racer<\/strong> just like McQueen all her life, but never started a race due to her feeling intimidated<\/strong> and outclassed by the other racers. She resigns as McQueen's trainer<\/strong> and heads back to the training center.<\/phrase>","McQueen calls his friend Mater for advice.<\/word>","McQueen tracks down Doc's mentor<\/word>","McQueen catches up to Cruz<\/word>","convinces her to rejoin him<\/word>","McQueen meets up with Smokey<\/word>","Doc never raced again<\/word>","found new happiness<\/word>","training McQueen<\/word>","Smokey and his friends help McQueen learn new tricks<\/word>","Cruz as his sparring partner<\/word>","during the final practice race<\/word>","Cruz suddenly overtakes him<\/word>","flashback to his crash<\/word>","shaking his confidence<\/word>","Guilty<\/word>","Smokey<\/word>","Thomasville<\/word>","Guilty<\/strong> and with no other options, McQueen calls his friend Mater for advice.<\/strong> He suggests that McQueen tracks down Doc's mentor<\/strong> Smokey<\/strong>, in Doc's hometown of Thomasville<\/strong>, so McQueen catches up to Cruz<\/strong> and convinces her to rejoin him<\/strong>. In Thomasville<\/strong>, McQueen meets up with Smokey<\/strong>, who reveals that despite the fact Doc never raced again<\/strong>, he found new happiness<\/strong> in training McQueen<\/strong>. After McQueen accepts that he will never be as fast as Storm, Smokey and his friends help McQueen learn new tricks<\/strong> to overcome his speed disadvantage, using Cruz as his sparring partner<\/strong>. However, during the final practice race<\/strong>, Cruz suddenly overtakes him<\/strong> and he suffers a flashback to his crash<\/strong>, shaking his confidence<\/strong>.<\/phrase>","McQueen starts last<\/word>","coaching from Smokey<\/word>","manages to gradually push up the ranks<\/word>","orders Cruz back to the training center<\/word>","remembering Cruz's dream of racing<\/word>","has his crew outfit her to take his place<\/word>","Cruz is able to push up the ranks<\/word>","eventually ends up right behind Storm<\/word>","tries to intimidate Cruz<\/word>","overtaking him<\/word>","winning the race<\/word>","race<\/word>","Florida<\/word>","Sterling<\/word>","At the race<\/strong> in Florida<\/strong>, McQueen starts last<\/strong>, but with coaching from Smokey<\/strong> in the pits, manages to gradually push up the ranks<\/strong>. Sterling<\/strong>, who still believes McQueen can't win, orders Cruz back to the training center<\/strong>, despite her wanting to stay and watch the race<\/strong>. Overhearing the exchange and remembering Cruz's dream of racing<\/strong>, McQueen instead has his crew outfit her to take his place<\/strong>, which includes painting on her his #95. While shaky at first, Cruz is able to push up the ranks<\/strong> thanks to McQueen coaching her using a combination of what he taught her and her own training methods, and eventually ends up right behind Storm<\/strong>. Storm, feeling threatened, tries to intimidate Cruz<\/strong>, even to the point of ramming her against the wall in the final lap. Cruz, being pinned by her wheels to the wall of the track, flips out of it over Storm, overtaking him<\/strong>, and winning the race<\/strong>.<\/phrase>","Cruz celebrates her victory<\/word>","Sterling offers her a role on his team<\/word>","instead takes a counteroffer from legendary owner Tex Dinoco<\/word>","McQueen and Cruz return to Radiator Springs<\/word>","Tex<\/word>","bought Rust-eze<\/word>","decides to continue racing<\/word>","become Cruz\u00b4 trainer<\/word>","just like Doc Hudson was for him<\/word>","Sterling<\/word>","race<\/word>","As Cruz celebrates her victory<\/strong>, Sterling offers her a role on his team<\/strong>, but she instead takes a counteroffer from legendary owner Tex Dinoco<\/strong>. Sterling<\/strong> reminds McQueen about his bet, but as McQueen started the race<\/strong> that Cruz finished using the same number, he gets a share of the win, thus winning his bet. Sometime later, McQueen and Cruz return to Radiator Springs<\/strong>, where McQueen reveals that Tex<\/strong>, after seeing Sterling<\/strong>'s callousness, has bought Rust-eze<\/strong> from him, and McQueen, now decked in Doc's racing colors, decides to continue racing<\/strong> and become Cruz\u00b4 trainer<\/strong>, just like Doc Hudson was for him<\/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':2232, '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':2232, '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':2232, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }