var presentation = ["three young daughters<\/word>","Pam<\/word>","dies in a car accident<\/word>","sportscaster<\/word>","Channel 8 News<\/word>","season two episode<\/word>","Tanner vs. Gibbler<\/word>","co-host<\/word>","station's new morning talk show<\/word>","Wake Up, San Francisco<\/word>","Danny Tanner<\/word>","raise<\/word>","his wife<\/word>","drunk driver<\/word>","Rebecca Donaldson<\/word>","Danny Tanner<\/strong> is left with three young daughters<\/strong> to raise<\/strong> after his wife<\/strong>, Pam<\/strong>, dies in a car accident<\/strong> caused by a drunk driver<\/strong>. At the beginning of the series, he works as a sportscaster<\/strong> for Channel 8 News<\/strong>. In the season two episode<\/strong> \"Tanner vs. Gibbler<\/strong>\", he is chosen by his station's general manager Mr. Strowbridge to be the co-host<\/strong> for the station's new morning talk show<\/strong>, Wake Up, San Francisco<\/strong>, alongside Rebecca Donaldson<\/strong>.<\/phrase>","since his wife's death<\/word>","intended to only include himself<\/word>","going out on dates<\/word>","select occasions<\/word>","first date<\/word>","Sea Cruise<\/word>","part<\/word>","fishing trip<\/word>","Jesse<\/word>","Joey<\/word>","Danny goes on his first date<\/strong> since his wife's death<\/strong> in the season one episode \"Sea Cruise<\/strong>,\" as part<\/strong> of a fishing trip<\/strong> that was intended to only include himself<\/strong>, Jesse<\/strong> and Joey<\/strong>; he is seen going out on dates<\/strong> on select occasions<\/strong> throughout the series.<\/phrase>","Rebecca goes on maternity leave<\/word>","giving birth to his nephews<\/word>","falling in love<\/word>","co-host replacement<\/word>","two of them begin dating<\/word>","The House Meets the Mouse<\/word>","long-distance situation<\/word>","Vicky was assigned various reporting jobs<\/word>","The Perfect Couple<\/word>","Vicky ended up getting her dream<\/word>","anchoring the network news<\/word>","long-distance relationship<\/word>","did not work<\/word>","Danny decides to break up with her<\/word>","Is It True About Stephanie<\/word>","eventually meets fellow single parent<\/word>","Making Out Is Hard to Do<\/word>","go on a date<\/word>","Claire and Present Danger<\/word>","Nicky<\/word>","Alex<\/word>","Vicky Larson<\/word>","Easy Rider<\/word>","New York City<\/word>","Claire Mahan<\/word>","While Rebecca goes on maternity leave<\/strong> in season five just before giving birth to his nephews<\/strong> Nicky<\/strong> and Alex<\/strong>, Danny ends up falling in love<\/strong> with her co-host replacement<\/strong>, Vicky Larson<\/strong>. The two of them begin dating<\/strong> in season five's \"Easy Rider<\/strong>,\" becoming Danny's most serious relationship since he became a widower, and the two later become engaged in the season six finale \"The House Meets the Mouse<\/strong>\". However, their relationship turned into a long-distance situation<\/strong> as Vicky was assigned various reporting jobs<\/strong> away from San Francisco. In season seven's \"The Perfect Couple<\/strong>,\" Vicky ended up getting her dream<\/strong> job of anchoring the network news<\/strong> in New York City<\/strong>, but a long-distance relationship<\/strong> did not work<\/strong> for either of them, so Danny decides to break up with her<\/strong>; this leads him to a mass feng shui habit in the following episode, \"Is It True About Stephanie<\/strong>?,\" to which his family acknowledges was his way of trying to cope with his breakup. Danny eventually meets fellow single parent<\/strong> Claire Mahan<\/strong> in season eight episode \"Making Out Is Hard to Do<\/strong>,\" and go on a date<\/strong> in the episode \"Claire and Present Danger<\/strong>.\"<\/phrase>","humor<\/word>","surrounding Danny's character<\/word>","obsession with cleaning and cleanliness<\/word>","family motto<\/word>","clean is good, dirt is bad<\/word>","quirkiness<\/word>","generally unhip dad personality<\/word>","pool player<\/word>","dart player<\/word>","guitarist<\/word>","Much of the humor<\/strong> surrounding Danny's character<\/strong> comes from his obsession with cleaning and cleanliness<\/strong>. Danny can often be found cleaning for cleaning's sake, sometimes even cleaning his cleaning products. He says the family motto<\/strong> is \"clean is good, dirt is bad<\/strong>.\" His quirkiness<\/strong> and generally unhip dad personality<\/strong> are also targets for humor<\/strong>. He is a skilled pool player<\/strong>, dart player<\/strong> and guitarist<\/strong>.<\/phrase>","cannot stand Kimmy Gibbler<\/word>","annoying<\/word>","obnoxious nuisance<\/word>","urging D.J. to make new friends<\/word>","Like most other characters, he generally cannot stand Kimmy Gibbler<\/strong>, considering her as \"an annoying<\/strong>, obnoxious nuisance<\/strong>\"; at times, urging D.J. to make new friends<\/strong> whenever Kimmy does something that irritates him.<\/phrase>","Danny and Becky relocate to Los Angeles<\/word>","talk show<\/word>","Danny got remarried<\/word>","second season<\/word>","mid-life crisis<\/word>","turned 60<\/word>","Danny reveals<\/word>","he and Teri got divorced<\/word>","Fuller House<\/word>","Wake Up USA<\/word>","Teri<\/word>","In the first episode of Fuller House<\/strong>, Danny and Becky relocate to Los Angeles<\/strong> for their new talk show<\/strong>, Wake Up USA<\/strong>, and it is revealed that Danny got remarried<\/strong> to a woman named Teri<\/strong>. During the second season<\/strong> Danny goes through a little bit of a mid-life crisis<\/strong> since he just turned 60<\/strong>. In season three Danny reveals<\/strong> that he and Teri got divorced<\/strong>.<\/phrase>","Danny and Becky asked for raises<\/word>","fired<\/word>","replaced by Mario Lopez<\/word>","go back<\/word>","ask for their old jobs back<\/word>","station only wants Becky back<\/word>","cheer him up<\/word>","tracked down Vicky<\/word>","30th Dadi-versary party<\/word>","Becky, Jesse and Joey<\/word>","moving back to San Francisco<\/word>","Danny announces he's moving back too,<\/word>","Wake Up San Francisco<\/word>","Jesse<\/word>","Joey<\/word>","back<\/word>","Danny and Becky asked for raises<\/strong> on their show but since they asked for too much they are fired<\/strong> and replaced by Mario Lopez<\/strong>. After feeling sorry for themselves they go back<\/strong> to Wake Up San Francisco<\/strong> to ask for their old jobs back<\/strong> but the station only wants Becky back<\/strong>. To cheer him up<\/strong>, the girls somehow tracked down Vicky<\/strong> and surprised him with her. He invites her to the 30th Dadi-versary party<\/strong> the girls threw for him, Jesse<\/strong> and Joey<\/strong>. Since Becky, Jesse and Joey<\/strong> are all moving back to San Francisco<\/strong>, Danny announces he's moving back too,<\/strong> and back<\/strong> into the house.<\/phrase>","season four<\/word>","Becky's talk show<\/word>","The Gab<\/word>","success<\/word>","turned back into Wake Up San Francisco<\/word>","Danny refused to audition<\/word>","co-host<\/word>","briefly lived life as an retiree<\/word>","eventually realizes<\/word>","misses being on air<\/word>","gets his old job back<\/word>","In season four<\/strong> Becky's talk show<\/strong> The Gab<\/strong> was a success<\/strong> but it turned back into Wake Up San Francisco<\/strong>. Danny refused to audition<\/strong> to be her co-host<\/strong>, and briefly lived life as an retiree<\/strong>. He eventually realizes<\/strong> that he misses being on air<\/strong> and gets his old job back<\/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':2519, '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':2519, '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':2519, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }