var presentation = ["recurring character<\/word>","season 2<\/word>","seasons 3\u20136<\/word>","Dalton Academy<\/word>","member<\/word>","The Warblers<\/word>","rival of New Directions<\/word>","love interest for Kurt<\/word>","Blame It on the Alcohol<\/word>","resulting in Blaine<\/word>","reasserting his identity as gay<\/word>","Blaine Anderson<\/word>","main character<\/word>","openly gay student<\/word>","Sectionals<\/word>","Regionals<\/word>","Rachel<\/word>","brief fling<\/word>","Blaine Anderson<\/strong> is a recurring character<\/strong> in season 2<\/strong> and a main character<\/strong> in seasons 3\u20136<\/strong>. He is introduced as an openly gay student<\/strong> at Dalton Academy<\/strong> and a member<\/strong> of The Warblers<\/strong>, a Sectionals<\/strong> and Regionals<\/strong> rival of New Directions<\/strong>. The character is a love interest for Kurt<\/strong>, though in the episode \"Blame It on the Alcohol<\/strong>\", he and Rachel<\/strong> have a brief fling<\/strong>, resulting in Blaine<\/strong> reasserting his identity as gay<\/strong>.<\/phrase>","role model for Kurt<\/word>","develops a crush on him<\/word>","beginning of season three<\/word>","decides to transfer to McKinley to be with Kurt<\/word>","joins New Directions<\/word>","Blaine is injured<\/word>","confrontation between New Directions<\/word>","The Warblers<\/word>","repair the damage<\/word>","relationship with Kurt<\/word>","later strained<\/word>","Kurt's eagerness to leave for New York after graduation<\/word>","separate the two<\/word>","until Blaine graduated<\/word>","two patch things up<\/word>","are still a couple<\/word>","end of the school year<\/word>","Original Song<\/word>","kiss<\/word>","eye surgery<\/word>","following year<\/word>","Blaine becomes a role model for Kurt<\/strong>, who develops a crush on him<\/strong>. During \"Original Song<\/strong>\", Blaine realizes he reciprocates Kurt's feeling, and they kiss<\/strong>. At the beginning of season three<\/strong>, Blaine decides to transfer to McKinley to be with Kurt<\/strong>, and joins New Directions<\/strong>. Blaine is injured<\/strong> during a confrontation between New Directions<\/strong> and The Warblers<\/strong>, and has eye surgery<\/strong> to repair the damage<\/strong>. His relationship with Kurt<\/strong> is later strained<\/strong> by Kurt's eagerness to leave for New York after graduation<\/strong>, which would separate the two<\/strong> at least until Blaine graduated<\/strong> the following year<\/strong>, but the two patch things up<\/strong>, and are still a couple<\/strong> at the end of the school year<\/strong>.<\/phrase>","beginning of his senior year<\/word>","prompts Kurt to follow his New York City dreams<\/word>","successfully runs for senior class president<\/word>","inadvertently pulls away from Blaine<\/word>","Vogue.com internship<\/word>","Blaine cheats on Kurt<\/word>","confessing to Kurt of his infidelity<\/word>","Kurt severs all ties<\/word>","lead singer<\/word>","New Directions<\/word>","At the beginning of his senior year<\/strong>, Blaine becomes the lead singer<\/strong> of New Directions<\/strong> and successfully prompts Kurt to follow his New York City dreams<\/strong>. Blaine successfully runs for senior class president<\/strong>. Kurt inadvertently pulls away from Blaine<\/strong> due to his Vogue.com internship<\/strong>; distraught, Blaine cheats on Kurt<\/strong>. After confessing to Kurt of his infidelity<\/strong>, Kurt severs all ties<\/strong>.<\/phrase>","Dalton Academy Warblers<\/word>","attempts to convince Blaine to return<\/word>","The Warblers<\/word>","convinces him<\/word>","despite having done a bad thing<\/word>","Blaine is still a good person<\/word>","an important member<\/word>","Hunter Clarington<\/word>","new captain<\/word>","becomes conflicted<\/word>","Sam Evans<\/word>","New Directions<\/word>","Hunter Clarington<\/strong>, the new captain<\/strong> of the Dalton Academy Warblers<\/strong>, attempts to convince Blaine to return<\/strong> to The Warblers<\/strong>. Blaine becomes conflicted<\/strong>, but Sam Evans<\/strong> ultimately convinces him<\/strong> that, despite having done a bad thing<\/strong>, Blaine is still a good person<\/strong> and an important member<\/strong> of New Directions<\/strong>.<\/phrase>","mend their relationship<\/word>","spend Christmas together<\/word>","hooks up with Kurt<\/word>","Will's wedding<\/word>","Kurt insists<\/word>","they are not going to become a couple<\/word>","best friends with Sam<\/word>","minor crush on him<\/word>","he later overcomes<\/word>","Tina harbors a crush on Blaine<\/word>","realizes her folly<\/word>","becomes his friend<\/word>","reveal the cheating done by the Warblers<\/word>","earn New Directions<\/word>","slot at Regionals<\/word>","they eventually win<\/word>","Thanksgiving<\/word>","New York City<\/word>","Kurt begins to mend their relationship<\/strong> in \"Thanksgiving<\/strong>\" and they spend Christmas together<\/strong> in New York City<\/strong>. He later hooks up with Kurt<\/strong> at Will's wedding<\/strong> where Kurt insists<\/strong> that they are not going to become a couple<\/strong>. He becomes best friends with Sam<\/strong>, developing a minor crush on him<\/strong> that he later overcomes<\/strong>. Tina harbors a crush on Blaine<\/strong>, but she realizes her folly<\/strong> and becomes his friend<\/strong>. He, along with Sam reveal the cheating done by the Warblers<\/strong> and earn New Directions<\/strong> a slot at Regionals<\/strong>, which they eventually win<\/strong>.<\/phrase>","later reconciles with Kurt<\/word>","proposes marriage to him<\/word>","auditions for NYADA<\/word>","gets in<\/word>","After graduation<\/word>","moves in with Kurt in New York<\/word>","decide to have their own space<\/word>","Blaine decides to share a room with Sam<\/word>","moved to New York<\/word>","Kurt asks Blaine to sing a song with him<\/word>","NYADA donor<\/word>","June takes interest in Blaine<\/word>","decides to organize a one-night-only show for Blaine<\/word>","Blaine wants to involve Kurt<\/word>","she refuses<\/word>","Blaine lies to Kurt<\/word>","tells him that he will also get to sing a song<\/word>","Kurt discovers the lie<\/word>","very upset<\/word>","ultimately reconcile<\/word>","Kurt decides to support his fianc\u00e9<\/word>","Blaine invites Kurt to perform a last duet with him<\/word>","enjoys the performance<\/word>","praises them<\/word>","Blaine later moves in with Kurt<\/word>","June Dolloway<\/word>","He later reconciles with Kurt<\/strong> and proposes marriage to him<\/strong>, getting help from several other show choirs. Later, he auditions for NYADA<\/strong> and gets in<\/strong>. After graduation<\/strong>, he moves in with Kurt in New York<\/strong>. But later, both of them decide to have their own space<\/strong> for some time and Blaine decides to share a room with Sam<\/strong>, who has also moved to New York<\/strong>. Kurt asks Blaine to sing a song with him<\/strong> in front of an influential NYADA donor<\/strong>, June Dolloway<\/strong>, who comes to the school for a dance studio inaugural. June takes interest in Blaine<\/strong> and decides to organize a one-night-only show for Blaine<\/strong>. Blaine wants to involve Kurt<\/strong> in it but she refuses<\/strong>. Blaine lies to Kurt<\/strong> and tells him that he will also get to sing a song<\/strong> in the showcase. When Kurt discovers the lie<\/strong>, he is very upset<\/strong>, but they ultimately reconcile<\/strong> and Kurt decides to support his fianc\u00e9<\/strong>. At the showcase, Blaine invites Kurt to perform a last duet with him<\/strong> much to June's dismay, but she enjoys the performance<\/strong> and praises them<\/strong>. Blaine later moves in with Kurt<\/strong>.<\/phrase>","Kurt eventually breaks off their engagement<\/word>","does not feel ready for marriage<\/word>","Blaine becomes depressed<\/word>","does poorly at NYADA<\/word>","expelled from school<\/word>","returns to Lima<\/word>","starts coaching the Warblers<\/word>","also starts to date Dave Karofsky<\/word>","comes as a shock to Kurt<\/word>","realizes he still loves Blaine<\/word>","get him back<\/word>","gets trapped in an elevator with Kurt<\/word>","part of a plan by Sue<\/word>","get them back together<\/word>","demands they kiss each other<\/word>","which they eventually do<\/word>","kiss again<\/word>","sing together during Rachel's house farewell party<\/word>","Blaine later breaks up with Karofsky<\/word>","gets back together with Kurt<\/word>","get married<\/word>","along with Brittany and Santana<\/word>","later move back to New York<\/word>","Blaine gets accepted into NYU<\/word>","Kurt returns to NYADA<\/word>","both are successful actors<\/word>","give performances for the LGBT community<\/word>","teach students to accept everyone<\/word>","are about to become fathers<\/word>","Rachel as their surrogate<\/word>","Lima<\/word>","Kurt eventually breaks off their engagement<\/strong> because he does not feel ready for marriage<\/strong>. Blaine becomes depressed<\/strong>, so much so that he does poorly at NYADA<\/strong> and is expelled from school<\/strong>. He returns to Lima<\/strong> and starts coaching the Warblers<\/strong> and he also starts to date Dave Karofsky<\/strong>, which comes as a shock to Kurt<\/strong> when he realizes he still loves Blaine<\/strong> and goes to Lima<\/strong> to get him back<\/strong>. Blaine later gets trapped in an elevator with Kurt<\/strong>, as part of a plan by Sue<\/strong> to get them back together<\/strong>, and she demands they kiss each other<\/strong> to get out, which they eventually do<\/strong>. They kiss again<\/strong> when they sing together during Rachel's house farewell party<\/strong>. Blaine later breaks up with Karofsky<\/strong> and gets back together with Kurt<\/strong>. They get married<\/strong> along with Brittany and Santana<\/strong>. They later move back to New York<\/strong> when Blaine gets accepted into NYU<\/strong> and Kurt returns to NYADA<\/strong>. After five years, both are successful actors<\/strong>, and they also give performances for the LGBT community<\/strong> and teach students to accept everyone<\/strong>. They are about to become fathers<\/strong>, with Rachel as their surrogate<\/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':2444, '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':2444, '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':2444, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }