var customStyle = `
.TeamPage_newsHolder a, 
.TeamPage_newsHolder a:link, 
.TeamPage_newsHolder a:visited,
.TeamPage_gridColumn a,
.TeamPage_gridColumn a:link,
.TeamPage_gridColumn a:visited,
.skCntWrapper .ModLinksC a,
.skCntWrapper .ModLinksC a:link,
.skCntWrapper .ModLinksC a:visited,
.skCntWrapper .ModDNNHTMLC a,
.skCntWrapper .ModDNNHTMLC a:link,
.skCntWrapper .ModDNNHTMLC a:visited {
	color: CustomBackgroundColor;
}

a, 
a:visited {
	color: CustomBackgroundColor;
}

.sWebTheme_ActionsArea a.sWebTheme_showSettings:active, 
.sWebTheme_ActionsArea a.sWebTheme_showSettings:hover, 
.sWebTheme_ActionsArea a.sWebTheme_showSettings:focus {
	background-color: CustomBackgroundColor;
	color: CustomFontColor;
}

#sWebHome_ActionsBar 
.sWebTheme_showSettings:hover{
	background-color: CustomBackgroundColor;
	color: CustomFontColor;
}

.dtContainer h2.head,
.dtContainer h2.head .title {
	background-color: CustomBackgroundColor;
}

.skNav,
.skSponsor {
	background-color: CustomBackgroundColor;
}

#dnnStandardMenu .mi1 .txt:hover, 
#dnnStandardMenu .mi2 .txt:hover {
	color: CustomBackgroundColor;
}

#dnnStandardMenu .mi1 .txt:hover svg, 
#dnnStandardMenu .mi2 .txt:hover svg {
	fill: CustomBackgroundColor;
}

#dnnStandardMenu .mi1:hover {
	color: CustomBackgroundColor;
}

#slider800420 .caption-bg:before {
	border-bottom-color: CustomBackgroundColor;
}

#slider800420 .caption-bg:after {
	background: CustomBackgroundColor;
}

.pager span.selected, 
.pager span.active {
	background: CustomBackgroundColor;
}

.skRight ::-webkit-scrollbar-track {
	background-color: CustomBackgroundColor;
}

.skRight ::-webkit-scrollbar {
	background-color: CustomBackgroundColor;
}

.skNavTabs {
	background-color: CustomBackgroundColor;
}

.skNews .date {
	color: CustomBackgroundColor;
}

.skNews h3.title a:hover {
	color: CustomBackgroundColor;
}

.inner h1,
.inner h2,
.inner h3,
.inner h4 {
	color: CustomBackgroundColor;
}

.datewrp .date,
.timeTitle .time {
	color: CustomBackgroundColor;
}

.timeTitle .title:hover {
	color: CustomBackgroundColor;
}

.skAboutus a,
.skHighlight a {
	color: CustomBackgroundColor;
}

.skTabsCnt a.btnblue {
	background: CustomBackgroundColor;
}

.cbField a.btnblue {
	background: CustomBackgroundColor;
}

.skTabsCnt::-webkit-scrollbar-thumb {
	background-color: CustomBackgroundColor;
}

.cbfield h2.head {
	background-color: CustomBackgroundColor;
}

.cbHelpful h2.head {
	background-color: CustomBackgroundColor;
}

.skSponsor {
	background-color: CustomBackgroundColor;
}

.skFooter .head {
	color: CustomBackgroundColor;
}

.skContact a:link, 
.skContact a:visited {
	color: CustomBackgroundColor;
}

.skSiteLink a.link:hover, 
.skSiteLink a.link:focus, 
.skSiteLink a.link:active {
	color: CustomBackgroundColor;
}

.skInfo a, 
.skInfo span{
	color: #222222;
}

.skInfo a:hover, 
.skInfo a:focus, 
.skInfo a:active {
	color: CustomFontColor;
}

.skInfo .skHiddenLogin:hover, 
.skInfo .skHiddenLogin:focus, 
.skInfo .skHiddenLogin:active, 
.skInfo .skHiddenLogin:link:hover, 
.skInfo .skHiddenLogin:link:focus, 
.skInfo .skHiddenLogin:link:active, 
.skInfo .skHiddenLogin:visited:hover, 
.skInfo .skHiddenLogin:visited:focus, 
.skInfo .skHiddenLogin:visited:active {
	color: CustomBackgroundColor;
}

.nav .item:first-child a.active,
.nav .item:first-child a:hover {
	background-color: CustomFontColor;
}

.nav a.active, 
.nav a:hover {
	background-color: CustomFontColor;
}

.cbSocial h2.head {
	background-color: CustomFontColor;
}

#Body #mobNav .navBar {
	background: CustomBackgroundColor;
}

#Body #mobNav .navDropDown {
	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;
}

.cbfield, 
.cbSocial,
.skFeedsTwitter,
.skFeedsFacebook,
.cbHelpful h2.head{
	background-color: #ffffff;
} 

@media screen and (max-width: 940px) {
	.mobTabLink {
		background-color: CustomBackgroundColor;
	}

	.mobTabLink .active:link, 
	.mobTabLink .active:visited {
		background-color: CustomBackgroundColor;
	}

	.cbfield h2.head,
	.cbSocial h2.head,
	.skFeedsTwitter h2.head,
	.skFeedsFacebook h2.head,
	.cbHelpful h2.head {
		color: CustomBackgroundColor;
	}

	.skFooter h3.head {
		background-color: CustomBackgroundColor;
	}
}

@media screen and (max-width: 768px) {
	.skLogin .btn, 
	.skLogin .btn:link, 
	.skLogin .btn:visited {
		background-color: CustomBackgroundColor;
	}

	.skSocial a svg:hover, 
	.skSocial a svg:focus, 
	.skSocial a svg:visited {
		fill: CustomBackgroundColor;
	}

	#slider800420 li::before {
		border-top-color: CustomBackgroundColor !important;
	}

	#slider800420 li .caption::after {
		border-bottom-color: CustomBackgroundColor !important;
	}

	.skArrow svg {
		fill: CustomBackgroundColor;
	}

	.cbContainer h2.head:hover {
		color: CustomBackgroundColor;
	}

	.skHighlight ::-webkit-scrollbar-thumb {
		background-color: CustomBackgroundColor;
	}
}

@media screen and (max-width: 570px) {
	.skFooter h3.head {
		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);
    }
});
