var presentation = ["The Vampire Diaries<\/word>","vampire<\/word>","human<\/word>","Damon and Stefan<\/word>","hadn't seen each other<\/word>","their bitter and violent relationship<\/word>","Damon Salvatore<\/word>","male protagonists<\/word>","distant descendant<\/word>","Silas<\/word>","Stefan Salvatore<\/word>","Cure<\/word>","major antagonist<\/word>","first part<\/word>","Season One<\/word>","colonial town<\/word>","Mystic Falls<\/word>","time<\/word>","his return<\/word>","fifteen years<\/word>","Damon Salvatore<\/strong> is one of the two main male protagonists<\/strong> of The Vampire Diaries<\/strong>. Damon was a 178-year-old vampire<\/strong> and distant descendant<\/strong> of Silas<\/strong>. Since his younger brother, Stefan Salvatore<\/strong>, injected him with the Cure<\/strong>, he is now human<\/strong>. He was a major antagonist<\/strong> in the first part<\/strong> of Season One<\/strong>. He was born during the 1800s and lived in the colonial town<\/strong> of Mystic Falls<\/strong> with his brother Stefan, his father, Giuseppe Salvatore, and also with his mother Lillian Salvatore until her death in 1858. He became a vampire<\/strong> in 1864. At the time<\/strong> of his return<\/strong> to Mystic Falls<\/strong>, Damon and Stefan<\/strong> hadn't seen each other<\/strong> in fifteen years<\/strong> due to their bitter and violent relationship<\/strong>.<\/phrase>","Augustine society<\/word>","experimented on vampires<\/word>","failed<\/word>","turned off his humanity<\/word>","sought revenge<\/word>","finally killed<\/word>","last descendant<\/word>","Whitmore family<\/word>","Enzo<\/word>","best friends<\/word>","plan<\/word>","critical moment<\/word>","guilt and sadness<\/word>","Aaron Whitmore<\/word>","In the 1950s, Damon was captured and tortured by the Augustine society<\/strong>, led by the Whitmore family<\/strong>, who experimented on vampires<\/strong> for a \"bigger purpose\". During his five years of captivity, he meets another prisoner, Enzo<\/strong>, with whom he became best friends<\/strong> with. Eventually, the plan<\/strong> the two made failed<\/strong> at a critical moment<\/strong> and thinking Enzo<\/strong> \"died\" because of him, Damon turned off his humanity<\/strong> to suppress the guilt and sadness<\/strong>. He sought revenge<\/strong>, an act of hunting down every member over generations that left one alive to carry on the family name until he finally killed<\/strong> the last descendant<\/strong> in the Whitmore family<\/strong>, which ended with Aaron Whitmore<\/strong>'s death.<\/phrase>","never loved him<\/word>","love for her fades<\/word>","love for Elena grows<\/word>","protect Elena<\/word>","Salvatore Boarding House<\/word>","sole purpose<\/word>","Mystic Falls<\/word>","his sire<\/word>","Katherine Pierce<\/word>","deeply loved<\/word>","his friendship<\/word>","Elena<\/word>","Damon's sole purpose<\/strong> in coming back to Mystic Falls<\/strong> was to free his sire<\/strong> Katherine Pierce<\/strong> from a tomb she was never in. Damon deeply loved<\/strong> her for 145 years. After realizing that Katherine never loved him<\/strong>, his love for her fades<\/strong> as his friendship<\/strong> and love for Elena grows<\/strong>. After strengthening his relationship with his brother, both Stefan and Damon begin working together to protect Elena<\/strong>, along with her friends and family. He lives with his brother Stefan, girlfriend Elena<\/strong>, and her brother Jeremy Gilbert in the Salvatore Boarding House<\/strong>.<\/phrase>","Stefan falling prey to Klaus<\/word>","Season Three<\/word>","In the Season Three<\/strong>, Damon filled the role as one of the protagonists in the first half of the season due to Stefan falling prey to Klaus<\/strong>.<\/phrase>","fall in love<\/word>","vampire<\/word>","romantic relationship<\/word>","her feeling for Damon were real<\/word>","Elena<\/word>","admit<\/word>","love<\/word>","start<\/word>","Season Four<\/word>","realize<\/word>","return<\/word>","Throughout the series, his bond with Elena<\/strong> continuously grows and they eventually fall in love<\/strong> with each other. Shortly after her death and subsequent transition into a vampire<\/strong>, Elena<\/strong>'s feelings for Damon are heightened which makes her admit<\/strong> her love<\/strong> for him and they start<\/strong> a romantic relationship<\/strong> in Season Four<\/strong>. The relationship is complicated when they realize<\/strong> that, due to the fact that it was Damon's blood that turned Elena<\/strong>, she is sire-bonded to him, so nobody is sure whether Elena<\/strong>'s feelings for Damon are real or because of the sire bond. But, most of the people insist that once the sire bond is broken, Elena<\/strong> will return<\/strong> to Stefan. When Jeremy dies, Elena<\/strong> turns off her emotions; after she turns them back on, the sire bond is broken and Elena<\/strong> reveals that her feeling for Damon were real<\/strong> and she's still in love<\/strong> with him.<\/phrase>","become friends once again<\/word>","diabolical plan<\/word>","Augustine Vampire<\/word>","crave vampire blood<\/word>","the Other Side collapsing<\/word>","gave up his life<\/word>","Season Five<\/word>","Enzo<\/word>","Elena<\/word>","Whitmore family<\/word>","Wes Maxfield<\/word>","cause<\/word>","Caroline<\/word>","Alaric<\/word>","In Season Five<\/strong>, Damon discovers Enzo<\/strong>'s undead status and they become friends once again<\/strong> however once \"Elena<\/strong>\" breaks up with him, he puts an end to his diabolical plan<\/strong> against the Whitmore family<\/strong> and is then injected with a dangerous compound by Wes Maxfield<\/strong>, causing him to become an Augustine Vampire<\/strong>, the only one in existence. This injection would cause<\/strong> him to crave vampire blood<\/strong>. He was later cured, thanks to Enzo<\/strong>, Stefan, and Caroline<\/strong>'s actions. Due to the Other Side collapsing<\/strong>, Damon gave up his life<\/strong> to save his loved ones and this particularly caused Elena<\/strong>, Stefan, and Alaric<\/strong> much grief.<\/phrase>","trapped<\/word>","continually reliving a day from his history<\/word>","form an alliance<\/word>","friendship with Bonnie<\/word>","become friends<\/word>","Alaric compel away all her memories of their relationship<\/word>","attempts to win her back<\/word>","Season Six<\/word>","Bonnie<\/word>","Prison World<\/word>","work<\/word>","Mystic Falls<\/word>","time<\/word>","Elena<\/word>","In Season Six<\/strong>, Damon and Bonnie<\/strong> are trapped<\/strong> in a 1994 Prison World<\/strong>, which Damon initially believes is his own personal hell, as they are continually reliving a day from his history<\/strong> that Damon believes is the worst thing he ever did. Bonnie<\/strong> is convinced her grandmother sent them there and there is a way out. They work<\/strong> together to find a way back to Mystic Falls<\/strong>. They also form an alliance<\/strong> to take down Kai. During this time<\/strong>, he is able to form a healthy friendship with Bonnie<\/strong>, and they are able to move on from their past and become friends<\/strong>. When Bonnie<\/strong> has a chance to send him home, leaving herself alone with Kai, she does so. Damon initially believes Bonnie<\/strong> was killed in the process, but when he realized she's still alive, he becomes determined to find a way to bring her back. After returning home, he learns that Elena<\/strong> has had Alaric compel away all her memories of their relationship<\/strong> and he attempts to win her back<\/strong>.<\/phrase>","regaining her magic<\/word>","Qetsiyah's calcified blood<\/word>","Silas' tombstone<\/word>","Cure for vampirism<\/word>","gave it to Elena<\/word>","become human<\/word>","sleeping curse<\/word>","tied the spell to Bonnie's life<\/word>","human<\/word>","difficult goodbye<\/word>","Bonnie<\/word>","Prison World<\/word>","escape<\/word>","Nova Scotia<\/word>","Cure<\/word>","Elena<\/word>","He is soon reunited with Bonnie<\/strong> who made it out of the Prison World<\/strong> and shows him a video of a mysterious lady, who turns out to be Damon's mother. Bonnie<\/strong> had managed to escape<\/strong> the 1994 Prison World<\/strong> by going to Nova Scotia<\/strong> and regaining her magic<\/strong> through Qetsiyah's calcified blood<\/strong> in Silas' tombstone<\/strong>. She also picked up the Cure for vampirism<\/strong> and gave it to him, who in turned gave it to Elena<\/strong>. Damon expressed the he also had the desire to take the Cure<\/strong> and become human<\/strong>. At the end of the season Kai placed Elena<\/strong> into a sleeping curse<\/strong> and tied the spell to Bonnie's life<\/strong>, which was supposed to keep the now human<\/strong> Elena<\/strong> in a mystical coma until Bonnie<\/strong> dies. Damon was devastated by this and said a difficult goodbye<\/strong> to Elena<\/strong> as they locked her in a coffin while his best friend, Bonnie<\/strong>, lived out her remaining days.<\/phrase>","I Was Feeling Epic<\/word>","break the spell<\/word>","newly human<\/word>","Damon married Elena<\/word>","long and happy life together<\/word>","Season Eight<\/word>","Bonnie<\/word>","Elena<\/word>","As of Season Eight<\/strong>'s \"I Was Feeling Epic<\/strong>\", Bonnie<\/strong> managed to break the spell<\/strong>, allowing Elena<\/strong> to wake up, while not killing herself in the process. Finally, Damon and Elena<\/strong> are reunited. In the end of the show, the newly human<\/strong> Damon married Elena<\/strong> and they lived a long and happy life together<\/strong> before passing away and finding peace.<\/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':1844, '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':1844, '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':1844, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }