var presentation = ["Toy Story 3<\/word>","Pixar Animation Studios<\/word>","Walt Disney Pictures<\/word>","Toy Story series<\/word>","computer-animated comedy film<\/word>","third installment<\/word>","Toy Story 3<\/strong> is a 2010 American computer-animated comedy film<\/strong> produced by Pixar Animation Studios<\/strong> for Walt Disney Pictures<\/strong>. It is the third installment<\/strong> in Pixar's Toy Story series<\/strong>.<\/phrase>","Andy's other remaining toys<\/word>","accidentally being donated to a day care center<\/word>","preparing to leave for college<\/word>","their ensuing race to get home before Andy leaves<\/word>","Woody<\/word>","Buzz Lightyear<\/word>","Andy<\/word>","17 years<\/word>","The plot focuses on Woody<\/strong>, Buzz Lightyear<\/strong>, and Andy's other remaining toys<\/strong> accidentally being donated to a day care center<\/strong>, while Andy<\/strong>, now 17 years<\/strong> old, is preparing to leave for college<\/strong>, and their ensuing race to get home before Andy leaves<\/strong>.<\/phrase>","preparing to leave for college<\/word>","not played with his toys for years<\/word>","most have gone<\/word>","Rex<\/word>","Mr. and Mrs. Potato Head<\/word>","three toy soldiers<\/word>","despondent toys reflect on their future<\/word>","soldiers parachute out the window<\/word>","leave<\/word>","Andy<\/word>","17 years<\/word>","Woody<\/word>","Buzz Lightyear<\/word>","Jessie<\/word>","Bullseye<\/word>","Slinky<\/word>","Hamm<\/word>","Aliens<\/word>","Andy<\/strong> is 17 years<\/strong> old and preparing to leave for college<\/strong>. He has not played with his toys for years<\/strong>, and most have gone<\/strong>, except for Woody<\/strong>, Buzz Lightyear<\/strong>, Jessie<\/strong>, Bullseye<\/strong>, Rex<\/strong>, Slinky<\/strong>, Hamm<\/strong>, Mr. and Mrs. Potato Head<\/strong>, the Aliens<\/strong>, and three toy soldiers<\/strong>. The despondent toys reflect on their future<\/strong>, and the soldiers parachute out the window<\/strong> and leave<\/strong>.<\/phrase>","Andy intends to take Woody to college<\/word>","puts the others into a trash bag<\/word>","attic<\/word>","Andy's mother<\/word>","mistakes the bag for trash<\/word>","puts it on the curb<\/word>","toys narrowly escape<\/word>","believing Andy threw them away<\/word>","Molly's old Barbie doll<\/word>","Woody follows<\/word>","unable to convince them of Andy's real intentions<\/word>","goes along<\/word>","donation box<\/word>","Sunnyside Daycare<\/word>","Andy intends to take Woody to college<\/strong> and puts the others into a trash bag<\/strong> to put them in the attic<\/strong>; however, Andy's mother<\/strong> mistakes the bag for trash<\/strong> and puts it on the curb<\/strong>. The toys narrowly escape<\/strong> and, believing Andy threw them away<\/strong>, get into a donation box<\/strong> in his mother's car with Molly's old Barbie doll<\/strong>, bound for Sunnyside Daycare<\/strong>. Woody follows<\/strong>, but is unable to convince them of Andy's real intentions<\/strong>, and goes along<\/strong> when Andy's mother<\/strong> drives to Sunnyside.<\/phrase>","Andy's toys are welcomed by the other toys<\/word>","delighted to learn that Sunnyside never runs out of children<\/word>","Barbie is enamored with a Ken doll<\/word>","Woody<\/word>","At Sunnyside, Andy's toys are welcomed by the other toys<\/strong>, led by Lots-O'-Huggin' Bear. All of the toys except for Woody<\/strong> are delighted to learn that Sunnyside never runs out of children<\/strong>, and Barbie is enamored with a Ken doll<\/strong>.<\/phrase>","Woody attempts to return home<\/word>","brings him home<\/word>","plays with him and her other toys<\/word>","shocked that Woody came from Sunnyside<\/word>","were owned by a girl named Daisy<\/word>","were lost during a family trip<\/word>","Lotso found out that he had been replaced<\/word>","Embittered, he lied to Big Baby<\/word>","saying Daisy had replaced all of them<\/word>","found<\/word>","Bonnie<\/word>","Chuckles<\/word>","toy clown<\/word>","Lotso<\/word>","Big Baby<\/word>","toy prison<\/word>","Woody attempts to return home<\/strong>, but is instead found<\/strong> by a child from Sunnyside named Bonnie<\/strong>, who brings him home<\/strong> and plays with him and her other toys<\/strong>. Bonnie<\/strong>'s toys are shocked that Woody came from Sunnyside<\/strong>, and Chuckles<\/strong>, a toy clown<\/strong>, explains that he, Lotso<\/strong>, and Big Baby<\/strong> were owned by a girl named Daisy<\/strong>, but were lost during a family trip<\/strong>. When they made it home, Lotso found out that he had been replaced<\/strong>. Embittered, he lied to Big Baby<\/strong>, saying Daisy had replaced all of them<\/strong>. They went to Sunnyside, where Lotso<\/strong> took over, turning it into a toy prison<\/strong>. Chuckles<\/strong> was eventually broken and later found<\/strong> by Bonnie<\/strong>.<\/phrase>","Andy's toys are subjected to a very rough playtime with the toddlers<\/word>","move the toys to the older children's room<\/word>","Lotso switches Buzz<\/word>","erasing his memory<\/word>","Mrs. Potato Head<\/word>","eye she lost in Andy's room<\/word>","sees Andy searching for them<\/word>","realize that Woody was telling the truth<\/word>","try to leave<\/word>","imprisoned by Lotso's henchmen<\/word>","Buzz<\/word>","Lotso<\/word>","original factory setting<\/word>","Andy<\/word>","After Andy's toys are subjected to a very rough playtime with the toddlers<\/strong>, Buzz<\/strong> asks Lotso<\/strong> to move the toys to the older children's room<\/strong>, but Lotso switches Buzz<\/strong> to his original factory setting<\/strong>, erasing his memory<\/strong>. Mrs. Potato Head<\/strong>, through an eye she lost in Andy's room<\/strong>, sees Andy searching for them<\/strong>. They realize that Woody was telling the truth<\/strong> about Andy<\/strong>'s intentions and try to leave<\/strong> but, with the assistance of the now brainwashed Buzz<\/strong>, are imprisoned by Lotso's henchmen<\/strong>.<\/phrase>","Woody returns to Sunnyside<\/word>","now only one way out<\/word>","the trash<\/word>","accidentally reset him to his Spanish mode<\/word>","Buzz allies himself with Woody<\/word>","falls in love with Jessie<\/word>","toys reach a dumpster<\/word>","cornered by Lotso's gang<\/word>","Woody reveals Lotso's deception to Big Baby<\/word>","throws Lotso into the dumpster<\/word>","toys try to leave<\/word>","Lotso pulls Woody into the dumpster<\/word>","rest of Andy's toys jump after him<\/word>","all fall inside<\/word>","Buzz returns to normal<\/word>","television falls onto him<\/word>","Chatter Telephone<\/word>","Andy<\/word>","Buzz<\/word>","garbage truck approaches<\/word>","Woody returns to Sunnyside<\/strong>, where a Chatter Telephone<\/strong> tells him that there is now only one way out<\/strong> \u2013 the trash<\/strong>. Andy<\/strong>'s toys subdue Buzz<\/strong>, but they accidentally reset him to his Spanish mode<\/strong>. Buzz allies himself with Woody<\/strong> and falls in love with Jessie<\/strong>. The toys reach a dumpster<\/strong> but are cornered by Lotso's gang<\/strong>. Woody reveals Lotso's deception to Big Baby<\/strong>, who throws Lotso into the dumpster<\/strong>. As a garbage truck approaches<\/strong>, the toys try to leave<\/strong>, but Lotso pulls Woody into the dumpster<\/strong>. The rest of Andy's toys jump after him<\/strong>, just as the truck arrives, and all fall inside<\/strong>. Buzz returns to normal<\/strong> after a television falls onto him<\/strong> inside the truck.<\/phrase>","The truck takes the toys to a landfill<\/word>","swept onto a conveyor belt<\/word>","leads to an incinerator<\/word>","narrowly avoiding a shredder<\/word>","Woody and Buzz help Lotso reach an emergency stop button<\/word>","Lotso to abandon them<\/word>","toys fall into the incinerator<\/word>","rescued at the last second by the Aliens<\/word>","Lotso is later found by a garbage truck driver<\/word>","ties him to his truck's radiator grille<\/word>","back to Andy's house<\/word>","Woody<\/word>","The truck takes the toys to a landfill<\/strong>, where they are swept onto a conveyor belt<\/strong> that leads to an incinerator<\/strong>. After narrowly avoiding a shredder<\/strong>, Woody and Buzz help Lotso reach an emergency stop button<\/strong>, only for Lotso to abandon them<\/strong>. The toys fall into the incinerator<\/strong> and resign themselves to their apparent fate, but are rescued at the last second by the Aliens<\/strong> operating the claw crane. Lotso is later found by a garbage truck driver<\/strong> who ties him to his truck's radiator grille<\/strong>. Woody<\/strong> and the other toys ride another garbage truck back to Andy's house<\/strong>.<\/phrase>","donates the toys to Bonnie<\/word>","Andy introduces the toys individually to Bonnie<\/word>","Woody is at the bottom of the donation box<\/word>","Bonnie recognizes him<\/word>","Andy passes Woody on to Bonnie<\/word>","they play together before he leaves<\/word>","Woody<\/word>","note<\/word>","Andy<\/word>","Bonnie<\/word>","Woody<\/strong> leaves a note<\/strong> for Andy<\/strong>, who, thinking the note<\/strong> is from his mother, donates the toys to Bonnie<\/strong>. Andy introduces the toys individually to Bonnie<\/strong> and, to Andy<\/strong>'s surprise, Woody is at the bottom of the donation box<\/strong>, and Bonnie recognizes him<\/strong>. Though initially hesitant, Andy passes Woody on to Bonnie<\/strong>, and they play together before he leaves<\/strong>. Woody<\/strong> and the other toys witness Andy<\/strong>'s departure as they begin their new lives with Bonnie<\/strong>.<\/phrase>","film's epilogue<\/word>","Ken<\/word>","made vast improvements to Sunnyside<\/word>","maintain contact with Bonnie's toys<\/word>","through letters<\/word>","Barbie<\/word>","Big Baby<\/word>","In the film's epilogue<\/strong>, Barbie<\/strong>, Ken<\/strong>, and Big Baby<\/strong> have made vast improvements to Sunnyside<\/strong> and maintain contact with Bonnie's toys<\/strong> through letters<\/strong>. The toy soldiers parachute into Sunnyside, and they are welcomed in by Ken<\/strong> and Barbie<\/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':2222, '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':2222, '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':2222, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }