var presentation = ["Margaret J<\/word>","deuteragonist<\/word>","mother of Bobby Hill<\/word>","paternal aunt of Luanne Platter<\/word>","two year teaching degree<\/word>","temporary teaching jobs<\/word>","freelance writer<\/word>","Margaret J<\/strong>. \"Peggy\" Hill (n\u00e9e Platter) (born February 7, 1954), the deuteragonist<\/strong> of King of the Hill, is the wife of Hank Hill and the mother of Bobby Hill<\/strong>. She is also the paternal aunt of Luanne Platter<\/strong>. She has a two year teaching degree<\/strong> and was hired for numerous part time and temporary teaching jobs<\/strong>, mostly at Tom Landry Middle School. She is a freelance writer<\/strong>, mostly for the local newspaper, the Arlen Bystander. She is a notary public and sculptor. She also had tried other jobs in many episodes. She is a real estate agent in the show's later seasons. Peggy drives a Light Sandstone colored 1981 Buick Century Limited and later a Black 2001-2006 Chrysler Sebring Convertible.<\/phrase>","said to be beautiful<\/word>","considered frumpy<\/word>","tendency to wear culottes<\/word>","average framed woman<\/word>","disproportionate size 16\u00bd shoe on her left foot, and size 16 on her right<\/word>","helpful gregariousness<\/word>","bitter or stubborn<\/word>","Peggy thinks she knows and what she actually knows<\/word>","She has been said to be beautiful<\/strong> (mostly by herself and Bill) despite being considered frumpy<\/strong> due to her granny-beehive and glasses, not to mention her tendency to wear culottes<\/strong>. Peggy wears square, rimless glasses and is generally seen wearing cut-off blouses and culottes. She is an average framed woman<\/strong> standing at about 5'7\" who wears a disproportionate size 16\u00bd shoe on her left foot, and size 16 on her right<\/strong>-- which has been a constant source of her misery. Peggy's primary characteristics are her helpful gregariousness<\/strong> and her highly inflated sense of self-worth: she always has a proactive, can-do attitude, but she rarely recognizes when she is wrong or ignorant and will often become bitter or stubborn<\/strong> and refuse to admit it until the last minute. The often-humorous conflict between what Peggy thinks she knows and what she actually knows<\/strong> is a common source of plot drama in the series, and the trouble caused by a negative aspect of her personality is often repaired in the end by a positive aspect of her personality.<\/phrase>","petty, childish ways<\/word>","poor self-esteem<\/word>","perceptions of her as a good wife and mother<\/word>","You're much too old for chocolate milk.<\/word>","When her authority is challenged in the slightest, Peggy often takes her anger out in petty, childish ways<\/strong>, suggesting she actually has a poor self-esteem<\/strong> and relies heavily on her family and community's perceptions of her as a good wife and mother<\/strong>. In \"Hank's Bad Hair Day,\" after learning that Bobby wants to use Hank's barber instead of having Peggy cutting his hair, she throws out Bobby's untouched glass of chocolate milk, spitefully saying, \"You're much too old for chocolate milk.<\/strong>\"<\/phrase>","impressive work ethic<\/word>","Substitute Teacher of the Year Award<\/word>","created by Peggy herself<\/word>","worked at Chris Sizemore Realty<\/word>","Like her husband, she has an impressive work ethic<\/strong> coupled with mediocre intelligence and minimal ambition: the greatest achievement of her career as an educator was to win Tom Landry Middle School's \"Substitute Teacher of the Year Award<\/strong>\" three sequential years, despite the award being a meaningless vote-based self-promotion (created by Peggy herself<\/strong>) that nobody else really cared about. She was also adamant about impressing her new boss, Chris Sizemore, when she worked at Chris Sizemore Realty<\/strong>, which (despite a few hiccups) eventually allowed her to use her cleverness to succeed.<\/phrase>","ironic<\/word>","abusive mother<\/word>","egomania<\/word>","Her personality appears to be ironic<\/strong>, considering her rough relationship with her abusive mother<\/strong>, who never thought she was good at anything. This may explain her overachiever status and egomania<\/strong> (Narcissistic personality disorder) and her tendency to react spitefully out of fear when her power roles (good mother, good citizen, good teacher) are challenged by events.<\/phrase>","always wanting to see the best in others<\/word>","Nancy's affair with John Redcorn<\/word>","Nancy once described Peggy as always wanting to see the best in others<\/strong>, explaining some of her gullibility and naivety, which she attributes as the reason why Peggy was the only one not to figure out about Nancy's affair with John Redcorn<\/strong> until Hank pointed it out to her in \"Peggy's Headache\".<\/phrase>","fan of Billy Crystal and Rob Reiner<\/word>","rabbi mysteries<\/word>","Born in Montana to cattle ranchers<\/word>","Peggy is a fan of Billy Crystal and Rob Reiner<\/strong>. She also responded affirmatively when Hank asked if she was reading her \"rabbi mysteries<\/strong>\", a probable reference to the novels of Harry Kemelman. Peggy also uses a catch phrase \"Ho yeah!\" when she feels accomplished.Born in Montana to cattle ranchers<\/strong>, she moved to Texas for high school. Her family includes Doc Platter (father), Maddy Platter (mother), Leanne Platter (ex sister in-law), Luanne Platter (niece), Hoyt Platter (twin brother), Laverne (aunt), and Boppo (uncle).<\/phrase>","mother was extremely critical<\/word>","father was aloof<\/word>","homemaker mother<\/word>","Peggy left her parents behind<\/word>","Peggy's mother was extremely critical<\/strong>, and her father was aloof<\/strong> and spoke in obtuse, nature-based metaphors that were the foundation of Hank's admiration towards Doc. These portrayals of her parents, from the episode \"A Rover Runs Through It\", are actually a retconned version differing quite noticeably from the homemaker mother<\/strong> \u2013 and presumably equally suburban father \u2013 displayed in flashbacks in earlier episodes. In early episodes, Mrs. Platter is seen visiting in the Hills' home, implying that she lives in or near Arlen, Texas, and is on speaking terms with her daughter. In fact, the suggestion in the later episode is that Peggy left her parents behind<\/strong> when she went to Texas, which is a significant alteration. In both versions her mother tends to be critical of her, albeit for different reasons.<\/phrase>","twin brother, Hoyt<\/word>","petty criminal<\/word>","he was working on an oil rig<\/word>","gave him money<\/word>","Peggy's twin brother, Hoyt<\/strong>, is Luanne's father. A petty criminal<\/strong>, Hoyt was unseen and serving a second jail term. The family told Luanne that he was working on an oil rig<\/strong> to spare her feelings. When Hoyt returned to Arlen, Peggy tried to help him out and gave him money<\/strong>, but eventually realized Hoyt was an incorrigible criminal and would destroy the entire family.<\/phrase>","more intelligent than she actually is<\/word>","estimates her IQ at 170<\/word>","fluent in Spanish<\/word>","she speaks it extremely poorly<\/word>","she accidentally kidnapped a child<\/word>","Peggy's inflated ego and irrepressible intellectual confidence leads her to believe she is vastly more intelligent than she actually is<\/strong>. It's stated that she estimates her IQ at 170<\/strong>, which would make her both a super-genius and the intellectual equal of the philosopher Confucius. She claims to be fluent in Spanish<\/strong>, and indeed teaches it to children as her primary area of expertise, when in reality she speaks it extremely poorly<\/strong>, with a terrible grasp of both grammar and vocabulary and a totally nonexistent accent. Her poor Spanish led her to face a Mexican judge on kidnapping charges after she accidentally kidnapped a child<\/strong> due to her inability to recognize that she couldn't speak even basic Spanish.<\/phrase>","knowledge of legal proceedings<\/word>","extensive Boggle playing<\/word>","This is not to say, however, that Peggy is unintelligent, as her natural curiosity and high motivation often lead her to resolve a plot crisis with sheer effort; for example, her knowledge of legal proceedings<\/strong> allowed Hank to filibuster an unpopular law from passing. Her extensive Boggle playing<\/strong> has given her a good vocabulary, allowing her to win the aforementioned state Boggle tournament with a 16-letter word, \"acquaintanceship.\"<\/phrase>","professional writer<\/word>","hippie folk music<\/word>","speaking in a formal, lyrical and stilted sort of cleverness<\/word>","She has been a professional writer<\/strong> for a long time, writing for newspapers and hippie folk music<\/strong>. She writes musings and often speaks like a muser. Always speaking in a formal, lyrical and stilted sort of cleverness<\/strong>. Like a philosophy major or perhaps a fortune-cookie.<\/phrase>","song lyrics were stolen by country singer Randy Travis<\/word>","reputation for self-promotion<\/word>","steals an anecdote about her large feet<\/word>","not having seen her parents for years<\/word>","save the ranch from Henry Winkler<\/word>","Peggy expects a warm thank you<\/word>","instead blamed<\/word>","In one of the few examples of Peggy's theories being proved correct, she once claimed her song lyrics were stolen by country singer Randy Travis<\/strong>, though Mr. Travis claimed to have written them independently. It is later revealed that the lyrics (and the story which Peggy tells Mr. Travis inspired her to write it) were, in fact, Peggy's, but her reputation for self-promotion<\/strong> makes even Hank think she is crying \"wolf\". Travis also steals an anecdote about her large feet<\/strong> and tells it to his audience during a performance. It isn't until Travis tells an audience that he saved Hank from drowning when, in reality, Hank was the one who saved him after Bill sent his RV into a lake, not knowing Mr. Travis was inside. Hank decided he was going to hurt him before Peggy told him it wouldn't make a difference.After not having seen her parents for years<\/strong>, Peggy went to Montana at the request of her mother to see her childhood home one last time. To save the ranch from Henry Winkler<\/strong>, and in an attempt to win her mother's favor, Peggy was able to locate an old law that allowed them to transfer their cattle through the main street of town. Afterwards, Winkler allows them to cut through his land for their cattle drive. In what appears to be a moment between mother and daughter, Peggy expects a warm thank you<\/strong> from her mother but is instead blamed<\/strong> for the whole thing; her mother says it would have never happened had she stayed on the farm. Peggy leaves, accepting the fact that her relationship with her mother is over and that she should focus on her relationship with Bobby.<\/phrase>","Peggy has a tendency to overreact<\/word>","believing he has ADD<\/word>","he just ate too much sugar<\/word>","he was a special-needs child<\/word>","Perhaps as a result of her relationship with her own parents, Peggy has a tendency to overreact<\/strong> to any indication that something is not right with Bobby, for example believing he was infected by mold because he couldn't remember her birthday (though he didn't know it in the first place), believing he has ADD<\/strong> even though he just ate too much sugar<\/strong> that morning, believing that he was a special-needs child<\/strong> when he was just lazy, and when she caught Bobby making out with a plastic head to train himself how to act around a girl, believing this to be a lie.<\/phrase>","aggrandizes her own accomplishments<\/word>","she created it<\/word>","Olympic torch<\/word>","I wrote the essay<\/word>","She frequently aggrandizes her own accomplishments<\/strong>, such as her continual recognition as the substitute teacher of the year, although she won the first award because she created it<\/strong>. This ego of hers was seen as a running gag in a few episodes where in some cases she will point out how she was a major part of something in an effort to hog the glory. For example, when she thinks Bobby has been chosen to run with the Olympic torch<\/strong> (although it was, moments later, proven to be Hank, not Bobby, who won the contest), Peggy is only willing to concede, \"Well, to be fair I wrote the essay<\/strong>, but let this be Bobby's moment.\" Her belief that someone can do anything if they put their mind to it often leads her into trouble when she takes the philosophy too literally; she often believes she can do many things for which she has no skill or background (such as walking into a crime scene and expecting to become part of the investigation).<\/phrase>","so highly of herself<\/word>","Monsignor Martinez is madly in love with her<\/word>","presumption that she is irresistible<\/word>","she can win a beauty contest<\/word>","awkwardly try to talk her out of competing<\/word>","It is perhaps not the fact that Peggy thinks so highly of herself<\/strong>, but in her assumption (and expectation) that everyone else thinks equally highly of her, which leads her into a variety of predicaments. In one episode, Peggy assumes that an actor, Eduardo Felipe, star of TV's Monsignor Martinez is madly in love with her<\/strong>. This idea is based somewhat on a cultural misunderstanding, over wine he tells her his wife is \"with the ancestors\" and acts in a way her friend Nancy agrees is \"flirting\", but largely on her presumption that she is irresistible<\/strong>. This happens multiple times throughout the series-- in one episode, Peggy believes she can win a beauty contest<\/strong>, hands-down, without modifying her appearance at all, since she is naturally just that beautiful; Hank has to awkwardly try to talk her out of competing<\/strong> against much younger, prettier women without hurting her feelings.<\/phrase>","self-consciously comparing herself<\/word>","Bobby's 14-year-old girlfriend<\/word>","Another episode sees her self-consciously comparing herself<\/strong> to Bobby's 14-year-old girlfriend<\/strong>, bragging that they are similarly beautiful, despite the comically vast difference in their ages and appearances.<\/phrase>","extremely inflated ego<\/word>","in my opinion<\/word>","SpaPeggy and meatballs<\/word>","piggyback on intelligent people<\/word>","Peggy's most negative, but humorous trait is her extremely inflated ego<\/strong>. She has the habit of using the phrase \"in my opinion<\/strong>\" when stating well known facts, such as, \"in my opinion<\/strong>, the day after Thanksgiving is one of the busiest shopping days of the year,\" and \"As I like to say\/call it,\" when using common expressions, or, for example, calls a basic boiled pasta and canned sauce spaghetti recipe \"SpaPeggy and meatballs<\/strong>.\" Hank calls her out on this in the Randy Travis episode, saying \"That's not your opinion, that's just fact.\" She also occasionally makes claims that seem to have no basis in reality at all, such as \"Swiss cheese is not Mexican, it's American\". She does this to try and piggyback on intelligent people<\/strong>'s observations to make herself look smarter.<\/phrase>","pleased with her own cleverness<\/word>","unwelcome crush on her<\/word>","better salesperson than she was<\/word>","When she is particularly pleased with her own cleverness<\/strong>, she coyly raises her hand to her chest and chuckles, \"Oh, Peggy!\" In an interesting spin on Peggy's self-confidence, she reluctantly recruited Bill Dauterive, whom she usually avoids because of his obvious and unwelcome crush on her<\/strong>, to a pyramid sales scheme, only to be surprised as Bill proved to be a much better salesperson than she was<\/strong>.<\/phrase>","ran for the school board<\/word>","candidate for national office<\/word>","backgammon set as a fake briefcase<\/word>","Peggy once ran for the school board<\/strong>, along with Minh and Nancy, but lost. In a frequent theme, Peggy, Minh, and Nancy began to turn on each other to win. In a classic example of her self-aggrandizing nature, Peggy treats her run for local school board as though she were a candidate for national office<\/strong>, using a backgammon set as a fake briefcase<\/strong> and answering her cellphone with \"War Room\". In the end, they all lost to a fundamentalist Christian, who planned to get rid of biology, geometry, the after-school program, and all \"offensive\" encyclopedias.<\/phrase>","admirable level of confidence and bravery<\/word>","empowers her<\/word>","While her ego tends to get her in trouble, it is also what gives her an incredibly admirable level of confidence and bravery<\/strong> that empowers her<\/strong> to stand up for herself and those around her.<\/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':2838, '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':2838, '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':2838, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }