(function($) { $( document ).ready( function () { $( 'body' ).on( 'click', '.latest-odds-widget .top-nav-item', function() { var current_game_type_id = $(this).attr('id'); var url = ''; $( '.latest-odds-widget #latest-odds-loading-image' ).css("display", 'block'); if ( 'latest_odds_widget_tvshow' == current_game_type_id ) { game_type = 'tvshows'; $( '.latest-odds-widget #latest_odds_widget_tvshow' ).addClass( 'active-desktop-main-top' ); $( '.latest-odds-widget #latest_odds_widget_tvshow' ).removeClass( 'inactive-desktop-main-top' ); $( '.latest-odds-widget #latest_odds_widget_awards' ).removeClass( 'active-desktop-main-top' ); $( '.latest-odds-widget #latest_odds_widget_awards' ).addClass( 'inactive-desktop-main-top' ); } else { game_type = 'awardshows'; $( '.latest-odds-widget #latest_odds_widget_tvshow' ).removeClass( 'active-desktop-main-top' ); $( '.latest-odds-widget #latest_odds_widget_tvshow' ).addClass( 'inactive-desktop-main-top' ); $( '.latest-odds-widget #latest_odds_widget_awards' ).addClass( 'active-desktop-main-top' ); $( '.latest-odds-widget #latest_odds_widget_awards' ).removeClass( 'inactive-desktop-main-top' ); } url = '/wp-json/gameplay-api/v1/app/odds-hub/' + game_type + '/', $.ajax( { method: "GET", url: url, success: function (response) { success_callback( response, game_type, 'first' ); }, fail: function (response) { } } ); }, ); $( 'body' ).on( 'click', '.latest-odds-widget .top-navigation .item', function() { var current_event_id = $(this).attr('id'); if ( $(this).hasClass( 'active' ) ) { return; } var url = ''; $( '.latest-odds-widget #latest-odds-loading-image2' ).css("display", 'block'); $( '.latest-odds-widget .item' ).removeClass( 'active' ); $(this).addClass("active"); game_type = $( '.latest-odds-widget #odds_widget_current_game_type' ).text(); odds_widget_current_category_id = $( '.latest-odds-widget #odds_widget_current_category_id' ).text(); odds_widget_current_user_type = $( '.latest-odds-widget #odds_widget_current_user_type' ).text(); url = '/wp-json/gameplay-api/v1/app/odds-hub/' + game_type + '/' + odds_widget_current_user_type + '/' + current_event_id, $.ajax( { method: "GET", url: url, success: function (response) { success_callback( response, game_type, 'second' ); }, fail: function (response) { } } ); }, ); $( 'body' ).on( 'change', '.latest-odds-widget #category_dropdown', function() { var category_id = $(this).val(); var url = ''; $( '.latest-odds-widget #latest-odds-loading-image3' ).css("display", 'block'); game_type = $( '.latest-odds-widget #odds_widget_current_game_type' ).text(); odds_widget_current_event = $( '.latest-odds-widget #odds_widget_current_event' ).text(); odds_widget_current_user_type = $( '.latest-odds-widget #odds_widget_current_user_type' ).text(); url = '/wp-json/gameplay-api/v1/app/odds-hub/' + game_type + '/' + odds_widget_current_user_type + '/' + odds_widget_current_event + '/' + category_id, $.ajax( { method: "GET", url: url, success: function (response) { success_callback( response, game_type, 'third' ); }, fail: function (response) { } } ); }, ); $( 'body' ).on( 'change', '.latest-odds-widget #user_type_dropdown', function() { var user_type = $(this).val(); usr_type = 'combined'; if ( 'expert' == user_type ) { usr_type = 'expert'; } else if ( 'editor' == user_type ) { usr_type = 'editor'; } else if ( 'top24' == user_type ) { usr_type = 'top24'; } else if ( 'star24' == user_type ) { usr_type = 'star24'; } else if ( 'users' == user_type ) { usr_type = 'user'; } var url = ''; $( '.latest-odds-widget #latest-odds-loading-image3' ).css("display", 'block'); game_type = $( '.latest-odds-widget #odds_widget_current_game_type' ).text(); odds_widget_current_event = $( '.latest-odds-widget #odds_widget_current_event' ).text(); odds_widget_current_category_id = $( '.latest-odds-widget #odds_widget_current_category_id' ).text(); url = '/wp-json/gameplay-api/v1/app/odds-hub/' + game_type + '/' + usr_type + '/' + odds_widget_current_event + '/' + odds_widget_current_category_id, $.ajax( { method: "GET", url: url, success: function (response) { success_callback( response, game_type, 'third' ); }, fail: function (response) { } } ); }, ); } ); function success_callback( response, game_type, resp_type ){ $( '.latest-odds-widget #latest-odds-loading-image' ).css("display", 'none'); $( '.latest-odds-widget #latest-odds-loading-image2' ).css("display", 'none'); $( '.latest-odds-widget #latest-odds-loading-image3' ).css("display", 'none'); if ( 'first' == resp_type ) { $( '.latest-odds-widget #latest-odds-data-container-main' ).empty(); var $wrapper = $( '
' ).attr( 'id', 'latest-odds-widget-container' ); /***** Loading image starts here ******/ var $loading_img_div = $( '
' ).attr( 'id', 'latest-odds-loading-image' ); $loading_img_div.css( 'display', 'none' ); $loadin_img = $( '' ).attr( 'src', '/wp-content/themes/vip/pmc-goldderby/assets/images/loading.gif' ); $loadin_img.attr( 'alt', 'Loading...' ); $loading_img_div.append( $loadin_img ); $wrapper.append( $loading_img_div ); /***** Loading image ends here ******/ var $latest_odds_dynamic_area = $( '
' ).attr( 'id', 'latest-odds-dynamic-area' ); /***** Game names (top navigation) starts here ******/ var $top_navitation = $( '
' ).attr( 'class', 'top-navigation' ); $.each( response.top_navigation, function (i, nav_item) { cl = 'item'; if ( nav_item.league_id == response.selected_league_id ) { cl = 'item active'; } $item = $( '
' ).attr( 'class', cl ); $item.attr( 'id', nav_item.league_id ); $item.text( nav_item.title ); $top_navitation.append( $item ); } ); $latest_odds_dynamic_area.append( $top_navitation ); /***** Game names (top navigation) ends here ******/ } else if ( 'second' == resp_type ){ $( '.latest-odds-widget #second_sec' ).empty(); } else { $( '.latest-odds-widget .latest-odds-user-data-container' ).empty(); } if ( 'third' !== resp_type ) { $second_sec = $( '
' ).attr( 'id', 'second_sec' ); /***** Loading image in second_sec starts here ******/ var $loading_img_div = $( '
' ).attr( 'id', 'latest-odds-loading-image2' ); $loading_img_div.css( 'display', 'none' ); $loadin_img = $( '' ).attr( 'src', '/wp-content/themes/vip/pmc-goldderby/assets/images/loading.gif' ); $loadin_img.attr( 'alt', 'Loading...' ); $loading_img_div.append( $loadin_img ); $second_sec.append( $loading_img_div ); /***** Loading image in second_sec ends here ******/ /***** Current League Title starts here ******/ $league_title = $( '
' ).attr( 'class', 'league_title' ); $league_title.text( response.selected_league_title ); $second_sec.append( $league_title ); /***** Current League Title ends here ******/ $cat_usertype_dropdown_div = $( '
' ).attr( 'class', 'cat-usertype-dropdown-div' ); /***** Category dropdown starts here ******/ $custom_dropdown = $( '' ).attr( 'class', 'custom-dropdown cat-dropdown' ); $select = $( '' ).attr( 'id', 'category_dropdown' ); $.each( response.categories, function (i, cat) { $option = $( '' ).attr( 'value', cat.category_id ); $option.text( cat.category_title ); $select.append( $option ); } ); $custom_dropdown.append( $select ); $cat_usertype_dropdown_div.append( $custom_dropdown ); /***** Category dropdown ends here ******/ /***** user type dropdown starts here ******/ var sortData = [ { value: "combined" }, { value: "editor" }, { value: "top24" }, { value: "star 24" }, { value: "users" }, ]; if ( 'awardshows' == game_type ) { sortData = [ { value: "combined" }, { value: "expert" }, { value: "editor" }, { value: "top24" }, { value: "star24" }, { value: "users" }, ]; } $custom_dropdown = $( '' ).attr( 'class', 'custom-dropdown flr' ); $select = $( '' ).attr( 'id', 'user_type_dropdown' ); $.each( sortData, function (i, usertype) { $option = $( '' ).attr( 'value', usertype.value ); $option.text( usertype.value ); $select.append( $option ); } ); $custom_dropdown.append( $select ); $cat_usertype_dropdown_div.append( $custom_dropdown ); /***** user type dropdown ends here ******/ $second_sec.append( $cat_usertype_dropdown_div ); /******** Data heading starts here ********/ $data_heading = $( '
' ).attr( 'class', 'data-heading' ); $f_column = $( '
' ).attr( 'class', 'f_column' ); $f_column.text( 'Nominees' ); $data_heading.append( $f_column ); $s_column = $( '
' ).attr( 'class', 's_column' ); $s_column.text( 'Top Choice' ); $data_heading.append( $s_column ); $t_column = $( '
' ).attr( 'class', 't_column' ); $t_column.text( 'Odds' ); $data_heading.append( $t_column ); $second_sec.append( $data_heading ); /******** Data heading ends here ********/ } /******** Main data container starts here ********/ if ( $( '.latest-odds-widget .latest-odds-user-data-container' ).length && $( ".latest-odds-widget .latest-odds-user-data-container" ).text() == '' ) { $user_data_container = $( '
' ).attr( 'class', 'latest-odds-user-data-container2' ); } else { $user_data_container = $( '
' ).attr( 'class', 'latest-odds-user-data-container' ); } /***** Loading image in second_sec starts here ******/ var $loading_img_div = $( '
' ).attr( 'id', 'latest-odds-loading-image3' ); $loading_img_div.css( 'display', 'none' ); $loadin_img = $( '' ).attr( 'src', '/wp-content/themes/vip/pmc-goldderby/assets/images/loading.gif' ); $loadin_img.attr( 'alt', 'Loading...' ); $loading_img_div.append( $loadin_img ); $user_data_container.append( $loading_img_div ); /***** Loading image in second_sec ends here ******/ $.each( response.odds, function (i, odd) { $user_data = $( '
' ).attr( 'class', 'user-data' ); $data1 = $( '
' ).attr( 'class', 'data1' ); $data1.text( parseInt(i) + 1 + '.' ); $user_data.append( $data1 ); $data2 = $( '
' ).attr( 'class', 'data2' ); $img = $( '' ).attr( 'src', odd.nominee_image ); $data2.append( $img ); $user_data.append( $data2 ); $data3 = $( '
' ).attr( 'class', 'data3' ); $data3.text( odd.candidate_title ); $user_data.append( $data3 ); $data4 = $( '
' ).attr( 'class', 'data4' ); $data4.text( odd.top_choice ); $user_data.append( $data4 ); $data5 = $( '
' ).attr( 'class', 'data5' ); $data5.text( odd.fractional_odds ); $user_data.append( $data5 ); $user_data_container.append( $user_data ); } ); /********* Add hiddend data starts here ************/ $hidden1 = $( '
' ).attr( 'id', 'odds_widget_current_event' ); $hidden1.css( 'display', 'none' ); $hidden1.text( response.selected_league_id ); $user_data_container.append( $hidden1 ); $hidden1 = $( '
' ).attr( 'id', 'odds_widget_current_category_id' ); $hidden1.css( 'display', 'none' ); $hidden1.text( response.selected_category_id ); $user_data_container.append( $hidden1 ); $hidden1 = $( '
' ).attr( 'id', 'odds_widget_current_user_type' ); $hidden1.css( 'display', 'none' ); $hidden1.text( response.selected_user_type ); $user_data_container.append( $hidden1 ); $hidden1 = $( '
' ).attr( 'id', 'odds_widget_current_game_type' ); $hidden1.css( 'display', 'none' ); $hidden1.text( game_type ); $user_data_container.append( $hidden1 ); /********* Add hiddend data ends here ************/ if ( 'third' !== resp_type ) { $second_sec.append( $user_data_container ); } /******** Main data container ends here ********/ if ( 'first' == resp_type ) { $latest_odds_dynamic_area.append( $second_sec ); $wrapper.append( $latest_odds_dynamic_area ); } if ( 'first' == resp_type ) { $( '.latest-odds-widget #latest-odds-data-container-main' ).append( $wrapper ); } else if ( 'second' == resp_type ) { $( '.latest-odds-widget #second_sec' ).append( $second_sec ); } else { $( '.latest-odds-widget .latest-odds-user-data-container' ).append( $user_data_container ); } $( '.lateset-odds-widget-more-link-text a' ).attr( 'href', '/odds/' + response.selected_user_type + '-odds/' + response.selected_league_slug + '/' ); return; } })(jQuery); ; (function($) { $( document ).ready( function() { $( '.join-conversation-popup-container' ).css( 'display', 'block' ); $( '.join-conversation-popup-container' ).animate({ bottom: '200' }, 2000 ); $( '.join-conversation-popup-container' ).delay(10000).animate({ bottom: '50' }, 2000 ); setInterval(function () { $( '.join-conversation-popup-container' ).animate({ bottom: '-100' }, 2000 ); $( '.join-conversation-popup-container' ).animate({ bottom: '200' }, 2000 ); $( '.join-conversation-popup-container' ).delay(10000).animate({ bottom: '50' }, 2000 ); }, 30000); } ); })( jQuery ); ; /*! This file is auto-generated */ window.addComment=function(v){var I,C,h,E=v.document,b={commentReplyClass:"comment-reply-link",commentReplyTitleId:"reply-title",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=v.MutationObserver||v.WebKitMutationObserver||v.MozMutationObserver,r="querySelector"in E&&"addEventListener"in v,n=!!E.documentElement.dataset;function t(){d(),e&&new e(o).observe(E.body,{childList:!0,subtree:!0})}function d(e){if(r&&(I=g(b.cancelReplyId),C=g(b.commentFormId),I)){I.addEventListener("touchstart",l),I.addEventListener("click",l);function t(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode)return C.removeEventListener("keydown",t),e.preventDefault(),C.submit.click(),!1}C&&C.addEventListener("keydown",t);for(var n,d=function(e){var t=b.commentReplyClass;e&&e.childNodes||(e=E);e=E.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return e}(e),o=0,i=d.length;o{if("function"==typeof n.pmcCnx)return;const c=Array.isArray(n.pmcCnx)?n.pmcCnx:n.pmcCnx.cmd||[],e=c=>({render:(e,o)=>{const r=c.settings?.plugins?.pmcCnx?.singleAutoPlay;if(r){let n;t?n=2:(t=!0,!0===r&&(n=0)),"number"==typeof n&&(c.settings={...c.settings,playbackMode:n})}n.cnx.cmd.push((()=>{n.cnx(c).render(e,((t,c)=>{n.pmc.adm.push((()=>{n.pmc.adm.attachConnatix(c)})),o&&o(t,c)}))}))}}),o=n=>{try{n.call(null)}catch(n){console.error(n)}};e.push=o,e.cmd={push:o},n.pmcCnx=e,c.forEach((n=>{e.push(n)}))})()}()}();; (function($){$.extend($.expr[":"],{"pmc-inview":function(element,index,match){var elementIsVisible=element.offsetHeight,elementPosition=element.getBoundingClientRect(),elementMiddlePosition=elementPosition.height/2+elementPosition.top;return elementIsVisible>0&&elementMiddlePosition>=0&&elementMiddlePosition<=window.innerHeight},"pmc-middle-child":function(element,index,match){var $items=$(element).parent().find(element.localName);if(3<=$items.length){return element===$items[Math.round($items.length/2)]}return false}})})(jQuery); ; !function(factory){"function"==typeof define&&define.amd?define(["jquery"],factory):"object"==typeof exports?module.exports=factory(require("jquery")):factory(jQuery)}(function($){var inviewObjects=[],viewportSize,viewportOffset,d=document,w=window,documentElement=d.documentElement,timer;function getViewportSize(){var mode,domObject,size={height:w.innerHeight,width:w.innerWidth};return size.height||!(mode=d.compatMode)&&$.support.boxModel||(size={height:(domObject="CSS1Compat"===mode?documentElement:d.body).clientHeight,width:domObject.clientWidth}),size}function getViewportOffset(){return{top:w.pageYOffset||documentElement.scrollTop||d.body.scrollTop,left:w.pageXOffset||documentElement.scrollLeft||d.body.scrollLeft}}function checkInView(){if(inviewObjects.length){var i=0,$elements=$.map(inviewObjects,function(inviewObject){var selector=inviewObject.data.selector,$element=inviewObject.$element;return selector?$element.find(selector):$element});for(viewportSize=viewportSize||getViewportSize(),viewportOffset=viewportOffset||getViewportOffset();iviewportOffset.top&&elementOffset.topviewportOffset.left&&elementOffset.left":">",'"':""","'":"'","`":"`"},qn=Pn(t),t=Pn(An(t)),Un=m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Wn=/(.)^/,zn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Ln=/\\|'|\r|\n|\u2028|\u2029/g;function $n(n){return"\\"+zn[n]}var Cn=/^\s*(\w|\$)+\s*$/;var Kn=0;function Jn(n,r,t,e,u){return e instanceof r?(e=En(n.prototype),o(r=n.apply(e,u))?r:e):n.apply(t,u)}var M=l(function(u,o){function i(){for(var n=0,r=o.length,t=Array(r),e=0;e{var activeConsentGroups,ga3Dimensions,activeConsentGroups,ga3Dimensions;getGA3Dimensions&&getGA4Dimensions&&(activeConsentGroups=window.pmc_onetrust_helpers?.getActiveConsentGroups?.()||[],ga3Dimensions=getGA3Dimensions(activeConsentGroups),activeConsentGroups=getGA4Dimensions(activeConsentGroups),"undefined"!=typeof pmc_ga_mapped_dimensions&&"undefined"!=typeof pmc_ga_dimensions&&pmc_ga_mapped_dimensions["pageview-id"]&&(ga3Dimensions[ga3Dimensions="dimension"+pmc_ga_mapped_dimensions["pageview-id"].toString()]=pvuuid,pmcGaCustomDimensions[ga3Dimensions]=pvuuid),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"VirtualPageView","pageview-type":"virtual_page","pageview-id":pvuuid,...activeConsentGroups}))};window.pmcGATriggered?sendVirtualPageview():pmc.hooks.add_action("pmc_ga_triggered",sendVirtualPageview),blogherads.adq.push(function(){try{blogherads.setPageMetaData(window.pmc_fpd||{}),blogherads.trackPageView(!0)}catch(e){}})}}),pmc_analytics_queues=(pmc.hooks.add_filter("pmc_event_tracking_social_data",function(socialEvent,socialNetwork){if(events.length<=0||null===socialNetwork)return null;var socialNetwork=socialNetwork.toLowerCase(),selector="pinit"===socialNetwork?".btn-pinterest":".btn-"+socialNetwork,index=null,socialNetwork;if(null===socialEvent)for(var i=0;i