var presentation = ["First Lady of the United States<\/word>","Gerald Ford<\/word>","Elizabeth Anne Ford<\/word>","social policy<\/word>","presidential spouse<\/word>","also served<\/word>","Second Lady of the United<\/word>","Elizabeth Anne Ford<\/strong> (April 8, 1918 \u2013 July 8, 2011) was the First Lady of the United States<\/strong> from 1974 to 1977, as the wife of President Gerald Ford<\/strong>. As First Lady, she was active in social policy<\/strong> and set a precedent as a politically active presidential spouse<\/strong>. Ford also served<\/strong> as the Second Lady of the United<\/strong> States from 1973 to 1974.<\/phrase>","breast cancer<\/word>","mastectomy<\/word>","Abortion rights<\/word>","Women's Movement<\/word>","feminism<\/word>","alcoholism<\/word>","high approval ratings<\/word>","liberal positions<\/word>","social issues<\/word>","passionate supporter<\/word>","Equal Rights Amendment<\/word>","first ladies<\/word>","hot-button issue<\/word>","time<\/word>","equal pay<\/word>","abortion<\/word>","gun control<\/word>","also raised<\/word>","long-running battle<\/word>","Throughout her husband's term in office, she maintained high approval ratings<\/strong> despite opposition from some conservative Republicans who objected to her more moderate and liberal positions<\/strong> on social issues<\/strong>. Ford was noted for raising breast cancer<\/strong> awareness following her 1974 mastectomy<\/strong>. In addition, she was a passionate supporter<\/strong> of the Equal Rights Amendment<\/strong>. As a supporter of Abortion rights<\/strong> and a leader in the Women's Movement<\/strong>, she gained fame as one of the most candid first ladies<\/strong> in history, commenting on every hot-button issue<\/strong> of the time<\/strong>, including feminism<\/strong>, equal pay<\/strong>, the Equal Rights Amendment<\/strong>, sex, drugs, abortion<\/strong>, and gun control<\/strong>. She also raised<\/strong> awareness of addiction when in the 1970s, she announced her long-running battle<\/strong> with alcoholism<\/strong> and substance abuse, being the first First Lady to do so.<\/phrase>","Betty Ford Center for substance abuse and addiction<\/word>","Presidential Medal of Freedom<\/word>","George H. W. Bush<\/word>","White House<\/word>","feminist movement<\/word>","first chair<\/word>","Congressional Gold Medal<\/word>","Following her White House<\/strong> years, she continued to lobby for the ERA and remained active in the feminist movement<\/strong>. She was the founder, and served as the first chair<\/strong> of the board of directors, of the Betty Ford Center for substance abuse and addiction<\/strong>. She was awarded the Congressional Gold Medal<\/strong> (co-presentation with her husband on October 21, 1998) and the Presidential Medal of Freedom<\/strong> (presented 1991 by George H. W. Bush<\/strong>).<\/phrase>","Chicago, Illinois<\/word>","Hortense and William Stephenson Bloomer, Sr.<\/word>","Elizabeth Anne Bloomer<\/word>","Royal Rubber Co<\/word>","Ford was born Elizabeth Anne Bloomer<\/strong> in 1918 in Chicago, Illinois<\/strong>, the third child and only daughter of Hortense and William Stephenson Bloomer, Sr.<\/strong>, who was a traveling salesman for Royal Rubber Co<\/strong>. She was called Betty as a child.<\/phrase>","William Jr<\/word>","Denver, Colorado<\/word>","Grand Rapids, Michigan<\/word>","Hortense<\/word>","Chicago<\/word>","older brothers<\/word>","Robert<\/word>","Central High School<\/word>","Hortense<\/strong> and William married on November 9, 1904, in Chicago<\/strong>. Betty's two older brothers<\/strong> were Robert<\/strong> and William Jr<\/strong>. After the family lived briefly in Denver, Colorado<\/strong>, she grew up in Grand Rapids, Michigan<\/strong>, where she graduated from Central High School<\/strong>.<\/phrase>","earn money<\/word>","popular dances<\/word>","Wall Street Crash<\/word>","Mary Free Bed Home for Crippled Children<\/word>","Calla Travis Dance Studio<\/word>","At the age of 11, she began modeling clothes and teaching children popular dances<\/strong>, such as the foxtrot, waltz, and big apple, to earn money<\/strong> in the wake of the Wall Street Crash<\/strong> of 1929. She worked with children with disabilities at the Mary Free Bed Home for Crippled Children<\/strong>. She studied dance at the Calla Travis Dance Studio<\/strong>, graduating in 1935.<\/phrase>","her father<\/word>","carbon monoxide poisoning<\/word>","their car<\/word>","garage doors<\/word>","open<\/word>","When Bloomer was age 16, her father<\/strong> died of carbon monoxide poisoning<\/strong> in the family's garage while working under their car<\/strong>, despite the garage doors<\/strong> being open<\/strong>. He died the day before his 60th birthday.<\/phrase>","Bennington School of Dance<\/word>","Bennington, Vermont<\/word>","Manhattan's Chelsea neighborhood<\/word>","Graham's auxiliary troupe<\/word>","high school<\/word>","her study<\/word>","her mother<\/word>","instead attended<\/word>","two summers<\/word>","live<\/word>","order<\/word>","Carnegie Hall in New York City<\/word>","In 1936, after graduating from high school<\/strong>, Bloomer proposed continuing her study<\/strong> of dance in New York City, but her mother<\/strong> refused. She instead attended<\/strong> the Bennington School of Dance<\/strong> in Bennington, Vermont<\/strong>, for two summers<\/strong>. After being accepted as a student, Bloomer moved to New York City to live<\/strong> in its Manhattan's Chelsea neighborhood<\/strong>; she worked as a fashion model in order<\/strong> to finance her dance studies. She joined Graham's auxiliary troupe<\/strong> and eventually performed with the company at Carnegie Hall in New York City<\/strong>.<\/phrase>","fashion coordinator<\/word>","dance group<\/word>","return<\/word>","end<\/word>","time<\/word>","her mother<\/word>","Grand Rapids<\/word>","Arthur Meigs Goodwin<\/word>","own<\/word>","Bloomer's mother opposed to her pursuing a career and insisted that she return<\/strong> home, and, as a compromise, they agreed that Bloomer would return<\/strong> home for six months and, if she still wanted to return<\/strong> to New York City at the end<\/strong> of that time<\/strong>, her mother<\/strong> would not protest further. Bloomer became immersed in her life in Grand Rapids<\/strong> and did not return<\/strong> to New York. her mother<\/strong> remarried, to family friend and neighbor Arthur Meigs Goodwin<\/strong>, and Bloomer lived with them. She got a job as assistant to the fashion coordinator<\/strong> for a local department store. She also organized her own<\/strong> dance group<\/strong> and taught dance at various sites in Grand Rapids<\/strong>.<\/phrase>","William G. Warren<\/word>","fashion coordinator<\/word>","poor health<\/word>","divorce<\/word>","Elizabeth Bloomer<\/word>","Grand Rapids<\/word>","time<\/word>","file<\/word>","care<\/word>","In 1942, Elizabeth Bloomer<\/strong> married William G. Warren<\/strong>, who worked for his father in insurance sales, and whom she had known since she was 12. William Warren began selling insurance for another company shortly after their marriage. The couple moved frequently because of his work. When they returned to Grand Rapids<\/strong>, she worked again at a department store this time<\/strong> as the fashion coordinator<\/strong>. Warren was an alcoholic and in poor health<\/strong>. Just after Betty decided to file<\/strong> for divorce<\/strong>, he went into a coma. She took care<\/strong> of him for another two years as he convalesced, at his family's home. She stayed upstairs while he was nursed downstairs. After he recovered, they were divorced on September 22, 1947.<\/phrase>","Gerald Ford<\/word>","World War II veteran<\/word>","U.S. House of Representatives<\/word>","The New York Times<\/word>","Grace Episcopal Church<\/word>","Grand Rapids<\/word>","delay<\/word>","On October 15, 1948, Elizabeth married Gerald Ford<\/strong>, a lawyer and World War II veteran<\/strong>, at Grace Episcopal Church<\/strong>, in Grand Rapids<\/strong>. Gerald Ford<\/strong> was then campaigning for what would be his first of thirteen terms as a member of the U.S. House of Representatives<\/strong>. In the first of adjustments for politics, he asked her to delay<\/strong> the wedding until shortly before the elections because, as The New York Times<\/strong> reported, \"Jerry was running for Congress and wasn't sure how voters might feel about his marrying a divorced ex-dancer.\"<\/phrase>","Michael Gerald Ford<\/word>","John Gardner Ford<\/word>","Steven Meigs Ford<\/word>","Susan Elizabeth Ford<\/word>","Gerald and Elizabeth Ford had four children together: Michael Gerald Ford<\/strong>, John Gardner Ford<\/strong>, Steven Meigs Ford<\/strong>, and Susan Elizabeth Ford<\/strong>.<\/phrase>","Washington, D.C.<\/word>","Gerald Ford<\/word>","resignation<\/word>","Watergate scandal<\/word>","Virginia<\/word>","Republican in the House<\/word>","Spiro Agnew<\/word>","Vice President<\/word>","President Richard Nixon<\/word>","The Fords moved to the Virginia<\/strong> suburbs of Washington, D.C.<\/strong>, and lived there for twenty-five years. Gerald Ford<\/strong> rose to become the highest-ranking Republican in the House<\/strong>. After Spiro Agnew<\/strong> resigned as Vice President<\/strong> in 1973, President Richard Nixon<\/strong> appointed Gerald Ford<\/strong> to the position. He succeeded to the presidency in 1974, upon Nixon's resignation<\/strong> in the wake of the Watergate scandal<\/strong>.<\/phrase>","mutual love<\/word>","First Couples in United<\/word>","The Fords, who were married 58 years until Gerald's death, were among the more openly affectionate First Couples in United<\/strong> States history. Neither was shy about their mutual love<\/strong> and equal respect, and they were known to have a strong personal and political partnership.<\/phrase>","disciplined<\/word>","The New York Times<\/word>","impact<\/word>","American culture<\/word>","Pat Nixon<\/word>","Reporters wondered what kind of first lady Ford would be, as they thought her predecessor, Pat Nixon<\/strong>, as noted by one reporter, to be the \"most disciplined<\/strong>, composed first lady in history.\" In the opinion of The New York Times<\/strong> and several presidential historians, \"Mrs. Ford's impact<\/strong> on American culture<\/strong> may be far wider and more lasting than that of her husband, who served a mere 896 days, much of it spent trying to restore the dignity of the office of the president.\"<\/phrase>","The New York Times<\/word>","Bump dance<\/word>","CB radio<\/word>","White House<\/word>","handle<\/word>","First Mama<\/word>","abortion<\/word>","regret<\/word>","Steinhauer of The New York Times<\/strong> described Ford as \"a product and symbol of the cultural and political times - doing the Bump dance<\/strong> along the corridors of the White House<\/strong>, donning a mood ring, chatting on her CB radio<\/strong> with the handle<\/strong> First Mama<\/strong> - a housewife who argued passionately for equal rights for women, a mother of four who mused about drugs, abortion<\/strong> and premarital sex aloud and without regret<\/strong>.\"<\/phrase>","60 Minutes<\/word>","resignation<\/word>","open<\/word>","use<\/word>","White House<\/word>","tour<\/word>","No Lady<\/word>","She was open<\/strong> about the benefits of psychiatric treatment, and spoke understandingly about marijuana use<\/strong> and premarital sex. The new First Lady noted during a televised White House<\/strong> tour<\/strong> that she and the President shared the same bed. Ford was a guest on 60 Minutes<\/strong> and, in a characteristically candid interview, she discussed how she would counsel her daughter if she was having an affair. She said she \"would not be surprised\" by that, and also acknowledged that her children may have experimented with marijuana, which was popular among the young. Some conservatives called her \"No Lady<\/strong>\" for her comments and demanded her \"resignation<\/strong>\", but her overall approval rating was at a high seventy-five percent.<\/phrase>","women's rights<\/word>","Women's Movement<\/word>","pro-abortion rights<\/word>","Fighting First Lady<\/word>","Woman of the Year<\/word>","time<\/word>","force<\/word>","call<\/word>","name<\/word>","During her time<\/strong> as First Lady, Ford was an outspoken advocate of women's rights<\/strong> and was a prominent force<\/strong> in the Women's Movement<\/strong> of the 1970s. She supported the proposed ERA and lobbied state legislatures to ratify the amendment, and took on opponents of the amendment. She was also un-apologetically pro-abortion rights<\/strong>. Her active political role prompted time<\/strong> to call<\/strong> her the country's \"Fighting First Lady<\/strong>\" and name<\/strong> her a Woman of the Year<\/strong> in 1975, as representing American women, along with other feminist icons.<\/phrase>","mastectomy<\/word>","breast cancer<\/word>","cover-up<\/word>","open<\/word>","Watergate<\/word>","talk<\/word>","Weeks after Ford became First Lady, she underwent a mastectomy<\/strong> for breast cancer<\/strong> on September 28, 1974, after having been diagnosed with the disease. Ford decided to be open<\/strong> about her illness because \"There had been so much cover-up<\/strong> during Watergate<\/strong> that we wanted to be sure there would be no cover-up<\/strong> in the Ford administration.\" Her openness about her cancer and treatment raised the visibility of a disease that Americans had previously been reluctant to talk<\/strong> about.<\/phrase>","Gerald Ford<\/word>","concession speech<\/word>","Jimmy Carter<\/word>","After Gerald Ford<\/strong>'s defeat by Jimmy Carter<\/strong> in the 1976 presidential election she delivered her husband's concession speech<\/strong> because he had lost his voice while campaigning.<\/phrase>","Betty Ford Center<\/word>","White House<\/word>","name<\/word>","NBC News<\/word>","appear<\/word>","Today<\/word>","After leaving the White House<\/strong> in 1977, Ford continued to lead an active public life. In addition to founding the Betty Ford Center<\/strong>, she remained active in women's issues, taking on numerous speaking engagements and lending her name<\/strong> to charities for fundraising. In March 1977, Ford signed with NBC News<\/strong> to appear<\/strong> in two news specials within the following two years along with contributing to Today<\/strong>, and jointly signed with her husband to write their memoirs.<\/phrase>","alcoholism<\/word>","In 1978, the Ford family staged an intervention and forced her to confront her alcoholism<\/strong> and an addiction to opioid analgesics, which had been prescribed in the early 1960s for a pinched nerve. She went into treatment for substance abuse.<\/phrase>","Betty Ford Center<\/word>","Rancho Mirage, California<\/word>","Betty: A Glad Awakening<\/word>","Healing and Hope: Six Women from the Betty Ford Center Share Their Powerful Journeys of Addiction and Recovery<\/word>","recovery<\/word>","Betty Ford Clinic<\/word>","Chris Chase<\/word>","book<\/word>","post<\/word>","In 1982, after her recovery<\/strong>, she established the Betty Ford Center<\/strong> (initially called the Betty Ford Clinic<\/strong>) in Rancho Mirage, California<\/strong>, for the treatment of chemical dependency, including treating the children of alcoholics. She served as chair of the board of directors. She also co-authored with Chris Chase<\/strong> a book<\/strong> about her treatment, Betty: A Glad Awakening<\/strong>. In 2003, Ford produced another book<\/strong>, Healing and Hope: Six Women from the Betty Ford Center Share Their Powerful Journeys of Addiction and Recovery<\/strong>. In 2005, Ford relinquished her chair of the center's board of directors to her daughter Susan. She had held the top post<\/strong> at the center since its founding.<\/phrase>","Rosalynn Carter<\/word>","National Women's Conference<\/word>","Houston, Texas<\/word>","U.S. Congress,<\/word>","breast cancer<\/word>","feminist movement<\/word>","First Ladies Lady Bird Johnson<\/word>","open<\/word>","National Plan of Action<\/word>","report<\/word>","improve<\/word>","equal pay<\/word>","Ford continued to be an active leader and activist of the feminist movement<\/strong> after the Ford administration. She continued to strongly advocate and lobby politicians and state legislatures for passage of the ERA.In 1977, she joined First Ladies Lady Bird Johnson<\/strong> and Rosalynn Carter<\/strong> to open<\/strong> and participate in the National Women's Conference<\/strong> in Houston, Texas<\/strong>, where she endorsed measures in the convention's National Plan of Action<\/strong>, a report<\/strong> sent to the state legislatures, the U.S. Congress,<\/strong> and the President on how to improve<\/strong> the status of American women. Ford continued to be an outspoken supporter of equal pay<\/strong> for women, breast cancer<\/strong> awareness, and the ERA throughout her life.<\/phrase>","Presidential Medal of Freedom<\/word>","Congressional Gold Medal<\/word>","Golden Palm Star on the Palm Springs Walk of Stars<\/word>","In November 18, 1991, she was awarded the Presidential Medal of Freedom<\/strong> by President George H.W. Bush and a Congressional Gold Medal<\/strong> in 1999. That same year, a Golden Palm Star on the Palm Springs Walk of Stars<\/strong> was dedicated to her and her husband.<\/phrase>","Woodrow Wilson Award<\/word>","Smithsonian Institution<\/word>","Woodrow Wilson Center<\/word>","On May 8, 2003, Ford received the Woodrow Wilson Award<\/strong> in Los Angeles for her public service, awarded by the Woodrow Wilson Center<\/strong> of the Smithsonian Institution<\/strong>.<\/phrase>","Gerald Ford<\/word>","heart failure<\/word>","Washington, D.C.<\/word>","Beaver Creek<\/word>","Colorado<\/word>","own<\/word>","part<\/word>","funeral<\/word>","California<\/word>","Michigan<\/word>","During these years, she and her husband resided in Rancho Mirage and in Beaver Creek<\/strong>, Colorado<\/strong>. Gerald Ford<\/strong> died, aged 93, of heart failure<\/strong> on December 26, 2006 at their Rancho Mirage home. Despite her advanced age and own<\/strong> frail physical condition, Ford traveled across the country and took part<\/strong> in the funeral<\/strong> events in California<\/strong>, Washington, D.C.<\/strong>, and Michigan<\/strong>.<\/phrase>","poor health<\/word>","Lady Bird Johnson's funeral<\/word>","live<\/word>","Susan Ford<\/word>","her mother<\/word>","funeral<\/word>","Following her husband's death, Ford continued to live<\/strong> in Rancho Mirage. poor health<\/strong> and increasing frailty due to operations in August 2006 and April 2007 for blood clots in her legs caused her to largely curtail her public life. Her ill health prevented her from attending Lady Bird Johnson's funeral<\/strong> in July 2007; her daughter Susan Ford<\/strong> represented her mother<\/strong> at the funeral<\/strong> service.<\/phrase>","Eisenhower Medical Center<\/word>","Gerald Ford<\/word>","Coincidentally<\/word>","Betty Ford died of natural causes on July 8, 2011, three months after her 93rd birthday, at Eisenhower Medical Center<\/strong> in Rancho Mirage. Coincidentally<\/strong>, she and her husband Gerald Ford<\/strong> were both 93 when they died.<\/phrase>","Palm Desert, California<\/word>","George W. Bush<\/word>","Michelle Obama<\/word>","Hillary Clinton<\/word>","former First Ladies<\/word>","Rosalynn Carter<\/word>","funeral<\/word>","Nancy Reagan<\/word>","funeral<\/strong> services were held in Palm Desert, California<\/strong>, on July 12, 2011, with over 800 people in attendance, including former president George W. Bush<\/strong>, then-First Lady Michelle Obama<\/strong>, then-Secretary of State Hillary Clinton<\/strong>, former First Ladies<\/strong> Rosalynn Carter<\/strong> and Nancy Reagan<\/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':1393, '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':1393, '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':1393, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }