var customStyle = `
/* Scoll Track*/
::-webkit-scrollbar-thumb {
  background-color: CustomBackgroundColor;
}

.skSection ::-webkit-scrollbar-thumb {
  background: CustomBackgroundColor;
}

a, a:link, a:visited {
    // color: CustomBackgroundColor;
}

.skAboutus a, .skAboutus a:link, .skAboutus a:visited {
    color: CustomBackgroundColor;
}

/* Skin Area CSS */
/********************************************************************/



/* Header CSS */
/*******************************************************************/
.skSocial #google_translate_element svg,
.skSocial a.link svg,
.skSocial a.link:link svg,
.skSocial a.link:visited svg {
  fill: CustomBackgroundColor;
}

.skAction .skLogin a.skBtn {
  background: CustomBackgroundColor;
}

.skAction .skLogin {
  background: CustomBackgroundColor;
}


/* Navigation CSS */
/*******************************************************************/
.skNav {
    background: CustomBackgroundColor;
}

.skNav #dnnStandardMenu .root.sel .txt, .skNav #dnnStandardMenu .root.exp .txt {
  color: CustomBackgroundColor;
}

.skNav #dnnStandardMenu .root .txt:hover {
  color: CustomBackgroundColor;
}

.skNav #dnnStandardMenu .root .mi1 .txt,
.skNav #dnnStandardMenu .root .mi2 .txt {
   color: CustomBackgroundColor;
}


/* News CSS */
/*******************************************************************/

.skSocialTab li a.skHead {
  background: CustomBackgroundColor;
}

.skSection .skHead {
  background: CustomBackgroundColor;
}

.skSocialTab li a.skHead:not(.active):hover {
  background-color: CustomBackgroundColor;
}

.skEventMonth, .skEventDay {
  color: CustomFontColor;
}

.skEventTime {
  color: CustomFontColor;
}

.skEventHead a.skEventLink:hover {
  color: CustomFontColor;
}

.skSection .viewall:hover, .skSection .viewall:focus {
  background-color: CustomBackgroundColor;
  color: CustomFontColor;
}

.skNews a.skLink:hover, .skNews a.skLink:focus {
  color: CustomFontColor;
}

.skColumnContent {
  background: CustomBackgroundColor;
}

.skColumnContent:after {
    background: linear-gradient(to bottom, rgba(0, 93, 219, 0) 0%, CustomBackgroundColor 60%, CustomBackgroundColor 100%);
    background: -webkit-linear-gradient to bottom, rgba(0, 93, 219, 0) 0%, CustomBackgroundColor 60%, CustomBackgroundColor 100%;
}


/* Field Status CSS */
/*******************************************************************/

ul.skField .skDate {
  color: CustomFontColor;
}


/* Sponsor CSS */
/*******************************************************************/

.skSpnPVLinks svg,
.skSpnNTLinks svg {
  fill: CustomBackgroundColor;
}


/* Slider CSS */
/********************************************************************/

#slider940516 a.next:hover svg,
#slider940516 a.prev:hover svg {
  fill: CustomBackgroundColor;
}

/* Footer CSS */
/********************************************************************/

.skFooter {
  background-color: CustomBackgroundColor;
}

.skBottomBar .skInfo .SkinObject:hover {
  color: CustomBackgroundColor;
}

.skBottomBar .skInfo .skHiddenLogin:hover {
  color: CustomBackgroundColor;
}

.skFooter .skSiteLink li.skSiteItem:hover:before,
.skFooter .skSiteLink li.skSiteItem:hover a.skSiteItemLink {
  color: CustomFontColor;
}

.skContact .skClubAddress a.skClubPhone,
.skContact .skClubAddress a.skClubEmail {
  color: CustomFontColor;
}

/*Inner pages*/
/********************************************************************/

.TeamPage_gridColumn a, 
.TeamPage_gridColumn a:link, 
.TeamPage_gridColumn a:visited {
  color: CustomBackgroundColor;
}

.TeamPage_normalText a, 
.TeamPage_normalText a:link, 
.TeamPage_normalText a:visited, 
.dtContent .content a, 
.dtContent .content a:link, 
.dtContent .content a:visited {
    color: CustomBackgroundColor;
}

.sWebTheme_ActionsArea a.sWebTheme_ActionsLinks:active span, 
.sWebTheme_ActionsArea a.sWebTheme_ActionsLinks:hover span, 
.sWebTheme_ActionsArea a.sWebTheme_ActionsLinks:focus span {
  background-color: CustomBackgroundColor;
  color: CustomFontColor;
}

.sWebTheme_ActionsArea a.sWebTheme_showSettings:hover {
  background-color: CustomBackgroundColor;
  color: CustomFontColor;
}

.skInner .default-header {
  background: CustomBackgroundColor;
}


/* Mobile CSS */
/********************************************************************/
#Body.athena #mobNav .navBar {
  background: CustomBackgroundColor;
}

#Body.athena #mobNav .navDropDown {
  background: CustomBackgroundColor;
}

#Body.athena #mobNav .navChild .navLink, #Body.athena #mobNav .navChild .navLink:link, #Body.athena #mobNav .navChild .navLink:visited {
  color: CustomBackgroundColor;
}

#Body.athena #mobNav .navChild .navIcon {
  fill: CustomBackgroundColor;
}

// .skSection .skColumnContent.expanded .skHead {
//   color: CustomBackgroundColor;
// }

.skSection .skNews .readmore a {
  color: CustomBackgroundColor;
}

/* responsive CSS */
/********************************************************************/

@media screen and (max-width: 768px) {
  .skSection .skColumnContent.expanded {
    background: CustomBackgroundColor;
  }
  
  #Body #slider940516 .pager a.selected {
    background: CustomBackgroundColor;
  }
}`

$(document).ready(function () {
    var customStyleSheet = $("<style type='text/css'></style>");
    var currentBackgroundColor = window.selectedBaseColor !== '' ? window.selectedBaseColor : window.currentBaseColor;
    var currentTextColor = window.selectedTextColor !== '' ? window.selectedTextColor : window.currentTextColor;

    $("body").append(customStyleSheet);
    $("#themecolor")
        .val(currentBackgroundColor)
        .change(function (event) {
            applyCustomColor();
        });

    $("#textcolor")
        .val(currentTextColor)
        .change(function (event) {
            applyCustomColor();
        });
    
    function applyCustomColor(){
        var baseRe = new RegExp("CustomBackgroundColor", "g");
        var textRe = new RegExp("CustomFontColor", "g");
        var css = customStyle.replace(baseRe, $("#themecolor").val()).replace(textRe, $("#textcolor").val());
        customStyleSheet.html(css);
    }
});