var presentation = ["archery<\/word>","healing and diseases<\/word>","Sun and light<\/word>","poetry<\/word>","beautiful<\/word>","music and dance<\/word>","truth and prophecy<\/word>","Greek gods<\/word>","Zeus<\/word>","Leto<\/word>","twin brother<\/word>","Artemis<\/word>","hunt<\/word>","athletic youth<\/word>","Apollo has been recognized as a god of archery<\/strong>, music and dance<\/strong>, truth and prophecy<\/strong>, healing and diseases<\/strong>, the Sun and light<\/strong>, poetry<\/strong>, and more. One of the most important and complex of the Greek gods<\/strong>, he is the son of Zeus<\/strong> and Leto<\/strong>, and the twin brother<\/strong> of Artemis<\/strong>, goddess of the hunt<\/strong>. Seen as the most beautiful<\/strong> god and the ideal of the kouros (ephebe, or a beardless, athletic youth<\/strong>), Apollo is considered to be the most Greek of all the gods.<\/phrase>","Delphi<\/word>","patron deity<\/word>","prophetic deity<\/word>","Delphic Oracle<\/word>","help<\/word>","various epithets<\/word>","call<\/word>","Delphic Apollo<\/word>","fugitives and refugees<\/word>","As the patron deity<\/strong> of Delphi<\/strong>, Apollo is an oracular god-the prophetic deity<\/strong> of the Delphic Oracle<\/strong>. Apollo is the god who affords help<\/strong> and wards off evil; various epithets<\/strong> call<\/strong> him the \"averter of evil\". Delphic Apollo<\/strong> is the patron of seafarers, foreigners and the protector of fugitives and refugees<\/strong>.<\/phrase>","epidemics<\/word>","archery<\/word>","Medicine<\/word>","his son<\/word>","Asclepius<\/word>","deadly plague<\/word>","his arrows<\/word>","his sister<\/word>","Artemis<\/word>","golden bow<\/word>","silver arrows<\/word>","attested facets<\/word>","panhellenic cult persona<\/word>","health and education<\/word>","their passage<\/word>","Medicine<\/strong> and healing are associated with Apollo, whether through the god himself or mediated through his son<\/strong> Asclepius<\/strong>. Apollo delivered people from epidemics<\/strong>, yet he is also a god who could bring ill-health and deadly plague<\/strong> with his arrows<\/strong>. The invention of archery<\/strong> itself is credited to Apollo and his sister<\/strong> Artemis<\/strong>. Apollo is usually described as carrying a golden bow<\/strong> and a quiver of silver arrows<\/strong>. Apollo's capacity to make youths grow is one of the best attested facets<\/strong> of his panhellenic cult persona<\/strong>. As the protector of young, Apollo is concerned with the health and education<\/strong> of children. He presided over their passage<\/strong> into adulthood.<\/phrase>","pastoral deity<\/word>","herdsmen and shepherds<\/word>","flocks and crops<\/word>","pests and predators<\/word>","primary duties<\/word>","other hand<\/word>","also encouraged<\/word>","new towns and establishment<\/word>","civil constitution<\/word>","his oracles<\/word>","Apollo is an important pastoral deity<\/strong>, and was the patron of herdsmen and shepherds<\/strong>. Protection of herds, flocks and crops<\/strong> from diseases, pests and predators<\/strong> were his primary duties<\/strong>. On the other hand<\/strong>, Apollo also encouraged<\/strong> founding new towns and establishment<\/strong> of civil constitution<\/strong>. He is associated with dominion over colonists. He was the giver of laws, and his oracles<\/strong> were consulted before setting laws in a city.<\/phrase>","poetry<\/word>","lyre<\/word>","Mousike<\/word>","Muses<\/word>","all music<\/word>","dance<\/word>","frequent companion<\/word>","their chorus<\/word>","common attribute<\/word>","Hellenistic<\/word>","5th century<\/word>","Apollo Helios<\/word>","Greeks with Helios<\/word>","Titan<\/word>","As the god of Mousike<\/strong> (art of Muses<\/strong>), Apollo presides over all music<\/strong>, songs, dance<\/strong> and poetry<\/strong>. He is the inventor of string-music, and the frequent companion<\/strong> of the Muses<\/strong>, functioning as their chorus<\/strong> leader in celebrations. The lyre<\/strong> is a common attribute<\/strong> of Apollo. In Hellenistic<\/strong> times, especially during the 5th century<\/strong> BCE, as Apollo Helios<\/strong> he became identified among Greeks with Helios<\/strong>, Titan<\/strong> god of the sun.<\/phrase>","Zeus<\/word>","Leto<\/word>","his mistresses<\/word>","Apollo was the son of Zeus<\/strong>, the king of the gods, and Leto<\/strong>, his previous wife or one of his mistresses<\/strong>.<\/phrase>","goddesses<\/word>","Zeus<\/word>","Hera<\/word>","Leto<\/word>","terra firma<\/word>","shelter<\/word>","many lands<\/word>","his mother<\/word>","floating island<\/word>","her children<\/word>","palm tree<\/word>","present<\/word>","When Zeus<\/strong>' wife Hera<\/strong> discovered that Leto<\/strong> was pregnant, she banned Leto<\/strong> from giving birth on terra firma<\/strong>. Leto<\/strong> sought shelter<\/strong> in many lands<\/strong>, only to be rejected by them. Finally, the voice of unborn Apollo informed his mother<\/strong> about a floating island<\/strong> named. Since it was neither a mainland nor an island, Leto<\/strong> was readily welcomed there and gave birth to her children<\/strong> under a palm tree<\/strong>. All the goddesses<\/strong> except Hera<\/strong> were present<\/strong> to witness the event.<\/phrase>","goddesses<\/word>","lyre<\/word>","archery<\/word>","golden sword<\/word>","Delos<\/word>","ambrosial fragrance<\/word>","clean<\/word>","then covered<\/word>","white garment<\/word>","golden bands<\/word>","Leto<\/word>","Themis<\/word>","divine law<\/word>","divine food<\/word>","Zeus<\/word>","Hera<\/word>","time<\/word>","his son<\/word>","golden headband<\/word>","When Apollo was born clutching a golden sword<\/strong>, everything on Delos<\/strong> turned into gold, and the island was filled with ambrosial fragrance<\/strong>. He was washed clean<\/strong> by the goddesses<\/strong> who then covered<\/strong> him in white garment<\/strong> and fastened golden bands<\/strong> around him. Since Leto<\/strong> was unable to feed the him, Themis<\/strong>, the goddess of divine law<\/strong>, fed him with nectar, or ambrosia. Upon tasting the divine food<\/strong>, Apollo broke free of the bands fastened onto him and declared that he would be the master of lyre<\/strong> and archery<\/strong>, and interpret the will of Zeus<\/strong> to humankind. Zeus<\/strong>, who had calmed Hera<\/strong> by the time<\/strong>, came and adorned his son<\/strong> with a golden headband<\/strong>.<\/phrase>","Delos<\/word>","his sister<\/word>","Artemis<\/word>","later came<\/word>","new cities<\/word>","As a child, Apollo is said to have built a foundation and an altar on Delos<\/strong> using the horns of the goats that his sister<\/strong> Artemis<\/strong> hunted. Since he learnt the art of building when young, he later came<\/strong> to be known as Archegetes, the founder (of towns)\" and god who guided men to build new cities<\/strong>.<\/phrase>","nymphs<\/word>","lyre<\/word>","archery<\/word>","Delphi<\/word>","early years<\/word>","time<\/word>","Thriae<\/word>","Artemis<\/word>","Phoebe<\/word>","In his early years<\/strong> when Apollo spent his time<\/strong> herding cows, he was reared by Thriae<\/strong>, the bee nymphs<\/strong>, who trained him and enhanced his prophetic skills. Apollo is also said to have invented the lyre<\/strong>, and along with Artemis<\/strong>, the art of archery<\/strong>. He then taught to the humans the art of healing and archery<\/strong>. Phoebe<\/strong>, his grandmother, gave the oracular shrine of Delphi<\/strong> to Apollo as a birthday gift.<\/phrase>","Delphi<\/word>","Python<\/word>","Hera<\/word>","hunt<\/word>","Leto<\/word>","trouble<\/word>","his mother<\/word>","search<\/word>","bow<\/word>","Hephaestus<\/word>","Python<\/strong> was sent by Hera<\/strong> to hunt<\/strong> the pregnant Leto<\/strong> to death, and had assaulted her. To avenge the trouble<\/strong> given to his mother<\/strong>, Apollo went in search<\/strong> of Python<\/strong> and killed it in the sacred cave at Delphi<\/strong> with the bow<\/strong> and arrows that he had received from Hephaestus<\/strong>.<\/phrase>","Delphi<\/word>","murder<\/word>","purified<\/word>","Python<\/word>","Gaea<\/word>","Tartarus<\/word>","Zeus<\/word>","agree<\/word>","his son<\/word>","Olympus<\/word>","serve<\/word>","order<\/word>","Vale of Tempe<\/word>","Athena<\/word>","Henceforth<\/word>","sin<\/word>","However, Apollo had committed a blood murder<\/strong> and had to be purified<\/strong>. Because Python<\/strong> was a child of Gaea<\/strong>, Gaea<\/strong> wanted Apollo to be banished to Tartarus<\/strong> as a punishment. Zeus<\/strong> didn't agree<\/strong> and instead exiled his son<\/strong> from Olympus<\/strong>, and instructed him to get purified<\/strong>. Apollo had to serve<\/strong> as a slave for nine years. After the servitude was over, as per his father's order<\/strong>, he travelled to the Vale of Tempe<\/strong> to bath in waters of Peneus. There Zeus<\/strong> himself performed purificatory rites on Apollo. purified<\/strong>, Apollo was escorted by his half sister Athena<\/strong> to Delphi<\/strong> where the oracular shrine was finally handed over to him by Gaea<\/strong>. Henceforth<\/strong>, Apollo became the god who cleansed himself from the sin<\/strong> of murder<\/strong> and, made men aware of their guilt and purified<\/strong> them.<\/phrase>","golden chariot<\/word>","Delphi<\/word>","Zeus<\/word>","his son<\/word>","golden bow<\/word>","Zeus<\/strong>, pleased with his son<\/strong>'s integrity, gave Apollo the seat next to him on his right side. He also gave to Apollo various gifts, like a golden tripod, a golden bow<\/strong> and arrows, a golden chariot<\/strong> and the city of Delphi<\/strong>.<\/phrase>","romantic relationship<\/word>","Olympus<\/word>","Python<\/word>","Admetus<\/word>","stay<\/word>","back<\/word>","When Apollo was exiled from Olympus<\/strong> for killing Python<\/strong>, he served as a herdsman under Admetus<\/strong>, who was then young and unmarried. Apollo is said to have shared a romantic relationship<\/strong> with Admetus<\/strong> during his stay<\/strong>. After completing his years of servitude, Apollo went back<\/strong> to Olympus<\/strong> as a god.<\/phrase>","untimely death<\/word>","Admetus<\/word>","return<\/word>","Alcestis<\/word>","King Pelias<\/word>","present<\/word>","live<\/word>","time<\/word>","Because Admetus<\/strong> had treated Apollo well, the god conferred great benefits on him in return<\/strong>. Apollo's mere presence is said to have made the cattle give birth to twins. Apollo helped Admetus<\/strong> win the hand of Alcestis<\/strong>, the daughter of King Pelias<\/strong>, by taming a lion and a boar to draw Admetus<\/strong>' chariot. He was present<\/strong> during their wedding to give his blessings. When Apollo learnt of Admetus<\/strong>' untimely death<\/strong>, he convinced or tricked the Fates into letting Admetus<\/strong> live<\/strong> past his time<\/strong>.<\/phrase>","hubris<\/word>","Ovid's<\/word>","lyre<\/word>","Poseidon<\/word>","Laomedon<\/word>","Zeus<\/word>","order<\/word>","check<\/word>","Troy<\/word>","Once Apollo and Poseidon<\/strong> served under the Trojan king Laomedon<\/strong> in accordance to Zeus<\/strong>' words. Apollodorus states that the gods willingly went to the king disguised as humans in order<\/strong> to check<\/strong> his hubris<\/strong>. Apollo guarded the cattle of Laomedon<\/strong> in the valleys of mount Ida, while Poseidon<\/strong> built the walls of Troy<\/strong>. Other versions make both Apollo and Poseidon<\/strong> the builders of the wall. In Ovid's<\/strong> account, Apollo completes his task by playing his tunes on his lyre<\/strong>.<\/phrase>","wages<\/word>","slaves<\/word>","Posedion<\/word>","Cetus<\/word>","However, the king not only refused to give the gods the wages<\/strong> he had promised, but also threatened to bind their feet and hands, and sell them as slaves<\/strong>. Angered by the unpaid labor and the insults, Apollo infected the city with a pestilence and Posedion<\/strong> sent the sea monster Cetus<\/strong>.<\/phrase>","Trojan War<\/word>","Apollo sided with the Trojans during the Trojan War<\/strong> waged by the Greeks against the Trojans.<\/phrase>","Achilles<\/word>","Agamemnon<\/word>","Chryseis<\/word>","return<\/word>","Iliad<\/word>","During the war, the Greek king Agamemnon<\/strong> captured Chryseis<\/strong>, the daughter of Apollo's priest Chryses, and refused to return<\/strong> her. Angered by this, Apollo shot arrows infected with the plague into the Greek encampment. He demanded that they return<\/strong> the girl, and the Achaeans (Greeks) complied, indirectly causing the anger of Achilles<\/strong>, which is the theme of the Iliad<\/strong>.<\/phrase>","the rouser of armies<\/word>","Zeus<\/word>","command<\/word>","cry<\/word>","back<\/word>","Receiving the aegis from Zeus<\/strong>, Apollo entered the battlefield as per his father's command<\/strong>, causing great terror to the enemy with his war cry<\/strong>. He pushed the Greeks back<\/strong> and destroyed many of the soldiers. He is described as \"the rouser of armies<\/strong>\" because he rallied the Trojan army when they were falling apart.<\/phrase>","Achilles<\/word>","own<\/word>","Hecuba<\/word>","save<\/word>","Patroclus<\/word>","Troy<\/word>","Encouraging Hector<\/word>","attack<\/word>","last<\/word>","attempt<\/word>","The Trojan hero Hector (who, according to some, was the god's own<\/strong> son by Hecuba<\/strong>) was favored by Apollo. When he got severely injured, Apollo healed him and encouraged him to take up his arms. During a duel with Achilles<\/strong>, when Hector was about to lose, Apollo hid Hector in a cloud of mist to save<\/strong> him. When the Greek warrior Patroclus<\/strong> tried to get into the fort of Troy<\/strong>, he was stopped by Apollo. Encouraging Hector<\/strong> to attack<\/strong> Patroclus<\/strong>, Apollo stripped the armour of the Greek warrior and broke his weapons. Patroclus<\/strong> was eventually killed by Hector. At last<\/strong>, after Hector's fated death, Apollo protected his corpse from Achilles<\/strong>' attempt<\/strong> to mutilate it by creating a magical cloud over the corpse.<\/phrase>","Achilles<\/word>","Paris<\/word>","heel<\/word>","Finally, Apollo caused Achilles<\/strong>' death by guiding an arrow shot by Paris<\/strong> into Achilles<\/strong>' heel<\/strong>. In some versions, Apollo himself killed Achilles<\/strong> by taking the disguise of Paris<\/strong>.<\/phrase>","unwed<\/word>","Muses<\/word>","Musagetes<\/word>","dance<\/word>","Orpheus<\/word>","Linus<\/word>","remain<\/word>","Apollo appears as the companion of the Muses<\/strong>, and as Musagetes<\/strong> (\"leader of Muses<\/strong>\") he leads them in dance<\/strong>. Apollo is also the lover of the Muses<\/strong> and by them he became the father of famous musicians like Orpheus<\/strong> and Linus<\/strong>. Apollo is said to have been the lover of all nine Muses<\/strong>, and not being able to choose one of them, decided to remain<\/strong> unwed<\/strong>.<\/phrase>","lyre<\/word>","hubris<\/word>","found<\/word>","present<\/word>","play<\/word>","Eros<\/word>","Psyche<\/word>","Peleus<\/word>","Thetis<\/word>","punish<\/word>","Apollo is often found<\/strong> delighting the immortal gods with his songs and music on the lyre<\/strong>. In his role as the god of banquets, he was always present<\/strong> to play<\/strong> music in weddings of the gods, like the marriage of Eros<\/strong> and Psyche<\/strong>, Peleus<\/strong> and Thetis<\/strong>. Apollo also participated in musical contests when challenged by others. He was the victor in all those contests, but he tended to punish<\/strong> his opponents severely for their hubris<\/strong>.<\/phrase>","lyre<\/word>","Hermes<\/word>","The invention of lyre<\/strong> is attributed either to Hermes<\/strong> or to Apollo himself. Distinctions have been made that Hermes<\/strong> invented lyre<\/strong> made of tortoise shell, whereas the lyre<\/strong> Apollo invented was a regular lyre<\/strong>.<\/phrase>","sired<\/word>","mortal women<\/word>","nymphs<\/word>","goddesses<\/word>","kings<\/word>","beautiful<\/word>","new cities<\/word>","Apollo sired<\/strong> many children, from mortal women<\/strong> and nymphs<\/strong> as well as the goddesses<\/strong>. His children grew up to be physicians, musicians, poets, seers or archers. Many of his sons founded new cities<\/strong> and became kings<\/strong>. They were all usually very beautiful<\/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':1200, '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':1200, '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':1200, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }