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

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

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


.dark-theme .skArea {
    background-color: CustomBackgroundColor0;
}

/* Top Bar CSS */
/*******************************************************************/

.skTopBar a img:hover {
  filter: drop-shadow(0 0 5px CustomBackgroundColor);
}

.skLinks,
.skSponsor {
	background: CustomBackgroundColor;
}

.skAction .skLogin a.skBtn{
	color: CustomFontColor;
}

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

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

#slider805500 .skReadMore:hover,
#slider805500 .skReadMore:focus,
#slider1080500 .skReadMore:hover,
#slider1080500 .skReadMore:focus {
	color: CustomBackgroundColor;
}

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

.skSection h2.skHead,
.skNews a.skLink,
ul.skField p.skName,
.skEventHead .skEventLink,
.skSocialTab li a.skHead,
.skEventMonth,
.skEventDay,
.skContact h2.skHead,
.skFooter .skSiteLink h2.skHead {
	color: CustomBackgroundColor;
}

.skSection .viewall {
	background-color: CustomBackgroundColor;
}

.skFooter .ftContent {
	border-top-color: CustomBackgroundColor;
}

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

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

.skBottomBar .skInfo .SkinObject:hover,
.skBottomBar .skInfo .skHiddenLogin:hover  {
	color: CustomFontColor;
}

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

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

/* responsive CSS */
/********************************************************************/
@media screen and (max-width: 768px) {
	 /* Mobile menu CSS */
	#Body #mobNav .navBar {
		background: CustomBackgroundColor !important;
	}
	#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.hot-pink .navChild .navIcon {
		fill: CustomBackgroundColor;
	}
	#Body #mobNav .navChild .navIcon{
		fill: CustomBackgroundColor !important;
	}
	
	#slider805500 .skPager a span {
		background: CustomBackgroundColor;
	}
	
	.skAction .skLogin a.skBtn	{
		background-color: CustomBackgroundColor;
	}
		
	.skSection .skNews .readmore a	{
		color: 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);
    }
});
