var presentation = ["Along for the Ride<\/word>","never sleeps at night<\/word>","her parents' continuous fighting<\/word>","spend her summer before college with her father and his new wife and baby<\/word>","really like her stepmother<\/word>","ends up spending her nights making up for her lost childhood<\/word>","Eli<\/word>","questions if people can truly change<\/word>","Sarah Dessen<\/word>","Auden West<\/word>","high school<\/word>","first reluctant<\/word>","half sister<\/word>","loner and insomniac<\/word>","intriguing past<\/word>","second chances<\/word>","Along for the Ride<\/strong> is a novel by Sarah Dessen<\/strong>. The novel focuses on Auden West<\/strong>, who never sleeps at night<\/strong> due to her parents' continuous fighting<\/strong> when she was in high school<\/strong>. Before heading off to college, Auden decides to spend her summer before college with her father and his new wife and baby<\/strong>. Although Auden is at first reluctant<\/strong>, she comes to really like her stepmother<\/strong> and half sister<\/strong>. Auden also ends up spending her nights making up for her lost childhood<\/strong> with Eli<\/strong>, a loner and insomniac<\/strong> with an intriguing past<\/strong>. She learns that second chances<\/strong> are possible and questions if people can truly change<\/strong>.<\/phrase>","enjoy the activities young children often got to do<\/word>","Defriese University<\/word>","take up her father's offer to spend her summer before college in the beach town Colby<\/word>","bonding time with her father<\/word>","disappointed to find out that that will not be the case<\/word>","her father spends all his time working on his novel<\/word>","stretch of beach<\/word>","teens hang out<\/word>","whom she almost becomes intimate with<\/word>","helps out her step mother<\/word>","supervising her half-sister, Thisbe<\/word>","Heidi rests<\/word>","helps Heidi run an errand<\/word>","Clementine's<\/word>","Auden West<\/word>","smart girl<\/word>","high school<\/word>","her summer<\/word>","her brother<\/word>","Hollis<\/word>","Europe<\/word>","One night<\/word>","Tip<\/word>","Jake<\/word>","Heidi<\/word>","Auden West<\/strong> is a smart girl<\/strong> who didn't get the chance to enjoy the activities young children often got to do<\/strong> (such as riding a bike) when she was a child. After being accepted into Defriese University<\/strong> and graduating high school<\/strong>, Auden is not sure on how to spend her summer<\/strong>. After receiving a package from her brother<\/strong> Hollis<\/strong> who is touring Europe<\/strong>, she decides to take up her father's offer to spend her summer before college in the beach town Colby<\/strong>. When she arrives, she hopes she can have some bonding time with her father<\/strong>. However, she is disappointed to find out that that will not be the case<\/strong> since her father spends all his time working on his novel<\/strong>. One night<\/strong> Auden heads down to the Tip<\/strong>, a stretch of beach<\/strong> where all the teens hang out<\/strong>. At the Tip<\/strong> she runs into a guy named Jake<\/strong>, with whom she almost becomes intimate with<\/strong>. Feeling guilty and wrong about what she was doing, Auden leaves for home. Early in the morning, she helps out her step mother<\/strong> by supervising her half-sister, Thisbe<\/strong>, while Heidi rests<\/strong>. Auden also helps Heidi run an errand<\/strong> pertaining to Heidi<\/strong>'s boutique named Clementine's<\/strong>.<\/phrase>","Heidi's employees<\/word>","ex-boyfriend Jake<\/word>","hooked up with a girl the previous night<\/word>","Auden ends up briefly explaining to Maggie that she has no relationship with Jake whatsoever<\/word>","Last Chance for dinner<\/word>","Auden's father<\/word>","does not want to leave the house<\/word>","can finish his book<\/word>","go to her boutique<\/word>","way to dinner<\/word>","Auden's father even more irritated<\/word>","prompted by her father to take care of Thisbe<\/word>","Eli helps her out by calming down Thisbe<\/word>","Maggie<\/word>","Leah<\/word>","Esther<\/word>","walk<\/word>","store and reveal<\/word>","love<\/word>","next day<\/word>","clear<\/word>","Heidi<\/word>","business error<\/word>","There she meets one of Heidi's employees<\/strong>, Maggie<\/strong>. Maggie<\/strong>'s friends Leah<\/strong> and Esther<\/strong> walk<\/strong> into the store and reveal<\/strong> to Maggie<\/strong> that her ex-boyfriend Jake<\/strong> (who she is still in love<\/strong> with) hooked up with a girl the previous night<\/strong>, though they don't know that it was Auden yet. Once they figure out who he hooked up with, Auden ends up briefly explaining to Maggie that she has no relationship with Jake whatsoever<\/strong>. The next day<\/strong> Auden's family decides to head down to the Last Chance for dinner<\/strong>. It is clear<\/strong> that Auden's father<\/strong> is irritated since he does not want to leave the house<\/strong> so he can finish his book<\/strong>. Heidi<\/strong> has to go to her boutique<\/strong> on the way to dinner<\/strong> due to a business error<\/strong>, which makes Auden's father even more irritated<\/strong>. While waiting for Heidi<\/strong> at the diner, Auden is prompted by her father to take care of Thisbe<\/strong> outside. Eli helps her out by calming down Thisbe<\/strong>.<\/phrase>","thanks Eli<\/word>","Eli runs the bike shop next to her boutique<\/word>","Eli has a little brother<\/word>","Eli<\/word>","dispute rises between Heidi and Auden's father<\/word>","Auden does not go home until two hours later<\/word>","only reason he invited Auden<\/word>","help out with Thisbe<\/word>","spend more time with both his daughters<\/word>","Auden spends the night fixing Heidi's finances<\/word>","Heidi offers Auden a job working on the store's books<\/word>","Auden's father<\/word>","Auden accepts the job<\/word>","Heidi<\/word>","Jake<\/word>","her father<\/word>","At that moment, Heidi<\/strong> appears and thanks Eli<\/strong>, who leaves. She informs Auden that Eli runs the bike shop next to her boutique<\/strong>. She also mentions that Eli has a little brother<\/strong> around Auden's age named Jake<\/strong>. Auden quickly realizes that Eli<\/strong>'s little brother Jake<\/strong> is the same Jake<\/strong> she fooled around with. At dinner a dispute rises between Heidi and Auden's father<\/strong> which they leave unresolved. Realizing their fight is not over, Auden does not go home until two hours later<\/strong>. However, Auden arrives at the peak of the fight. Auden stays on the porch and overhears her father<\/strong> say that the only reason he invited Auden<\/strong> was so she can help out with Thisbe<\/strong>. She also overhears Heidi<\/strong> standing up for her and telling her father<\/strong> that he should spend more time with both his daughters<\/strong>. Auden leaves for another three hours and is unsure whether to feel grateful or not for Heidi<\/strong> defending her. Later that night after everyone was asleep, Auden spends the night fixing Heidi's finances<\/strong>. Grateful, Heidi offers Auden a job working on the store's books<\/strong>. After a remark from Auden's father<\/strong>, Auden accepts the job<\/strong>, much to her fathers disappointment.<\/phrase>","she's treated kindly by the other girls<\/word>","highly critical of Heidi<\/word>","Auden's mother notices that Auden has changed<\/word>","Auden defends Heidi<\/word>","employees at Heidi's boutique<\/word>","encourage Auden to go to a party with them<\/word>","encounter with Eli<\/word>","both of them have nocturnal habits<\/word>","do things that Auden hasn't really done before<\/word>","The start getting closer<\/word>","Auden asks Maggie if she can teach her how to ride a bike.<\/word>","store<\/word>","kiss<\/word>","Maggie<\/word>","help<\/word>","While Auden works she's treated kindly by the other girls<\/strong>. After a few days Auden's mother comes down to visit. She is highly critical of Heidi<\/strong> and the store<\/strong> for the stereotype of women it projects. Auden's mother notices that Auden has changed<\/strong> once Auden defends Heidi<\/strong>. The employees at Heidi's boutique<\/strong> encourage Auden to go to a party with them<\/strong> and there she has an encounter with Eli<\/strong>. They keep bumping into each other, they eventually find out that both of them have nocturnal habits<\/strong>. They start hanging out with each other when night time comes. They do things that Auden hasn't really done before<\/strong>, such as bowling. The start getting closer<\/strong> and eventually they kiss<\/strong> for the first time. Auden asks Maggie if she can teach her how to ride a bike.<\/strong> Maggie<\/strong> agrees to help<\/strong>.<\/phrase>","Auden's ex prom date<\/word>","Auden breaks the friendship between her and Eli<\/word>","Jason asks Auden to go with him to the Beach Bash<\/word>","end of the summer<\/word>","Jason turns Auden down again<\/word>","Auden asks Eli to go with her<\/word>","he rejects her<\/word>","Eli and Auden meet again<\/word>","decide to go to the Beach Bash together<\/word>","Auden is at Ray's, a coffee shop<\/word>","Eli<\/word>","They end the novel being a couple again<\/word>","Jason<\/word>","Heidi<\/word>","Beach Bash<\/word>","end<\/word>","book<\/word>","Jason<\/strong>, Auden's ex prom date<\/strong> comes around. Auden breaks the friendship between her and Eli<\/strong> because she feels uncomfortable with how different she is becoming. Jason asks Auden to go with him to the Beach Bash<\/strong>, an event Heidi<\/strong> had planned for the end of the summer<\/strong>. Auden accepts. When the Beach Bash<\/strong> comes, Jason turns Auden down again<\/strong>. Auden asks Eli to go with her<\/strong>, but he rejects her<\/strong> and it takes a toll on Auden. However, when Eli and Auden meet again<\/strong>, they talk things out and decide to go to the Beach Bash together<\/strong> and have a great time. At the end<\/strong> of the book<\/strong>, Auden is at Ray's, a coffee shop<\/strong> she used to regularly visit when she had insomnia, with Eli<\/strong>. They end the novel being a couple again<\/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':2117, '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':2117, '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':2117, 'userId':0, 'playerAction':action, 'playerArea':area, 'details':details, 'timestamp': t } }) .done(function(results){ }) .fail(function( jqXHR, textStatus ) { alert( "Request failed: " + textStatus ); }); }