var presentation = ["fate had blundered over her<\/word>","a family of artisans<\/word>","caste<\/word>","She was one of those pretty and charming girls born, as though fate had blundered over her<\/strong>, into a family of artisans<\/strong>. She had no marriage portion, no expectations, no means of getting known, understood, loved, and wedded by a man of wealth and distinction; and she let herself be married off to a little clerk in the Ministry of Education. Her tastes were simple because she had never been able to afford any other, but she was as unhappy as though she had married beneath her; for women have no caste<\/strong> or class, their beauty, grace, and charm serving them for birth or family, their natural delicacy, their instinctive elegance, their nimbleness of wit, are their only mark of rank, and put the slum girl on a level with the highest lady in the land.<\/phrase>","feeling herself born for every delicacy and luxury<\/word>","heart-broken regrets and hopeless dreams<\/word>","She suffered endlessly, feeling herself born for every delicacy and luxury<\/strong>. She suffered from the poorness of her house, from its mean walls, worn chairs, and ugly curtains. All these things, of which other women of her class would not even have been aware, tormented and insulted her. The sight of the little Breton girl who came to do the work in her little house aroused heart-broken regrets and hopeless dreams<\/strong> in her mind.<\/phrase>","antechambers<\/word>","homage<\/word>","She imagined silent antechambers<\/strong>, heavy with Oriental tapestries, lit by torches in lofty bronze sockets, with two tall footmen in knee-breeches sleeping in large arm-chairs, overcome by the heavy warmth of the stove. She imagined vast saloons hung with antique silks, exquisite pieces of furniture supporting priceless ornaments, and small, charming, perfumed rooms, created just for little parties of intimate friends, men who were famous and sought after, whose homage<\/strong> roused every other woman's envious longings.<\/phrase>","murmured gallantries<\/word>","an inscrutable smile<\/word>","When she sat down for dinner at the round table covered with a three-days-old cloth, opposite her husband, who took the cover off the soup-tureen, exclaiming delightedly: \"Aha! Scotch broth! What could be better?\" she imagined delicate meals, gleaming silver, tapestries peopling the walls with folk of a past age and strange birds in faery forests; she imagined delicate food served in marvellous dishes, murmured gallantries<\/strong>, listened to with an inscrutable smile<\/strong> as one trifled with the rosy flesh of trout or wings of asparagus chicken.<\/phrase>","to be wildly attractive and sought after<\/word>","an exultant air<\/word>","She had no clothes, no jewels, nothing. And these were the only things she loved; she felt that she was made for them. She had longed so eagerly to charm, to be desired, to be wildly attractive and sought after<\/strong>.\nShe had a rich friend, an old school friend whom she refused to visit, because she suffered so keenly when she returned home. She would weep whole days, with grief, regret, despair, and misery.\nOne evening her husband came home with an exultant air<\/strong>, holding a large envelope in his hand.<\/phrase>","she flung the invitation petulantly across the table<\/word>","\"Here's something for you,\" he said.\nSwiftly she tore the paper and drew out a printed card on which were these words:\n\"The Minister of Education and Madame Ramponneau request the pleasure of the company of Monsieur and Madame Loisel at the Ministry on the evening of Monday, January the 18th.\"\nInstead of being delighted, as her husband hoped, she flung the invitation petulantly across the table<\/strong>, murmuring:<\/phrase>","\"What do you want me to do with this?\"\n\"Why, darling, I thought you'd be pleased. You never go out, and this is a great occasion. I had tremendous trouble to get it. Every one wants one; it's very select, and very few go to the clerks. You'll see all the really big people there.\"\nShe looked at him out of furious eyes, and said impatiently: \"And what do you suppose I am to wear at such an affair?\"\nHe had not thought about it; he stammered:\n\"Why, the dress you go to the theatre in. It looks very nice, to me...\"<\/phrase>","stupefied<\/word>","He stopped, stupefied<\/strong> and utterly at a loss when he saw that his wife was beginning to cry. Two large tears ran slowly down from the corners of her eyes towards the corners of her mouth.\n\"What's the matter with you? What's the matter with you?\" he faltered.\nBut with a violent effort she overcame her grief and replied in a calm voice, wiping her wet cheeks:\n\"Nothing. Only I haven't a dress and so I can't go to this party. Give your invitation to some friend of yours whose wife will be turned out better than I shall.\"<\/phrase>","a suitable dress<\/word>","He was heart-broken.\n\"Look here, Mathilde,\" he persisted. \"What would be the cost of a suitable dress<\/strong>, which you could use on other occasions as well, something very simple?\"\nShe thought for several seconds, reckoning up prices and also wondering for how large a sum she could ask without bringing upon herself an immediate refusal and an exclamation of horror from the careful-minded clerk.\nAt last she replied with some hesitation:<\/phrase>","four hundred francs<\/word>","get a really nice dress with the money<\/word>","\"I don't know exactly, but I think I could do it on four hundred francs<\/strong>.\"\nHe grew slightly pale, for this was exactly the amount he had been saving for a gun, intending to get a little shooting next summer on the plain of Nanterre with some friends who went lark-shooting there on Sundays.\nNevertheless he said: \"Very well. I'll give you four hundred francs<\/strong>. But try and get a really nice dress with the money<\/strong>.\"<\/phrase>","The day of the party drew near, and Madame Loisel seemed sad, uneasy and anxious. Her dress was ready, however. One evening her husband said to her:\n\"What's the matter with you? You've been very odd for the last three days.\"\n\"I'm utterly miserable at not having any jewels, not a single stone, to wear,\" she replied. \"I shall look like absolutely no one. I would almost rather not go to the party.\"<\/phrase>","there's nothing so humiliating as looking poor<\/word>","She uttered a cry<\/word>","\"Wear flowers,\" he said. \"They're very smart at this time of the year. For ten francs you could get two or three gorgeous roses.\"\nShe was not convinced.\n\"No... there's nothing so humiliating as looking poor<\/strong> in the middle of a lot of rich women.\"\n\"How stupid you are!\" exclaimed her husband. \"Go and see Madame Forestier and ask her to lend you some jewels. You know her quite well enough for that.\"\nShe uttered a cry<\/strong> of delight.<\/phrase>","\"That's true. I never thought of it.\"\nNext day she went to see her friend and told her her trouble.\nMadame Forestier went to her dressing-table, took up a large box, brought it to Madame Loisel, opened it, and said:\n\"Choose, my dear.\"\nFirst she saw some bracelets, then a pearl necklace, then a Venetian cross in gold and gems, of exquisite workmanship. She tried the effect of the jewels before the mirror, hesitating, unable to make up her mind to leave them, to give them up. She kept on asking:<\/phrase>","a superb diamond necklace<\/word>","her heart began to beat covetously<\/word>","ecstasy<\/word>","\"Haven't you anything else?\"\n\"Yes. Look for yourself. I don't know what you would like best.\"\nSuddenly she discovered, in a black satin case, a superb diamond necklace<\/strong>; her heart began to beat covetously<\/strong>. Her hands trembled as she lifted it. She fastened it round her neck, upon her high dress, and remained in ecstasy<\/strong> at sight of herself.\nThen, with hesitation, she asked in anguish:<\/phrase>","\"Could you lend me this, just this alone?\"\n\"Yes, of course.\"\nShe flung herself on her friend's breast, embraced her frenziedly, and went away with her treasure. The day of the party arrived. Madame Loisel was a success. She was the prettiest woman present, elegant, graceful, smiling, and quite above herself with happiness. All the men stared at her, inquired her name, and asked to be introduced to her. All the Under-Secretaries of State were eager to waltz with her. The Minister noticed her.<\/phrase>","ecstatically<\/word>","homage<\/word>","She danced madly, ecstatically<\/strong>, drunk with pleasure, with no thought for anything, in the triumph of her beauty, in the pride of her success, in a cloud of happiness made up of this universal homage<\/strong> and admiration, of the desires she had aroused, of the completeness of a victory so dear to her feminine heart.<\/phrase>","poverty clashed with the beauty of the ball-dress<\/word>","She left about four o'clock in the morning. Since midnight her husband had been dozing in a deserted little room, in company with three other men whose wives were having a good time. He threw over her shoulders the garments he had brought for them to go home in, modest everyday clothes, whose poverty clashed with the beauty of the ball-dress<\/strong>. She was conscious of this and was anxious to hurry away, so that she should not be noticed by the other women putting on their costly furs.<\/phrase>","the Seine<\/word>","Loisel restrained her.\n\"Wait a little. You'll catch cold in the open. I'm going to fetch a cab.\"\nBut she did not listen to him and rapidly descended the staircase. When they were out in the street they could not find a cab; they began to look for one, shouting at the drivers whom they saw passing in the distance.\nThey walked down towards the Seine<\/strong>, desperate and shivering. At last they found on the quay one of those old nightprowling carriages which are only to be seen in Paris after dark, as though they were ashamed of their shabbiness in the daylight.<\/phrase>","the Rue des Martyrs<\/word>","She uttered a cry<\/word>","It brought them to their door in the Rue des Martyrs<\/strong>, and sadly they walked up to their own apartment. It was the end, for her. As for him, he was thinking that he must be at the office at ten.\nShe took off the garments in which she had wrapped her shoulders, so as to see herself in all her glory before the mirror. But suddenly She uttered a cry<\/strong>. The necklace was no longer round her neck!<\/phrase>","\"What's the matter with you?\" asked her husband, already half undressed.\nShe turned towards him in the utmost distress.\n\"I... I... I've no longer got Madame Forestier's necklace....\"\nHe started with astonishment.\n\"What!... Impossible!\"\nThey searched in the folds of her dress, in the folds of the coat, in the pockets, everywhere. They could not find it.<\/phrase>","\"Are you sure that you still had it on when you came away from the ball?\" he asked.\n\"Yes, I touched it in the hall at the Ministry.\"\n\"But if you had lost it in the street, we should have heard it fall.\"\n\"Yes. Probably we should. Did you take the number of the cab?\"\n\"No. You didn't notice it, did you?\"\n\"No.\"<\/phrase>","dumbfounded<\/word>","volition<\/word>","They stared at one another, dumbfounded<\/strong>. At last Loisel put on his clothes again.\n\"I'll go over all the ground we walked,\" he said, \"and see if I can't find it.\"\nAnd he went out. She remained in her evening clothes, lacking strength to get into bed, huddled on a chair, without volition<\/strong> or power of thought.\nHer husband returned about seven. He had found nothing.<\/phrase>","a ray of hope impelled him<\/word>","state of bewilderment<\/word>","He went to the police station, to the newspapers, to offer a reward, to the cab companies, everywhere that a ray of hope impelled him<\/strong>.\nShe waited all day long, in the same state of bewilderment<\/strong> at this fearful catastrophe.\nLoisel came home at night, his face lined and pale; he had discovered nothing.\n\"You must write to your friend,\" he said, \"and tell her that you've broken the clasp of her necklace and are getting it mended. That will give us time to look about us.\"\nShe wrote at his dictation.<\/phrase>","they had lost all hope<\/word>","By the end of a week they had lost all hope<\/strong>.\nLoisel, who had aged five years, declared:\n\"We must see about replacing the diamonds.\"\nNext day they took the box which had held the necklace and went to the jewellers whose name was inside. He consulted his books.\n\"It was not I who sold this necklace, Madame; I must have merely supplied the clasp.\"<\/phrase>","ill with remorse and anguish of mind<\/word>","Then they went from jeweller to jeweller, searching for another necklace like the first, consulting their memories, both ill with remorse and anguish of mind<\/strong>.\nIn a shop at the Palais-Royal they found a string of diamonds which seemed to them exactly like the one they were looking for. It was worth forty thousand francs. They were allowed to have it for thirty-six thousand.\nThey begged the jeweller not to sell it for three days. And they arranged matters on the understanding that it would be taken back for thirty-four thousand francs, if the first one were found before the end of February.<\/phrase>","usurers<\/word>","appalled<\/word>","Loisel possessed eighteen thousand francs left to him by his father. He intended to borrow the rest.\nHe did borrow it, getting a thousand from one man, five hundred from another, five louis here, three louis there. He gave notes of hand, entered into ruinous agreements, did business with usurers<\/strong> and the whole tribe of money-lenders. He mortgaged the whole remaining years of his existence, risked his signature without even knowing if he could honour it, and, appalled<\/strong> at the agonising face of the future, at the black misery about to fall upon him, at the prospect of every possible physical privation and moral torture, he went to get the new necklace and put down upon the jeweller's counter thirty-six thousand francs.<\/phrase>","When Madame Loisel took back the necklace to Madame Forestier, the latter said to her in a chilly voice:\n\"You ought to have brought it back sooner; I might have needed it.\"\nShe did not, as her friend had feared, open the case. If she had noticed the substitution, what would she have thought? What would she have said? Would she not have taken her for a thief?<\/phrase>","the ghastly life of abject poverty<\/word>","garret<\/word>","Madame Loisel came to know the ghastly life of abject poverty<\/strong>. From the very first she played her part heroically. This fearful debt must be paid off. She would pay it. The servant was dismissed. They changed their flat; they took a garret<\/strong> under the roof.<\/phrase>","the heavy work of the house<\/word>","fighting for every wretched halfpenny of her money<\/word>","She came to know the heavy work of the house<\/strong>, the hateful duties of the kitchen. She washed the plates, wearing out her pink nails on the coarse pottery and the bottoms of pans. She washed the dirty linen, the shirts and dish-cloths, and hung them out to dry on a string; every morning she took the dustbin down into the street and carried up the water, stopping on each landing to get her breath. And, clad like a poor woman, she went to the fruiterer, to the grocer, to the butcher, a basket on her arm, haggling, insulted, fighting for every wretched halfpenny of her money<\/strong>.<\/phrase>","twopence-halfpenny<\/word>","this life lasted ten years<\/word>","Every month notes had to be paid off, others renewed, time gained.\nHer husband worked in the evenings at putting straight a merchant's accounts, and often at night he did copying at twopence-halfpenny<\/strong> a page.\nAnd this life lasted ten years<\/strong>.\nAt the end of ten years everything was paid off, everything, the usurer's charges and the accumulation of superimposed interest.<\/phrase>","Madame Loisel looked old now. She had become like all the other strong, hard, coarse women of poor households. Her hair was badly done, her skirts were awry, her hands were red. She spoke in a shrill voice, and the water slopped all over the floor when she scrubbed it. But sometimes, when her husband was at the office, she sat down by the window and thought of that evening long ago, of the ball at which she had been so beautiful and so much admired.<\/phrase>","What would have happened if she had never lost those jewels. Who knows? Who knows? How strange life is, how fickle! How little is needed to ruin or to save!\nOne Sunday, as she had gone for a walk along the Champs-Elysees to freshen herself after the labours of the week, she caught sight suddenly of a woman who was taking a child out for a walk. It was Madame Forestier, still young, still beautiful, still attractive.<\/phrase>","Madame Loisel was conscious of some emotion. Should she speak to her? Yes, certainly. And now that she had paid, she would tell her all. Why not?\nShe went up to her.\n\"Good morning, Jeanne.\"\nThe other did not recognise her, and was surprised at being thus familiarly addressed by a poor woman.<\/phrase>","I've had some hard times<\/word>","many sorrows<\/word>","\"But... Madame...\" she stammered. \"I don't know... you must be making a mistake.\"\n\"No... I am Mathilde Loisel.\"\nHer friend uttered a cry.\n\"Oh!... my poor Mathilde, how you have changed!...\"\n\"Yes, I've had some hard times<\/strong> since I saw you last; and many sorrows<\/strong>... and all on your account.\"\n\"On my account!... How was that?\"\n\"You remember the diamond necklace you lent me for the ball at the Ministry?\"<\/phrase>","Madame Forestier had halted<\/word>","\"Yes. Well?\"\n\"Well, I lost it.\"\n\"How could you? Why, you brought it back.\"\n\"I brought you another one just like it. And for the last ten years we have been paying for it. You realise it wasn't easy for us; we had no money.... Well, it's paid for at last, and I'm glad indeed.\"\nMadame Forestier had halted<\/strong>.<\/phrase>","she smiled in proud and innocent happiness<\/word>","mine was imitation<\/word>","\"You say you bought a diamond necklace to replace mine?\"\n\"Yes. You hadn't noticed it? They were very much alike.\"\nAnd she smiled in proud and innocent happiness<\/strong>.\nMadame Forestier, deeply moved, took her two hands.\n\"Oh, my poor Mathilde! But mine was imitation<\/strong>. It was worth at the very most five hundred francs!... \"<\/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':1754, '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':1754, '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':1754, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }