var presentation = ["Queen of Air and Darkness<\/word>","The Dark Artifices trilogy<\/word>","The Shadowhunter Chronicles<\/word>","final book<\/word>","Cassandra Clare<\/word>","chronological series<\/word>","LA Institute<\/word>","previous series<\/word>","City in the Sea by Edgar Allan Poe<\/word>","Queen of Air and Darkness<\/strong> is the third and final book<\/strong> in The Dark Artifices trilogy<\/strong> by Cassandra Clare<\/strong>, which is the fourth chronological series<\/strong> in The Shadowhunter Chronicles<\/strong>. This series follows the characters of the LA Institute<\/strong> in 2012 and features characters from all of the previous series<\/strong>. The chapter titles all come from the poem City in the Sea by Edgar Allan Poe<\/strong>.<\/phrase>","The Cohort<\/word>","destroy Downworlders<\/word>","take over the Clave<\/word>","Robert as the new Inquisitor<\/word>","Julian Blackthorn<\/word>","changed by their love<\/word>","dampens his feelings<\/word>","Kit Herondale's fey heritage<\/word>","warlock sickness<\/word>","ring<\/word>","alert his wife, Tessa Gray, to her location<\/word>","Lord of Shadows<\/word>","prepare<\/word>","Robert Lightwood<\/word>","Livvy Blackthorn<\/word>","fascist organization<\/word>","Horace Dearborn<\/word>","replace<\/word>","Magnus Bane<\/word>","parabatai bond<\/word>","Emma Carstairs<\/word>","spell<\/word>","distant cousin<\/word>","Jem Carstairs<\/word>","ley lines<\/word>","After the events of Lord of Shadows<\/strong>, the Shadowhunters prepare<\/strong> for the burials of Robert Lightwood<\/strong> and Livvy Blackthorn<\/strong>. The Cohort<\/strong>, a fascist organization<\/strong> that aim to discredit and destroy Downworlders<\/strong>, and take over the Clave<\/strong>. They nominate Horace Dearborn<\/strong> to replace<\/strong> Robert as the new Inquisitor<\/strong>. Julian Blackthorn<\/strong> confesses to Magnus Bane<\/strong> that his parabatai bond<\/strong> with Emma Carstairs<\/strong> has been changed by their love<\/strong>, asking him to put a spell<\/strong> that dampens his feelings<\/strong>. During the funeral, Emma meets with her distant cousin<\/strong>, Jem Carstairs<\/strong>, telling her about Kit Herondale's fey heritage<\/strong> as well as a warlock sickness<\/strong> supposedly caused by ley lines<\/strong>. Before leaving, he gives her a ring<\/strong> which will alert his wife, Tessa Gray, to her location<\/strong>.<\/phrase>","plans to interrogate all Downworlders<\/word>","Los Angeles<\/word>","go to Faerie<\/word>","kill Annabel Blackthorn<\/word>","retrieve the Black Volume of the Dead<\/word>","arrive at Faerie<\/word>","Horace never intended them to survive<\/word>","kill them<\/word>","Seelie Queen<\/word>","Black Volume<\/word>","how to break the parabatai bond<\/word>","Silent City<\/word>","Mortal Sword<\/word>","break all parabatai bonds in the world<\/word>","realize<\/word>","Dane Larkspear<\/word>","Nene<\/word>","appear<\/word>","Seelie Court<\/word>","copy<\/word>","return<\/word>","parabatai bond<\/word>","original bond<\/word>","Horace states his plans to interrogate all Downworlders<\/strong> and bars Emma and Julian from leaving with the other Blackthorns back to Los Angeles<\/strong>. He gives them a mission to go to Faerie<\/strong>, kill Annabel Blackthorn<\/strong>, and retrieve the Black Volume of the Dead<\/strong>. When the two arrive at Faerie<\/strong>, they realize<\/strong> that Horace never intended them to survive<\/strong> and has sent Dane Larkspear<\/strong> to kill them<\/strong>. Julian kills him before Seelie faeries, including Nene<\/strong>, appear<\/strong> to take them to the Seelie Court<\/strong>. There, Julian gives the Seelie Queen<\/strong> a copy<\/strong> of the Black Volume<\/strong> in return<\/strong> for the information on how to break the parabatai bond<\/strong>. They learn that they can break their parabatai bond<\/strong> by cutting the original bond<\/strong> in Silent City<\/strong> with the Mortal Sword<\/strong>, which will break all parabatai bonds in the world<\/strong>.<\/phrase>","hide Kieran<\/word>","The Cohort<\/word>","Diego convinces Kieran to escape<\/word>","Kieran heads to Los Angeles<\/word>","go to Faerie<\/word>","join the revels<\/word>","Cristina manages to escape<\/word>","requests that Adaon helps them<\/word>","Scholomanche<\/word>","Diego Rosales<\/word>","Pool of Reflection<\/word>","Samantha<\/word>","Cristina Rosales<\/word>","Mark Blackthorn<\/word>","call<\/word>","Jaime Rosales<\/word>","Eternidad<\/word>","Oban<\/word>","Manuel Villalobos<\/word>","At the Scholomanche<\/strong>, Diego Rosales<\/strong> attempts to hide Kieran<\/strong> from The Cohort<\/strong>. He saves Kieran when he is about to be thrown into the Pool of Reflection<\/strong>, in the process knocking Dane's sister, Samantha<\/strong>, towards the pool, where she is tortured to insanity. The two are imprisoned and learn about Emma's and Julian's mission. Diego convinces Kieran to escape<\/strong> using his fey steed while he remains behind. Kieran heads to Los Angeles<\/strong> and saves Cristina Rosales<\/strong> and Mark Blackthorn<\/strong> as they are attacked by faeries while investigating a ley line. Learning about the mission, Cristina, Mark, and Kieran call<\/strong> in Jaime Rosales<\/strong> to give them the Eternidad<\/strong> so they can go to Faerie<\/strong>. The trio are forced to join the revels<\/strong> of Kieran's brother Oban<\/strong>, who is working with a Cohort member, Manuel Villalobos<\/strong>. Cristina manages to escape<\/strong> with the Eternidad<\/strong> and requests that Adaon helps them<\/strong>.<\/phrase>","vote on a Downworlder registry<\/word>","Clave vote to create the registry<\/word>","Gwyn ap Nudd<\/word>","Los Angeles<\/word>","Briefly captured<\/word>","break free from Horace<\/word>","Jia Penhallow is imprisoned<\/word>","Clave<\/word>","Diana Wrayburn<\/word>","Gwyn<\/word>","Horace calls the Clave<\/strong> several times to vote on a Downworlder registry<\/strong>. After being informed of what befell the Larkspear siblings, the Clave vote to create the registry<\/strong>. Diana Wrayburn<\/strong> demands Gwyn ap Nudd<\/strong> to take her back to Los Angeles<\/strong>. Briefly captured<\/strong>, she is able to break free from Horace<\/strong> before leaving with Gwyn<\/strong>. However, in the process, the Consul, Jia Penhallow is imprisoned<\/strong>.<\/phrase>","replace her<\/word>","Seelie Queen<\/word>","regain her son, Ash<\/word>","subjecting Ash to spells from the Black Volume<\/word>","attract people to care for him<\/word>","use Ash to conquer the Seelie Court<\/word>","wipe all Shadowhunters<\/word>","reunite with Clary Fairchild and Jace Herondale<\/word>","Nene<\/word>","Unseelie King<\/word>","Unseelie Tower<\/word>","King Arawn<\/word>","Nene<\/strong> offers Emma and Julian the chance to replace her<\/strong>, so another sympathetic faerie's positions to accompany the Seelie Queen<\/strong> during her parley with the Unseelie King<\/strong> to regain her son, Ash<\/strong>. Infiltrating the Unseelie Tower<\/strong>, they confront Annabel and the King Arawn<\/strong>, who is revealed to be subjecting Ash to spells from the Black Volume<\/strong>, causing him to attract people to care for him<\/strong>. He plans to use Ash to conquer the Seelie Court<\/strong> and wipe all Shadowhunters<\/strong>. After a brief encounter with Ash, Emma and Julian are thrown to the dungeons and reunite with Clary Fairchild and Jace Herondale<\/strong>.<\/phrase>","four are freed by Cristina and Adaon<\/word>","rescue Mark and Kieran<\/word>","portal to a place called Thule<\/word>","Seelie Queen<\/word>","claim her son<\/word>","she and Arawn used to have a daughter<\/word>","Annabel takes Ash through the portal to Thule<\/word>","Kieran manages to kill Arawn<\/word>","hunt them<\/word>","decide to enter Thule<\/word>","First Heir<\/word>","Adaon<\/word>","attempt<\/word>","Riders of Mannan<\/word>","fail<\/word>","The four are freed by Cristina and Adaon<\/strong>, who fakes them as his prisoners to Arawn's court so they can rescue Mark and Kieran<\/strong>. Arawn has opened a portal to a place called Thule<\/strong>, which he uses to power up Ash. A heated confrontation ensues with a vengeful Julian attacking Annabel. Arawn then attemps to have Ash execute Kieran before the Seelie Queen<\/strong> appears to claim her son<\/strong>, revealing that she and Arawn used to have a daughter<\/strong>, the First Heir<\/strong>, whom he killed. In the confusion, Annabel takes Ash through the portal to Thule<\/strong>, while Kieran manages to kill Arawn<\/strong>. While the Seelie Queen<\/strong> leaves with Adaon<\/strong>, Emma and Julian attempt<\/strong> to leave with the others as the Riders of Mannan<\/strong> hunt them<\/strong>, but fail<\/strong> and decide to enter Thule<\/strong>.<\/phrase>","Thule is an alternate universe<\/word>","In this reality<\/word>","Clary was killed during the Battle of the Burren<\/word>","Sebastian Morgenstern to conquer the world<\/word>","portals for demons to cross over<\/word>","striving for freedom with the Downworlders<\/word>","Resistance is led by Livvy<\/word>","still alive in Thule<\/word>","reveals that their versions in Thule have been Endarkened<\/word>","decay<\/word>","Blight<\/word>","Legion of the Star<\/word>","Resistance<\/word>","shock<\/word>","Upon arrival, Emma and Julian learn that Thule is an alternate universe<\/strong> set two years into the future. In this reality<\/strong>, Clary was killed during the Battle of the Burren<\/strong>, allowing Sebastian Morgenstern to conquer the world<\/strong>, causing lands to decay<\/strong> in a phenomenon known as Blight<\/strong>, which serves as portals for demons to cross over<\/strong>. Shadowhunters have lost their angelic power and split between the many siding with Sebastian and calling themselves the Legion of the Star<\/strong>, and those striving for freedom with the Downworlders<\/strong>, known as the Resistance<\/strong>. To their shock<\/strong>, the Resistance is led by Livvy<\/strong>, who is still alive in Thule<\/strong>. Though at first skeptical, Livvy eventually warms up to Emma and Julian and reveals that their versions in Thule have been Endarkened<\/strong>.<\/phrase>","Emma breaks her ring to call for Tessa's help<\/word>","alternate Tessa<\/word>","last warlock<\/word>","warlock sickness<\/word>","Thule<\/word>","failed to kill Sebastian<\/word>","Mortal Sword<\/word>","Blight can be neutralized<\/word>","waters from Lake Lyn<\/word>","Silent City<\/word>","Mortal Sword is located<\/word>","manage to retrieve it<\/word>","Tessa sacrifices herself<\/word>","Emma time to kill Sebastian<\/word>","Julian avenges Livvy by killing Annabel<\/word>","taking off with Emma back to their reality<\/word>","Blight<\/word>","Resistance<\/word>","head<\/word>","Emma breaks her ring to call for Tessa's help<\/strong> and to her surprise gets a response. She and Julian meet with alternate Tessa<\/strong>, the world's last warlock<\/strong> as all others have died of warlock sickness<\/strong> caused by the Blight<\/strong>. While the Shadowhunters of Thule<\/strong> have failed to kill Sebastian<\/strong> with the Mortal Sword<\/strong>-which still exists in Thule<\/strong>-she believes that the two, who are not of this world, may be able to bring him down. She also informs them that Blight can be neutralized<\/strong> with waters from Lake Lyn<\/strong>. Emma and Julian briefly confront Annabel, who promises to make a portal for them to go home, but they will have to take Ash with them. Emma, Julian, and the Resistance<\/strong> head<\/strong> to Silent City<\/strong>, where the Mortal Sword is located<\/strong>, and manage to retrieve it<\/strong> before the Legion ambush them. Tessa sacrifices herself<\/strong> to give Emma time to kill Sebastian<\/strong> with the Sword, aided by Ash, who flies away with Jace using his wings. After she opens the portal, Julian avenges Livvy by killing Annabel<\/strong>, before taking off with Emma back to their reality<\/strong>.<\/phrase>","alternate Tessa<\/word>","get the waters<\/word>","Horace announces the deaths of Clary and Jace<\/word>","manipulate his supporters<\/word>","Julian has Magnus remove the dampening spell<\/word>","the Cohort's lies<\/word>","Livia's Watch<\/word>","Emma is convinced not to cut the original parabatai bond by Julian<\/word>","Blight<\/word>","Wild Hunt<\/word>","Oban<\/word>","Downworlders<\/word>","name<\/word>","Back home, Emma tells the others the solution the alternate Tessa<\/strong> told her about the Blight<\/strong>. The group work with the Wild Hunt<\/strong> to get the waters<\/strong>. Horace announces the deaths of Clary and Jace<\/strong> to manipulate his supporters<\/strong> as he is about to parley with Oban<\/strong>. Julian has Magnus remove the dampening spell<\/strong>, before calling on a meeting of anti-Registry Shadowhunters and Downworlders<\/strong> to expose the Cohort's lies<\/strong>, under the name<\/strong> \"Livia's Watch<\/strong>\". Manuel, knowing the truth about Clary and Jace, attempts to assassinate them but is foiled by Julian and taken prisoner. Emma is convinced not to cut the original parabatai bond by Julian<\/strong>.<\/phrase>","The Cohort<\/word>","Livia's Watch<\/word>","forcing Manuel to divulge the truth<\/word>","Mortal Sword<\/word>","Ty begins a ritual to resurrect Livvy<\/word>","bring Livvy as an apparition that only the two can see<\/word>","Kit discovers that he is a descendant of the First Heir<\/word>","Magnus' friend long thought to be dead<\/word>","Zara Dearborn gravely wounds Emma<\/word>","strengthened by their love<\/word>","gigantic monsters<\/word>","kill Horace<\/word>","nearly destroy Alicante<\/word>","the Blackthorns convince them to lay down their arms<\/word>","they discover that they are no longer parabatai<\/word>","Unseelie Court<\/word>","Regardless<\/word>","Riders of Mannan<\/word>","Shade<\/word>","Ragnor Fell<\/word>","parabatai bond<\/word>","The parley between The Cohort<\/strong> and the Unseelie Court<\/strong> is interrupted by Livia's Watch<\/strong>, who expose Horace's lies by forcing Manuel to divulge the truth<\/strong> using the alternate Mortal Sword<\/strong>, before escalating into open warfare. During the confrontation, Dru frees Jia, Diego, and Jaime from imprisonment. Meanwhile, Ty begins a ritual to resurrect Livvy<\/strong>, despite Kit's protests. Regardless<\/strong>, the ritual only manages to bring Livvy as an apparition that only the two can see<\/strong>. Kit discovers that he is a descendant of the First Heir<\/strong> when he manages to incapacitate the Riders of Mannan<\/strong>. It is also revealed that Shade<\/strong>, the warlock who helped Ty find the ingredients for the ritual, is actually Ragnor Fell<\/strong>, Magnus' friend long thought to be dead<\/strong>. In the war's final stages, Zara Dearborn gravely wounds Emma<\/strong>. As Julian cradles her, their parabatai bond<\/strong> is strengthened by their love<\/strong>, transforming them into gigantic monsters<\/strong> that kill Horace<\/strong> and swiftly dispose their enemies. However, they nearly destroy Alicante<\/strong> before the Blackthorns convince them to lay down their arms<\/strong>. When they wake up, they discover that they are no longer parabatai<\/strong>.<\/phrase>","Kieran kills Oban<\/word>","new Unseelie King<\/word>","he is forced to part ways<\/word>","realize their love for each other<\/word>","Kit decides to move in with Tessa and Jem<\/word>","side effects of Livvy's resurrection spell<\/word>","Clave meeting<\/word>","the Cohort refuse to surrender<\/word>","new Consul<\/word>","anti-Cohort Shadowhunters to leave Idris<\/word>","never return back<\/word>","Alec and Magnus hold their wedding in front of the Los Angeles Institute<\/word>","Adaon<\/word>","Devon<\/word>","Alec Lightwood<\/word>","With Cristina's and Mark's help, Kieran kills Oban<\/strong> and is proclaimed the new Unseelie King<\/strong>, since Adaon<\/strong> relinquishes his birthright. With this status, he is forced to part ways<\/strong> from them just as they realize their love for each other<\/strong>. Kit decides to move in with Tessa and Jem<\/strong> to Devon<\/strong>. Dru overhears Magnus telling Ty about the side effects of Livvy's resurrection spell<\/strong>. During the Clave meeting<\/strong>, the Cohort refuse to surrender<\/strong>, so Alec Lightwood<\/strong>, having been proclaimed as the new Consul<\/strong> after Jia's abdication, leads the anti-Cohort Shadowhunters to leave Idris<\/strong> and never return back<\/strong>. Subsequently, Alec and Magnus hold their wedding in front of the Los Angeles Institute<\/strong>.<\/phrase>","Seelie Queen<\/word>","Jace of Thule<\/word>","Jace promises to hand Ash over<\/word>","exchange<\/word>","meeting Clary<\/word>","In the epilogue, the Seelie Queen<\/strong> is visited by the Jace of Thule<\/strong>. Jace promises to hand Ash over<\/strong> in exchange<\/strong> for meeting Clary<\/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':2073, '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':2073, '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':2073, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }