var presentation = ["fundamental elements<\/word>","ancient Romans spread Greek ideas<\/word>","Democracy. Philosophy. Sculpture. Dramatic tragedies. The Olympic Games.\nMany of the fundamental elements<\/strong> of Western culture first arose more than 2,000 years ago in ancient Greece.\nAfter conquering the Greeks, the ancient Romans spread Greek ideas<\/strong> throughout their empire, which included much of Europe.<\/phrase>","glorification<\/word>","image of humans<\/word>","Greek gods<\/word>","cornerstone<\/word>","spirit of individualism<\/word>","The glorification<\/strong> of the human form and of human accomplishment defined ancient Greek art, philosophy, literature, and religion. Even their gods were created in the image of humans<\/strong>. The Greek gods<\/strong> had human emotions, looked like humans, and behaved more like people than infallible gods.\nThe Greeks' emphasis on the individual is one major cornerstone<\/strong> of Western Civilization. Indeed, the spirit of individualism<\/strong> as defined by the Greeks is still alive and well in modern American culture and society.<\/phrase>","polytheistic<\/word>","Mount Olympus<\/word>","The ancient Greeks were polytheistic<\/strong> - that is, they worshipped many gods. Their major gods and goddesses lived at the top of Mount Olympus<\/strong>, the highest mountain in Greece, and myths described their lives and actions. In myths, gods often actively intervened in the day-to-day lives of humans. Greek religion did not have a standard set of morals; there were no Judaic Ten Commandments. Myths were used to help explain the unknown and sometimes teach a lesson.<\/phrase>","thunderbolt<\/word>","Greek gods<\/word>","Homer<\/word>","the Iliad<\/word>","the Odyssey<\/word>","For example, Zeus, the king of the gods, carried his favorite weapon, the thunderbolt<\/strong>. When it rained and there was thunder and lightning, the ancient Greeks believed that Zeus was venting his anger. Many stories about how the Greek gods<\/strong> behaved and interacted with humans are found in the works of Homer<\/strong>. He created two epic poems: the Iliad<\/strong>, which related the events of the Trojan War, and the Odyssey<\/strong>, which detailed the travels of the hero Odysseus. These two poems were passed down orally over many generations.<\/phrase>","image of humans<\/word>","flawed<\/word>","The Greeks created gods in the image of humans<\/strong>; that is, their gods had many human qualities even though they were gods. The gods, heroes, and humans of Greek mythology were flawed<\/strong>. The gods were highly emotional and behaved inconsistently and sometimes immorally.<\/phrase>","behaved irrationally<\/word>","The gods constantly fought among themselves, behaved irrationally<\/strong> and unfairly, and were often jealous of each other. For example, Zeus, the king of the gods, was rarely faithful to his wife Hera. Hera plotted against Zeus and punished his mistresses.<\/phrase>","major and minor gods<\/word>","goddess of love<\/word>","Poseidon<\/word>","underwater kingdom<\/word>","In addition to Zeus and Hera, there were many other major and minor gods<\/strong> in the Greek religion. At her birth, Athena, the goddess of wisdom, sprang directly from the head of Zeus. Hermes, who had winged feet, was the messenger of the gods and could fly anywhere with great speed. Aphrodite, the goddess of love<\/strong>, was the most beautiful being in the universe. Her brother, Ares, the god of war, was sinister, mean, and disliked. Poseidon<\/strong> ruled the sea from his underwater kingdom<\/strong>, and Apollo rode his chariot across the sky, bringing the sun with him.<\/phrase>","Styx<\/word>","Charon<\/word>","Hades was in charge of the dead in the underworld. Almost all people went to Hades after they died whether they were good or bad. To get there, the dead had to cross the river Styx<\/strong>. Charon<\/strong> was the name of the boatman who ferried the souls of the dead across the river Styx<\/strong> to Hades.<\/phrase>","gods punished<\/word>","Tantalus<\/word>","forever thirsty and hungry<\/word>","Typically, the gods punished<\/strong> those who were bad. For example, Tantalus<\/strong>, who killed his own son and served him to the gods for dinner, was sent to Hades and made forever thirsty and hungry<\/strong>. Although there was a pool of clear, fresh drinking water at his feet, whenever Tantalus<\/strong> bent down to drink, the pool would dry up and disappear.<\/phrase>","delicious fruit<\/word>","Tantalus<\/word>","tantalize<\/word>","Likewise, over his head hung the most delicious fruit<\/strong>. However, whenever Tantalus<\/strong> reached for them, a wind would blow them just out of his reach. The English word \"tantalize<\/strong>\" derives from the name Tantalus<\/strong>.<\/phrase>","goddess of fertility<\/word>","The list below features some of the most famous gods and goddess in Greek mythology and their important attributes:\nZeus: King of the gods, Zeus killed his tyrant father Chronos; he is also the god of thunder\nHera: The wife of Zeus and the goddess of fertility<\/strong><\/phrase>","Poseidon: The god of the sea\nHades: The god of the underworld<\/phrase>","sister of Zeus<\/word>","leader of the Titans<\/word>","Hestia: A little-known goddess, a sister of Zeus<\/strong>, and the goddess of the home and hearth\nChronos: The leader of the Titans<\/strong> and the father of the Olympians, Chronos ate all of his children except for Zeus, who killed him<\/phrase>","harvest<\/word>","versatile<\/word>","Demeter: Goddess of the harvest<\/strong> and the mother of Persephone\nApollo: God of the sun, music, and art; one of the most versatile<\/strong> gods<\/phrase>","childbirth<\/word>","goddess of love<\/word>","Artemis: Goddess of the hunt, moon, and childbirth<\/strong>; the sister of Apollo\nAphrodite: The goddess of love<\/strong> and the mother of Eros\nAres: The god of War<\/phrase>","Athens<\/word>","Mount Olympus<\/word>","crippled<\/word>","Athena: She sprang full-grown from Zeus's head; she is the Goddess of wisdom; the city of Athens<\/strong> is also named for her\nHephaestus: The god of the forge; thrown from the top of Mount Olympus<\/strong> by Zeus, Hephaestus is also crippled<\/strong>; the husband of Aphrodite<\/phrase>","messenger god<\/word>","winter<\/word>","Hermes: The messenger god<\/strong>; wears a winged helmet and winged sandals\nPersephone: The daughter of Demeter; Persephone was kidnapped by Hades to be his bride, and because she ate three pomegranate seeds, she is forced to spend three months of the year in Hades (This period of time is known as winter<\/strong>)<\/phrase>","wine and revelry<\/word>","Cupid<\/word>","Dionysus: The god of wine and revelry<\/strong>; Dionysus had an enormous following throughout the Greek world\nEros: The god of love; often depicted as a young child, Eros uses magical arrows to cause people to fall in love; known to the Romans as Cupid<\/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':2533, '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':2533, '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':2533, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }