var customStyle = `

.TeamPage_newsHolder a, .TeamPage_newsHolder a:link, .TeamPage_newsHolder a:visited {
    color: CustomBackgroundColor;
}

a, a:visited {
  color: CustomBackgroundColor;
}
    
#Body .sWebTheme_Actions a.sWebTheme_ActionsLinks:hover span, #Body .sWebTheme_Actions a.sWebTheme_ActionsLinks:focus span, #Body .sWebTheme_Actions a.sWebTheme_ActionsLinks:active span {
  background: CustomBackgroundColor;
  color: CustomFontColor;
}

#Body #sWebHome_ActionsBar .sWebTheme_showSettings:hover {
  background-color: CustomBackgroundColor;
  color: CustomFontColor;
}

/*Skin Area*/
.skArea {
  background-color: CustomBackgroundColor;
}

::-webkit-scrollbar-thumb {
  background-color: CustomBackgroundColor;
}

/*Topbar Social*/
.skLogin svg:hover {
  fill: CustomBackgroundColor;
}

.skLogin .google-translater svg {
  fill: CustomBackgroundColor;
}

.skLogin a.skBtn {
  background-color: CustomBackgroundColor;
}

#Body #dnnStandardMenu .haschild.exp .roottxt.txt {
  background-color: CustomBackgroundColor;
}

#Body #dnnStandardMenu .m .txt:hover {
  background-color: CustomBackgroundColor;
}

#Body #dnnStandardMenu .roottxt.txt:hover {
  background-color: CustomBackgroundColor;
}

.slider620320 .skReadMore:hover {
  background-color: CustomBackgroundColor;
}

.skLeft .cbField h2.skHead {
  background-color: CustomFontColor;
}

.skLeft .cbField a.viewall:hover {
  background-color: CustomBackgroundColor;
}

/*Social Tab*/
.skSocialTab li {
  background-color: CustomFontColor;
}

ul.tweet_list a.tweet_screen_name:hover {
  color: CustomBackgroundColor;
}

.tweet_text a {
  color: CustomBackgroundColor;
}

/*field status*/
ul.skField .skDate {
  color: CustomBackgroundColor;
}

#cbHelpful.skLinks a.skLink i {
  background-color: CustomBackgroundColor;
}

#cbHelpful.skLinks a.skLink:hover {
  color: CustomBackgroundColor;
}

.skTabsCnt a.viewall:hover {
  background-color: CustomBackgroundColor;
  color: CustomFontColor;
}

.skNavTabs a.active {
  background-color: CustomFontColor;
}

.skNews a.skLink:hover,
.skNews .skDate {
  color: CustomBackgroundColor;
}

.skNews .skSummary a {
  color: CustomBackgroundColor;
}

.skNews .skImg:after {
  background-color: CustomBackgroundColor;
}

ul.skEventWrapper .skDate,
ul.skEventWrapper .skHead .skLink:hover {
  color: CustomBackgroundColor;
}

ul.skEventWrapper li.skItem .skIcon svg {
  fill: CustomBackgroundColor;
}

.skAboutus h1,
.skAboutus h2,
.skAboutus h3,
.skAboutus h4,
.skAboutus h5,
.skAboutus h6,
.skAboutus a,
.skHighlight h1,
.skHighlight h2,
.skHighlight h3,
.skHighlight h4,
.skHighlight h5,
.skHighlight h6,
.skHighlight a {
  color: CustomBackgroundColor;
}

.skSponsor .skNextBtn,
.skSponsor .skPrevBtn {
  border-right-color: CustomBackgroundColor;
}

.skInfo a.SkinObject:hover,
.skInfo .skHiddenLogin:hover {
  color: CustomFontColor;
}

/*Inner Page*/
#Body .skBannerWrap {
  background-color: CustomBackgroundColor;
}

@media screen and (max-width: 768px) {
  .skTopBar {
    background-color: #fff;
    color: CustomBackgroundColor;
  }
  
  .skLogin svg {
    fill: CustomBackgroundColor;
  }

  .skLeft .cbSocial h2.skHead,
  .skLeft .cbField h2.skHead,
  .skLeft .cbHelpful h2.skHead {
    background-color: CustomFontColor;
  }
  .skLeft .cbField a.viewall:hover {
    background-color: CustomBackgroundColor;
  }
  .skTabs .mobTabLink {
    background-color: CustomFontColor;
  }
  .skTabsCnt a.viewall {
    background-color: CustomBackgroundColor;
  }
  .skFooter {
    background: CustomBackgroundColor;
  }

  #Body #mobNav .navTabs .activeTab {
    border-bottom-color: CustomBackgroundColor;
  }

  #Body #mobNav .navChild .navLink, #Body #mobNav .navChild .navLink:link, #Body #mobNav .navChild .navLink:visited {
    color: CustomBackgroundColor;
  }

  #Body #mobNav .navChild .navIcon {
    fill: 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);
  }
}); 