/*----------------------------------------------------------------------------------- /* Styles Switcher -----------------------------------------------------------------------------------*/ jQuery(document).on("click", "ul.colors .color1", function(){ jQuery("#color-css" ).attr("href", function (i, attr) { return attr.replace(/color([0-9]+)/,'color1'); }); return false; }); jQuery(document).on("click", "ul.colors .color2", function(){ jQuery("#color-css" ).attr("href", function (i, attr) { return attr.replace(/color([0-9]+)/,'color2'); }); return false; }); jQuery(document).on("click", "ul.colors .color3", function(){ jQuery("#color-css" ).attr("href", function (i, attr) { return attr.replace(/color([0-9]+)/,'color3'); }); return false; }); jQuery(document).on("click", "ul.colors .color4", function(){ jQuery("#color-css" ).attr("href", function (i, attr) { return attr.replace(/color([0-9]+)/,'color4'); }); return false; }); jQuery(document).on("click", "ul.colors .color5", function(){ jQuery("#color-css" ).attr("href", function (i, attr) { return attr.replace(/color([0-9]+)/,'color5'); }); return false; }); jQuery(document).on("click", "ul.colors .color6", function(){ jQuery("#color-css" ).attr("href", function (i, attr) { return attr.replace(/color([0-9]+)/,'color6'); }); return false; }); jQuery(document).on("click", "ul.colors li a", function(e){ e.preventDefault(); jQuery(this).parent().parent().find("a").removeClass("active"); jQuery(this).addClass("active"); }); jQuery(document).on('click', '#style-switcher .bottom a.settings',function(e){ e.preventDefault(); var div = jQuery("#style-switcher"); if (div.css("left") === "-189px") { jQuery("#style-switcher").animate({ left: "0px" }); } else { jQuery("#style-switcher").animate({ left: "-189px" }); } return false; });