var customStyle = `
.chronosDefault a,
.chronosDefault a:link,
.chronosDefault a:visited {
  color: CustomBackgroundColor;
}

.chronosDefault .TeamPage_newsHolder a,
.chronosDefault .TeamPage_newsHolder a:link,
.chronosDefault .TeamPage_newsHolder a:visited,
.chronosDefault .TeamPage_gridColumn a,
.chronosDefault .TeamPage_gridColumn a:link,
.chronosDefault .TeamPage_gridColumn a:visited,
.chronosDefault .innerpage-content-wrapper .ModLinksC a,
.chronosDefault .innerpage-content-wrapper .ModLinksC a:link,
.chronosDefault .innerpage-content-wrapper .ModLinksC a:visited,
.chronosDefault .innerpage-content-wrapper .ModDNNHTMLC a,
.chronosDefault .innerpage-content-wrapper .ModDNNHTMLC a:link,
.chronosDefault .innerpage-content-wrapper .ModDNNHTMLC a:visited {
  color: CustomBackgroundColor;
}

a.sWebTheme_showSettings:hover,
a.sWebTheme_showSettings:link:hover,
a.sWebTheme_showSettings:visited:hover {
  background-color: CustomBackgroundColor;
  color: CustomFontColor;
}

a.sWebTheme_ActionsLinks:hover span,
a.sWebTheme_ActionsLinks:focus span,
a.sWebTheme_ActionsLinks:active span {
  background: CustomBackgroundColor;
  color: CustomFontColor;
}

.chronosDefault .skLogin a.link:hover,
.chronosDefault .skLogin a.link:focus,
.chronosDefault .skLogin a.link:active {
  background: CustomBackgroundColor;
}

#Body.chronos-color-gold .skSocial a.link:hover svg,
#Body.chronos-color-lime .skSocial a.link:hover svg,
#Body.chronos-color-sky .skSocial a.link:hover svg,
#Body.chronos-color-pink .skSocial a.link:hover svg,
#Body.chronos-color-hot-pink .skSocial a.link:hover svg {
  fill: CustomBackgroundColor;
}

#Body.chronos-color-gold .skLogin #google_translate_element:hover svg,
#Body.chronos-color-lime .skLogin #google_translate_element:hover svg,
#Body.chronos-color-sky .skLogin #google_translate_element:hover svg,
#Body.chronos-color-pink .skLogin #google_translate_element:hover svg,
#Body.chronos-color-hot-pink .skLogin #google_translate_element:hover svg {
  fill: CustomBackgroundColor;
}

#Body.chronosDefault #mobNav .navBar,
#Body.chronosDefault #mobNav .navDropDown {
  background: CustomBackgroundColor;
}

#Body.chronosDefault #mobNav .navChild .navLink,
#Body.chronosDefault #mobNav .navChild .navLink:link,
#Body.chronosDefault #mobNav .navChild .navLink:visited {
  color: CustomBackgroundColor;
}

#Body.chronosDefault #mobNav .navChild .navIcon {
  fill: CustomBackgroundColor;
}

/* Slider CSS */
/*******************************************************************/
.chronosDefault #slider942406 li.item {
  border-right-color: CustomBackgroundColor;
}

.chronosDefault #slider942406:after {
  background: CustomBackgroundRGBA(0.8);
}

.chronosDefault #slider942406 .navigation:after,
.chronosDefault #slider942406 .navigation:before {
  background: CustomBackgroundColor;
}

.chronosDefault #slider942406 .item:after {
  background: CustomBackgroundColor;
}

.chronosDefault #slider942406 a.readmore:hover,
.chronosDefault #slider942406 a.readmore:focus,
.chronosDefault #slider942406 a.readmore:active {
  color: CustomBackgroundColor;
  border-color: CustomBackgroundColor;
}

.chronosDefault #slider942406 a.prev:hover {
  border-right-color: CustomBackgroundColor;
}

.chronosDefault #slider942406 a.next:hover {
  border-left-color: CustomBackgroundColor;
}

.chronosDefault #slider942406 .pager a.selected span {
  background: CustomBackgroundColor;
}

/* News CSS */
/*******************************************************************/

.chronosDefault .skNews .news-border:hover {
  border-color: CustomBackgroundColor;
}

.chronosDefault .skNews .skNewsImage {
  background: CustomBackgroundColor;
}

.chronosDefault .skNews li.item:hover .image,
.chronosDefault .skNews li.item:hover .news-border {
  border-color: CustomBackgroundColor;
}

.chronosDefault .skNews .link .image:hover {
  border-color: CustomBackgroundColor;
}

/* Links CSS */
/********************************************************************/
.chronosDefault.chronos-color-red .skLinks a.link:hover,
.chronosDefault.chronos-color-orange .skLinks a.link:hover,
.chronosDefault.chronos-color-navy .skLinks a.link:hover,
.chronosDefault.chronos-color-maroon .skLinks a.link:hover,
.chronosDefault.chronos-color-purple .skLinks a.link:hover,
.chronosDefault.chronos-color-pink .skLinks a.link:hover,
.chronosDefault.chronos-color-lime .skLinks a.link:hover,
.chronosDefault.chronos-color-sky .skLinks a.link:hover,
.chronosDefault.chronos-color-gray .skLinks a.link:hover,
.chronosDefault.chronos-color-gold .skLinks a.link:hover,
.chronosDefault.chronos-color-plum .skLinks a.link:hover,
.chronosDefault.chronos-color-hot-pink .skLinks a.link:hover,
.chronosDefault.chronos-color-green .skLinks a.link:hover,
.chronosDefault.chronos-color-blue .skLinks a.link:hover {
  background: #fff;
}

.chronosDefault .skLinks a.link,
.chronosDefault .skLinks a.link:link,
.chronosDefault .skLinks a.link:visited {
  background: CustomBackgroundColor;
}

.chronosDefault .skTabsCnt .tweet_list a:hover,
.chronosDefault .skTabsCnt .ManageField a:hover {
  color: CustomBackgroundColor;
}

/* sponsor CSS */
/********************************************************************/
.chronosDefault .skSponsor {
  background: CustomBackgroundColor;
}

/* footer CSS */
/********************************************************************/
.chronosDefault .skFooter h2.head,
.chronosDefault .skFooter h2.head:link,
.chronosDefault .skFooter h2.head:visited {
  color: CustomBackgroundColor;
}

.chronosDefault .skSiteLink a.link:hover,
.chronosDefault .skSiteLink a.link:focus,
.chronosDefault .skSiteLink a.link:active {
  color: CustomBackgroundColor;
}

.chronosDefault .skContactus a,
.chronosDefault .skContactus a:link,
.chronosDefault .skContactus a:visited {
  color: CustomBackgroundColor;
}

/* info CSS */
/********************************************************************/
.chronosDefault .skInfo a.SkinObject:hover,
.chronosDefault .skInfo a.SkinObject:focus,
.chronosDefault .skInfo a.SkinObject:active {
  color: CustomBackgroundColor;
}

.chronosDefault a.hiddenlogin:hover,
.chronosDefault a.hiddenlogin:focus,
.chronosDefault a.hiddenlogin:active {
  color: CustomBackgroundColor;
}

/* InnerPage CSS */
/********************************************************************/
.chronosDefault .innerpage-content-wrapper .skWidth {
  background: CustomBackgroundColor;
}

.chronosDefault .skNav {
  background-color: CustomBackgroundColor;
}

.chronosDefault .skSlider {
  background: CustomBackgroundColor;
}

.chronosDefault .skTabsCnt {
  background: CustomBackgroundColor;
}

@media screen and (max-width: 942px) {
  .chronosDefault #slider942406 .pager span {
    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 rgbaRe=new RegExp("CustomBackgroundRGBA\(([^)]+)\)", "g") var css=customStyle .replace(baseRe, currentBackgroundColor) .replace(textRe, currentTextColor);
    customStyleSheet.html(css);
  }
});