var presentation = ["12th Disney animated feature film<\/word>","Cinderella<\/word>","musical fantasy film<\/word>","Walt Disney<\/word>","fairy tale<\/word>","same name<\/word>","Charles Perrault<\/word>","Cinderella<\/strong> is a 1950 American animated musical fantasy film<\/strong> produced by Walt Disney<\/strong>. Based on the fairy tale<\/strong> of the same name<\/strong> by Charles Perrault<\/strong>, it is the 12th Disney animated feature film<\/strong>.<\/phrase>","lost both parents<\/word>","forced to work<\/word>","scullery maid in her own house<\/word>","cruel to her<\/word>","jealous of Cinderella's charm and beauty<\/word>","kind<\/word>","gentle young woman<\/word>","friends with mice and kind to birds<\/word>","She protects the small animals<\/word>","Lady Tremaine's cat Lucifer<\/word>","King is frustrated that his son<\/word>","not married<\/word>","organize a ball<\/word>","find a suitable wife<\/word>","requesting every eligible maiden attend<\/word>","notice of the ball<\/word>","Lady Tremaine agrees to let Cinderella go<\/word>","finishes her chores<\/word>","find a suitable dress<\/word>","Cinderella<\/word>","dissatisfying life<\/word>","young age<\/word>","Lady Tremaine<\/word>","two stepsisters<\/word>","Drizella<\/word>","Anastasia<\/word>","royal palace<\/word>","Prince<\/word>","Grand Duke<\/word>","Cinderella<\/strong> is living a dissatisfying life<\/strong>, having lost both parents<\/strong> at a young age<\/strong> and being forced to work<\/strong> as a scullery maid in her own house<\/strong>. Her stepmother, Lady Tremaine<\/strong>, is cruel to her<\/strong>, and she is jealous of Cinderella's charm and beauty<\/strong>. Additionally, her two stepsisters<\/strong>, Drizella<\/strong> and Anastasia<\/strong>, cruelly take advantage of her. Despite this, Cinderella<\/strong> is a kind<\/strong> and gentle young woman<\/strong>. She is friends with mice and kind to birds<\/strong> that live in and around the house. She protects the small animals<\/strong> from Lady Tremaine's cat Lucifer<\/strong>. Meanwhile, at the royal palace<\/strong>, the King is frustrated that his son<\/strong>, the Prince<\/strong>, still is not married<\/strong>. He and the Grand Duke<\/strong> organize a ball<\/strong> to find a suitable wife<\/strong> for the bored and picky Prince<\/strong>, requesting every eligible maiden attend<\/strong>. Upon receiving notice of the ball<\/strong>, Lady Tremaine agrees to let Cinderella go<\/strong> if she finishes her chores<\/strong> and can find a suitable dress<\/strong> to wear.<\/phrase>","gown that belonged to her mother<\/word>","refashion it for the ball<\/word>","giving her extra chores<\/word>","Jaq<\/word>","Gus<\/word>","refashion it for her<\/word>","Cinderella comes downstairs wearing the dress<\/word>","stepsisters are furious<\/word>","tear the dress to shreds<\/word>","leaving for the ball with their mother<\/word>","rushes out into the garden in tears<\/word>","Fairy Godmother appears<\/word>","Fairy Godmother magically transforms a pumpkin into a carriage<\/word>","Major, into a coachman<\/word>","Bruno, into a footman<\/word>","turning Cinderella's ruined dress into a shimmering ballgown<\/word>","Cinderella leaves for the ball<\/word>","spell will break at the stroke of midnight<\/word>","Cinderella<\/word>","step-family impedes<\/word>","animal friends<\/word>","Drizella<\/word>","Anastasia<\/word>","Heartbroken<\/word>","her shoes<\/word>","glass slippers<\/word>","Fairy Godmother<\/word>","Cinderella<\/strong> finds a gown that belonged to her mother<\/strong> and decides to refashion it for the ball<\/strong>, but her step-family impedes<\/strong> this by giving her extra chores<\/strong>. Cinderella<\/strong>'s animal friends<\/strong>, including Jaq<\/strong> and Gus<\/strong>, refashion it for her<\/strong>, completing the design with a necklace and sash discarded by Drizella<\/strong> and Anastasia<\/strong>, respectively. When Cinderella comes downstairs wearing the dress<\/strong>, the stepsisters are furious<\/strong> when they realize Cinderella<\/strong> is wearing their accessories and tear the dress to shreds<\/strong> before leaving for the ball with their mother<\/strong>. Heartbroken<\/strong>, Cinderella<\/strong> rushes out into the garden in tears<\/strong>, where her Fairy Godmother appears<\/strong> before her. Insisting that Cinderella<\/strong> go to the ball, the Fairy Godmother magically transforms a pumpkin into a carriage<\/strong>, the mice into horses, Cinderella<\/strong>'s horse, Major, into a coachman<\/strong>, and dog, Bruno, into a footman<\/strong>, before turning Cinderella's ruined dress into a shimmering ballgown<\/strong> and her shoes<\/strong> into glass slippers<\/strong>. As Cinderella leaves for the ball<\/strong>, the Fairy Godmother<\/strong> warns her the spell will break at the stroke of midnight<\/strong>.<\/phrase>","Prince rejects every girl at the ball<\/word>","agrees to dance with him<\/word>","two fall in love<\/word>","stroll together in the castle gardens<\/word>","about to kiss<\/word>","Cinderella hears the clock start to chime midnight<\/word>","flees<\/word>","one of her slippers falls off<\/word>","Cinderella flees in the coach<\/word>","spell breaks<\/word>","last stroke of midnight<\/word>","The only remaining piece Cinderella has of her costume<\/word>","one glass slipper on her foot<\/word>","Cinderella<\/word>","The Prince rejects every girl at the ball<\/strong> until he sees Cinderella<\/strong>, who agrees to dance with him<\/strong>, unaware of who he is. The two fall in love<\/strong> and go out for a stroll together in the castle gardens<\/strong>. As they are about to kiss<\/strong>, Cinderella hears the clock start to chime midnight<\/strong> and flees<\/strong>. As she leaves the castle, one of her slippers falls off<\/strong>. The palace guards give chase as Cinderella flees in the coach<\/strong> before the spell breaks<\/strong> on the last stroke of midnight<\/strong>. Cinderella<\/strong>, her pets, and the mice hide in a wooded area as the guards pass. The only remaining piece Cinderella has of her costume<\/strong> is the one glass slipper on her foot<\/strong>.<\/phrase>","remains anonymous<\/word>","has escaped<\/word>","Prince wishes to marry her<\/word>","lost glass slipper is the only piece of evidence<\/word>","The King issues a royal proclamation<\/word>","ordering every maiden in the kingdom to try on the slipper<\/word>","Lady Tremaine overhears Cinderella humming the waltz played at the ball<\/word>","Realizing that Cinderella is the mysterious girl<\/word>","Lady Tremaine locks her in her attic bedroom<\/word>","Jaq<\/word>","Gus<\/word>","steal the key<\/word>","Lady Tremaine's dress pocket<\/word>","unsuccessfully try on the slipper<\/word>","Lucifer ambushes the mice<\/word>","Bruno chases him out of the house<\/word>","allowing the mice to free Cinderella<\/word>","Duke is about to leave<\/word>","Cinderella appears<\/word>","asks to try on the slipper<\/word>","Knowing it will fit<\/word>","Lady Tremaine trips the footman<\/word>","brings the Duke the slipper<\/word>","causing it to shatter<\/word>","Cinderella presents the Duke with the other slipper<\/word>","fits perfectly<\/word>","film ends<\/word>","now-married Prince and Cinderella<\/word>","their wedding<\/word>","sharing a kiss as they leave<\/word>","Grand Duke<\/word>","King<\/word>","Cinderella<\/word>","Anastasia<\/word>","Drizella<\/word>","The Grand Duke<\/strong> informs the King<\/strong> that Cinderella<\/strong>, who remains anonymous<\/strong>, has escaped<\/strong>, and that the Prince wishes to marry her<\/strong>. The lost glass slipper is the only piece of evidence<\/strong>. The King issues a royal proclamation<\/strong> ordering every maiden in the kingdom to try on the slipper<\/strong> for size to find the girl. After this news reaches Cinderella<\/strong>'s household, Lady Tremaine overhears Cinderella humming the waltz played at the ball<\/strong>. Realizing that Cinderella is the mysterious girl<\/strong>, Lady Tremaine locks her in her attic bedroom<\/strong>. Later, the Duke arrives at the house, and Jaq<\/strong> and Gus<\/strong> steal the key<\/strong> from Lady Tremaine's dress pocket<\/strong> and take it up to the attic as Anastasia<\/strong> and Drizella<\/strong> unsuccessfully try on the slipper<\/strong>. Lucifer ambushes the mice<\/strong>, but Bruno chases him out of the house<\/strong>, allowing the mice to free Cinderella<\/strong>. As the Duke is about to leave<\/strong>, Cinderella appears<\/strong> and asks to try on the slipper<\/strong>. Knowing it will fit<\/strong>, Lady Tremaine trips the footman<\/strong> as he brings the Duke the slipper<\/strong>, causing it to shatter<\/strong> on the floor. Much to her horror, and the Grand Duke<\/strong>'s profound relief, Cinderella presents the Duke with the other slipper<\/strong>, which fits perfectly<\/strong>. The film ends<\/strong> with a now-married Prince and Cinderella<\/strong> at their wedding<\/strong>, sharing a kiss as they leave<\/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':2253, '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':2253, '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':2253, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }