var presentation = ["The Vampire Diaries<\/word>","Lizzie and Josie Saltzman<\/word>","her transition into a vampire<\/word>","excessively competitive<\/word>","Caroline Forbes<\/word>","main female characters<\/word>","Sheriff Elizabeth Forbes<\/word>","Stefan Salvatore<\/word>","Damon Salvatore<\/word>","Elena Gilbert<\/word>","surrogate mother<\/word>","Alaric<\/word>","twin daughters<\/word>","Prior<\/word>","her insecurities<\/word>","Caroline Forbes<\/strong> is a vampire and one of the main female characters<\/strong> on The Vampire Diaries<\/strong>. Caroline is the daughter of William Forbes II and Sheriff Elizabeth Forbes<\/strong>, the wife of the late Stefan Salvatore<\/strong> and the sister-in-law of Damon Salvatore<\/strong> and Elena Gilbert<\/strong>. She is also the surrogate mother<\/strong> of Alaric<\/strong> and Jo's twin daughters<\/strong>, Lizzie and Josie Saltzman<\/strong>. Prior<\/strong> to her transition into a vampire<\/strong>, she was known for her insecurities<\/strong>, which caused her to be excessively competitive<\/strong>, mainly with Elena.<\/phrase>","always had<\/word>","strong bond<\/word>","Elena Gilbert<\/word>","Bonnie Bennett<\/word>","best friends<\/word>","Stefan Salvatore<\/word>","close friends<\/word>","her ex<\/word>","Matt Donovan<\/word>","Niklaus Mikaelson<\/word>","She has always had<\/strong> a strong bond<\/strong> with her childhood friends, Elena Gilbert<\/strong> and Bonnie Bennett<\/strong>. She became best friends<\/strong> with Stefan Salvatore<\/strong> after she became a vampire and he became her mentor. She is also close friends<\/strong> with her ex<\/strong>, Matt Donovan<\/strong>, whom she has known since childhood, and with Niklaus Mikaelson<\/strong>.<\/phrase>","severely injured<\/word>","heal Caroline<\/word>","Damon rescues her<\/word>","Season One<\/word>","car wreck<\/word>","internal bleeding<\/word>","Damon Salvatore<\/word>","Katherine Pierce<\/word>","knowingly turned<\/word>","own<\/word>","eventually giving<\/word>","Klaus<\/word>","Earlier in the series, Caroline begins dating Elena's ex-boyfriend, Matt, who encourages her to become more caring, kind, and selfless. In the Season One<\/strong> finale, Caroline was severely injured<\/strong> in a car wreck<\/strong> and suffered internal bleeding<\/strong>. When Caroline's situation was looking pretty bleak, Bonnie and Elena agreed that Damon Salvatore<\/strong> should heal Caroline<\/strong> by feeding her his blood. Later, after Caroline's health had improved, Caroline was smothered to death in the hospital by Katherine Pierce<\/strong>, who was aware that Damon had healed Caroline, therefore knowingly turned<\/strong> her into a vampire. Katherine planned to use Caroline to her own<\/strong> advantage by manipulating her, threatening those she loved and eventually giving<\/strong> her to Klaus<\/strong> as a sacrifice. However, Damon rescues her<\/strong>, and the deal made by Katherine is forfeited.<\/phrase>","causes them to break up<\/word>","fell in love with Caroline<\/word>","werewolf<\/word>","ended<\/word>","Monster's Ball<\/word>","new vampire nature<\/word>","love<\/word>","Tyler<\/word>","full moon<\/word>","romantic relationship<\/word>","Klaus<\/word>","her beauty<\/word>","Caroline's new vampire nature<\/strong> brought difficulty to her relationship with Matt and this eventually causes them to break up<\/strong> despite their love<\/strong> for each other. Matt's friend, Tyler<\/strong>, fell in love with Caroline<\/strong> after she helped him with his first full moon<\/strong> as a werewolf<\/strong>. After a while, she realized that she's in love<\/strong> with Tyler<\/strong> too, so they begin a romantic relationship<\/strong> which ended<\/strong> in \"Monster's Ball<\/strong>\". Klaus<\/strong> also fell in love with Caroline<\/strong> because of her beauty<\/strong>, strength, and intelligence. But they do not end up together.<\/phrase>","die in front of her<\/word>","Damon died to save him<\/word>","Caroline was also forced to see her best friend, Stefan, die in front of her<\/strong>. When he comes back to life, she is extremely happy but also sad because Damon died to save him<\/strong>.<\/phrase>","kept out all vampires<\/word>","find a way bring Damon and Bonnie back to life<\/word>","tries to convince him to come back home<\/word>","he refuses<\/word>","Four months<\/word>","Mystic Falls<\/word>","anti-magic bubble<\/word>","also teamed<\/word>","Enzo<\/word>","Four months<\/strong> after the deaths of Bonnie and Damon, Caroline has dropped out of college and has been trying to find a way to get vampires back into Mystic Falls<\/strong> as an anti-magic bubble<\/strong> has kept out all vampires<\/strong>. She also teamed<\/strong> as up with Enzo<\/strong>, to try and find a way bring Damon and Bonnie back to life<\/strong>. Caroline also hasn't spoken to Stefan after Damon's death. She finally finds Stefan with the help of Enzo<\/strong>, and tries to convince him to come back home<\/strong>. Much to her dismay, he refuses<\/strong>, and their friendship becomes more strained and tense.<\/phrase>","mends her friendship with Stefan<\/word>","poor behavior<\/word>","cold shoulder<\/word>","When Damon returns, Stefan does everything he can to make up for his poor behavior<\/strong>, but Caroline constantly gives him the cold shoulder<\/strong>. However, after learning about her mother's sickness, Caroline soon mends her friendship with Stefan<\/strong> and unexpectedly kisses him. Soon after, Liz passes away in the hospital surrounded by Damon, Elena, Matt and Stefan.<\/phrase>","halted<\/word>","romantic relationship<\/word>","After Caroline's mother passed away, Stefan and Caroline halted<\/strong> their budding romantic relationship<\/strong>. Caroline also shut off her emotions after her mother died, and she encourages Stefan to do the same. While without their humanity, Caroline and Stefan restart their relationship. But, once they regain their emotions, Caroline states that she needs some time before starting a relationship with with Stefan.<\/phrase>","she wants to be with Stefan<\/word>","complicates their relationship<\/word>","break up<\/word>","go on the run<\/word>","raise her children<\/word>","Mystic Falls<\/word>","Alaric<\/word>","During the seventh season, Caroline finally realizes she wants to be with Stefan<\/strong> and they get together. However, when Stefan's mother and her adoptive vampire-witch hybrid children come to Mystic Falls<\/strong>, this complicates their relationship<\/strong>. After Caroline became pregnant, as a surrogate, with Alaric<\/strong>'s twins, this causes Caroline and Stefan to slowly drift apart and break up<\/strong> for three years. During this time, Stefan is forced to go on the run<\/strong> with Valerie and Caroline continues to raise her children<\/strong> with Alaric<\/strong>.<\/phrase>","break up<\/word>","force them to work together<\/word>","get back together<\/word>","When Stefan and Valerie break up<\/strong>, he tries to win Caroline back, but she is cold to him during their reunion. However, circumstances force them to work together<\/strong> for the first time in three years and they slowly warm up to each other again. Later, Caroline realizes that she only truly loves Stefan and the two get back together<\/strong> again.<\/phrase>","Season Eight<\/word>","Stefan proposed to Caroline<\/word>","turn off his humanity<\/word>","protect Caroline's daughters<\/word>","Stefan became human again<\/word>","killed Enzo<\/word>","work<\/word>","Cade<\/word>","cure<\/word>","marry<\/word>","In Season Eight<\/strong> Stefan proposed to Caroline<\/strong> and she said yes but they are briefly separated when Stefan agreed to turn off his humanity<\/strong> and work<\/strong> for Cade<\/strong> to protect Caroline's daughters<\/strong> Lizzie and Josie. It was also during this time that Stefan became human again<\/strong> when Bonnie gave him the cure<\/strong> after he killed Enzo<\/strong> as he struggled with his guilt he planned to leave Caroline until he realized he wanted to spend what years he had left as a human with her. They later marry<\/strong>.<\/phrase>","Stefan sacrificed his life to save Mystic Falls<\/word>","would love him forever<\/word>","love her always<\/word>","It was after their wedding that Stefan sacrificed his life to save Mystic Falls<\/strong> from hellfire and when Caroline learned of this called Stefan leaving him a message telling him she understood his decision and would love him forever<\/strong> hoping that he would get her message before he died which he did. He later asked Elena to pass on a message to Caroline to tell her he heard her and would love her always<\/strong> before he went into the afterlife.<\/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':1846, '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':1846, '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':1846, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }