var presentation = ["His mother<\/word>","wants him to marry a trophy wife<\/word>","attended many prestigious prep schools<\/word>","got kicked out of<\/word>","more interested in partying than studying<\/word>","versed in pop culture<\/word>","talent<\/word>","vast knowledge of journalism<\/word>","well traveled<\/word>","enjoy heavy drinking<\/word>","dangerous risk taking<\/word>","rich, party loving guys<\/word>","Logan Huntzberger<\/word>","second child<\/word>","Mitchum<\/word>","Shira Huntzberger<\/word>","Born<\/word>","Huntzberger Publishing Company<\/word>","national newspaper conglomerate<\/word>","tense relationship<\/word>","his father<\/word>","older sister<\/word>","Honor<\/word>","stupid pranks<\/word>","traditional ladies man<\/word>","well read<\/word>","Rory<\/word>","newspaper writing<\/word>","wealthy upbringing<\/word>","best friends<\/word>","Colin<\/word>","Finn<\/word>","Logan Huntzberger<\/strong> is the second child<\/strong> of Mitchum<\/strong> and Shira Huntzberger<\/strong>. Born<\/strong> in 1982, he is heir to the Huntzberger Publishing Company<\/strong>, a national newspaper conglomerate<\/strong>. He has a tense relationship<\/strong> with his father<\/strong>. his father<\/strong> seems to view him more of a commodity than a son. His mother<\/strong> has expectations and wants him to marry a trophy wife<\/strong>, even though she doesn't come from money herself. He has an older sister<\/strong>, Honor<\/strong>. He attended many prestigious prep schools<\/strong>, most of which he got kicked out of<\/strong> for the stupid pranks<\/strong> that he played. Logan first appears as a traditional ladies man<\/strong> who is more interested in partying than studying<\/strong>. He appears to be very well read<\/strong> and versed in pop culture<\/strong>, as he understands most of the references Rory<\/strong> throws his way; and even though he prefers a good time, he does have a talent<\/strong> in newspaper writing<\/strong> and has a vast knowledge of journalism<\/strong>. Due to his wealthy upbringing<\/strong>, he is well traveled<\/strong>, and seems to enjoy heavy drinking<\/strong> and dangerous risk taking<\/strong>. His two best friends<\/strong> are Colin<\/strong> and Finn<\/strong>, both of whom are rich, party loving guys<\/strong> like himself.<\/phrase>","he and his friends pass by her<\/word>","Logan's friends tease Marty<\/word>","pay little attention to Rory<\/word>","Logan meets Rory again<\/word>","hallway of her dormitory<\/word>","lecture him<\/word>","his treatment of Marty<\/word>","debate with her<\/word>","remember her instantly<\/word>","next time they meet<\/word>","first encounters<\/word>","Rory<\/word>","her friend<\/word>","Marty<\/word>","Logan first encounters<\/strong> Rory<\/strong> when he and his friends pass by her<\/strong> and her friend<\/strong> Marty<\/strong>. At first, Logan's friends tease Marty<\/strong> and pay little attention to Rory<\/strong>. However, when Logan meets Rory again<\/strong> in the hallway of her dormitory<\/strong>, she takes the opportunity to lecture him<\/strong> on his treatment of Marty<\/strong>. Logan continues to debate with her<\/strong> and promises that he will remember her instantly<\/strong> the next time they meet<\/strong>.<\/phrase>","Rory's first impression of Logan<\/word>","not very favorable<\/word>","lazy rich boy<\/word>","help on an article<\/word>","secret society that Logan is in<\/word>","Life and Death Brigade<\/word>","fascinated by the club<\/word>","take a dangerous jump off a tall<\/word>","Rory to reconsider<\/word>","initial impression of him<\/word>","winds up comforting Rory<\/word>","after her break-up with Dean<\/word>","develops a crush on Logan<\/word>","Logan has feelings for her too<\/word>","not a commitment guy<\/word>","agree to a no strings attached relationship<\/word>","signs<\/word>","both want more<\/word>","decides the relationship is too much for her<\/word>","tries to end it<\/word>","Logan takes this as an ultimatum<\/word>","agrees to a monogamous relationship<\/word>","Rory<\/word>","Rory's first impression of Logan<\/strong> is not very favorable<\/strong>, viewing him as a typical lazy rich boy<\/strong>. However, she goes to him when she needs help on an article<\/strong> about a secret society that Logan is in<\/strong>, called the Life and Death Brigade<\/strong>. She is fascinated by the club<\/strong> and is convinced by Logan to take a dangerous jump off a tall<\/strong> structure, causing Rory to reconsider<\/strong> her initial impression of him<\/strong>. Logan eventually winds up comforting Rory<\/strong> at a party after her break-up with Dean<\/strong>. Rory<\/strong> soon develops a crush on Logan<\/strong>, and while Logan has feelings for her too<\/strong>, he makes it clear he is not a commitment guy<\/strong>, so they agree to a no strings attached relationship<\/strong>. During their relationship, there are signs<\/strong> that both want more<\/strong>, and Rory<\/strong> eventually decides the relationship is too much for her<\/strong>, so she tries to end it<\/strong>. However, Logan takes this as an ultimatum<\/strong>, and agrees to a monogamous relationship<\/strong>.<\/phrase>","family members' disapproval<\/word>","Rory dropping out of Yale<\/word>","break-up in season 6<\/word>","threatened by the return of Jess<\/word>","found out<\/word>","Jess and Rory had been high school sweethearts<\/word>","treated Jess<\/word>","Jess treated Dean<\/word>","alienating Rory<\/word>","Jess simply walked away<\/word>","Rory argued with Logan<\/word>","his behavior towards Jess<\/word>","aimlessness of their life together<\/word>","decided to take a break<\/word>","Despite family members' disapproval<\/strong> and Rory dropping out of Yale<\/strong>, their relationship continues until a break-up in season 6<\/strong>. Logan was threatened by the return of Jess<\/strong> in season 6, even more so when he found out<\/strong> that Jess and Rory had been high school sweethearts<\/strong>. He treated Jess<\/strong> the same way Jess treated Dean<\/strong> in the past, but wound up alienating Rory<\/strong> further as Jess simply walked away<\/strong>. After Rory argued with Logan<\/strong> about his behavior towards Jess<\/strong> and the aimlessness of their life together<\/strong>, they decided to take a break<\/strong>.<\/phrase>","Logan saw this as a break-up<\/word>","get with an ex-girlfriend<\/word>","make amends<\/word>","grand gestures<\/word>","purchasing a coffee cart<\/word>","accepted the gifts<\/word>","didn't give in<\/word>","Logan went to Lorelai for help<\/word>","convinced Lorelai<\/word>","both had something in common<\/word>","agree to help him<\/word>","Lorelai wrote a letter<\/word>","Rory agreed to give Logan another chance<\/word>","helping Rory<\/word>","Yale Daily News<\/word>","Paris's tyrannical reign<\/word>","moved in together<\/word>","Paris kicked Rory out<\/word>","Martha's Vineyard<\/word>","Luke and Lorelai<\/word>","Luke, who has been aloof around Logan<\/word>","looks at him in a new light<\/word>","helps Luke with a Valentine gift<\/word>","Rory finds out<\/word>","getting back together with his ex-girlfriend<\/word>","she misses Honor's wedding<\/word>","breaks up with Logan<\/word>","he takes very badly<\/word>","later gets back together with him<\/word>","Rory<\/word>","own<\/word>","use<\/word>","Lorelai<\/word>","save<\/word>","However, Logan saw this as a break-up<\/strong> and proceeded to get with an ex-girlfriend<\/strong>. Logan attempted to make amends<\/strong> through grand gestures<\/strong>, which included purchasing a coffee cart<\/strong> and barista for Rory<\/strong>'s own<\/strong> personal use<\/strong>. Rory<\/strong> accepted the gifts<\/strong> but didn't give in<\/strong> until Logan went to Lorelai for help<\/strong>. He convinced Lorelai<\/strong> that they both had something in common<\/strong> causing Lorelai<\/strong> to agree to help him<\/strong>. Lorelai wrote a letter<\/strong>, and Rory agreed to give Logan another chance<\/strong>. Logan later wound up helping Rory<\/strong> save<\/strong> the Yale Daily News<\/strong> under Paris's tyrannical reign<\/strong>. Rory<\/strong> and Logan moved in together<\/strong> after Paris kicked Rory out<\/strong> because she was mad that Rory<\/strong> was made editor of the paper after Paris was ousted from the position by the newspaper staff. They also go to Martha's Vineyard<\/strong> with Luke and Lorelai<\/strong>. Luke, who has been aloof around Logan<\/strong>, looks at him in a new light<\/strong> when he helps Luke with a Valentine gift<\/strong> for Lorelai<\/strong>. All is well until Rory finds out<\/strong> about him getting back together with his ex-girlfriend<\/strong>. After she finds this out she misses Honor's wedding<\/strong> and breaks up with Logan<\/strong> which he takes very badly<\/strong>. She later gets back together with him<\/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':2480, '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':2480, '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':2480, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }