Blues top Hawks to take commanding 3-1 lead
‘) HTML.push(‘‘); HTML.push(‘ | ‘); HTML.push(‘‘ + jersey + ‘ ‘ + playerData.firstName + ” ” + playerData.lastName); if (position) { HTML.push(‘, ‘ + position); } HTML.push(‘ ‘); HTML.push(‘‘ + height + ” ” + weight + ‘‘); HTML.push(‘ |
‘); // Start HTML HTML.push(‘
‘ + statValue + ‘ |
‘); HTML.push(”); //2012 – NEW MOUSEOVER STATS var content = HTML.join(‘\n’); return content; } return false; }, // Destroy Mouseover Stats for players //————————————————————————- destroyMouseOverStats: function () { //————————————————————————- $(“#gcYTDstats”).hide().empty(); }, // Build Scoreboard //————————————————————————- buildScoreboard: function () { //————————————————————————- // Set the static scoreboard data $(“div#gameVenue span.venue”).html(NHLGC.gcData.venue); if (NHLGC.atlData.games[NHLGC.gameId].tv) { $(“div#gameVenue span.tv”).html(“TV: ” + NHLGC.atlData.games[NHLGC.gameId].tv); } // Set the dynamic scoreboard data document.getElementById(‘gcAwayScore’).innerHTML = NHLGC.atlData.games[NHLGC.gameId].ascore; document.getElementById(‘gcHomeScore’).innerHTML = NHLGC.atlData.games[NHLGC.gameId].hscore; document.getElementById(‘gcGameStatus’).className = NHLGC.gameStatus; //Set Game Status on the ScoreBoard switch (NHLGC.gameStatus) { case “S”: document.getElementById(‘gcGameStatus’).innerHTML = “”; document.getElementById(‘gcTimeLeft’).innerHTML = formatTime(‘%I:%M %p’, NHLGC.atlData.games[NHLGC.gameId].schedule_time); break; case “P”: var periodLabel = NHLGC.getPeriodLabel(NHLGC.gamePeriod, NHLGC.regularSeason, true); if (NHLGC.hasGameMode(NHLGC.gameId, “OT”)) { periodLabel = periodLabel.replace(“OT”,” Overtime”); } else if (periodLabel == “SO”) { periodLabel = “Shootout”; } else { periodLabel = ‘‘ + periodLabel + ‘Period‘; } document.getElementById(‘gcGameStatus’).innerHTML = periodLabel; document.getElementById(‘gcTimeLeft’).innerHTML = NHLGC.atlData.games[NHLGC.gameId].time_remaining; break; case “F”: var gameStatus = “Final “; if (NHLGC.hasGameMode(NHLGC.gameId, “SO”)) { gameStatus += “SO”; } else if (NHLGC.hasGameMode(NHLGC.gameId, “OT”)) { gameStatus += NHLGC.getPeriodLabel(NHLGC.gamePeriod, NHLGC.regularSeason, false); } document.getElementById(‘gcGameStatus’).innerHTML = “”; document.getElementById(‘gcTimeLeft’).innerHTML = gameStatus; break; default: document.getElementById(‘gcGameStatus’).innerHTML = NHLGC.gameStatusStr; document.getElementById(‘gcTimeLeft’).innerHTML = “”; } //Build Scoreboard var minCols = 3; var numCols = (NHLGC.atlData.games[NHLGC.gameId].aline_score) ? NHLGC.atlData.games[NHLGC.gameId].aline_score.length : 0; var totCols = (numCols ‘+periodLabel+”); if (numCols ‘); hScore.push(‘
‘); } else { var ashootout_goals = (NHLGC.atlData.games[NHLGC.gameId][‘ashootout_goals’]) ? NHLGC.atlData.games[NHLGC.gameId][‘ashootout_goals’] : 0; var hshootout_goals = (NHLGC.atlData.games[NHLGC.gameId][‘hshootout_goals’]) ? NHLGC.atlData.games[NHLGC.gameId][‘hshootout_goals’] : 0; var total_so = 0; if ((ashootout_goals > 0) && (ashootout_goals 0) && (hshootout_goals ‘+aline_score+”); hScore.push(‘
‘); } } var HTML = new Array(); HTML.push(‘
‘+NHLGC.awaynick+’ | ‘+NHLGC.atlData.games[NHLGC.gameId].ascore+’ |
‘+NHLGC.homenick+’ | ‘+NHLGC.atlData.games[NHLGC.gameId].hscore+’ |
‘); document.getElementById(‘gcLineScore’).innerHTML = HTML.join(‘\n’); }, // Powerplay alert //————————————————————————- powerPlay: function () { //————————————————————————- var aStrength = document.getElementById(‘astrength’); var hStrength = document.getElementById(‘hstrength’); aStrength.className = ‘strength’ + NHLGC.atlData[‘games’][NHLGC.gameId][‘astrength’]; hStrength.className = ‘strength’ + NHLGC.atlData[‘games’][NHLGC.gameId][‘hstrength’]; }, // Total Shots on Scoreboard //————————————————————————- totalShotsOnGoal: function () { //————————————————————————- document.getElementById(‘gcAwayShots’).innerHTML = “SOG
” + NHLGC.atlData[‘games’][NHLGC.gameId].asog + ‘‘; document.getElementById(‘gcHomeShots’).innerHTML = “SOG
” + NHLGC.atlData[‘games’][NHLGC.gameId].hsog + ‘‘; }, // Render the penalty box to reflect players in penalty //————————————————————————- renderPenaltyBox: function () { //————————————————————————- if (typeof NHLGC.gcData.penalty_box != “undefined”) { if (NHLGC.gcData.penalty_box.length > 0) { var HTML = []; HTML.push(‘
Penalty Box | |||
Time Left | Player | Infraction | ‘+penaltyBox[i].timeRemaining+’ | ‘ + penaltyBox[i].firstName + ‘ ‘ + penaltyBox[i].lastName + ‘ | ‘ + penaltyBox[i].penaltyText + ‘ |
‘); document.getElementById(‘penaltyBox’).innerHTML = HTML.join(‘\n’); $(‘#penaltyBox:hidden’).slideDown(“slow”); } else { $(‘#penaltyBox’).slideUp(“slow”); } } }, // Render the last five plays into the scoreboard //————————————————————————- renderLastFivePlays: function () { //————————————————————————- if (NHLGC.gcData.last_5_plays) { var HTML = []; HTML.push(‘
‘+lastFivePlays[i].text+’ |
‘); document.getElementById(‘lastFivePlays’).innerHTML = HTML.join(‘\n’); } }, // Render last play text //————————————————————————- renderGameText: function () { //————————————————————————- var gametext = NHLGC.atlData[“games”][NHLGC.gameId][“long_game_text”]; $(“#gcGameText”).html(gametext); }, // Render game odds //————————————————————————- renderOdds: function () { //————————————————————————- var odds = []; var spread, overunder, home_moneyline; if (NHLGC.home_moneyline) { home_moneyline = NHLGC.home_moneyline + ‘ (‘ + NHLGC.homeAbbrev + ‘)’; } if (NHLGC.spread) { spread = NHLGC.spread + ‘ (‘ + NHLGC.homeAbbrev + ‘)’; } if (NHLGC.overunder) { overunder = NHLGC.overunder + ‘ O/U’; } if (home_moneyline) { odds.push(home_moneyline); } if (overunder) { odds.push(overunder); } var oddsStr = odds.join(‘ | ‘); if (oddsStr.length > 0) { oddsStr = ‘Line:‘ + oddsStr; } $(“#gcOdds”).html(oddsStr); }, // Render the stars of the game at the conclusion of the game //————————————————————————- renderStarPlayers: function () { //————————————————————————- var starPlayers = NHLGC.atlData[‘games’][NHLGC.gameId].star_players; if (starPlayers.length == 0) { return; } $(“#gcGameText”).hide(); var HTML = ‘
Three Stars
‘; HTML += ”; HTML += ”; $(“div.starPlayers”).html(HTML); $(“div.starPlayers”).slideDown(“slow”); }, // Render the ShootOut Stats //————————————————————————- renderShootOutStats: function () { //————————————————————————- if (NHLGC.getPeriodLabel(NHLGC.gamePeriod, NHLGC.regularSeason) == “SO”) { document.getElementById(‘awayShootOutStats’).style.display = “block”; document.getElementById(‘homeShootOutStats’).style.display = “block”; NHLGC.buildAwayShootOutSkaters(); NHLGC.buildHomeShootOutSkaters(); NHLGC.buildAwayShootOutGoalies(); NHLGC.buildHomeShootOutGoalies(); } }, // Build the scoring summary component //————————————————————————- buildScoringSummary: function () { //————————————————————————- if (NHLGC.gcData.scoring_summary) { var HTML = new Array(); for (var i = 0; i ‘); HTML.push(‘
‘); for (var j = 0; j ‘); HTML.push(‘
‘); HTML.push(‘
‘); HTML.push(”); } HTML.push(”); } document.getElementById(‘scoringSummary’).innerHTML = HTML.join(‘\n’); } }, // Build Penalty Summary //————————————————————————- buildPenaltySummary: function () { //————————————————————————- if (NHLGC.gcData.penalty_summary) { var HTML = new Array(); for (var i = 0; i ‘); HTML.push(‘
‘); for (var j = 0; j ‘); HTML.push(‘
‘); HTML.push(‘
‘); HTML.push(”); } HTML.push(”); } document.getElementById(‘penaltySummary’).innerHTML = HTML.join(‘\n’); } }, // Render Hockey Rink and Shotchart //————————————————————————- renderRink: function () { //————————————————————————- var numOfTabs = NHLGC.gamePeriod + 2; var tabWidth = Math.ceil((579 / numOfTabs) – 1); var ulTabs = document.getElementById(“shotchartTabs”) || document.createElement(“ul”); while ( ulTabs.hasChildNodes() ) ulTabs.removeChild( ulTabs.lastChild ); ulTabs.setAttribute(“id”, “shotchartTabs”); var liTab = document.createElement(“li”); //Build Tabs for (var i = 0; i ‘; liBox.innerHTML += ‘‘; liBox.innerHTML += ”; liBox.innerHTML += ‘
‘; liBox.innerHTML += ‘
‘; ulBox.appendChild(liBox); document.getElementById(“gcRink”).appendChild(ulBox); NHLGC.renderShotChart(); }, // Initiate goalie mouse/touch events //————————————————————————- initGoalieEvents: function() { //————————————————————————- // Mouse events $(“ul#shotchartBoxes”).delegate(“div#awayGoalie, div#homeGoalie”, “mouseenter”, function(event) { event.stopPropagation(); $(“div#shotChart div.shotDetails”).hide().remove(); NHLGC.renderGoalieDetail(event.currentTarget); }); $(“ul#shotchartBoxes”).delegate(“div#awayGoalie, div#homeGoalie”, “mouseleave”, function(event) { event.stopPropagation(); $(“div.goalieInfo”).remove(); }); // Touch events $(“ul#shotchartBoxes”).delegate(“div#awayGoalie, div#homeGoalie”, “touchstart”, function(event) { $(“div#shotChart div.shotDetails”).hide().remove().done(function(){ NHLGC.renderGoalieDetail(event.currentTarget); }); }); $(“div.goalieInfo div.closeButton”).live(“touchstart”, function(event) { event.preventDefault(); event.stopPropagation(); var elemId = event.currentTarget.id; $(“div.goalieInfo”).hide().remove(); }); }, // Build HTML for Goalie detail //————————————————————————- buildGoalieDetail: function (goalieZones, goalie) { //————————————————————————- var HTML = []; HTML.push(‘
‘); HTML.push(‘
‘); HTML.push(‘‘); HTML.push(goalie.firstName + ‘ ‘ + goalie.lastName); if (goalie.jerseyNumber) { HTML.push(‘ #’ + goalie.jerseyNumber); } HTML.push(‘‘); HTML.push(‘
‘ + goalie.SYtdGoalsAgainst + ‘ | ‘ + goalie.SYtdSaves + ‘ |
‘); HTML.push(‘
Shots Against
‘ + goalieZones.zone_avg[0] + ‘
‘ + goalieZones.zone_avg[1] + ‘
‘ + goalieZones.zone_avg[2] + ‘
‘ + goalieZones.zone_avg[3] + ‘
‘ + goalieZones.zone_avg[4] + ‘
‘); HTML.push(‘
‘); HTML.push(‘Full Player Page‘); HTML.push(‘
‘); return HTML.join(‘\n’); }, // /Render Goalie detail //————————————————————————- renderGoalieDetail: function (goalieElem) { //————————————————————————- var goalieDetails = ”; var elemId = $(goalieElem).attr(“id”); var goalieId = (elemId == “awayGoalie”) ? NHLGC.awayGoalieZones.ids[0] : NHLGC.homeGoalieZones.ids[0]; var goalieZones = (elemId == “awayGoalie”) ? NHLGC.awayGoalieZones[goalieId] : NHLGC.homeGoalieZones[goalieId]; var goalieInfo = (elemId == “awayGoalie”) ? NHLGC.gcData.agoalies : NHLGC.gcData.hgoalies; for (var i=0; i 0) { var img = $(goalieElem).find(‘div’).get(0); $(img).before(goalieDetails); } }, // Render Short Chart based on selected tab //————————————————————————- renderShotChart: function (tabElem) { //————————————————————————- tabElem = tabElem || null; NHLGC.tabSelected = (tabElem) ? tabElem.getAttribute(“tab”) : NHLGC.tabSelected; //Apply selected style to selected tab var li = document.getElementById(“shotchartTabs”).getElementsByTagName(“button”); for (var i = 0; i .300) { return ‘hc301’; } else if ((zoneValue > .275) && (zoneValue .250) && (zoneValue .225) && (zoneValue 0.0) && (zoneValue = 200) xPos = 180; //Keep away shots on left side of rink if (shotData.teamFlag == 1 && xPos ‘ + playerNm + jerseyNum + ‘
‘ + playText; tr.appendChild(td); tbody.appendChild(tr); table.appendChild(tbody); //Play Text Cell var tr = document.createElement(“tr”); tr.vAlign = “bottom”; var td = document.createElement(“td”); td.className = ‘playerlink’; td.innerHTML = ‘Full Player Page‘; tr.appendChild(td); tbody.appendChild(tr); table.appendChild(tbody); //Build Goalie Box var goalie = document.createElement(“div”); goalie.setAttribute(“id”, “goalie”+shotId); goalie.className = ($(shotElem).data(‘team’) == “away”) ? “goalieHome” : “goalieAway”; var shotOnGoalie = document.getElementById(“shotOnGoalie”) || document.createElement(“div”); shotOnGoalie.setAttribute(“id”, “shotOnGoalie”); shotOnGoalie.className = “shotZone” + $(shotElem).data(‘shotZone’); shotOnGoalie.className += (goalFlag) ? ” shotGoal” : ” shotMiss”; goalie.appendChild(shotOnGoalie); var goalieInfo = ($(shotElem).data(‘team’) == “away”) ? NHLGC.gcData.hgoalies : NHLGC.gcData.agoalies; var goalieName; var goalieHand; var goalieFound = false; for (var i = 0; i ‘ + ‘‘ + goalieName + ‘‘; //close button for tablets var closeDiv = document.createElement(“div”); closeDiv.className = “closeButton”; //pointer caret var pointerDiv = document.createElement(“div”); pointerDiv.className = (team == “away”) ? “pointerLeft” : “pointerRight”; pointerDiv.style.top = pointerY + “px”; shotDiv.appendChild(pointerDiv); shotDiv.appendChild(closeDiv); shotDiv.appendChild(table); shotDiv.appendChild(goalie); shotDiv.appendChild(span); div.appendChild(shotDiv); } //if shot detail obstructs audio checkbox, hide audio checkbox if (xPos ‘]; HTML.push(‘
SHOOTOUT
‘); var soNum = ‘
‘; var awaySO = ‘
- ‘ + NHLGC.awayAbbrev + ‘
‘; var homeSO = ‘
- ‘ + NHLGC.homeAbbrev + ‘
- ‘ + shots[i].firstName.substr(0,1) + ‘. ‘ + shots[i].lastName + ‘
- ‘ + shots[i].firstName.substr(0,1) + ‘. ‘ + shots[i].lastName + ‘
‘; var separator = ”; var shotCount = Math.ceil(shots.length / 2); var count = 0; var startCount = 0; var totalShots = shots.length; if (shotCount > 4) { startCount = shotCount – 4; } for (var i=0; i ‘ + count + ‘ ‘; } //render the miss/made icons var soClass = (shots[i].goalFlag) ? ‘so_o’ : ‘so_x’; if (shots[i].teamFlag == 0) { awaySO += ‘
‘; } else if (shots[i].teamFlag == 1) { homeSO += ‘
‘; } } soNum += ‘
‘; awaySO += ”; homeSO += ”; HTML.push(soNum); HTML.push(awaySO); HTML.push(separator); HTML.push(homeSO); HTML.push(‘
Away Team
Lineup | G | A | PIM | S |
---|
Goalies | SV | GA |
---|
Shootout Stats
Skaters | G | S |
---|
Goalies | SV | GA |
---|
” } callFBApi = function() { var accessToken; var uid; FB.getLoginStatus(function(response) { if (response.status === ‘connected’) { handle_fb_response(response.authResponse); } else{ FB.login(function(response) { if (response.authResponse) { handle_fb_response(response.authResponse); } }); } }); }; handle_fb_response = function(authResponse){ uid = authResponse.userID; accessToken = authResponse.accessToken; FB.api(‘/me’, function(social) { //CBSi.log(“== FB USER DATA ==”, social); log_in_socially(social.name, social.username, ‘fb’); document.cookie = “lf_social_info=|FB|; expires=0; path=/”; }); } log_in_socially = function(dn, userid, site) { $.ajax({ url: “/data/common/livefyre/lf_social_login”, dataType: ‘json’, data: { lfdn: dn, lfuser: userid, ssite: site } }).done(function(profile) { if (profile.error) { return null; } else { document.cookie = “lf_social_login=”+ profile.socialsess +”; expires=0; path=/”; profile.socialsess = ‘1’; userObj = profile; lf_user_profile = profile; doLivefyreAuth(profile); } }); }; callTwitterApi = function() { window.open(‘/common/livefyre/V3/via_twitter?debug=32′,’twitterOauth’,’width=600,height=500,menu=0,status=0′); }; callTwitterApiHidden = function() { var arr1 = readCookie(‘lf_social_info’).split(/\|/); log_in_socially(arr1[2], arr1[3], ‘twitter’); hasProfile = 1; } function doLivefyreAuth(cval) { var isLoggedIn = 1; if (cval) { try { fyre.conv.login(cval.token); } catch (e) { isLoggedIn = 0; } } } changeDOM = function() { if (isLoggedIn == 1){ if (hasProfile == 0) { $(‘.fyre .fyre-user-loggedout’).hide(); $(‘#getScreenName’).show(); var screenNameContent = ‘Get a Screen Name to Comment‘; $(‘#getScreenName’).html(screenNameContent); } } changedDom = 1; }; function updateCommentCounts(element,count){ if (count == 1){ $(element).html(‘‘ + count + ‘ | Comment‘); $(element).show(); $(‘.commentsCountLabel’).html(‘comment’); } else{ $(element).html(‘‘ + count + ‘ | Comments‘); $(element).show(); $(‘.commentsCountLabel’).html(‘comments’); } $(‘.commentsCount’).html(count); } function removeLfError(){ $(‘#cbsLfError’).remove(); $(‘.fyre-editor-error’).remove(); } var authDelegate = new fyre.conv.RemoteAuthDelegate(); authDelegate.login = function (handlers){ if (isLoggedIn Please log in above to post a comment.