var presentation = ["U.S. President Andrew Jackson<\/word>","She<\/word>","White House hostess<\/word>","First Lady of the United States<\/word>","Emily Donelson<\/word>","Rachel Donelson Jackson<\/word>","Emily Donelson<\/strong> (June 1, 1807 \u2013 December 19, 1836) was the niece of Rachel Donelson Jackson<\/strong>, the wife of U.S. President Andrew Jackson<\/strong>. She<\/strong> served as White House hostess<\/strong> and de facto First Lady of the United States<\/strong>.<\/phrase>","Tennessee<\/word>","Donelson, Tennessee<\/word>","President Andrew Jackson<\/word>","She<\/word>","Nashville Female Academy<\/word>","Nashville<\/word>","her father<\/word>","John Donelson<\/word>","Rachel Donelson Jackson<\/word>","many girls<\/word>","her day<\/word>","formal education<\/word>","Mary Ann Eastin<\/word>","accomplished student<\/word>","Emily Tennessee<\/strong> Donelson was born on her father<\/strong>'s farm in Donelson, Tennessee<\/strong>. her father<\/strong>, John Donelson<\/strong>, was the brother of Rachel Donelson Jackson<\/strong>, the wife of future President Andrew Jackson<\/strong>. Unlike many girls<\/strong> of her day<\/strong>, Emily was afforded a formal education<\/strong>. She<\/strong> studied at Nashville Female Academy<\/strong> in Nashville<\/strong>, with her niece Mary Ann Eastin<\/strong>, and was considered an accomplished student<\/strong>.<\/phrase>","Andrew Jackson Donelson<\/word>","Andrew<\/word>","first cousin<\/word>","mutual uncle and aunt<\/word>","Rachel Donelson Jackson<\/word>","four children<\/word>","On September 16, 1824, seventeen-year-old Emily married Andrew Jackson Donelson<\/strong>. Donelson was Emily's first cousin<\/strong> and a ward of their mutual uncle and aunt<\/strong>, Andrew<\/strong> and Rachel Donelson Jackson<\/strong>. The couple had four children<\/strong>.<\/phrase>","White House hostess<\/word>","The Hermitage<\/word>","Tennessee<\/word>","Andrew Jackson<\/word>","She<\/word>","Rachel Donelson Jackson<\/word>","Jacksons<\/word>","similar arrangement<\/word>","their plantation<\/word>","Mary Ann Eastin<\/word>","It has been speculated that even before Rachel Donelson Jackson<\/strong>'s death in 1828, Jackson had planned for Emily to accompany them to Washington to assist Rachel in the duties of White House hostess<\/strong>. The Jacksons<\/strong> had maintained a similar arrangement<\/strong> with Emily at The Hermitage<\/strong>, their plantation<\/strong> in Tennessee<\/strong>. The death of Rachel Donelson Jackson<\/strong> caused these plans to be abandoned and Andrew Jackson<\/strong> asked Emily to take over all the responsibilities of the White House hostess<\/strong>, which She<\/strong> did with the aid of her niece Mary Ann Eastin<\/strong>.<\/phrase>","She<\/word>","New Year's party<\/word>","White House<\/word>","President Jackson<\/word>","private secretary<\/word>","first months<\/word>","Rachel Donelson Jackson<\/word>","unofficial period<\/word>","Emily hosted<\/word>","She<\/strong> arrived in Washington at the age of 21. Her husband, A. J. Donelson, served as President Jackson<\/strong>'s private secretary<\/strong>. The first months<\/strong> of Jackson's administration marked a period of mourning for Rachel Donelson Jackson<\/strong>. The unofficial period<\/strong> of mourning ended when Emily hosted<\/strong> a New Year's party<\/strong> at the White House<\/strong> on January 1, 1830.<\/phrase>","Washington society<\/word>","buzz<\/word>","Peggy Eaton<\/word>","new wife<\/word>","Secretary of War John Henry Eaton<\/word>","extramarital affair<\/word>","first husband<\/word>","their relationship<\/word>","In 1829, Washington society<\/strong> began to buzz<\/strong> with rumors surrounding Peggy Eaton<\/strong>, the new wife<\/strong> of Secretary of War John Henry Eaton<\/strong>. The rumors alleged the couple's relationship had begun as an extramarital affair<\/strong>, and that Peggy's first husband<\/strong> had committed suicide when he learned of their relationship<\/strong>.<\/phrase>","Petticoat affair<\/word>","Vice President John C. Calhoun<\/word>","receive Peggy<\/word>","Washington society<\/word>","Cabinet<\/word>","several members<\/word>","Floride Calhoun<\/word>","The growing scandal, soon to be nicknamed the Petticoat affair<\/strong>, began to split Jackson's Cabinet<\/strong>. The wives of several members<\/strong> of Jackson's Cabinet<\/strong>, most notably Floride Calhoun<\/strong>, the wife of Vice President John C. Calhoun<\/strong>, refused to receive Peggy<\/strong> into Washington society<\/strong>, and snubbed the couple.<\/phrase>","She<\/word>","Andrew Jackson<\/word>","Washington society<\/word>","President Jackson<\/word>","Peggy Eaton<\/word>","also drew<\/word>","late wife<\/word>","Jacksons<\/word>","first husband<\/word>","divorce proceedings<\/word>","John Quincy Adams<\/word>","mercilessly attacked<\/word>","ill health<\/word>","her death<\/word>","President Jackson<\/strong> viewed the treatment of Peggy Eaton<\/strong> as unwarranted and unfair. He also drew<\/strong> comparisons to the treatment of his own late wife<\/strong>. Unbeknownst to the Jacksons<\/strong>, Rachel was still legally married to her first husband<\/strong> when She<\/strong> married Andrew Jackson<\/strong>, as he had begun divorce proceedings<\/strong> against Rachel, but the action was not finalized. This fact was discovered by supporters of John Quincy Adams<\/strong> during the election of 1828. They mercilessly attacked<\/strong> Rachel as an adulterer and a bigamist. Although Rachel had suffered from ill health<\/strong> since 1825, Jackson blamed her death<\/strong> in December 1828 on the stresses of the campaign. Jackson believed that Washington society<\/strong> was treating Peggy unfairly just as it had treated his late wife<\/strong>.<\/phrase>","She<\/word>","White House<\/word>","basic courtesies<\/word>","his subordinates<\/word>","accept<\/word>","Eatons<\/word>","head<\/word>","Jackson began to pressure his subordinates<\/strong> to accept<\/strong> the couple. Emily had sided with the group that wanted to snub the Eatons<\/strong>. When Jackson confronted Emily, She<\/strong> relented somewhat and included Peggy in White House<\/strong> functions, but Emily extended to her the basic courtesies<\/strong> and nothing more. The situation came to a head<\/strong> when the Eatons<\/strong> declined Jackson's invitation to a White House<\/strong> dinner in early 1830. When Jackson inquired why they had declined his invitation, Peggy cited Emily's cold treatment.<\/phrase>","Andrew Jackson<\/word>","The Hermitage<\/word>","stay<\/word>","Emily and Andrew Jackson<\/strong> traveled to The Hermitage<\/strong> for a vacation in the summer of 1830. By then the rift between the President and Emily had grown so great that Emily refused to stay<\/strong> at The Hermitage<\/strong>, instead choosing to stay<\/strong> at her mother's house. When Jackson returned to Washington, A. J. accompanied him but Emily did not.<\/phrase>","White House<\/word>","She<\/word>","back<\/word>","long<\/word>","Peggy Eaton<\/word>","When Jackson returned to the White House<\/strong>, he implored Emily to come back<\/strong> and resume her duties. However, She<\/strong> refused to do so as long<\/strong> as Jackson continued to insist on Peggy Eaton<\/strong>'s acceptance in the White House<\/strong>.<\/phrase>","daughter-in-law<\/word>","White House hostess<\/word>","White House<\/word>","tuberculosis<\/word>","Sarah Yorke Jackson<\/word>","President Jackson<\/word>","Emily Donelson<\/word>","cause<\/word>","Peggy Eaton<\/word>","argue<\/word>","Beginning in 1834, Sarah Yorke Jackson<\/strong>, President Jackson<\/strong>'s daughter-in-law<\/strong>, served as the White House hostess<\/strong>. There are conflicting accounts about Emily Donelson<\/strong>'s absence from the White House<\/strong> during the three years that Sarah Yorke Jackson<\/strong> served as hostess. A cohort of scholars believe that the cause<\/strong> was her treatment of Peggy Eaton<\/strong>, while others argue<\/strong> that it was her worsening tuberculosis<\/strong>.<\/phrase>","She<\/word>","The Hermitage<\/word>","tuberculosis<\/word>","Poplar Grove<\/word>","Tulip Grove<\/word>","First Lady in American<\/word>","Emily's health began to deteriorate in 1836. In June of that year She<\/strong> went to recuperate at Poplar Grove<\/strong> (later termed Tulip Grove<\/strong>), her plantation adjacent to The Hermitage<\/strong>. Her health continued to decline, and She<\/strong> died that December at the age of 29, possibly of her tuberculosis<\/strong>, making her the shortest-lived First Lady in American<\/strong> history. She<\/strong> died looking out the window waiting for her husband to come home.<\/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':1310, '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':1310, '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':1310, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }