var presentation = ["personification<\/word>","Sun<\/word>","Helios<\/word>","Greek<\/word>","Helios<\/strong> in ancient Greek<\/strong> religion and myth, is the god and personification<\/strong> of the Sun<\/strong>, often depicted in art with a radiant crown and driving a horse-drawn chariot through the sky.<\/phrase>","Sol<\/word>","Helios<\/word>","Classical Greece<\/word>","Apollo<\/word>","Roman Emperor Julian<\/word>","Though Helios<\/strong> was a relatively minor deity in Classical Greece<\/strong>, his worship grew more prominent in late antiquity thanks to his identification with several major solar divinities of the Roman period, particularly Apollo<\/strong> and Sol<\/strong>. The Roman Emperor Julian<\/strong> made Helios<\/strong> the central divinity of his short-lived revival of traditional Roman religious practices in the 4th century AD.<\/phrase>","Eos<\/word>","dawn<\/word>","Helios<\/word>","Greek<\/word>","Hyperion<\/word>","Theia<\/word>","Selene<\/word>","Moon<\/word>","Helios<\/strong> figures prominently in several works of Greek<\/strong> mythology, poetry, and literature, in which he is often described as the son of the Titans Hyperion<\/strong> and Theia<\/strong> and brother of the goddesses Selene<\/strong> (the Moon<\/strong>) and Eos<\/strong> (the dawn<\/strong>).<\/phrase>","Helios<\/word>","Phaethon<\/word>","fire<\/word>","Zeus<\/word>","The best known story involving Helios<\/strong> is that of his son Phaethon<\/strong>, who attempted to drive his father's chariot but lost control and set the Earth on fire<\/strong>. If Zeus<\/strong> had not interfered by throwing a thunderbolt at Phaethon<\/strong>, killing him instantly, all mortals would have died.<\/phrase>","Ares<\/word>","ensnares<\/word>","Helios<\/word>","Panoptes<\/word>","Alcinous in the Odyssey<\/word>","Aphrodite<\/word>","Hephaestus<\/word>","punish<\/word>","Helios<\/strong> was sometimes characterized with the epithet Panoptes<\/strong> (\"the all-seeing\"). In the story told in the hall of Alcinous in the Odyssey<\/strong>, Aphrodite<\/strong>, the consort of Hephaestus<\/strong>, secretly beds Ares<\/strong>, but all-seeing Helios<\/strong> spies on them and tells Hephaestus<\/strong>, who ensnares<\/strong> the two lovers in nets invisibly fine, to punish<\/strong> them.<\/phrase>","Sun<\/word>","Odysseus<\/word>","land<\/word>","Thrinacia<\/word>","Circe<\/word>","Hyperion<\/word>","Helios<\/word>","In the Odyssey, Odysseus<\/strong> and his surviving crew land<\/strong> on Thrinacia<\/strong>, an island sacred to the Sun<\/strong> god, whom Circe<\/strong> names Hyperion<\/strong> rather than Helios<\/strong>. There, the sacred cattle of Helios<\/strong> were kept.<\/phrase>","Sun<\/word>","lightning bolt<\/word>","Odysseus<\/word>","kill<\/word>","Helios<\/word>","Zeus<\/word>","Underworld<\/word>","Though Odysseus<\/strong> warns his men, when supplies run short they impiously kill<\/strong> and eat some of the cattle of the Sun<\/strong>. The guardians of the island, Helios<\/strong>' daughters, tell their father about this. Helios<\/strong> appeals to Zeus<\/strong> telling them to dispose of Odysseus<\/strong>' men or he will take the Sun<\/strong> and shine it in the Underworld<\/strong>. Zeus<\/strong> destroys the ship with his lightning bolt<\/strong>, killing all the men except for Odysseus<\/strong>.<\/phrase>","Sun<\/word>","bold<\/word>","Greek<\/word>","Helios<\/word>","Delphic<\/word>","Athenaeus in Deipnosophistae<\/word>","Hesperides<\/word>","land<\/word>","Ethiops<\/word>","Heracles<\/word>","Erytheia<\/word>","Geryon<\/word>","Libyan<\/word>","desert<\/word>","heat<\/word>","Almost<\/word>","turn<\/word>","sail<\/word>","found<\/word>","reach<\/word>","In one Greek<\/strong> vase painting, Helios<\/strong> appears riding across the sea in the cup of the Delphic<\/strong> tripod which appears to be a solar reference. Athenaeus in Deipnosophistae<\/strong> relates that, at the hour of sunset, Helios<\/strong> climbed into a great golden cup in which he passes from the Hesperides<\/strong> in the farthest west to the land<\/strong> of the Ethiops<\/strong>, with whom he passes the dark hours. While Heracles<\/strong> traveled to Erytheia<\/strong> to retrieve the cattle of Geryon<\/strong>, he crossed the Libyan<\/strong> desert<\/strong> and was so frustrated at the heat<\/strong> that he shot an arrow at Helios<\/strong>, the Sun<\/strong>. Almost<\/strong> immediately, Heracles<\/strong> realized his mistake and apologized profusely, in turn<\/strong> and equally courteous, Helios<\/strong> granted Heracles<\/strong> the golden cup which he used to sail<\/strong> across the sea every night, from the west to the east because he found<\/strong> Heracles<\/strong>' actions immensely bold<\/strong>. Heracles<\/strong> used this golden cup to reach<\/strong> Erytheia<\/strong>.<\/phrase>","Pasipha\u00eb<\/word>","Phaethusa<\/word>","Lampetia<\/word>","Oceanid Perse<\/word>","Helios<\/word>","Circe<\/word>","Perses<\/word>","By the Oceanid Perse<\/strong>, Helios<\/strong> became the father of Ae\u00ebtes, Circe<\/strong>, Perses<\/strong> and Pasipha\u00eb<\/strong>. His other children are Phaethusa<\/strong> (\"radiant\") and Lampetia<\/strong> (\"shining\").<\/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':1247, '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':1247, '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':1247, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }