var presentation = ["R. L. Stine's<\/word>","save his town<\/word>","monsters from the Goosebumps franchise<\/word>","havoc<\/word>","Goosebumps<\/word>","American comedy horror film<\/word>","horror book series<\/word>","same name<\/word>","help<\/word>","escape<\/word>","their books<\/word>","real world<\/word>","Goosebumps<\/strong> is a 2015 American comedy horror film<\/strong>. Based on R. L. Stine's<\/strong> children's horror book series<\/strong> of the same name<\/strong>, it follows a teenager who tries to save his town<\/strong> with Stine's help<\/strong> after all the monsters from the Goosebumps franchise<\/strong> begin to escape<\/strong> from their books<\/strong>, wreaking havoc<\/strong> in the real world<\/strong>.<\/phrase>","his father's recent death<\/word>","Madison, Delaware<\/word>","avoid contact with them<\/word>","abandoned amusement park<\/word>","start to become friends<\/word>","stay away from Hannah<\/word>","something bad will happen<\/word>","Zach Cooper<\/word>","his mother<\/word>","move<\/word>","New York City<\/word>","peaceful town<\/word>","his neighbor<\/word>","overprotective father<\/word>","next morning<\/word>","Madison High School<\/word>","Champ<\/word>","clumsy student<\/word>","After his father's recent death<\/strong>, Zach Cooper<\/strong> and his mother<\/strong> Gale move<\/strong> from New York City<\/strong> to the peaceful town<\/strong> of Madison, Delaware<\/strong>. While settling in the neighborhood, Zach meets his neighbor<\/strong> Hannah, but her overprotective father<\/strong> warns him to avoid contact with them<\/strong>. The next morning<\/strong>, at Madison High School<\/strong>, where Gale works as vice-principal, Zach befriends Champ<\/strong>, a clumsy student<\/strong>. That night, Hannah invites Zach to an abandoned amusement park<\/strong> where they start to become friends<\/strong>. However, when they return home, Hannah's father warns again that Zach stay away from Hannah<\/strong> or something bad will happen<\/strong>.<\/phrase>","leaving Zach with his Aunt Lorraine<\/word>","he and Champ enter his home<\/word>","bookshelf<\/word>","Goosebumps franchise<\/word>","mysteriously locked<\/word>","The Abominable Snowman of Pasadena<\/word>","releasing the book's titular monster<\/word>","encloses the monster again in the book<\/word>","following night<\/word>","her father<\/word>","local police station<\/word>","numerous books<\/word>","Champ<\/word>","help<\/word>","chase<\/word>","local ice rink<\/word>","The following night<\/strong>, Gale leaves to supervise a dance at the school, leaving Zach with his Aunt Lorraine<\/strong>. Fearing that Hannah is in danger, Zach tricks her father<\/strong> into going to the local police station<\/strong> while he and Champ enter his home<\/strong>. While investigating, both find a bookshelf<\/strong> with numerous books<\/strong> from the Goosebumps franchise<\/strong>, each mysteriously locked<\/strong>. In response to Champ<\/strong>'s curiosity, Zach opens The Abominable Snowman of Pasadena<\/strong>, releasing the book's titular monster<\/strong>. With Hannah's help<\/strong>, they chase<\/strong> the creature to a local ice rink<\/strong> where Hannah's father appears and encloses the monster again in the book<\/strong>.<\/phrase>","Hannah's father unwittingly reveals<\/word>","Goosebumps creator, R. L. Stine<\/word>","Slappy burns his book<\/word>","flees<\/word>","releasing several other monsters<\/word>","Fifi the Vampire Poodle<\/word>","Please Don't Feed the Vampire!<\/word>","Slappy the Dummy from the Night of the Living Dummy<\/word>","lawn gnomes<\/word>","Revenge of the Lawn Gnomes<\/word>","escape<\/word>","their books<\/word>","panic and destruction<\/word>","Hannah's father unwittingly reveals<\/strong> that he is Goosebumps creator, R. L. Stine<\/strong>. Back home, the group encounters Slappy the Dummy from the Night of the Living Dummy<\/strong> books. As revenge for being locked up for years, Slappy burns his book<\/strong> and flees<\/strong> with all the others. Stine and the kids are attacked by the lawn gnomes<\/strong> from Revenge of the Lawn Gnomes<\/strong>, being forced to escape<\/strong>. Slappy begins releasing several other monsters<\/strong> from their books<\/strong>, causing panic and destruction<\/strong> around Madison. Meanwhile, Lorraine is attacked by Fifi the Vampire Poodle<\/strong> from Please Don't Feed the Vampire!<\/strong>.<\/phrase>","lock all the monsters<\/word>","only be done<\/word>","typewriter<\/word>","Brent Green<\/word>","My Best Friend Is Invisible<\/word>","giant praying mantis<\/word>","hide in the local supermarket<\/word>","Will Blake<\/word>","run over by Lorraine<\/word>","new book<\/word>","A Shocker on Shock Street<\/word>","Werewolf of Fever Swamp<\/word>","parking lot<\/word>","attack<\/word>","Zach implores Stine to write a new book<\/strong> that can lock all the monsters<\/strong> back up, but it can only be done<\/strong> with a supernatural typewriter<\/strong> in the school. Along the way, the group is attacked by Brent Green<\/strong> from My Best Friend Is Invisible<\/strong> and the giant praying mantis<\/strong> from A Shocker on Shock Street<\/strong>, forcing them to hide in the local supermarket<\/strong>. Will Blake<\/strong> from The Werewolf of Fever Swamp<\/strong> chases them to the parking lot<\/strong> where he is run over by Lorraine<\/strong>, who survived Fifi's attack<\/strong>.<\/phrase>","cemetery<\/word>","Hannah shines in the moonlight<\/word>","face his loneliness<\/word>","Hannah is unaware of this<\/word>","typewriter<\/word>","Zach and Champ try to warn everyone<\/word>","nobody believes them<\/word>","Slappy releases the rest of the monsters<\/word>","storm the school<\/word>","Slappy finds Stine and breaks his fingers<\/word>","before he can finish the book<\/word>","Attack of the Graveyard Ghouls<\/word>","arrive<\/word>","Hannah Fairchild from The Ghost Next Door<\/word>","book<\/word>","Stine and the kids go through a cemetery<\/strong>, where Zach realizes that Hannah shines in the moonlight<\/strong> before being attacked by ghouls from Attack of the Graveyard Ghouls<\/strong>. When they arrive<\/strong> at the school, Zach confronts Stine in private; he reveals that his \"daughter\" is Hannah Fairchild from The Ghost Next Door<\/strong>, and that he created her to face his loneliness<\/strong>, although Hannah is unaware of this<\/strong>. Stine finds the typewriter<\/strong> and begins writing a book<\/strong> based on the events around them, while Zach and Champ try to warn everyone<\/strong>, but nobody believes them<\/strong> until the mantis attacks the building. Slappy releases the rest of the monsters<\/strong> from the books and they storm the school<\/strong>. Despite the students and school staff's efforts to keep the monsters out, they break in nonetheless. Slappy finds Stine and breaks his fingers<\/strong> with the typewriter<\/strong>'s case before he can finish the book<\/strong>.<\/phrase>","abandoned amusement park<\/word>","Blob<\/word>","The Blob That Ate Everyone<\/word>","other monsters arrive<\/word>","Stine confronts the creature<\/word>","devoured<\/word>","climb a ferris wheel to finish the book<\/word>","mantis causes it to collapse<\/word>","Zach refuses to open the book<\/word>","because Hannah will also be sucked in<\/word>","she knew the truth<\/word>","Hannah opens the book<\/word>","sucking Slappy and all the monsters inside<\/word>","accepting her fate<\/word>","Champ<\/word>","roll<\/word>","kiss<\/word>","To ensure everyone's safety, Stine and the kids trick them into following a school bus rigged with explosives while they board another bus to the abandoned amusement park<\/strong>. After realizing the group's ruse, Slappy tracks down and confronts them, he then releases the Blob<\/strong> from The Blob That Ate Everyone<\/strong> as the other monsters arrive<\/strong> at the park. Stine confronts the creature<\/strong> but is devoured<\/strong> while Zach, Hannah and Champ<\/strong> climb a ferris wheel to finish the book<\/strong>. However, the mantis causes it to collapse<\/strong> and roll<\/strong> towards the forest. Zach refuses to open the book<\/strong>, because Hannah will also be sucked in<\/strong>, but she reveals that she knew the truth<\/strong> about herself all along. Hannah opens the book<\/strong>, sucking Slappy and all the monsters inside<\/strong>, saying goodbye to Zach with a kiss<\/strong> before accepting her fate<\/strong>.<\/phrase>","Stine starts working as a new teacher<\/word>","date Lorraine<\/word>","re-wrote Hannah back into reality<\/word>","making her permanently real<\/word>","typewriter writing by itself<\/word>","Brent Green<\/word>","The Invisible Boy's Revenge<\/word>","Madison High School<\/word>","new book<\/word>","book<\/word>","Goosebumps<\/word>","Some time later, Stine starts working as a new teacher<\/strong> at Madison High School<\/strong> while starting to date Lorraine<\/strong>. After school, Stine reveals to Zach that he re-wrote Hannah back into reality<\/strong> with a new book<\/strong>. When Zach and Hannah leave school together, Stine burns Hannah's book<\/strong>, making her permanently real<\/strong>. However, when Stine is about to leave school, he looks at his typewriter writing by itself<\/strong>. To his horror, Brent Green<\/strong> was omitted in imprisonment, beginning to write a new Goosebumps<\/strong> book<\/strong> entitled The Invisible Boy's Revenge<\/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':2002, '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':2002, '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':2002, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }