var presentation = ["Roger Rabbit's Car Toon Spin<\/word>","Roger Rabbit<\/word>","Disneyland Park<\/word>","Steven Spielberg<\/word>","Robert Zemeckis<\/word>","Roger Rabbit's Car Toon Spin<\/strong> is a dark ride located at the Disneyland Park<\/strong> based on the Steven Spielberg<\/strong> and Robert Zemeckis<\/strong> feature film Who Framed Roger Rabbit<\/strong>.<\/phrase>","Toontown Cab Company<\/word>","Toontown<\/word>","Ink and Paint Club<\/word>","Dip<\/word>","Dip refinery<\/word>","queue<\/word>","Jessica Rabbit<\/word>","Baby Herman<\/word>","Toon Patrol<\/word>","return<\/word>","phone<\/word>","Entering the Toontown Cab Company<\/strong>, the queue<\/strong> winds its way through darkened Toontown<\/strong> streets and alleys, passing through the Ink and Paint Club<\/strong>'s backstage areas like Jessica Rabbit<\/strong>'s dressing room and the prop cage, then past the window of Baby Herman<\/strong>'s apartment. In a window on the upper floors, the shadows of the Toon Patrol<\/strong> can be seen plotting to Dip<\/strong> the city with the queue<\/strong> passing above their Dip refinery<\/strong>. Exiting this area, the guests return<\/strong> to the Toontown Cab Company<\/strong> and approach the loading area. Characters' voices can also be heard throughout the queue<\/strong>, including two points where the Toon Patrol<\/strong> can be heard discussing their plans, one in the alley in front of the Ink and Paint Club<\/strong> and the other in their hideout. Jessica can also be heard talking on the phone<\/strong> outside her dressing room door.<\/phrase>","license plates<\/word>","have code-like puns of various Disney characters or slogans<\/word>","Toontown<\/word>","The Little Mermaid<\/word>","101 Dalmatians<\/word>","start<\/word>","queue<\/word>","include<\/word>","Big Bad Wolf<\/word>","MR TOAD<\/word>","Wonderland<\/word>","Wendy<\/word>","Peter Pan<\/word>","White Rabbit<\/word>","Captain Hook<\/word>","Aristocat<\/word>","Zip-a-Dee-Doo-Dah<\/word>","Three Little Pigs<\/word>","At the start<\/strong> of the ride's queue<\/strong>, some license plates<\/strong> hanging on the wall have code-like puns of various Disney characters or slogans<\/strong>. They include<\/strong> 2N TOWN (Toontown<\/strong>), BB WOLF (Big Bad Wolf<\/strong>), MR TOAD<\/strong> (Mr. Toad), 1DRLND (Wonderland<\/strong>), 1D N PTR (Wendy<\/strong> & Peter Pan<\/strong>), IM L8 (I'm late - The White Rabbit<\/strong>), CAP 10 HK (Captain Hook<\/strong>), L MERM8 (The Little Mermaid<\/strong>), 101 DLMN (101 Dalmatians<\/strong>), FAN T C (Fantasy), RS2CAT (Aristocat<\/strong>), ZPD2DA (Zip-a-Dee-Doo-Dah<\/strong>), and 3 LIL PIGS (Three Little Pigs<\/strong>).<\/phrase>","Dip<\/word>","Roger Rabbit<\/word>","cab can then spin around<\/word>","Lenny the Cab<\/word>","Benny the Cab<\/word>","Stupid<\/word>","Greasy<\/word>","Wheezy<\/word>","point<\/word>","Fantasyland<\/word>","Mad Tea Party<\/word>","Guests board a yellow Toon cab named Lenny the Cab<\/strong>, the twin cousin of Benny the Cab<\/strong>. Each cab seats two people, and the cabs are dispatched in groups of two. Once the traffic light in the loading area changes to green, the cabs leave the loading area. The ride begins with Stupid<\/strong>, Greasy<\/strong> and Wheezy<\/strong> dumping barrels of Dip<\/strong> into the streets, sending Roger Rabbit<\/strong> and Benny spinning out of control, and the guests' cab drives into the Dip<\/strong> as well. At this point<\/strong>, the steering wheel of the cab becomes active, and the cab can then spin around<\/strong>, much like Fantasyland<\/strong>'s Mad Tea Party<\/strong>. Nearby, Smarty has tied up Jessica and placed her in the trunk of his car.<\/phrase>","China shop run by a bull<\/word>","Spin Street<\/word>","laugh and dance around<\/word>","crash<\/word>","protect<\/word>","shop<\/word>","travel<\/word>","The cabs then crash<\/strong> through a China shop run by a bull<\/strong>, who is trying to protect<\/strong> some of his stock. Upon exiting the shop<\/strong>, the cars travel<\/strong> down Spin Street<\/strong>, where Toon fire hydrants, power cables, mailboxes, and streetlights laugh and dance around<\/strong>.<\/phrase>","Toontown Power House<\/word>","fall down<\/word>","Toon skyscrapers<\/word>","Roger promises to fix things<\/word>","enter<\/word>","pass<\/word>","face<\/word>","Next, the cabs enter<\/strong> the Toontown Power House<\/strong>, where they pass<\/strong> a furnace with an abstract face<\/strong> and encounter Roger having an electricity fight with Psycho. Passing through a series of explosions, the cabs \"fall down<\/strong>\" from Toon skyscrapers<\/strong>. Heading closer to street level past a group of stairs, Roger promises to fix things<\/strong>.<\/phrase>","Gag Factory<\/word>","Sleazy<\/word>","put them out of contrition<\/word>","drop a safe onto the cabs<\/word>","Dip Machine<\/word>","Dip the cabs<\/word>","Roger saves the day<\/word>","portable hole<\/word>","Toontown Cab Company<\/word>","enter<\/word>","Greasy<\/word>","Wheezy<\/word>","Stupid<\/word>","escape<\/word>","allow<\/word>","return<\/word>","The cabs then enter<\/strong> the Gag Factory<\/strong>, going past various jokes and gags, and a weasel named Sleazy<\/strong> holds a large metal gate open for the cabs, intending to \"put them out of contrition<\/strong>\". Jessica manages to free herself and assault Greasy<\/strong> and Wheezy<\/strong>. Stupid<\/strong> then tries to drop a safe onto the cabs<\/strong>. Just as the Dip Machine<\/strong> is about to Dip the cabs<\/strong>, they narrowly escape<\/strong> and Roger saves the day<\/strong> by stretching his arm out and using a portable hole<\/strong> to allow<\/strong> the cabs to return<\/strong> safely to the Toontown Cab Company<\/strong>, going through a cartoon \"The End\" title card to return<\/strong> to the loading area.<\/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':1541, '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':1541, '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':1541, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }