var SportsubsCookieModule=function(n){return n.setCookie=function(t,i,r){var u,f;try{u=new Date;u.setTime(u.getTime()+r*864e5);f="expires="+u.toUTCString();document.cookie=t+"="+i+"; "+f}catch(e){n.handleError(e,["JavaScript","Sportsubs.setCookie"],{cookiename:t,value:i,expiry:r},null,null)}},n.getCookie=function(t){var u,f,r,i;try{for(u=t+"=",f=document.cookie.split(";"),r=0;r0){var a=u.data("lazy-url"),v=u.data("lazy-load-interval"),f=u.data("lazy-load-count");(typeof f=="undefined"||Number.isNaN(f))&&(f=0);e=u.data("lazy-max-load-count");(typeof e=="undefined"||Number.isNaN(e))&&(e=1);o=u.data("lazy-startup-delay");(typeof o=="undefined"||Number.isNaN(o)||f>0)&&(o=0);h=u.data("lazy-show-busy");typeof h=="undefined"&&(h=!1);typeof i!="undefined"&&(h=i);var y=u.data("lazy-always-function"),p=u.data("lazy-done-function"),w=u.data("lazy-content-loaded-function"),b=u.data("lazy-fail-function"),c=u,l=u.data("loading-overlay-id");_.isNil(l)||_.isEmpty(l)||$(l).length===1&&(c=$(l));k=$(u).data("load-status");k!=="error"&&(e==-1||f-1&&(n.isLoadingProducts=!0,n.productPage++,f.html('

<\/i> Loading more items...<\/em><\/p>'),o={productCategoryId:u.attr("data-product-category-id"),productSubCategoryId:u.attr("data-product-sub-category-id"),pageSize:u.attr("data-page-size"),skip:u.attr("data-skip"),removed:u.attr("data-removed-items"),searchText:u.attr("data-search-text")},$.get(e,o,function(t){if(typeof t!="undefined"&&t.trim()!==""){var i=u.children(".flex-dummy").first();i.length===1?i.before($(t)):u.append(t);f.empty();u.attr("data-skip",$(".filterable").length);$(".item-count").text($(".filterable").length);parseInt(u.attr("data-total-items"))>=$(".filterable").length?$(u).removeClass("paginated"):$(u).addClass("paginated");typeof r=="function"&&r()}else n.productPage=-1,f.html('

<\/p>')}).always(function(){n.isLoadingProducts=!1})))}catch(s){n.handleError(s,["JavaScript","Sportsubs.loadMoreItems"],null,null,null)}},n}(Sportsubs||{}),SportsubsPingModule=function(n){return n.pingRequest=null,n.startPinger=function(t,i,r){try{isFinite(i)||(i=6e4);isFinite(r)||(r=8);var u=36e5*r;n.pingRetries=Math.round(u/i);n.pinger=setInterval(function(){n.sendPing(t)},i)}catch(f){n.handleError(f,["JavaScript","Sportsubs.startPinger"],{url:t,ms:i,maxRetryHours:r},null,null)}},n.sendPing=function(t){try{(typeof n.pingRequest=="undefined"||n.pingRequest===null)&&(n.pingRequest=$.ajax({url:t,cache:!1,success:function(t){isNaN(n.pingRetries)||n.pingRetries<1?(n.stopPinger(),n.handleError(new Error("Pinger aborted: Exceeded maximum ping session."),["JavaScript","Sportsubs.sendPing"],{},null,null)):t.Success!=="True"?(n.stopPinger(),n.handleError(new Error("Pinger aborted: Error response from server."),["JavaScript","Sportsubs.sendPing"],{},null,null)):n.pingRetries=Math.max(0,n.pingRetries-1)},error:function(){n.stopPinger()},complete:function(){n.pingRequest=null}}))}catch(i){n.handleError(i,["JavaScript","Sportsubs.sendPing"],{url:t},null,null)}},n.stopPinger=function(){try{n.pingRetries=0;clearInterval(n.pinger)}catch(t){n.handleError(t,["JavaScript","Sportsubs.stopPinger"],{"Sportsubs.pingRetries":n.pingRetries},null,null)}},n}(Sportsubs||{}),SportsubsUIModule=function(n){return n.productFadeDelay=150,n.productFadeTimeouts=[],n.priceSlider=null,n.partialReadyEvent=function(){n.initAutoHideAlerts(12e3,450);n.initFormEnchancements();n.initBootstrapTooltips();n.initDatePickers();n.fadeInImageOnLoad(".fade-in-on-load");n.intDependantCheckboxToggle();n.initAddressEditorScripts();n.initPrintButtons();n.navigateToCollapsedAnchor();n.initBootstrapToggles();n.initFormChangeWarning();n.initCarousels(".jcarousel");n.setAddToCartButtonStates();n.initNumberSliders();n.initConnectedDropdowns();n.initTargetValueOnChange()},n.forceSameHeight=function(t){try{var i=-1;(typeof t=="undefined"||t==="")&&(t=".same-height");$(".same-height").each(function(){i=i>$(this).height()?i:$(this).height()});$(".same-height").each(function(){$(this).height(i)})}catch(r){n.handleError(r,["JavaScript","Sportsubs.forceSameHeight"],{selector:t,"max height":i},null,null)}},n.fitTabsToWidth=function(t,i,r){try{_.isNaN(i)&&(i=50);_.isNaN(r)&&(r=250);(typeof t=="undefined"||t==="")&&(t=".fit-tabs");$(t).each(function(){var i=$(this),u=i.innerWidth()-60,n=i.find("li");if(n.length>0){var t=-1,r=Math.min(200,Math.max(50,Math.floor(u/n.length)));n.outerWidth(r);n.each(function(){t=t>$(this).height()?t:$(this).outerHeight()});n.each(function(){$(this).outerHeight(t);$(this).find("a").first().outerWidth(r).outerHeight(t)})}})}catch(u){n.handleError(u,["JavaScript","Sportsubs.fitTabsToWidth"],{selector:t},null,null)}},n.intDependantCheckboxToggle=function(t){(typeof t=="undefined"||t==="")&&(t=".toggle-targets");$(t).on("click",function(){n.setDependantCheckboxState(this)});$(t).each(function(){n.setDependantCheckboxState(this)})},n.setDependantCheckboxState=function(t){try{var r=$(t).prop("checked"),i=$(t).data("target");i!==""&&(r?$(i).attr("disabled",!1).parent().css("cursor","pointer").removeClass("muted"):$(i).prop("checked",!1).attr("disabled",!0).parent().css("cursor","not-allowed").addClass("muted"))}catch(u){n.handleError(u,["JavaScript","Sportsubs.setDependantCheckboxState"],{element:t[0].id},null,null)}},n.initAutoHideAlerts=function(n,t){isNaN(n)&&(n=5e3);isNaN(t)&&(t=500);$(".alert-autohide").fadeTo(n,t).slideUp(t,function(){$(this).alert("close")})},n.refreshFormValidators=function(n){typeof n!="undefined"&&n!==null&&$(n).find("form").each(function(){$(this).removeData("validator");$(this).removeData("unobtrusiveValidation");$.validator.unobtrusive.parse($(this))})},n.initBootstrapToggles=function(){if(typeof $.fn.bootstrapToggle!="undefined"){$("[data-toggle='toggle']").bootstrapToggle("destroy");$("[data-toggle='toggle']").bootstrapToggle();$(".bootstrap-toggle-row").off("click.squads").on("click.squads",function(n){$(n.target).hasClass("toggle-off")||$(n.target).hasClass("toggle-on")||($toggle=$(this).find(".bootstrap-toggle").first(),$toggle.length===1&&$toggle.bootstrapToggle("toggle"))})}},n.navigateToCollapsedAnchor=function(){var u,i,t,r,f;try{for(u=window.location.hash.replace("#",""),i=u.split("/"),t=0;t0&&$("#"+r).collapse("show")}catch(e){n.handleError(e,["JavaScript","Sportsubs.navigateToCollapsedAnchor"],{location:window.location},null,null)}},n.initBootstrapTooltips=function(){$.isFunction($.fn.tooltip)&&$('[data-toggle="tooltip"]').tooltip({container:"body",placement:"top"})},n.initNumberSliders=function(){},n.previewCard=function(n){bootbox.dialog({message:'',title:"Custom card preview",buttons:{danger:{label:"Close",className:"btn-secondary",callback:function(){bootbox.hideAll()}}}})},n.fadeInImageOnLoad=function(t){try{(typeof t=="undefined"||t==="")&&(t=".fade-in-on-load");$(t).each(function(){if(this.complete)$(this).css("opacity","1");else $(this).off("load").on("load",function(){$(this).css("opacity")==="0"&&$(this).css("opacity","1")})})}catch(i){n.handleError(i,["JavaScript","Sportsubs.fadeInImageOnLoad"],{fadeClass:t},null,null)}},n.initPrintButtons=function(){$(".print-button").off("click.sportsubs").on("click.sportsubs",function(){var t=$(this).data("print-content-id");typeof t!="undefined"&&t!==""&&n.printElementContent(t)})},n.getValueRange=function(){var t;try{var i=0,r=0,u=$("[data-low-value]").map(function(){return parseFloat($(this).data("low-value"))}).get();return typeof u!="undefined"&&u!==null&&u.length>0&&(i=Math.floor(Math.min.apply(Math,u))),t=$("[data-high-value]").map(function(){return parseFloat($(this).data("high-value"))}).get(),typeof t!="undefined"&&t!==null&&t.length>0&&(r=Math.ceil(Math.max.apply(Math,t))),isNaN(i)&&(i=0),isNaN(r)&&(r=0),{min:i,max:r}}catch(f){n.handleError(f,["JavaScript","Sportsubs.getValueRange"],null,null,null)}},n.filterByRange=function(t){try{typeof t!="undefined"&&t!==null&&($(".filterable").not(function(){return parseInt($(this).attr("data-low-value"))>=t[0]&&parseInt($(this).attr("data-high-value"))<=t[1]}).hide(),$(".filterable").filter(function(){return parseInt($(this).attr("data-low-value"))>=t[0]&&parseInt($(this).attr("data-high-value"))<=t[1]}).fadeIn("fast"))}catch(i){n.handleError(i,["JavaScript","Sportsubs.filterByRange"],{minMax:t},null,null)}},n.fadeInObject=function(t){typeof t!="undefined"&&t.jquery&&t.fadeIn(n.productFadeDelay)},n.fadeOutObject=function(n){typeof n!="undefined"&&n.jquery&&n.hide()},n.showHiddenFilterables=function(){$(".filterable:hidden").fadeOut().hide().each(function(t){n.productFadeTimeouts[t]=setTimeout(n.fadeInObject,t*n.productFadeDelay,$(this))})},n.refreshProductLayout=function(){var i,t;try{n.showHiddenFilterables();i=Math.max.apply(Math,$(".filterable").map(function(){return $(this).height()}).get());$(".same-tile-height").each(function(){$(this).height(i)});n.priceSlider!==null&&typeof n.priceSlider.noUiSlider!="undefined"&&n.priceSlider.noUiSlider!==null&&(t=n.getValueRange(),n.priceSlider.noUiSlider.updateOptions({range:t}),n.priceSlider.noUiSlider.set([t.min,t.max]));n.fadeInImageOnLoad(".fade-in-on-load")}catch(r){n.handleError(r,["JavaScript","Sportsubs.refreshProductLayout"],null,null,null)}},n.setAddToCartButtonStates=function(t){try{(typeof t=="undefined"||t===null||t==="")&&(t="button.add-to-cart");$(t).each(function(){n.setAddToCartButtonState(this)})}catch(i){n.handleError(i,["JavaScript","Sportsubs.setAddToCartButtonStates"],null,null,null)}},n.setAddToCartButtonState=function(t){var r,i;try{r=$(t).closest("form");r.length===1&&(i=r.find("button.add-to-cart"),i.length===1&&(i.parent().tooltip("dispose"),i.prop("disabled")===!0&&(i.css("pointer-events","none"),i.hasClass("addtocartdisabled")?i.parent().attr("title",i.attr("data-add-to-cart-disabled-message")):i.hasClass("outofstock")?i.parent().attr("data-original-title","Sold out"):i.parent().attr("title","Not available")),i.hasClass("addtocartdisabled")||(n.addToCartFormIsValid(r)?(i.css("pointer-events","all"),i.prop("disabled",!1),i.parent().attr("title","")):(i.prop("disabled",!0),i.parent().attr("title","Choose a size/quantity before adding to cart"))),i.prop("disabled")===!0&&i.parent().tooltip({container:"body",placement:"top",trigger:"focus hover"})))}catch(u){n.handleError(u,["JavaScript","Sportsubs.setAddToCartButtonState"],null,null,null)}},n.addToCartFormIsValid=function(t){try{var r=!0,i=$(t).find("input.quantity-input"),u=$(t).find(".select-size");return i.length>0&&(!$.isNumeric(i.val())||i.val()<1)&&(r=!1),i.length>0&&i.val()>10&&i.val("10"),u.length>0&&(!$.isNumeric(u.val())||u.val()<1)&&(r=!1),r}catch(f){n.handleError(f,["JavaScript","Sportsubs.addToCartFormIsValid"],null,null,null)}},n.initialisePriceSlider=function(t,i,r){var s,h;try{if($(i).length===1){var o=n.getValueRange(),u=o.min,f=o.max;if(u===f||$(r).length<2)$(i).addClass("d-none");else{n.priceSlider=document.getElementById(t);noUiSlider.create(n.priceSlider,{start:[u,f],connect:!1,margin:10,step:1,range:{min:u,max:f}});s=document.getElementById("lower-value");h=document.getElementById("upper-value");n.priceSlider.noUiSlider.on("update",function(t,i){i?h.innerHTML=t[i]:s.innerHTML=t[i];n.filterByRange(n.priceSlider.noUiSlider.get())});var e=document.createElement("div"),c=n.priceSlider.getElementsByClassName("noUi-base")[0],l=n.priceSlider.getElementsByClassName("noUi-origin");e.className+="connect";c.appendChild(e);n.priceSlider.noUiSlider.on("update",function(n,t){var r=t?"right":"left",i=l[t].style.left.slice(0,-1);t===1&&(i=100-i);e.style[r]=i+"%"});$("#sortPriceLow").click(function(){typeof tinysort=="function"&&tinysort($(r),{data:"best-price"})});$("#sortPriceHigh").click(function(){typeof tinysort=="function"&&tinysort($(r),{data:"best-price",order:"desc"})});$("#sortAlpha").click(function(){typeof tinysort=="function"&&tinysort($(r),{data:"description"})});$("#sortReverseAlpha").click(function(){typeof tinysort=="function"&&tinysort($(r),{data:"description",order:"desc"})});$(i).removeClass("d-none")}}}catch(a){n.handleError(a,["JavaScript","Sportsubs.initialisePriceSlider"],null,null,null)}},n.alert=function(n,t,i,r,u){var f={options:{backdrop:!0,closeButton:!1,animate:!1,centerVertical:!0},title:i,message:n,callback:function(n){n?_.isFunction(r)&&r():_.isFunction(u)&&u()}},e;if(i||(f.title=i),typeof bootbox!="undefined"&&typeof bootbox.alert=="function")switch(t){case"confirm":f.callback=function(n){n?_.isFunction(r)&&r():_.isFunction(u)&&u()};bootbox.confirm(f);break;default:f.callback=r;bootbox.alert(f)}else switch(t){case"confirm":e=confirm(n);e?_.isFunction(r)&&r():_.isFunction(u)&&u();break;default:alert(n)}},n.setToCenterOfParent=function(n,t,i,r){parentWidth=$(t).width();parentHeight=$(t).height();elementWidth=$(n).width();elementHeight=$(n).height();i||$(n).css("left",parentWidth/2-elementWidth/2);r||$(n).css("top",parentHeight/2-elementHeight/2)},n.initCarousels=function(){try{$('[data-jcarousel="true"]').each(function(){var n=$(this).data();(typeof n.vertical=="undefined"||n.vertical==="")&&(n.vertical=!1);(typeof n.wrap=="undefined"||n.wrap==="")&&(n.wrap="circular");(typeof n.center=="undefined"||n.center==="")&&(n.center=!1);(typeof n.jcarouselautoscroll=="undefined"||n.jcarouselautoscroll==="")&&(n.jcarouselautoscroll=!1);$(this).jcarousel({wrap:n.wrap,vertical:n.vertical,center:n.center,transitions:Modernizr.csstransitions?{transforms:Modernizr.csstransforms,transforms3d:Modernizr.csstransforms3d,easing:"ease"}:!1});var i=$(this).find("ul li").length,r=$(this).find("ul li").first().width(),u=$(this).width(),t=$(this).closest(".jcarousel-wrapper");if(t.length===1)if(i*r<\/option>").val("").text("None"));$.each(t,function(n,t){$childSelect.append($("

<\/div>",{"class":"tab-panel-group card-group responsive "+r,id:"collapse-"+t.attr("id")});$.each(e,function(){var n=$(this),o=n.attr("class")===undefined?"":n.attr("class"),s="responsive-tab accordion-toggle",r=n.parent().attr("class")===undefined?"":n.parent().attr("class"),i="card",e=n.get(0).hash.replace("#","collapse-");o.length>0&&(s+=" "+o);r.length>0&&(r=r.replace(/\bactive\b/g,""),i+=" "+r,i=i.replace(/\s{2,}/g," "),i=i.replace(/^\s+|\s+$/g,""));n.parent().hasClass("active")&&(u="#"+e);f.append($("
").attr("class",i).html($("
").attr("class","card-header").html($("

").attr("class","card-title").html($("",{"class":s,"data-toggle":"collapse","data-parent":"#collapse-"+t.attr("id"),href:"#"+e,"data-target":"#"+e,html:n.html()})))).append($("
",{id:e,"class":"card-collapse collapse responsive-tab-collapse"})))});t.next().after(f);t.addClass(i);$(".tab-content.responsive").addClass(i);u&&$(u).collapse("show")});n.responsiveTabCheckResize();n.bindTabToCollapse()},n.responsiveTabCheckResize=function(){$(".card-group.responsive").is(":visible")===!0&&n.responsiveTabCurrentState==="tabs"?(n.tabToPanel(),n.responsiveTabCurrentState="card"):$(".card-group.responsive").is(":visible")===!1&&n.responsiveTabCurrentState==="card"&&(n.panelToTab(),n.responsiveTabCurrentState="tabs")},n.tabToPanel=function(){var n=$(".nav-tabs.responsive");$.each(n,function(n,t){var i=$(t).next(".tab-content").find(".tab-pane");$.each(i,function(n,t){var i=$(t).attr("id").replace(/^/,"#collapse-");$(t).removeClass("tab-pane").addClass("card-body previous-tab-pane").appendTo($(i))})})},n.panelToTab=function(){var n=$(".card-group.responsive");$.each(n,function(n,t){var i=$(t).attr("id").replace("collapse-","#"),r=$(i).next(".tab-content")[0],u=$(t).find(".card-body.previous-tab-pane");u.removeClass("card-body previous-tab-pane").addClass("tab-pane").appendTo($(r))})},n.bindTabToCollapse=function(){var t=$(".nav-tabs.responsive").find("li a"),i=$(".card-group.responsive").find(".card-collapse");t.on("shown.bs.tab",function(t){var i,r;n.responsiveTabCurrentState==="tabs"&&(i=$(t.currentTarget.hash.replace(/#/,"#collapse-")),i.collapse("show"),t.relatedTarget&&(r=$(t.relatedTarget.hash.replace(/#/,"#collapse-")),r.collapse("hide")))});i.on("shown.bs.collapse",function(t){var i,r,u;n.responsiveTabCurrentState==="panel"&&(i=$(t.target),i.length===1&&typeof i.attributes!="undefined"&&(r=i.attributes.id.replace(/collapse-/g,"#"),$('a[href="'+r+'"]').tab("show"),u=$(t.currentTarget).closest(".card-group.responsive"),$(u).find(".card-body").removeClass("active"),$(t.currentTarget).find(".card-body").addClass("active")))})},$(window).resize(function(){n.responsiveTabCheckResize()}),n}(Sportsubs||{}),SportsubsCmsModule=function(n){return n.Cms=function(){var rr=function(){console.log("this is a private method");return},r=function(t){var r,i;try{if(t!=null&&t.length===1&&n.Cms.settings.canEditWidgets){var u=n.isValueTrue(t.attr("data-cms-editable")),f=n.isValueTrue(t.attr("data-cms-published")),e=n.isValueTrue(t.attr("data-cms-positionable")),o=n.isValueTrue(t.attr("data-cms-removeable")),s=n.isValueTrue(t.attr("data-cms-edit-inline")),h=n.isValueTrue(t.attr("data-cms-edit-status"))&&n.Cms.settings.canPublish,c=n.isValueTrue(t.attr("data-cms-edit-content"));t.remove(".cms-widget-edit-menu");r=$("
",{"class":"cms-widget-overlay"}).appendTo(t);i=$("",{"class":"cms-widget-edit-menu"}).appendTo(r);o&&$("",{"class":"cms-button-remove action-buttons",html:'<\/i>'}).appendTo(i);e&&$("",{"class":"cms-button-drag action-buttons",html:'<\/i>'}).appendTo(i);u&&$("",{"class":"cms-button-settings action-buttons",html:'<\/i>'}).appendTo(i);s?($("",{"class":"cms-button-edit action-buttons",html:'<\/i>'}).appendTo(i),$("",{"class":"cms-button-save edit-buttons",html:'<\/i>'}).appendTo(i),$("",{"class":"cms-button-cancel-edit edit-buttons",html:'<\/i>'}).appendTo(i)):c&&$("",{"class":"cms-button-edit-content action-buttons",html:'<\/i>'}).appendTo(i);h&&(f?$("",{"class":"cms-button-publish-state action-buttons",html:'<\/i>'}).appendTo(i):$("",{"class":"cms-button-publish-state action-buttons",html:'<\/i>'}).appendTo(i))}}catch(l){n.handleError(l,["JavaScript","Sportsubs.Cms.addWidgetEditToolbar"],{widgetId:t.attr("data-widget-id")},null,null)}},y=function(n,t){(n==null||n=="")&&(n="An unknown error occurred, please contact support.");(t==null||t=="")&&(t="Error!");new BsToast({title:t,content:n,position:"top-left",type:"danger",icon:'<\/i>',delay:-1})},p=function(n,t){new BsToast({title:t,content:n,type:"info",position:"top-left",icon:'<\/i>',delay:6e3})},o=function(n,t){new BsToast({title:t,content:n,position:"top-left",type:"success",icon:'<\/i>',delay:6e3})},s=function(n,t){new BsToast({title:t,content:n,position:"top-left",type:"warning",icon:'<\/i>',delay:6e3})},w=function(t,i){try{var r=null;return i==null&&(i=".content-section"),$allSections=$(i),$allSections.length>0&&(r=$allSections.filter('[data-position="'+t+'"]')),r.first()}catch(u){n.handleError(u,["JavaScript","Sportsubs.Cms.findLayoutSectionById"],{id:t,sectionClass:i},null,null)}},u=function(t,i,r,u,f){try{var e=null;return f==null&&(f=".content-section"),$allSections=$(f),$allSections.length>0&&(e=$allSections.filter('[data-position="'+t+'"]'),u!=null&&u>0?e=e.filter('[data-product-id="'+u+'"]'):r!=null&&r>0?e=e.filter('[data-product-subtype-id="'+r+'"]'):i!=null&&i>0&&(e=e.filter('[data-product-type-id="'+i+'"]'))),e.first()}catch(o){n.handleError(o,["JavaScript","Sportsubs.Cms.findLayoutSectionByIdAndProductApplicability"],{id:t,insertType:insertType,insertType:insertTypeId,sectionClass:f},null,null)}},f=function(t,i,r){try{var u=null;return(typeof r=="undefined"||r==null)&&(r=".content-section"),(typeof i=="undefined"||i==null)&&(i=0),$allSections=$(r),$allSections.length>0&&(u=$allSections.filter('[data-parent-key="'+t+'"]').filter('[data-division-id="'+i+'"]')),u.first()}catch(f){n.handleError(f,["JavaScript","Sportsubs.Cms.findWidgetGroupByKey"],{key:t,sectionClass:r},null,null)}},i=function(t,i){try{var r=null;return i==null&&(i=".content-widget-container"),$allWidgets=$(i),$allWidgets.length>0&&(r=$allWidgets.filter('[data-widget-id="'+t+'"]')),r.first()}catch(u){n.handleError(u,["JavaScript","Sportsubs.Cms.findWidgetById"],{id:t,widgetClass:i},null,null)}},b=function(t,i){try{var r=null;return i==null&&(i=".content-widget-container"),$allWidgets=$(i),$allWidgets.length>0&&(r=$allWidgets.filter('[data-widget-guid="'+t+'"]')),r.first()}catch(u){n.handleError(u,["JavaScript","Sportsubs.Cms.findWidgetByKey"],{key:id,widgetClass:i},null,null)}},e=function(t,i,r,e,o,s,c,a,v){var p=!1,y;try{v==null&&(v=".content-widget-container");o==null&&(o=0);$section=e!=null&&e!=""?f(e,o):u(r,s,c,a);$section.length===1&&(y=$.parseHTML(i),y!=null&&y!==""&&($(y).appendTo($section),p=!0,$section=e!=null&&e!=""?f(e,o):u(r,s,c,a),h($section),l(t)))}catch(w){n.handleError(w,["JavaScript","Sportsubs.Cms.insertWidgetIntoSection"],{sectionId:r,parentWidgetKey:e,divisionId:o,catId:catId,subcatId:subcatId,containerClass:v},null,null)}finally{return p}},k=function(n){var t=[];return n!=null&&n.length===1&&($allItems=n.children(".content-widget"),$allItems.each(function(n){var i=$(this).attr("data-widget-id");$(this).attr("data-display-order",n);t.push({key:i,value:n})})),t},h=function(t){t!=null&&t.length===1&&(n.Cms.removeFlexBoxBreaks(t),$sectionWidgets=t.children(".content-widget"),$sectionWidgets.sort(function(n,t){return $(n).data("display-order")+1-($(t).data("display-order")+1)}).appendTo(t),n.Cms.addFlexBoxBreaks(t))},d=function(t,i,r){var u=null;try{(r==null||r==="")&&(r="#cmsWidgetSettings");u=$(r);u.length===1&&(i!=null&&u.find(".modal-body").html(i),t!=null&&u.find(".modal-title").html(t),u.hasClass("in")||u.modal("show"),$("#cmsSidebar").removeClass("active"))}catch(f){n.handleError(f,["JavaScript","Sportsubs.Cms.openWidgetEditModal"],{id:$id,title:t},null,null)}finally{return u}},c=function(n){n==null&&(n="#cmsWidgetSettings");var t=$(n);t.length===1&&t.hasClass("show")&&t.modal("hide")},g=function(t,i,r){var u=null;try{(r==null||r==="")&&(r="#cmsFileManager");u=$(r);u.length===1&&(i!=null&&u.find(".modal-body").html(i),t!=null&&u.find(".modal-title").html(t),u.hasClass("in")||u.modal("show"))}catch(f){n.handleError(f,["JavaScript","Sportsubs.Cms.openFileManagerModal"],{id:$id,title:t},null,null)}finally{return u}},nt=function(n){n==null&&(n="#cmsFileManager");var t=$(n);t.length===1&&t.hasClass("show")&&t.modal("hide")},tt=function(n,t,i,r,u){var f=$(n);f!=null&&f.length===1&&(f.attr("data-widget-id",t),r===1?(f.attr("data-cms-published","True"),f.removeClass("cms-draft"),f.addClass("cms-published")):(f.attr("data-cms-published","False"),f.removeClass("cms-published"),f.addClass("cms-draft")),u!=null&&f.attr("data-display-order",u))},l=function(t){n.debugMessage("Function: "+arguments.callee.name+"WidgetId: "+t);n.partialReadyEvent();var i=n.Cms.findWidgetById(t);n.refreshFormValidators(i)},it=function(n){n!=null&&n.length===1&&n.find(".flex-line-break").remove()},rt=function(n){n!=null&&n.length===1&&n.find(".content-widget-container.break-before, .content-widget-container.break-after").each(function(){var t=$(this).attr("data-widget-id"),n=$(this);n.hasClass("break-after")&&$("
",{dataWidgetId:t,"class":"flex-line-break break-after"}).insertAfter(n);n.hasClass("break-before")&&$("
",{dataWidgetId:t,"class":"flex-line-break break-before"}).insertBefore(n)})},ut=function(){},ft=function(n,t){if(t!==null&&($selectedElement=$(t.file.element),$selectedElement.length===1)){var i=$selectedElement.closest(".modal"),r=i.attr("data-update-field"),u=i.attr("data-parent-selector");if(r!=null){var s=document.getElementById(r),f="",e=t.file.fileManager.currentPath,o=t.file.encodedName;f=e?e+"/"+o:o;$("#"+r).val(f);$("#"+r).closest(".file-chooser").find(".file-chooser-preview").attr("src",t.file.imageSrc)}i.hasClass("show")&&i.modal("hide");u!=null&&$(u).modal("show")}},et=function(n){n!=null&&n||(n=".cms-applicable");$(n).addClass("cms-edit-disabled")},a=function(n){n!=null&&n||(n=".cms-applicable");$(n).removeClass("cms-edit-disabled")},ot=function(n){n!=null&&n||(n=".cms-toolbox-popover");$(n).popover("dispose")},st=function(n){n!=null&&n||(n=".cms-toolbox-popover");$(document).popover({selector:n,trigger:"hover",delay:{show:750,hide:100},template:'