var presentation = ["Cars 2<\/word>","spy action-adventure comedy film<\/word>","Pixar Animation Studios<\/word>","Walt Disney Pictures<\/word>","sequel<\/word>","second film in the Cars franchise<\/word>","Lightning McQueen<\/word>","World Grand Prix<\/word>","Cars<\/word>","film<\/word>","race car<\/word>","tow truck<\/word>","Mater<\/word>","head<\/word>","Japan<\/word>","Europe<\/word>","compete<\/word>","international espionage<\/word>","Cars 2<\/strong> is a 2011 American 3D computer-animated spy action-adventure comedy film<\/strong> produced by Pixar Animation Studios<\/strong> for Walt Disney Pictures<\/strong>. It is a sequel<\/strong> to 2006's Cars<\/strong> and the second film in the Cars franchise<\/strong>. In the film<\/strong>, race car<\/strong> Lightning McQueen<\/strong> and tow truck<\/strong> Mater<\/strong> head<\/strong> to Japan<\/strong> and Europe<\/strong> to compete<\/strong> in the World Grand Prix<\/strong>, but Mater<\/strong> accidentally becomes sidetracked with international espionage<\/strong>.<\/phrase>","infiltrates an oil rig<\/word>","rescue a fellow spy<\/word>","led by Professor Z\u00fcndapp<\/word>","disguised as a camera<\/word>","the agent he came to rescue is dead<\/word>","flees<\/word>","fakes his death<\/word>","British spy<\/word>","Finn McMissile<\/word>","lemon cars<\/word>","electromagnetic pulse emitter<\/word>","shipping crate<\/word>","British spy<\/strong> Finn McMissile<\/strong> infiltrates an oil rig<\/strong> owned by a group of lemon cars<\/strong> to rescue a fellow spy<\/strong>. He witnesses the lemons, seemingly led by Professor Z\u00fcndapp<\/strong>, load an electromagnetic pulse emitter<\/strong>, disguised as a camera<\/strong> onto a shipping crate<\/strong>. After finding out the agent he came to rescue is dead<\/strong>, he flees<\/strong> and fakes his death<\/strong>.<\/phrase>","Lightning McQueen<\/word>","four-time Piston Cup champion<\/word>","recent death of his mentor<\/word>","returns to Radiator Springs<\/word>","challenges McQueen to race<\/word>","World Grand Prix<\/word>","promote his new environmentally friendly fuel<\/word>","depart for Tokyo<\/word>","Grand Prix<\/word>","Doc Hudson<\/word>","Italian formula race car<\/word>","Francesco Bernoulli<\/word>","Sir Miles Axlerod<\/word>","Allinol<\/word>","best friend<\/word>","Mater<\/word>","Luigi<\/word>","Guido<\/word>","Fillmore<\/word>","Sarge<\/word>","first race<\/word>","Lightning McQueen<\/strong> is now a four-time Piston Cup champion<\/strong> after the recent death of his mentor<\/strong> Doc Hudson<\/strong>, and returns to Radiator Springs<\/strong>. However, Italian formula race car<\/strong>, Francesco Bernoulli<\/strong>, challenges McQueen to race<\/strong> in the newly created World Grand Prix<\/strong>, led by its creator Sir Miles Axlerod<\/strong>, who intends to promote his new environmentally friendly fuel<\/strong>, Allinol<\/strong>. McQueen and his best friend<\/strong> Mater<\/strong> - along with Luigi<\/strong>, Guido<\/strong>, Fillmore<\/strong>, and Sarge<\/strong> - depart for Tokyo<\/strong> for the first race<\/strong> of the Grand Prix<\/strong>.<\/phrase>","World Grand Prix promotional event<\/word>","Mater makes a scene<\/word>","leaking oil<\/word>","eating a bowl of Wasabi<\/word>","angering McQueen<\/word>","Mater interrupts a fight<\/word>","American spy<\/word>","McMissile and his new partner Holley Shiftwell<\/word>","attempt to meet<\/word>","Redline passes his information to Mater<\/word>","Redline is captured<\/word>","killed by Professor Z\u00fcndapp<\/word>","Allinol combusts when hit with an EMP pulse<\/word>","Holley mistakes Mater to be Redline<\/word>","recruits him to help foil Z\u00fcndapp's plot<\/word>","Rod Redline<\/word>","Grem<\/word>","Acer<\/word>","At a World Grand Prix promotional event<\/strong>, Mater makes a scene<\/strong> after leaking oil<\/strong> and eating a bowl of Wasabi<\/strong>, angering McQueen<\/strong>. While cleaning up, Mater interrupts a fight<\/strong> between American spy<\/strong> Rod Redline<\/strong> (whom McMissile and his new partner Holley Shiftwell<\/strong> attempt to meet<\/strong>) and lemons Grem<\/strong> and Acer<\/strong>. Redline passes his information to Mater<\/strong>. Meanwhile, Redline is captured<\/strong> and killed by Professor Z\u00fcndapp<\/strong>, who reveals that Allinol combusts when hit with an EMP pulse<\/strong>. Z\u00fcndapp informs his superior, an unknown mastermind, that Redline passed on his information. Holley mistakes Mater to be Redline<\/strong>, and recruits him to help foil Z\u00fcndapp's plot<\/strong>.<\/phrase>","three cars are ignited by the camera<\/word>","McQueen places second in the race<\/word>","due to Mater accidentally giving him bad racing advice<\/word>","McQueen snaps at Mater<\/word>","abducted by Finn<\/word>","while attempting to return to Radiator Springs<\/word>","collect more information<\/word>","Finn's old friend<\/word>","Porto Corsa, Italy<\/word>","next race is being held<\/word>","Mater infiltrates the criminals' meeting<\/word>","camera is used on a few more cars<\/word>","causing a multi-car pileup<\/word>","McQueen finishes first<\/word>","lifts the requirement to use it for the final race<\/word>","McQueen decides to continue using it<\/word>","criminals plot to kill McQueen<\/word>","This spooks Mater<\/word>","causing him to blow his cover<\/word>","allow him, Finn, and Holley to be captured<\/word>","first race<\/word>","Paris<\/word>","Tomber<\/word>","travel<\/word>","Allinol<\/word>","London<\/word>","At the first race<\/strong>, three cars are ignited by the camera<\/strong>. McQueen places second in the race<\/strong> after Bernoulli, due to Mater accidentally giving him bad racing advice<\/strong> while evading Z\u00fcndapp's henchmen with help from Holley and Finn. McQueen snaps at Mater<\/strong>, who is abducted by Finn<\/strong> while attempting to return to Radiator Springs<\/strong>. After traveling to Paris<\/strong> to collect more information<\/strong> from Finn's old friend<\/strong> Tomber<\/strong>, they travel<\/strong> to Porto Corsa, Italy<\/strong>, where the next race is being held<\/strong>. During the race, Mater infiltrates the criminals' meeting<\/strong>, just as the camera is used on a few more cars<\/strong>, causing a multi-car pileup<\/strong>, while McQueen finishes first<\/strong>. Due to increased fears over Allinol<\/strong>'s safety, Axlerod lifts the requirement to use it for the final race<\/strong>. However, when McQueen decides to continue using it<\/strong>, the criminals plot to kill McQueen<\/strong> in the next race in London<\/strong>. This spooks Mater<\/strong>, causing him to blow his cover<\/strong> and allow him, Finn, and Holley to be captured<\/strong>.<\/phrase>","Mater, Finn, and Holley are taken to and tied up inside Big Ben<\/word>","he is not the spy they think he is<\/word>","Mater learns that the camera did not function on McQueen<\/word>","criminals tell him they planted a bomb in his pits as a backup plan<\/word>","break free and escape<\/word>","Finn and Holley escape<\/word>","realize that the bomb is on Mater's air filter<\/word>","flees down the race course<\/word>","McQueen chases after him to apologize<\/word>","Finn apprehends Professor Z\u00fcndapp<\/word>","he attempts to escape<\/word>","lemons arrive and outnumber Finn, Holley, Mater, and McQueen<\/word>","soon rescued by the arrival of the other Radiator Springs residents<\/word>","Axlerod as the mastermind<\/word>","Axlerod had major investments in crude oil<\/word>","surged in value<\/word>","once the failure of Allinol<\/word>","disgraced the idea<\/word>","environmentally friendly fuel<\/word>","Mater receives an honorary knighthood from the Queen<\/word>","Mater<\/word>","Buckingham Palace<\/word>","Mater, Finn, and Holley are taken to and tied up inside Big Ben<\/strong>, where he admits to them that he is not the spy they think he is<\/strong>. Mater learns that the camera did not function on McQueen<\/strong>, but the criminals tell him they planted a bomb in his pits as a backup plan<\/strong>, spurring him to break free and escape<\/strong>. Finn and Holley escape<\/strong> soon after, but realize that the bomb is on Mater's air filter<\/strong>. Mater<\/strong> had already arrived at the pits when they tell him this, so he flees down the race course<\/strong> while McQueen chases after him to apologize<\/strong> for his earlier outburst. Finn apprehends Professor Z\u00fcndapp<\/strong> while he attempts to escape<\/strong>. The other lemons arrive and outnumber Finn, Holley, Mater, and McQueen<\/strong>, but they are soon rescued by the arrival of the other Radiator Springs residents<\/strong>. Mater<\/strong> and McQueen go to Buckingham Palace<\/strong>, where Mater<\/strong> reveals Axlerod as the mastermind<\/strong> behind the plot by forcing him to disable Mater<\/strong>'s bomb. It is revealed Axlerod had major investments in crude oil<\/strong>, which would have surged in value<\/strong> once the failure of Allinol<\/strong> disgraced the idea<\/strong> of environmentally friendly fuel<\/strong>. After Axlerod is arrested, Mater receives an honorary knighthood from the Queen<\/strong>.<\/phrase>","changed McQueen's fuel<\/word>","Fillmore's organic biofuel<\/word>","Radiator Springs Grand Prix<\/word>","World Grand Prix contenders<\/word>","Mater declines an invitation<\/word>","go on another mission<\/word>","choosing to stay in Radiator Springs<\/word>","Back in Radiator Springs<\/word>","Sarge<\/word>","Allinol<\/word>","Back in Radiator Springs<\/strong>, Sarge<\/strong> reveals that he changed McQueen's fuel<\/strong> from Allinol<\/strong> to Fillmore's organic biofuel<\/strong>, explaining why the camera did not work on him. A \"Radiator Springs Grand Prix<\/strong>\" is held featuring all the World Grand Prix contenders<\/strong>, and Mater declines an invitation<\/strong> from Finn and Holley to go on another mission<\/strong>, choosing to stay in Radiator Springs<\/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':2224, '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':2224, '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':2224, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }