var presentation = ["Avengers: Age of Ultron<\/word>","superhero film<\/word>","the Avengers<\/word>","sequel to The Avengers<\/word>","fight Ultron<\/word>","obsessed<\/word>","causing human extinction<\/word>","Marvel Comics<\/word>","superhero team<\/word>","film<\/word>","artificial intelligence<\/word>","Avengers: Age of Ultron<\/strong> is a 2015 American superhero film<\/strong> based on the Marvel Comics<\/strong> superhero team<\/strong> the Avengers<\/strong>. It is the sequel to The Avengers<\/strong>. In the film<\/strong>, the Avengers<\/strong> fight Ultron<\/strong>, an artificial intelligence<\/strong> obsessed<\/strong> with causing human extinction<\/strong>.<\/phrase>","the Avengers<\/word>","Tony Stark<\/word>","Clint Barton<\/word>","Hydra facility<\/word>","experimented on humans<\/word>","scepter<\/word>","previously wielded by Loki<\/word>","Strucker's test subjects<\/word>","superhuman speed<\/word>","Wanda<\/word>","telepathic and telekinetic abilities<\/word>","apprehend Strucker<\/word>","Stark retrieves Loki's scepter<\/word>","European country<\/word>","Sokovia<\/word>","Steve Rogers<\/word>","Thor<\/word>","Bruce Banner<\/word>","Natasha Romanoff<\/word>","Baron Wolfgang von Strucker<\/word>","Pietro<\/word>","In the Eastern European country<\/strong> of Sokovia<\/strong>, the Avengers<\/strong>-Tony Stark<\/strong>, Steve Rogers<\/strong>, Thor<\/strong>, Bruce Banner<\/strong>, Natasha Romanoff<\/strong>, and Clint Barton<\/strong>-raid a Hydra facility<\/strong> commanded by Baron Wolfgang von Strucker<\/strong>, who has experimented on humans<\/strong> using the scepter<\/strong> previously wielded by Loki<\/strong>. They meet two of Strucker's test subjects<\/strong>-twins Pietro<\/strong>, who has superhuman speed<\/strong>, and Wanda<\/strong> Maximoff, who has telepathic and telekinetic abilities<\/strong>-and apprehend Strucker<\/strong>, while Stark retrieves Loki's scepter<\/strong>.<\/phrase>","scepter's gem<\/word>","secretly<\/word>","decide to use it<\/word>","Ultron global defense program<\/word>","Ultron<\/word>","eradicate humanity<\/word>","save Earth<\/word>","eliminates Stark's A.I.<\/word>","J.A.R.V.I.S.<\/word>","attacks the Avengers<\/word>","Escaping with the scepter<\/word>","upgrade his rudimentary body<\/word>","army of robot drones<\/word>","recruits the Maximoffs<\/word>","hold Stark responsible for their parents' deaths<\/word>","Ulysses Klaue<\/word>","Johannesburg<\/word>","vibranium<\/word>","Avengers attack Ultron<\/word>","Wanda subdues them<\/word>","haunting visions<\/word>","Banner to turn into the Hulk<\/word>","Stark stops him<\/word>","anti-Hulk armor<\/word>","discover<\/word>","artificial intelligence<\/word>","complete<\/word>","Sokovia<\/word>","Maximoffs<\/word>","Stark and Banner discover<\/strong> an artificial intelligence<\/strong> within the scepter's gem<\/strong>, and secretly<\/strong> decide to use it<\/strong> to complete<\/strong> Stark's Ultron global defense program<\/strong>. The unexpectedly sentient Ultron<\/strong>, believing he must eradicate humanity<\/strong> to save Earth<\/strong>, eliminates Stark's A.I.<\/strong> J.A.R.V.I.S.<\/strong> and attacks the Avengers<\/strong> at their headquarters. Escaping with the scepter<\/strong>, Ultron<\/strong> uses the resources in Strucker's Sokovia<\/strong> base to upgrade his rudimentary body<\/strong> and build an army of robot drones<\/strong>. Having killed Strucker, he recruits the Maximoffs<\/strong>, who hold Stark responsible for their parents' deaths<\/strong> by his company's weapons, and goes to the base of arms dealer Ulysses Klaue<\/strong> in Johannesburg<\/strong> to get vibranium<\/strong>. The Avengers attack Ultron<\/strong> and the Maximoffs<\/strong>, but Wanda subdues them<\/strong> with haunting visions<\/strong>, causing Banner to turn into the Hulk<\/strong> and rampage until Stark stops him<\/strong> with his anti-Hulk armor<\/strong>.<\/phrase>","worldwide backlash<\/word>","Wanda<\/word>","send the team into hiding<\/word>","consult with Dr. Erik Selvig<\/word>","apocalyptic future<\/word>","saw in his hallucination<\/word>","Nick Fury arrives<\/word>","form a plan<\/word>","stop Ultron<\/word>","Ultron uses Loki's scepter<\/word>","enslave the team's friend<\/word>","Dr. Helen Cho<\/word>","synthetic-tissue technology<\/word>","vibranium<\/word>","scepter's gem<\/word>","craft a new body<\/word>","Ultron uploads himself into the body<\/word>","Wanda is able to read his mind<\/word>","Maximoffs turn against Ultron<\/word>","fight Ultron<\/word>","retrieve the synthetic body<\/word>","Ultron captures Romanoff<\/word>","Thor<\/word>","Seoul<\/word>","plan<\/word>","human extinction<\/word>","A worldwide backlash<\/strong> over the resulting destruction, and the fears Wanda<\/strong>'s hallucinations incited, send the team into hiding<\/strong> at a safe house. Thor<\/strong> departs to consult with Dr. Erik Selvig<\/strong> on the apocalyptic future<\/strong> he saw in his hallucination<\/strong>, while Nick Fury arrives<\/strong> and encourages the team to form a plan<\/strong> to stop Ultron<\/strong>. In Seoul<\/strong>, Ultron uses Loki's scepter<\/strong> to enslave the team's friend<\/strong> Dr. Helen Cho<\/strong>. They use her synthetic-tissue technology<\/strong>, vibranium<\/strong>, and the scepter's gem<\/strong> to craft a new body<\/strong>. As Ultron uploads himself into the body<\/strong>, Wanda is able to read his mind<\/strong>; discovering his plan<\/strong> for human extinction<\/strong>, the Maximoffs turn against Ultron<\/strong>. Rogers, Romanoff, and Barton fight Ultron<\/strong> and retrieve the synthetic body<\/strong>, but Ultron captures Romanoff<\/strong>.<\/phrase>","the Avengers<\/word>","secretly upload J.A.R.V.I.S.<\/word>","Ultron<\/word>","into the synthetic body<\/word>","help activate the body<\/word>","gem on its brow<\/word>","vibranium<\/word>","build a machine<\/word>","large part of the capital city skyward<\/word>","intending to crash it into the ground<\/word>","cause global extinction<\/word>","the Hulk<\/word>","The Avengers fight Ultron's army<\/word>","Rhodes<\/word>","S.H.I.E.L.D. agents<\/word>","evacuate civilians<\/word>","Pietro dies<\/word>","shields Barton from gunfire<\/word>","Wanda abandons her post<\/word>","destroy Ultron's primary body<\/word>","drones to activate the machine<\/word>","city plummets<\/word>","Stark and Thor overload the machine<\/word>","shatter the landmass<\/word>","departs in a Quinjet<\/word>","Vision confronts and seemingly destroys Ultron's last remaining body<\/word>","Thor<\/word>","vision<\/word>","Mind Stone<\/word>","Infinity Stones<\/word>","Maximoffs<\/word>","Sokovia<\/word>","battle<\/word>","Helicarrier with Maria Hill<\/word>","the Avengers<\/strong> fight among themselves when Stark and Banner secretly upload J.A.R.V.I.S.<\/strong>-who is still working after hiding from Ultron<\/strong> inside the Internet-into the synthetic body<\/strong>. Thor<\/strong> returns to help activate the body<\/strong>, based on his vision<\/strong> that the gem on its brow<\/strong> is the Mind Stone<\/strong>, one of the six Infinity Stones<\/strong>, the most powerful objects in existence. This vision<\/strong> and the Maximoffs<\/strong> go with the Avengers<\/strong> to Sokovia<\/strong>, where Ultron<\/strong> has used the remaining vibranium<\/strong> to build a machine<\/strong> to lift a large part of the capital city skyward<\/strong>, intending to crash it into the ground<\/strong> to cause global extinction<\/strong>. Banner rescues Romanoff, who awakens the Hulk<\/strong> for the battle<\/strong>. The Avengers fight Ultron's army<\/strong> while Fury arrives in a Helicarrier with Maria Hill<\/strong>, James Rhodes<\/strong>, and S.H.I.E.L.D. agents<\/strong> to evacuate civilians<\/strong>. Pietro dies<\/strong> when he shields Barton from gunfire<\/strong>, and a vengeful Wanda abandons her post<\/strong> to destroy Ultron's primary body<\/strong>, which allows one of his drones to activate the machine<\/strong>. The city plummets<\/strong>, but Stark and Thor overload the machine<\/strong> and shatter the landmass<\/strong>. In the aftermath, the Hulk<\/strong>, unwilling to endanger Romanoff by being with her, departs in a Quinjet<\/strong>, while Vision confronts and seemingly destroys Ultron's last remaining body<\/strong>.<\/phrase>","the Avengers<\/word>","established a new base<\/word>","Thor returns to Asgard<\/word>","Rogers and Romanoff prepare to train new Avengers<\/word>","Rhodes<\/word>","Wanda<\/word>","vision<\/word>","Sam Wilson<\/word>","Later, with the Avengers<\/strong> having established a new base<\/strong> run by Fury, Hill, Cho, and Selvig, Thor returns to Asgard<\/strong> to learn more about the forces he suspects have manipulated major events. As Stark leaves and Barton retires, Rogers and Romanoff prepare to train new Avengers<\/strong>-- Rhodes<\/strong>, vision<\/strong>, Sam Wilson<\/strong>, and Wanda<\/strong>.<\/phrase>","dissatisfied by the failures of his pawns<\/word>","dons a gauntlet<\/word>","vows to retrieve the Infinity Stones<\/word>","Thanos<\/word>","In a mid-credits scene, Thanos<\/strong>, dissatisfied by the failures of his pawns<\/strong>, dons a gauntlet<\/strong> and vows to retrieve the Infinity Stones<\/strong> himself.<\/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':2325, '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':2325, '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':2325, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }