var presentation = ["Fantasia 2000<\/word>","animated film<\/word>","sequel to 1940's Fantasia<\/word>","consists of animated segments<\/word>","set to pieces of classical music<\/word>","Walt Disney Feature Animation<\/word>","Walt Disney Pictures<\/word>","Fantasia 2000<\/strong> is a 1999 American animated film<\/strong> produced by Walt Disney Feature Animation<\/strong> and released by Walt Disney Pictures<\/strong>. It is the sequel to 1940's Fantasia<\/strong>. Like its predecessor, Fantasia 2000<\/strong> consists of animated segments<\/strong> set to pieces of classical music<\/strong>.<\/phrase>","orchestra tuning<\/word>","Deems Taylor's introduction from Fantasia<\/word>","showing various segments from Fantasia<\/word>","form the set and stage for an orchestra<\/word>","Musicians take their seats<\/word>","animators draw at their desks<\/word>","James Levine approaches the conductor's podium<\/word>","film<\/word>","sound<\/word>","Panels<\/word>","The film<\/strong> begins with the sound<\/strong> of an orchestra tuning<\/strong> and Deems Taylor's introduction from Fantasia<\/strong>. Panels<\/strong> showing various segments from Fantasia<\/strong> fly in outer space and form the set and stage for an orchestra<\/strong>. Musicians take their seats<\/strong> and tune up and animators draw at their desks<\/strong> before James Levine approaches the conductor's podium<\/strong> and signals the beginning of the first piece.<\/phrase>","Symphony No. 5<\/word>","Ludwig van Beethoven<\/word>","Abstract patterns<\/word>","shapes<\/word>","resemble butterflies<\/word>","explore a world of light and darkness<\/word>","pursued by a swarm of black bats<\/word>","world is ultimately conquered by light<\/word>","Symphony No. 5<\/strong> by Ludwig van Beethoven<\/strong>. Abstract patterns<\/strong> and shapes<\/strong> that resemble butterflies<\/strong> in various colorful shades, tints, and hues explore a world of light and darkness<\/strong> while being pursued by a swarm of black bats<\/strong>. The world is ultimately conquered by light<\/strong>.<\/phrase>","Pines of Rome<\/word>","Ottorino Respighi<\/word>","family of humpback whales<\/word>","calf is separated from his parents<\/word>","becomes trapped<\/word>","he finds his way out<\/word>","family join a larger pod of whales<\/word>","Pines of Rome<\/strong> by Ottorino Respighi<\/strong>. A family of humpback whales<\/strong> are able to fly. The calf is separated from his parents<\/strong>, and becomes trapped<\/strong> in an iceberg. Eventually, he finds his way out<\/strong> with his mother's help. The family join a larger pod of whales<\/strong>, who fly and frolic through the clouds to emerge into outer space.<\/phrase>","Rhapsody in Blue<\/word>","George Gershwin<\/word>","early 1930s<\/word>","designed in the style of Al Hirschfeld's known caricatures<\/word>","Joe<\/word>","wish for a better life<\/word>","ends with all four getting their wish<\/word>","Set in New York City<\/word>","Duke<\/word>","Rachel<\/word>","John<\/word>","Rhapsody in Blue<\/strong> by George Gershwin<\/strong>. Set in New York City<\/strong> in the early 1930s<\/strong>, and designed in the style of Al Hirschfeld's known caricatures<\/strong> of the time, the story follows four individuals named Duke<\/strong>, Joe<\/strong>, Rachel<\/strong> and John<\/strong>, who wish for a better life<\/strong>. The segment ends with all four getting their wish<\/strong>, though their stories interact with each other's without any of them knowing.<\/phrase>","Piano Concerto No. 2, Allegro, Opus 102<\/word>","Based on the fairy tale<\/word>","The Steadfast Tin Soldier<\/word>","broken toy soldier<\/word>","one leg<\/word>","falls in love<\/word>","toy ballerina<\/word>","protects her<\/word>","evil jack-in-the-box<\/word>","Dmitri Shostakovich<\/word>","Hans Christian Andersen<\/word>","Piano Concerto No. 2, Allegro, Opus 102<\/strong> by Dmitri Shostakovich<\/strong>. Based on the fairy tale<\/strong> \"The Steadfast Tin Soldier<\/strong>\" by Hans Christian Andersen<\/strong>, a broken toy soldier<\/strong> with one leg<\/strong> falls in love<\/strong> with a toy ballerina<\/strong> and protects her<\/strong> from an evil jack-in-the-box<\/strong>. Unlike the original story, this version has a happy ending.<\/phrase>","The Carnival of the Animals, Finale<\/word>","Camille Saint-Sa\u00ebns<\/word>","force a slapstick member<\/word>","engage in the flock's dull routines<\/word>","The Carnival of the Animals, Finale<\/strong> by Camille Saint-Sa\u00ebns<\/strong>. A flock of flamingoes tries to force a slapstick member<\/strong>, who enjoys playing with a yo-yo, to engage in the flock's dull routines<\/strong>.<\/phrase>","The Sorcerer's Apprentice<\/word>","Paul Dukas<\/word>","segment is the only one featured in both Fantasia and Fantasia 2000<\/word>","apprentice<\/word>","attempts some of his master's magic tricks<\/word>","Der Zauberlehrling<\/word>","Goethe<\/word>","Mickey Mouse<\/word>","sorcerer<\/word>","Yen Sid<\/word>","The Sorcerer's Apprentice<\/strong> by Paul Dukas<\/strong>. Based on the 1797 poem \"Der Zauberlehrling<\/strong>\" by Goethe<\/strong>, the segment is the only one featured in both Fantasia and Fantasia 2000<\/strong>. It tells the story of Mickey Mouse<\/strong>, an apprentice<\/strong> of sorcerer<\/strong> Yen Sid<\/strong> who attempts some of his master's magic tricks<\/strong> before knowing how to control them.<\/phrase>","Pomp and Circumstance \u2013 Marches 1, 2, 3 and 4<\/word>","Noah's Ark<\/word>","Book of Genesis<\/word>","Noah's assistant<\/word>","Donald's wife<\/word>","task<\/word>","gathering the animals to the Ark<\/word>","Edward Elgar<\/word>","Donald Duck<\/word>","Daisy Duck<\/word>","Pomp and Circumstance \u2013 Marches 1, 2, 3 and 4<\/strong> by Edward Elgar<\/strong>. Based on the story of Noah's Ark<\/strong> from the Book of Genesis<\/strong>, Donald Duck<\/strong> is Noah's assistant<\/strong> and Daisy Duck<\/strong> is Donald's wife<\/strong>. Donald is given the task<\/strong> of gathering the animals to the Ark<\/strong>, and misses, loses, and reunites with Daisy in the process.<\/phrase>","Firebird Suite<\/word>","Igor Stravinsky<\/word>","Sprite is awoken<\/word>","companion<\/word>","elk<\/word>","accidentally wakes a fiery spirit of destruction<\/word>","destroys the forest<\/word>","seemingly the Sprite<\/word>","The Sprite survives<\/word>","restore the forest<\/word>","normal state<\/word>","Firebird Suite<\/strong>-1919 Version by Igor Stravinsky<\/strong>. A Sprite is awoken<\/strong> by her companion<\/strong>, an elk<\/strong>, and accidentally wakes a fiery spirit of destruction<\/strong> in a nearby volcano who destroys the forest<\/strong> and seemingly the Sprite<\/strong>. The Sprite survives<\/strong> and the elk<\/strong> encourages her to restore the forest<\/strong> to its normal state<\/strong>.<\/phrase>","closing credits<\/word>","orchestra leaving<\/word>","scenes from the movie flying off into space<\/word>","During the first half of the closing credits<\/strong>, we see the orchestra leaving<\/strong> as well as scenes from the movie flying off into space<\/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':2284, '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':2284, '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':2284, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }