var presentation = ["Parks and Recreation<\/word>","auditor<\/word>","straightforward<\/word>","passive-aggressive<\/word>","Ben Wyatt<\/word>","then became<\/word>","regular character<\/word>","originally appeared<\/word>","Chris Traeger<\/word>","Ben Wyatt<\/strong> is a character on the NBC TV show Parks and Recreation<\/strong>. He guest-starred in two episodes in season two, and then became<\/strong> a regular character<\/strong> in season 3. He originally appeared<\/strong> as a state auditor<\/strong> who comes to Pawnee with Chris Traeger<\/strong> to evaluate Pawnee's funds at the end of season 2. Ben is straightforward<\/strong> and willing to tell the truth, even if it could offend someone. He could also be passive-aggressive<\/strong> at times.<\/phrase>","mayor<\/word>","Partridge, Minnesota<\/word>","immaturity<\/word>","lack of experience<\/word>","bankrupted the city<\/word>","auditor<\/word>","wave<\/word>","anti-incumbent sentiment<\/word>","Ben Wyatt<\/word>","winter sports complex<\/word>","Ice Town<\/word>","cities escape bankruptcy<\/word>","Riding a wave<\/strong> of anti-incumbent sentiment<\/strong>, Ben Wyatt<\/strong> was elected mayor<\/strong> of the town of Partridge, Minnesota<\/strong> in November of 1992, at the age of 18. His immaturity<\/strong> and lack of experience<\/strong> led him to be unofficially banned from Partridge after he bankrupted the city<\/strong> by creating a winter sports complex<\/strong> called Ice Town<\/strong>. After maturing, he becomes a state auditor<\/strong> and helps cities escape bankruptcy<\/strong>.<\/phrase>","do not get along<\/word>","auditor<\/word>","mayor<\/word>","Leslie Knope<\/word>","In Season Two when Ben first comes to Pawnee, he and Leslie Knope<\/strong> do not get along<\/strong>. When he asks her out to have a beer, they begin to respect each other more. They become friends and he shares his history in politics with her, and tells her he became an auditor<\/strong> to show that he is responsible enough to run for mayor<\/strong> again.<\/phrase>","Harvest Festival<\/word>","flu<\/word>","Flu Season<\/word>","Pawnee Chamber of Commerce<\/word>","waffles<\/word>","JJ's Diner<\/word>","his interest romantically in Leslie<\/word>","Leslie Knope<\/word>","important presentation<\/word>","noodle soup<\/word>","Ben and Chris agree to re-start the tradition of the Pawnee Harvest Festival<\/strong> at the proposal of Leslie Knope<\/strong>. Ben brings Leslie to the hospital for the flu<\/strong> because she won't admit she's sick in the episode \"Flu Season<\/strong>\", due to the fact that she has an important presentation<\/strong> with the Pawnee Chamber of Commerce<\/strong> about the Harvest Festival<\/strong>. He brings her waffles<\/strong> from JJ's Diner<\/strong> in the same episode, and chicken noodle soup<\/strong>, hinting his interest romantically in Leslie<\/strong>. The Harvest Festival<\/strong> brings Ben and Leslie closer together because of the teamwork needed for the success of it.<\/phrase>","Jerry's Painting<\/word>","Andy<\/word>","he has feelings for Leslie<\/word>","Road Trip<\/word>","kiss<\/word>","In the episode \"Jerry's Painting<\/strong>\", he admits to Andy<\/strong> that he has feelings for Leslie<\/strong> and that she might have feelings for him also. In \"Road Trip<\/strong>\", he and Leslie kiss<\/strong>. Season 3 leaves off with uncertainty as to which the relationship will continue because Leslie is contemplating running for office.<\/phrase>","confused<\/word>","follow her dreams<\/word>","split amicably<\/word>","not rid the two of their feelings<\/word>","secret romance<\/word>","Season 4 starts with Leslie being confused<\/strong> over whether to continue her secret romance<\/strong> with Ben or to follow her dreams<\/strong> and run for office. The pair decides to split amicably<\/strong>, with Ben giving Leslie a \"Knope 2012\" button. However, this split does not rid the two of their feelings<\/strong> for each other.<\/phrase>","make their relationship official<\/word>","Smallest Park<\/word>","Eventually, after several more fights and awkward situations, Leslie and Ben decide to make their relationship official<\/strong>, despite the consequences, in \"Smallest Park<\/strong>\".<\/phrase>","trial<\/word>","two-week suspension<\/word>","resigned<\/word>","order to save hers<\/word>","resignation<\/word>","he was resigning because he loves Leslie<\/word>","Ethel Beavers<\/word>","Leslie and Ben then decide it is best to tell Chris about their relationship, which results to Leslie being put on trial<\/strong> to see whether she used her relationship with Ben to get special treatment. Leslie is then surprised when she receives only a two-week suspension<\/strong> with pay. She is then informed that Ben has resigned<\/strong> from his job in order to save hers<\/strong>. Later, when Leslie has Ethel Beavers<\/strong> read the transcript from his resignation<\/strong> (on Chris's recommendation), she finds out that Ben had said he was resigning because he loves Leslie<\/strong>. Leslie then has Ethel read a transcript of her saying she loves Ben to him.<\/phrase>","He proposes to Leslie<\/word>","spontaneous wedding ceremony<\/word>","City Hall<\/word>","He proposes to Leslie<\/strong> and they move into a house together. Ben and Leslie had a spontaneous wedding ceremony<\/strong> at City Hall<\/strong>, attended only by their close friends.<\/phrase>","Flu Season<\/word>","pregnant<\/word>","they are having triplets<\/word>","time jump<\/word>","parents of two boys and a girl<\/word>","learn<\/word>","In \"Flu Season<\/strong> 2\" Leslie learns that she is pregnant<\/strong>. When Ben does find out, he is happy. Ben and Leslie subsequently learn<\/strong> from Dr. Saperstein that they are having triplets<\/strong>. Ben becomes extremely tense and apprehensive about the cost of raising three children, but Leslie is able to calm him. A time jump<\/strong> of three years shows that Ben and Leslie are now parents of two boys and a girl<\/strong>.<\/phrase>","move to Washington<\/word>","April<\/word>","Andy<\/word>","work<\/word>","Department of the Interior<\/word>","Congress<\/word>","Ben and Leslie decide to move to Washington<\/strong> with April<\/strong> and Andy<\/strong> after Leslie is offered a promotion to work<\/strong> at the Department of the Interior<\/strong> and Ben runs for Congress<\/strong> in 2018.<\/phrase>","flash-forwards<\/word>","Ben's congressional campaign<\/word>","successful<\/word>","representative<\/word>","Indiana<\/word>","House of Representatives<\/word>","Governor of Indiana<\/word>","President of the United States<\/word>","secret service<\/word>","Through a series of flash-forwards<\/strong>, it is revealed that Ben's congressional campaign<\/strong> was successful<\/strong> and is now a representative<\/strong> from Indiana<\/strong> for the House of Representatives<\/strong>. In 2025, he and Leslie are both given the opportunity to run as Governor of Indiana<\/strong>, Ben ultimately decides to let Leslie run (which she wins). By 2048, it is hinted that either he or Leslie has been elected President of the United States<\/strong> when a member of the secret service<\/strong> approaches both of them and says \"It's time to go\".<\/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':1721, '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':1721, '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':1721, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }