var presentation = ["computer animated comedy-adventure film<\/word>","white dog named Bolt<\/word>","spent his entire life on the set<\/word>","thinks that he has super powers<\/word>","believes<\/word>","has been kidnapped<\/word>","rescue her<\/word>","Bolt<\/word>","Walt Disney Animation Studios<\/word>","film<\/word>","plot centers<\/word>","television series<\/word>","human owner<\/word>","Penny<\/word>","cross-country journey<\/word>","Bolt<\/strong> is a 2008 American computer animated comedy-adventure film<\/strong> produced by Walt Disney Animation Studios<\/strong>. The film<\/strong>'s plot centers<\/strong> on a white dog named Bolt<\/strong> who, having spent his entire life on the set<\/strong> of a television series<\/strong>, thinks that he has super powers<\/strong>. When he believes<\/strong> that his human owner<\/strong>, Penny<\/strong>, has been kidnapped<\/strong>, he sets out on a cross-country journey<\/strong> to rescue her<\/strong>.<\/phrase>","adopted by an eight-year-old girl<\/word>","Five years later<\/word>","hit television series called Bolt<\/word>","Bolt uses various superpowers<\/word>","protect Penny from the villain<\/word>","deceived Bolt his entire life<\/word>","Bolt believes everything in the show is real<\/word>","he really has superpowers<\/word>","Bolt to believe Penny has been kidnapped<\/word>","escapes<\/word>","trapped inside a box of foam peanuts<\/word>","shipped to New York City<\/word>","White Shepherd<\/word>","Bolt<\/word>","Penny<\/word>","realistic performance<\/word>","sonic scream-like superbark<\/word>","cliffhanger episode<\/word>","on-set trailer<\/word>","Hollywood<\/word>","A White Shepherd<\/strong> puppy named Bolt<\/strong> is adopted by an eight-year-old girl<\/strong> named Penny<\/strong>. Five years later<\/strong>, Bolt<\/strong> and Penny<\/strong> star in a hit television series called Bolt<\/strong>, in which Bolt uses various superpowers<\/strong> to protect Penny from the villain<\/strong>. To gain a more realistic performance<\/strong>, the show's producers have deceived Bolt his entire life<\/strong>, arranging the filming in such a way that Bolt believes everything in the show is real<\/strong> and that he really has superpowers<\/strong>, including a devastatingly powerful sonic scream-like superbark<\/strong>. After a cliffhanger episode<\/strong> causes Bolt to believe Penny has been kidnapped<\/strong>, he escapes<\/strong> from his on-set trailer<\/strong> in Hollywood<\/strong> but knocks himself unconscious in the process and is trapped inside a box of foam peanuts<\/strong> which is shipped to New York City<\/strong>.<\/phrase>","New York<\/word>","resumes his search<\/word>","finds out the hard way<\/word>","his superpowers are useless<\/word>","Bolt compels Mittens to guide him back to Penny<\/word>","start their journey<\/word>","Penny is distraught over Bolt's disappearance<\/word>","convinced<\/word>","continue filming<\/word>","less experienced lookalike dog<\/word>","Bolt<\/word>","Penny<\/word>","Mittens<\/word>","feral cat<\/word>","Hollywood<\/word>","In New York<\/strong>, Bolt<\/strong> resumes his search<\/strong> for Penny<\/strong> and, much to his dismay and confusion, finds out the hard way<\/strong> that his superpowers are useless<\/strong>. He encounters Mittens<\/strong>, a feral cat<\/strong> who bullies pigeons out of their food. Bolt compels Mittens to guide him back to Penny<\/strong> and the two start their journey<\/strong> westward by truck. Meanwhile, in Hollywood<\/strong>, Penny is distraught over Bolt's disappearance<\/strong> but is convinced<\/strong> by the studio to continue filming<\/strong> with a less experienced lookalike dog<\/strong>.<\/phrase>","act like a cute but needy dog<\/word>","obtaining food for them<\/word>","RV park<\/word>","fanatical Bolt fan<\/word>","allows Mittens to figure out Bolt is from a television show<\/word>","tries to tell Bolt this<\/word>","Attempting to superbark repeatedly<\/word>","noise draws the attention of an Animal Control patrol<\/word>","Bolt and Mittens are both captured<\/word>","taken to an animal shelter<\/word>","Bolt<\/word>","Mittens<\/word>","Rhino<\/word>","fearless hamster<\/word>","Surprised at his first feelings of hunger, Bolt<\/strong> is shown by Mittens<\/strong> how to act like a cute but needy dog<\/strong>, obtaining food for them<\/strong> both at an RV park<\/strong>. They are joined by Rhino<\/strong>, a fearless hamster<\/strong> and fanatical Bolt fan<\/strong>. Rhino<\/strong>'s unwavering faith in Bolt<\/strong> substantiates the dog's illusions about himself, but allows Mittens to figure out Bolt is from a television show<\/strong>. She tries to tell Bolt this<\/strong>, but Bolt<\/strong> simply becomes frustrated. Attempting to superbark repeatedly<\/strong>, the noise draws the attention of an Animal Control patrol<\/strong> and Bolt and Mittens are both captured<\/strong> and taken to an animal shelter<\/strong>.<\/phrase>","freed from the patrol van<\/word>","realizes and accepts<\/word>","he is just a normal dog<\/word>","rescue Mittens from the shelter<\/word>","Bolt and Mittens form a close friendship<\/word>","she teaches Bolt how to be an ordinary dog<\/word>","enjoy typical dog activities<\/word>","hearing Bolt is still drawn to find Penny<\/word>","tells him Penny is only an actor<\/word>","humans never truly love their pets<\/word>","eventually betray and abandon them<\/word>","Bolt refuses to believe her<\/word>","continues on alone to Hollywood<\/word>","his two friends follow shortly after<\/word>","Bolt<\/word>","Rhino<\/word>","Mittens<\/word>","stay<\/word>","Las Vegas<\/word>","Bolt<\/strong>, freed from the patrol van<\/strong> by Rhino<\/strong>, finally realizes and accepts<\/strong> that he is just a normal dog<\/strong>, but regains his confidence after Rhino<\/strong> exhorts him to heroism. They rescue Mittens from the shelter<\/strong>, and as they continue west, Bolt and Mittens form a close friendship<\/strong> in which she teaches Bolt how to be an ordinary dog<\/strong> and enjoy typical dog activities<\/strong>. Mittens<\/strong> makes plans for the three of them to stay<\/strong> in Las Vegas<\/strong>, but hearing Bolt is still drawn to find Penny<\/strong>, she tells him Penny is only an actor<\/strong>, and humans never truly love their pets<\/strong>, and eventually betray and abandon them<\/strong>, as this happened to her. Bolt refuses to believe her<\/strong> and continues on alone to Hollywood<\/strong>; with Rhino<\/strong>'s encouragement his two friends follow shortly after<\/strong>.<\/phrase>","Bolt reaches the studio<\/word>","Penny embracing his lookalike<\/word>","broken-hearted Bolt leaves<\/word>","sees Penny telling her mother how much she misses Bolt<\/word>","Mittens follows Bolt and explains<\/word>","Bolt lookalike panics<\/word>","accidentally knocks over some flaming torches<\/word>","setting the sound stage on fire<\/word>","Penny trapped inside<\/word>","Bolt arrives and the two reunite<\/word>","unable to escape before Penny begins to suffocate<\/word>","Penny begs Bolt to go but Bolt refuses to leave her<\/word>","Bolt uses his superbark<\/word>","alerting the firefighters to their location<\/word>","allowing both of them to be rescued<\/word>","Penny<\/word>","Mittens<\/word>","Bolt reaches the studio<\/strong> and finds Penny embracing his lookalike<\/strong>, unaware that Penny<\/strong> still misses him and her affection for the lookalike is only a part of a rehearsal. A broken-hearted Bolt leaves<\/strong>, but Mittens<\/strong>, on a gantry in the studio, sees Penny telling her mother how much she misses Bolt<\/strong>. Mittens follows Bolt and explains<\/strong>. At the same time, the Bolt lookalike panics<\/strong> during the show's filming and accidentally knocks over some flaming torches<\/strong>, setting the sound stage on fire<\/strong> with Penny trapped inside<\/strong>. Bolt arrives and the two reunite<\/strong> inside the burning studio, but are unable to escape before Penny begins to suffocate<\/strong> from the smoke. Penny begs Bolt to go but Bolt refuses to leave her<\/strong>. Bolt uses his superbark<\/strong> through the building's air vent, alerting the firefighters to their location<\/strong> and allowing both of them to be rescued<\/strong> in time.<\/phrase>","Penny and her mother quit<\/word>","show continues with a replacement Bolt and Penny<\/word>","Penny adopts Mittens and Rhino<\/word>","move to a rural home<\/word>","enjoy a simpler, happy lifestyle<\/word>","with Bolt and her new pets<\/word>","Penny and her mother quit<\/strong> when their overeager agent proposes they exploit the incident for publicity purposes. The show continues with a replacement Bolt and Penny<\/strong> and a new storyline involving alien abduction. Penny adopts Mittens and Rhino<\/strong>, and she and her family move to a rural home<\/strong> to enjoy a simpler, happy lifestyle<\/strong> with Bolt and her new pets<\/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':2299, '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':2299, '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':2299, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }