var presentation = ["Shazam!<\/word>","superhero film<\/word>","DC Comics<\/word>","seventh installment<\/word>","DC Extended Universe<\/word>","teenager<\/word>","Billy Batson<\/word>","chosen<\/word>","ancient wizard Shazam<\/word>","be his new champion<\/word>","saying the name Shazam<\/word>","transform into an adult superhero<\/word>","foster brother<\/word>","Freddy Freeman<\/word>","discover Billy's new powers<\/word>","order to stop<\/word>","Dr. Thaddeus Sivana<\/word>","Seven Deadly Sins<\/word>","Shazam!<\/strong> is a 2019 American superhero film<\/strong> based on the DC Comics<\/strong> character of the same name. It is the seventh installment<\/strong> in the DC Extended Universe<\/strong>. The plot follows teenager<\/strong> Billy Batson<\/strong> as he is chosen<\/strong> by the ancient wizard Shazam<\/strong> to be his new champion<\/strong> by saying the name Shazam<\/strong>, allowing him to transform into an adult superhero<\/strong> with various superpowers. Billy and his foster brother<\/strong> Freddy Freeman<\/strong> must discover Billy's new powers<\/strong> in order to stop<\/strong> the evil Dr. Thaddeus Sivana<\/strong> and the Seven Deadly Sins<\/strong>.<\/phrase>","young Thaddeus Sivana<\/word>","riding in a car<\/word>","transported<\/word>","Rock of Eternity<\/word>","magical temple<\/word>","another dimension<\/word>","ancient wizard Shazam<\/word>","searching for someone pure of heart<\/word>","bestow his power<\/word>","name as champion<\/word>","Seven Deadly Sins<\/word>","Council of Wizards<\/word>","Thaddeus is tempted<\/word>","Eye of Sin<\/word>","hears the voices of the Sins<\/word>","promising him power<\/word>","if he will free them<\/word>","wizard deems Thaddeus unworthy<\/word>","magically returns him to the car<\/word>","scene that leads to a car accident<\/word>","crippling his father<\/word>","In 1974, young Thaddeus Sivana<\/strong> is riding in a car<\/strong> with his father and brother when he is suddenly transported<\/strong> to the Rock of Eternity<\/strong>, a magical temple<\/strong> in another dimension<\/strong>. There, the ancient wizard Shazam<\/strong> has spent centuries searching for someone pure of heart<\/strong> on whom to bestow his power<\/strong> and name as champion<\/strong>, after the previous champion released the Seven Deadly Sins<\/strong>, which killed the rest of the Council of Wizards<\/strong>. Thaddeus is tempted<\/strong> by the Eye of Sin<\/strong>, through which he hears the voices of the Sins<\/strong>, trapped in stone statues, promising him power<\/strong> if he will free them<\/strong>. The wizard deems Thaddeus unworthy<\/strong> and magically returns him to the car<\/strong>, where he makes a scene that leads to a car accident<\/strong>, crippling his father<\/strong>. The Sins send Thaddeus a message telling him to find them.<\/phrase>","present-day<\/word>","Philadelphia<\/word>","foster child<\/word>","Billy Batson<\/word>","runs away<\/word>","foster homes<\/word>","search for his birth mother<\/word>","placed in a group home run<\/word>","Victor and Rosa Vasquez<\/word>","five other foster children<\/word>","Mary Bromfield<\/word>","Pedro Pe\u00f1a<\/word>","Eugene Choi<\/word>","Darla Dudley<\/word>","superhero enthusiast<\/word>","Freddy Freeman<\/word>","Sivana succeeds in his lifelong quest<\/word>","find a way back<\/word>","Rock of Eternity<\/word>","steals the Eye of Sin<\/word>","becoming the Sins' vessel<\/word>","bests the wizard<\/word>","In present-day<\/strong> Philadelphia<\/strong>, 14-year-old foster child<\/strong> Billy Batson<\/strong> continually runs away<\/strong> from foster homes<\/strong> to search for his birth mother<\/strong>, from whom he became separated while at a carnival ten years prior. He is placed in a group home run<\/strong> by Victor and Rosa Vasquez<\/strong>, with five other foster children<\/strong>-- Mary Bromfield<\/strong>, Pedro Pe\u00f1a<\/strong>, Eugene Choi<\/strong>, Darla Dudley<\/strong>, and superhero enthusiast<\/strong> Freddy Freeman<\/strong>. Meanwhile, the embittered Sivana succeeds in his lifelong quest<\/strong> to find a way back<\/strong> to the Rock of Eternity<\/strong>. He steals the Eye of Sin<\/strong>, becoming the Sins' vessel<\/strong>, bests the wizard<\/strong>, and uses his newfound power to kill his father, brother, and Sivana Industries' board of directors.<\/phrase>","Billy defends Freddy from bullies<\/word>","transported<\/word>","Rock of Eternity<\/word>","wizard chooses Billy to be his new champion<\/word>","saying the name Shazam<\/word>","transformed into an adult superhero<\/word>","wizard turns to dust<\/word>","explore his newfound powers<\/word>","include<\/word>","super strength<\/word>","near-invulnerability<\/word>","electricity manipulation<\/word>","saying Shazam again<\/word>","transform back into his normal body<\/word>","Freddy posts viral videos<\/word>","new superhero<\/word>","Billy starts skipping school<\/word>","use his powers<\/word>","fame<\/word>","straining his friendship with Freddy<\/word>","accidentally endangers<\/word>","saves a bus full of people<\/word>","Sivana confronts him<\/word>","demanding that he surrender his powers<\/word>","manages to escape<\/word>","siblings deduce that he is the superhero<\/word>","complete his search for his mother<\/word>","disheartened<\/word>","learn that she abandoned him<\/word>","felt inadequate<\/word>","raise him as a single, young mother<\/word>","school<\/word>","speed<\/word>","money<\/word>","At school<\/strong>, Billy defends Freddy from bullies<\/strong> and is chased into a subway, where he is transported<\/strong> to the Rock of Eternity<\/strong>. The wizard chooses Billy to be his new champion<\/strong>. By saying the name Shazam<\/strong>, Billy is transformed into an adult superhero<\/strong>. The wizard turns to dust<\/strong>, leaving his magical staff behind. At home, Freddy is taken into Billy's confidence and helps him explore his newfound powers<\/strong>, which include<\/strong> super strength<\/strong>, speed<\/strong>, near-invulnerability<\/strong>, and electricity manipulation<\/strong>. By saying Shazam again<\/strong>, he can transform back into his normal body<\/strong>. Freddy posts viral videos<\/strong> of the new superhero<\/strong>, and Billy starts skipping school<\/strong> to use his powers<\/strong> to busk for money<\/strong> and fame<\/strong>, straining his friendship with Freddy<\/strong>. When Billy accidentally endangers<\/strong> and then saves a bus full of people<\/strong>, Sivana confronts him<\/strong>, demanding that he surrender his powers<\/strong>. Billy discovers that he can fly, and manages to escape<\/strong>. His foster siblings deduce that he is the superhero<\/strong>, and complete his search for his mother<\/strong>, who lives nearby. Billy rushes to see her, but is disheartened<\/strong> to learn that she abandoned him<\/strong>, having felt inadequate<\/strong> to raise him as a single, young mother<\/strong>.<\/phrase>","Sivana deduces Billy's identity<\/word>","takes his foster siblings hostage<\/word>","agrees to transfer his powers<\/word>","exchange for their safety<\/word>","Rock of Eternity<\/word>","effect the transfer<\/word>","children follow and attack Sivana<\/word>","Sivana becomes vulnerable<\/word>","seven Sins leave his body<\/word>","Sivana pursues them<\/word>","winter carnival<\/word>","unleashes the Sins upon the crowd<\/word>","Billy uses the staff<\/word>","share his powers with his siblings<\/word>","transforming them<\/word>","adult superheroes like him<\/word>","siblings battle the Sins<\/word>","Billy faces down Sivana<\/word>","Billy makes Sivana vulnerable<\/word>","yanks the Eye of Sin out of his head<\/word>","recapturing all the Sins<\/word>","Sivana deduces Billy's identity<\/strong> and takes his foster siblings hostage<\/strong>. Billy agrees to transfer his powers<\/strong> to Sivana in exchange for their safety<\/strong>. They go to the Rock of Eternity<\/strong> to use the wizard's staff to effect the transfer<\/strong>, but the children follow and attack Sivana<\/strong>. Billy observes that Sivana becomes vulnerable<\/strong> when all seven Sins leave his body<\/strong>. Sivana pursues them<\/strong> to a winter carnival<\/strong> and unleashes the Sins upon the crowd<\/strong>. Remembering the wizard's words, Billy uses the staff<\/strong> to share his powers with his siblings<\/strong>, transforming them<\/strong> into adult superheroes like him<\/strong>. He then breaks the staff, and his siblings battle the Sins<\/strong> while Billy faces down Sivana<\/strong>. By luring out the final Sin, Envy, Billy makes Sivana vulnerable<\/strong> and yanks the Eye of Sin out of his head<\/strong>, recapturing all the Sins<\/strong>.<\/phrase>","Billy and his siblings are hailed as heroes<\/word>","return the Eye and the Sins<\/word>","their prison<\/word>","Rock of Eternity<\/word>","superhero lair<\/word>","accepts his foster parents and siblings as his real family<\/word>","In his superhero form<\/word>","has lunch with his siblings<\/word>","also invited Superman<\/word>","mid-credits scene<\/word>","Sivana is approached<\/word>","talking caterpillar<\/word>","proposes an alliance<\/word>","school<\/word>","Billy and his siblings are hailed as heroes<\/strong>, return the Eye and the Sins<\/strong> to their prison<\/strong>, and realize they can use the Rock of Eternity<\/strong> as their superhero lair<\/strong>. Billy finally accepts his foster parents and siblings as his real family<\/strong>. In his superhero form<\/strong>, he has lunch with his siblings<\/strong> at school<\/strong>, revealing to Freddy's surprise that he has also invited Superman<\/strong>. In a mid-credits scene<\/strong>, the imprisoned Sivana is approached<\/strong> by a talking caterpillar<\/strong>, who proposes an alliance<\/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':2792, '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':2792, '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':2792, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }