var presentation = ["encountered<\/word>","confronted<\/word>","Spaniard Hern\u00e1n Cort\u00e9s<\/word>","astute<\/word>","Montezuma was the unluckiest of kings. History elected him to oversee the ruin of the last great Central American empire. Other Aztec rulers had encountered<\/strong> setbacks in their conquests. For Montezuma it was different. He confronted<\/strong> an alien empire from across the sea. In its leader, the Spaniard Hern\u00e1n Cort\u00e9s<\/strong>, he faced an opponent as astute<\/strong> and skillful as himself. In the end, Cort\u00e9s proved the more determined of the two.<\/phrase>","Columbus' historic voyage<\/word>","gold and souls<\/word>","In the wake of Columbus' historic voyage<\/strong> in 1492, expeditions, especially from Imperial Spain, swarmed into Aztec territory. They came in search of gold and souls<\/strong>-gold to enrich the coffers of the Spanish king (and their own), and heathen souls to rescue for Christianity. Within a generation, America's ancient civilizations were crushed. Both the Aztec Empire in southern modern-day Mexico and the Inca Empire in the western Andes Mountains of South America collapsed after campaigns lasting just a couple of years. How did they fall so fast? Historians suggest many causes.<\/phrase>","conquistadores<\/word>","ruthless fighting force<\/word>","cannons and arquebus<\/word>","encountered<\/word>","The Spanish \"conquistadores<\/strong>\" or conquerors came from an army that was the most ruthless fighting force<\/strong> on earth. It had not suffered a single defeat for 150 years. The Spaniards possessed cannons and arquebus<\/strong> (primitive muskets), which terrified the American tribes. Horses, which the Aztecs had never encountered<\/strong>, gave the Spaniards greater mobility. Above all, there was the Spanish sword. It could kill with a single lightning thrust. Against all this, the Aztec's primary weapons were wooden clubs studded with obsidian glass.<\/phrase>","religious rituals<\/word>","siege<\/word>","savages<\/word>","Wars were religious rituals<\/strong> to the Aztecs. A prime objective was the capture of prisoners for sacrifice. During the siege<\/strong> of Tenochtitlan, conquistadors watched from a distance. They were horrified as Aztecs dragged captives up the steps of the Great Temple and ripped out their hearts. The Spanish viewed the Aztecs as savages<\/strong>.<\/phrase>","brightly feathered costumes<\/word>","demoralized<\/word>","Aztec warriors had several opportunities to kill Cort\u00e9s. Each time they tried to capture him alive-and each time he escaped. Spaniards killed Aztec leaders whenever they could. These indigenous leaders were prominent in their brightly feathered costumes<\/strong> and often led the warrior ranks. With their deaths, ordinary soldiers became demoralized<\/strong> and fled.<\/phrase>","loose confederation of allies<\/word>","resented<\/word>","The Aztec Empire was a loose confederation of allies<\/strong> and subject states. Many deeply resented<\/strong> Aztec rule, their dreaded tax collectors, and the massive tributes they paid. In the Spanish, they saw their saviors. Cort\u00e9s exploited this unrest with great skill. In his final assault on the Aztec capital of Tenochtitlan, his band of 900 Spanish soldiers was joined by perhaps 150,000 natives.<\/phrase>","diseases<\/word>","natural immunities<\/word>","The Europeans brought with them diseases<\/strong> such as measles and smallpox against which the American tribes had no natural immunities<\/strong>. These diseases<\/strong> spread like wildfire, killing rulers of both the Aztecs and Incas, along with millions of other people.<\/phrase>","the personalities<\/word>","gifted generals<\/word>","wily politicians<\/word>","magic and superstition<\/word>","hardheaded realist<\/word>","Finally, the personalities<\/strong> of Montezuma and Hern\u00e1n Cort\u00e9s must be considered. Both were gifted generals<\/strong> and wily politicians<\/strong>. But Montezuma was mired in magic and superstition<\/strong> while Cort\u00e9s was a hardheaded realist<\/strong>.<\/phrase>","Vera Cruz<\/word>","omens of doom<\/word>","soothsayers<\/word>","Long before Cort\u00e9s landed at Vera Cruz<\/strong> on Good Friday,30 1519, omens of doom<\/strong> appeared. A comet \"bright as to turn night into day\" lit the sky. Dismayed soothsayers<\/strong> and astrologers maintained they did not see it, and Montezuma cast them into cages where they starved to death. Then, an important temple burned. Lastly, hunters brought Montezuma a bird with a mirror strapped to its head. In it he saw large numbers of people \"advance as for war; they appeared to be half men half deer.\"<\/phrase>","Spanish galleons<\/word>","Quetzalcoatl<\/word>","How much of this is fact? How much is myth? Since much of the history is told from the Spaniards' point of view, it's hard to tell. By the time spies brought tales of mountains floating upon the sea (Spanish galleons<\/strong>), and men with \"flesh very white... a long beard and hair to their ears,\" Montezuma's nerves were shattered. Was this the legendary feathered serpent god, Quetzalcoatl<\/strong>, who once vanished into the eastern ocean, now returned?<\/phrase>","potential threat<\/word>","Montezuma half-convinced himself that Cort\u00e9s was a god-though whether this is true or another mythic re-imagining of history is up to debate. Indeed, some scholars find it unlikely that he and his people viewed Cort\u00e9s and the rest of the Spaniards as gods. Regardless, the Aztec people did know a potential threat<\/strong>, foreign as the Europeans were when they saw one.<\/phrase>","Quetzalcoatl<\/word>","He sent Cort\u00e9s the feathery costume of Quetzalcoatl<\/strong> with other gifts, including \"twenty ducks made of gold, very natural looking.\" Cort\u00e9s took the bold move of marching on Tenochtitlan. With a force of 500 Spanish soldiers and whatever warriors he recruited along the way, he faced Montezuma on the city's southern causeway on November 8, 1519. Montezuma invited him in.<\/phrase>","shrewd<\/word>","rectified<\/word>","Was this a political blunder or a shrewd<\/strong> tactical move? Once inside the city, Cort\u00e9s found himself isolated, at the mercy of the Aztec Empire. He quickly rectified<\/strong> matters. In another bold stroke, he kidnapped Montezuma. With 30 seasoned soldiers, he entered the royal palace and gave the Emperor a bleak choice: come with us or die. Montezuma-fearful, puzzled, dejected, and disorientated by these strange men-submitted.<\/phrase>","siege<\/word>","Francisco Pizarro<\/word>","Months later, while trying to calm a rebellion against the invaders, Montezuma was killed in a firestorm of rocks and javelins. Cort\u00e9s and his crew barely escaped with their lives.\nNine months later he returned with a huge army of Spaniards and native recruits. First, they set siege<\/strong> to Tenochtitlan, denying it food and fresh water. On August 13, 1521, Tenochtitlan fell. A decade later, the Incas, plagued by civil war and decimated by smallpox, faced Francisco Pizarro<\/strong>. They suffered a similar fate.<\/phrase>","legends<\/word>","reclaimed<\/word>","archaeologists<\/word>","foods<\/word>","These great civilizations live on-in their legends<\/strong>, their art, and architecture, lovingly reclaimed<\/strong> by archaeologists<\/strong> and historians. Their foods<\/strong> transformed Europe-tomatoes, corn, and potatoes became staple foods<\/strong> of much of the Old World's growing population. A new Atlantic World that incorporated elements of European, African, and American cultures was taking shape.<\/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':2539, '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':2539, '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':2539, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }