var presentation = ["Barbara Bush<\/word>","wife<\/word>","George H. W. Bush<\/word>","president of the United States<\/word>","Barbara Bush Foundation for Family Literacy<\/word>","George W. Bush<\/word>","Jeb<\/word>","governor of Florida<\/word>","mother<\/word>","first lady<\/word>","United States<\/word>","previously was<\/word>","second lady<\/word>","six children<\/word>","Abigail Adams<\/word>","two women<\/word>","Barbara Bush<\/strong> (June 8, 1925 \u2013 April 17, 2018) was the first lady<\/strong> of the United States<\/strong> from 1989 to 1993 as the wife<\/strong> of George H. W. Bush<\/strong>, who served as the 41st president of the United States<\/strong>, and founder of the Barbara Bush Foundation for Family Literacy<\/strong>. She previously was<\/strong> the second lady<\/strong> of the United States<\/strong> from 1981 to 1989. Among her six children<\/strong> are George W. Bush<\/strong>, the 43rd president of the United States<\/strong>, and Jeb<\/strong> Bush, the 43rd governor of Florida<\/strong>. She and Abigail Adams<\/strong> are the only two women<\/strong> to be the wife<\/strong> of one U.S. president and the mother<\/strong> of another.<\/phrase>","Rye, New York<\/word>","World War II<\/word>","Barbara Pierce<\/word>","George Herbert Walker Bush<\/word>","his deployment<\/word>","Naval officer<\/word>","later began<\/word>","political career<\/word>","Barbara Pierce<\/strong> was born in New York City. She met George Herbert Walker Bush<\/strong> at the age of sixteen, and the two married in Rye, New York<\/strong> in 1945, while he was on leave during his deployment<\/strong> as a Naval officer<\/strong> in World War II<\/strong>. They moved to Texas in 1948, where George later began<\/strong> his political career<\/strong>.<\/phrase>","Pauline and Marvin Pierce<\/word>","Rye, New York<\/word>","popular women's magazines<\/word>","Barbara Pierce<\/word>","Booth Memorial Hospital<\/word>","Manhattan<\/word>","suburban town<\/word>","later became<\/word>","McCall Corporation<\/word>","Redbook<\/word>","two elder<\/word>","Martha<\/word>","James<\/word>","younger brother<\/word>","Scott<\/word>","Barbara Pierce<\/strong> was born on June 8, 1925, at Booth Memorial Hospital<\/strong>, a Salvation Army facility at 314 East 15th Street on Stuyvesant Square in the New York City borough of Manhattan<\/strong>, to Pauline and Marvin Pierce<\/strong>. She was raised in the suburban town<\/strong> of Rye, New York<\/strong>. Her father later became<\/strong> president of McCall Corporation<\/strong>, the publisher of the popular women's magazines<\/strong> Redbook<\/strong> and McCall's. She had two elder<\/strong> siblings, Martha<\/strong> and James<\/strong>, and a younger brother<\/strong>, Scott<\/strong>.<\/phrase>","Ashley Hall<\/word>","three siblings<\/word>","Milton Public School<\/word>","Rye Country Day School<\/word>","her youth<\/word>","enjoyed swimming<\/word>","interest<\/word>","gathering and reading<\/word>","her family<\/word>","Pierce and her three siblings<\/strong> were raised in a house on Onondaga Street in Rye. She attended Milton Public School<\/strong> from 1931 to 1937, Rye Country Day School<\/strong> until 1940 and later the boarding school Ashley Hall<\/strong> in Charleston, South Carolina, from 1940 to 1943. In her youth<\/strong>, Pierce was athletic and enjoyed swimming<\/strong>, tennis, and bike riding. Her interest<\/strong> in reading began early in life; she recalled gathering and reading<\/strong> with her family<\/strong> during the evenings.<\/phrase>","George H. W. Bush<\/word>","Round Hill Country Club<\/word>","Phillips Academy<\/word>","World War II<\/word>","Smith College<\/word>","Christmas<\/word>","dance<\/word>","torpedo bomber pilot<\/word>","his planes<\/word>","her studies<\/word>","two weeks<\/word>","73 years<\/word>","her death<\/word>","presidential couple<\/word>","Jimmy<\/word>","Rosalynn Carter<\/word>","their record<\/word>","When Pierce was 16 and on Christmas<\/strong> vacation, she met George H. W. Bush<\/strong> at a dance<\/strong> at the Round Hill Country Club<\/strong> in Greenwich, Connecticut; he was a student at Phillips Academy<\/strong> in Andover, Massachusetts. After 18 months, the two became engaged to be married, just before he went off to World War II<\/strong> as a Navy torpedo bomber pilot<\/strong>. He named three of his planes<\/strong> after her: Barbara, Barbara II, and Barbara III. When he returned on leave, she had discontinued her studies<\/strong> at Smith College<\/strong> in Northampton, Massachusetts; two weeks<\/strong> later, on January 6, 1945, they were married. They were married 73 years<\/strong> until her death<\/strong> on April 17, 2018, the longest-married presidential couple<\/strong> in U.S. history until Jimmy<\/strong> and Rosalynn Carter<\/strong> beat their record<\/strong> on October 17, 2019.<\/phrase>","Barbara Bush<\/word>","13 years<\/word>","six children<\/word>","17 grandchildren<\/word>","Over the next 13 years<\/strong>, George and Barbara Bush<\/strong> had six children<\/strong> who, among them, gave the couple a total of 17 grandchildren<\/strong> and 9 great-grandchildren:<\/phrase>","Laura Welch<\/word>","George Walker Bush<\/word>","twin daughters<\/word>","three grandchildren<\/word>","George Walker Bush<\/strong>, who married Laura Welch<\/strong> on November 5, 1977. They have twin daughters<\/strong>, and three grandchildren<\/strong>.<\/phrase>","Pauline Robinson (Robin) Bush<\/word>","died<\/word>","leukemia<\/word>","Pauline Robinson (Robin) Bush<\/strong>, who died<\/strong> of leukemia<\/strong> at age 3.<\/phrase>","John Ellis (Jeb) Bush Sr<\/word>","Columba Garnica Gallo<\/word>","three children<\/word>","four grandchildren<\/word>","John Ellis (Jeb) Bush Sr<\/strong>., who married Columba Garnica Gallo<\/strong> on February 23, 1974. They have three children<\/strong>, and four grandchildren<\/strong>.<\/phrase>","two grandsons<\/word>","Neil Mallon Bush<\/word>","Sharon Smith<\/word>","three children<\/word>","Maria Andrews<\/word>","Neil Mallon Bush<\/strong>, who married Sharon Smith<\/strong> in 1980; they divorced in April 2003. They have three children<\/strong>, and two grandsons<\/strong>. Neil married Maria Andrews<\/strong> in 2004.<\/phrase>","two children<\/word>","Marvin Pierce Bush<\/word>","Margaret Molster<\/word>","Marvin Pierce Bush<\/strong>, who married Margaret Molster<\/strong> in 1981. They have two children<\/strong>.<\/phrase>","Dorothy Walker (Doro) Bush Koch<\/word>","two children<\/word>","Robert P. Koch<\/word>","William LeBlond<\/word>","Dorothy Walker (Doro) Bush Koch<\/strong>, who married William LeBlond<\/strong> in 1982; they divorced in 1990, and have two children<\/strong>. Dorothy married Robert P. Koch<\/strong> in June 1992; they have two children<\/strong><\/phrase>","oil business<\/word>","Barbara's parents<\/word>","car accident<\/word>","mother<\/word>","died<\/word>","leukemia<\/word>","Yale University<\/word>","travel<\/word>","attend<\/word>","Pauline Robinson Bush<\/word>","move<\/word>","start<\/word>","Zapata Corporation<\/word>","After the war ended, George and Barbara had their first child while George was a student at Yale University<\/strong>. The young family soon moved to Odessa, Texas, where George entered the oil business<\/strong>. In September 1949, Barbara's parents<\/strong> were in a car accident<\/strong> in New York and her mother<\/strong> was killed. Mrs. Bush was pregnant at the time with her second child, and was advised not to travel<\/strong> to attend<\/strong> the funeral. When the baby was born, she was named Pauline Robinson Bush<\/strong> in honor of Barbara's mother<\/strong>.The Bushes would move<\/strong> some 29 times during their marriage. Over time, Bush built a business in the oil industry and joined with colleagues to start<\/strong> up the successful Zapata Corporation<\/strong>. Barbara raised her children while her husband was usually away on business. In 1953, the Bushes' daughter, Robin, died<\/strong> of leukemia<\/strong>.<\/phrase>","Harris County Republican Party chairman<\/word>","U.S. senator from Texas<\/word>","Midland<\/word>","When their daughter Dorothy was born in August 1959, the Bushes moved from Midland<\/strong> to Houston. In 1963, George Bush was elected Harris County Republican Party chairman<\/strong>, in the first of what would become many elections. In 1964, he made his first run for a prominent political office-U.S. senator from Texas<\/strong>. Although he lost the election, the exposure that the Bush family received put George and Barbara on the national scene.<\/phrase>","U.S. representative in Congress from Texas<\/word>","U.S. Congress<\/word>","executive branch<\/word>","government-related posts<\/word>","Barbara Bush<\/word>","accompanied him<\/word>","In 1966, George Bush was elected as a U.S. representative in Congress from Texas<\/strong>. Barbara raised her children while her husband campaigned and occasionally joined him on the trail. Over the ensuing years, George Bush was elected or appointed to several different positions in the U.S. Congress<\/strong> or the executive branch<\/strong>, or government-related posts<\/strong>, and Barbara Bush<\/strong> accompanied him<\/strong> in each case.<\/phrase>","wife<\/word>","Washington, D.C.<\/word>","ambassador to the United Nations<\/word>","accepted<\/word>","interest<\/word>","Senate<\/word>","President Richard Nixon<\/word>","United States<\/word>","Watergate<\/word>","Chairman of the Republican National Committee<\/word>","reject<\/word>","offer<\/word>","As the wife<\/strong> of a congressman, Barbara immersed herself in projects that piqued her interest<\/strong>; the projects included various charities and Republican women's groups in Washington, D.C.<\/strong> Though her husband lost a second bid for the Senate<\/strong> in 1970, President Richard Nixon<\/strong> appointed him the United States<\/strong> ambassador to the United Nations<\/strong>, which enabled Barbara to begin forming relationships in New York City with prominent diplomats. As the Watergate<\/strong> scandal heated up in 1973, Nixon asked Bush to become Chairman of the Republican National Committee<\/strong>; Barbara advised her husband to reject<\/strong> the offer<\/strong> because of the harsh political climate, but he accepted<\/strong> anyway.<\/phrase>","head of the U.S. Liaison Office in the People's Republic of China<\/word>","serve as Director of Central Intelligence<\/word>","isolation<\/word>","depression<\/word>","Gerald Ford<\/word>","share<\/word>","Nixon's successor, Gerald Ford<\/strong>, appointed Bush head of the U.S. Liaison Office in the People's Republic of China<\/strong> in 1974, and the Bushes relocated. She enjoyed the time that she spent in China and often rode bicycles with her husband to explore cities and regions that few Americans had visited. Three years later, Bush was recalled to the U.S. to serve as Director of Central Intelligence<\/strong> during a crucial time of legal uncertainty for the agency. He was not allowed to share<\/strong> classified aspects of his job with Barbara; the ensuing sense of isolation<\/strong>, coupled with her perception that she was not achieving her goals while other women of her time were, plunged her into a depression<\/strong>.<\/phrase>","Barbara Bush<\/word>","president of the United States<\/word>","pro-choice on abortion<\/word>","conservative wing of the Republican party<\/word>","California governor<\/word>","accepted<\/word>","running mate<\/word>","stir<\/word>","Equal Rights Amendment<\/word>","Ronald Reagan<\/word>","Barbara Bush<\/strong> defended her husband's experience and personal qualities when he announced his candidacy for president of the United States<\/strong> in 1980. She caused a stir<\/strong> when she said that she supported ratification of the Equal Rights Amendment<\/strong> and was pro-choice on abortion<\/strong>, placing her at odds with the conservative wing of the Republican party<\/strong>, led by California governor<\/strong> Ronald Reagan<\/strong>. Reagan earned the presidential nomination over her husband, who then accepted<\/strong> Reagan's invitation to be his running mate<\/strong>; the team was elected in 1980.<\/phrase>","Barbara Bush<\/word>","household name<\/word>","literacy issues<\/word>","homelessness<\/word>","C. Fred's Story<\/word>","proceeds<\/word>","literacy charities<\/word>","second lady<\/word>","interest<\/word>","book<\/word>","Barbara Bush<\/strong>'s eight years as second lady<\/strong> made her a household name<\/strong>. After her son Neil was diagnosed with dyslexia, she took an interest<\/strong> in literacy issues<\/strong> and began working with several different literacy organizations. She spent much time researching and learning about the factors that contributed to illiteracy-she believed homelessness<\/strong> was also connected-and the efforts underway to combat both. She traveled around the country and the world, either with the vice president on official trips or by herself. In 1984, she wrote a children's book<\/strong>, C. Fred's Story<\/strong>, which recounted the adventures of a family as related by their cocker spaniel, C. Fred. She donated all of the book<\/strong>'s proceeds<\/strong> to literacy charities<\/strong>.<\/phrase>","national party convention<\/word>","traditional first lady<\/word>","domestic staples<\/word>","less emphasis on style<\/word>","Vice President Bush<\/word>","succeed<\/word>","President Reagan<\/word>","first lady<\/word>","Nancy Reagan<\/word>","interest<\/word>","In 1988, Vice President Bush<\/strong> announced his candidacy for president to succeed<\/strong> the term-limited President Reagan<\/strong>. By this time, Barbara had experienced two presidential campaigns, but broke new ground by becoming the third candidate's spouse to speak at the national party convention<\/strong> that nominated her husband. She promised voters that she would be a traditional first lady<\/strong> and campaigned actively for her husband. The campaign at times focused on the large Bush family, and contrasted her with the incumbent first lady<\/strong>, Nancy Reagan<\/strong>, by highlighting her interest<\/strong> in domestic staples<\/strong> such as church, gardening, and time spent with family while placing less emphasis on style<\/strong> sense and fashion; she drew attention to both her famous white hair and disinterest in wearing designer clothes. She generally avoided discussion of political issues during the campaign, particularly those on which she and her husband differed, and those closely involved with the campaign have reported that she was actively involved in campaign strategy. Bush was elected in November 1988 and sworn in on January 20, 1989.<\/phrase>","Family literacy<\/word>","Barbara Bush<\/word>","Barbara Bush Foundation for Family Literacy<\/word>","generational cycle of illiteracy<\/word>","cause<\/word>","first lady<\/word>","develop<\/word>","America<\/word>","learn<\/word>","Family literacy<\/strong> was Barbara Bush<\/strong>'s cause<\/strong> as first lady<\/strong>, and she called it \"the most important issue we have\". She became involved with many literacy organizations, served on literacy committees and chaired many reading organizations. Eventually, she helped develop<\/strong> the Barbara Bush Foundation for Family Literacy<\/strong>. She continued to be dedicated to eliminating the generational cycle of illiteracy<\/strong> in America<\/strong> by supporting programs where parents and their young children are able to learn<\/strong> together.<\/phrase>","abortion access<\/word>","LGBT rights<\/word>","civil rights<\/word>","AIDS awareness<\/word>","support<\/word>","Mrs. Bush also spoke about her support<\/strong> for abortion access<\/strong>, LGBT rights<\/strong>, civil rights<\/strong>, and AIDS awareness<\/strong>.<\/phrase>","fundamental family value<\/word>","her death<\/word>","President Donald Trump<\/word>","Amongst<\/word>","Upon her death<\/strong>, President Donald Trump<\/strong> made a statement declaring, \"Amongst<\/strong> [Mrs. Bush's] greatest achievements was recognizing the importance of literacy as a fundamental family value<\/strong> that requires nurturing and protection.\"<\/phrase>","presidential campaign<\/word>","Barbara Bush<\/word>","personal matters<\/word>","Republican Party<\/word>","choice for someone else<\/word>","hate<\/word>","During her husband's 1992 presidential campaign<\/strong>, Barbara Bush<\/strong> stated that abortion and homosexuality are personal matters<\/strong> and argued that the Republican Party<\/strong> should not take a stand on it, saying that \"The personal things should be left out of, in my opinion, platforms and conventions.\" Her personal views on abortion were not known, although her friends reported at that time that she \"privately supported abortion rights\". She explained, \"I hate<\/strong> abortions, but I just could not make that choice for someone else<\/strong>.\"<\/phrase>","George W. Bush<\/word>","Bill Clinton<\/word>","point<\/word>","own<\/word>","long<\/word>","saw<\/word>","Bush's husband ultimately went on to lose his bid for re-election to Bill Clinton<\/strong>. Bush described January 20, 1993, the day of Bill Clinton<\/strong>'s inauguration, a \"tough day\" for her and her husband. After returning to Houston, the two were visited by their son, George W. Bush<\/strong>, and at that point<\/strong>, Bush realized that she had not cooked in 12 years. She had difficulty driving a car on her own<\/strong>, and she did not drive far from home for a long<\/strong> time; her husband warned people to get out of the way if they saw<\/strong> her car.<\/phrase>","George W. Bush<\/word>","presidential campaign<\/word>","doubtful<\/word>","debates<\/word>","friction<\/word>","watch<\/word>","listen<\/word>","Bush campaigned for her son George W. Bush<\/strong> after he announced his presidential campaign<\/strong> in June 1999. Throughout the country, she met with women who supported his campaign, but she remained doubtful<\/strong> of his chances of winning. The resentment toward the campaign continued with her rejection of any criticism of her son that was said in her presence. She refused to watch<\/strong> any of the debates<\/strong>, in contrast to her husband, who was willing to listen<\/strong> and watch<\/strong> every debate. This created friction<\/strong> between the couple.<\/phrase>","Jeb<\/word>","potential bid for the presidency<\/word>","other families<\/word>","we've had enough Bushes<\/word>","try<\/word>","Bush was initially opposed to her son Jeb<\/strong> making a potential bid for the presidency<\/strong>; she believed that other families<\/strong> should have a try<\/strong> at the nation's highest office and that \"we've had enough Bushes<\/strong>\". However, she reversed her position and appeared in a campaign ad for him.<\/phrase>","died<\/word>","Houston home<\/word>","George W. Bush<\/word>","mother<\/word>","Barbara Bush<\/word>","man<\/word>","miss<\/word>","thank<\/word>","Bush died<\/strong> in her Houston home<\/strong> at the age of 92 on April 17, 2018. Her son George W. Bush<\/strong> tweeted, \"My dear mother<\/strong> has passed on at age 92. Laura, Barbara, Jenna, and I are sad, but our souls are settled because we know hers was. I'm a lucky man<\/strong> that Barbara Bush<\/strong> was my mother<\/strong>. Our family will miss<\/strong> her dearly, and we thank<\/strong> you all for your prayers and good wishes.\"<\/phrase>","Episcopal Church<\/word>","George Bush Presidential Library<\/word>","George W. Bush<\/word>","George H. W. Bush<\/word>","Barack Obama<\/word>","Bill Clinton<\/word>","First Ladies Melania Trump<\/word>","Michelle Obama<\/word>","Laura Bush<\/word>","Hillary Clinton<\/word>","Her funeral was held at St. Martin's Episcopal Church<\/strong> in Houston on April 21, 2018, with burial at the George Bush Presidential Library<\/strong> in College Station, Texas. Former Presidents Barack Obama<\/strong>, George W. Bush<\/strong>, Bill Clinton<\/strong> and George H. W. Bush<\/strong>, and fellow First Ladies Melania Trump<\/strong>, Michelle Obama<\/strong>, Laura Bush<\/strong> and Hillary Clinton<\/strong> were notable representatives who attended the service. Her husband survived her by seven months, dying on November 30, 2018.<\/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':1422, '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':1422, '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':1422, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }