/** * This file adds some LIVE to the Theme Customizer live preview. To leverage * this, set your custom settings to 'postMessage' and then add your handling * here. Your javascript should grab settings from customizer controls, and * then make any necessary changes to the page using jQuery. */ ( function( $ ){ /** * Dynamic Internal/Embedded Style for a Control */ function big_store_add_dynamic_css( control, style ){ control = control.replace( '[', '-' ); control = control.replace( ']', '' ); jQuery( 'style#' + control ).remove(); jQuery( 'head' ).append( '' ); } /** * Responsive Spacing CSS */ function big_store_responsive_spacing( control, selector, type, side ){ wp.customize( control, function( value ){ value.bind( function( value ){ var sidesString = ""; var spacingType = "padding"; if ( value.desktop.top || value.desktop.right || value.desktop.bottom || value.desktop.left || value.tablet.top || value.tablet.right || value.tablet.bottom || value.tablet.left || value.mobile.top || value.mobile.right || value.mobile.bottom || value.mobile.left ) { if ( typeof side != undefined ) { sidesString = side + ""; sidesString = sidesString.replace(/,/g , "-"); } if ( typeof type != undefined ) { spacingType = type + ""; } // Remove ' ); } else { wp.customize.preview.send( 'refresh' ); jQuery( 'style#' + control + '-' + spacingType + '-' + sidesString ).remove(); } } ); } ); } /** * Apply CSS for the element */ function big_store_css( control, css_property, selector, unit ){ wp.customize( control, function( value ) { value.bind( function( new_value ) { // Remove ' ); } else { wp.customize.preview.send( 'refresh' ); // Remove old. jQuery( 'style#' + control ).remove(); } } ); } ); } /*******************************/ // Range slider live customizer /*******************************/ function bigStoreGetCss( arraySizes, settings, to ) { 'use strict'; var data, desktopVal, tabletVal, mobileVal, className = settings.styleClass, i = 1; var val = JSON.parse( to ); if ( typeof( val ) === 'object' && val !== null ) { if ('desktop' in val) { desktopVal = val.desktop; } if ('tablet' in val) { tabletVal = val.tablet; } if ('mobile' in val) { mobileVal = val.mobile; } } for ( var key in arraySizes ) { // skip loop if the property is from prototype if ( ! arraySizes.hasOwnProperty( key )) { continue; } var obj = arraySizes[key]; var limit = 0; var correlation = [1,1,1]; if ( typeof( val ) === 'object' && val !== null ) { if( typeof obj.limit !== 'undefined'){ limit = obj.limit; } if( typeof obj.correlation !== 'undefined'){ correlation = obj.correlation; } data = { desktop: ( parseInt(parseFloat( desktopVal ) / correlation[0]) + obj.values[0]) > limit ? ( parseInt(parseFloat( desktopVal ) / correlation[0]) + obj.values[0] ) : limit, tablet: ( parseInt(parseFloat( tabletVal ) / correlation[1]) + obj.values[1] ) > limit ? ( parseInt(parseFloat( tabletVal ) / correlation[1]) + obj.values[1] ) : limit, mobile: ( parseInt(parseFloat( mobileVal ) / correlation[2]) + obj.values[2] ) > limit ? ( parseInt(parseFloat( mobileVal ) / correlation[2]) + obj.values[2] ) : limit }; } else { if( typeof obj.limit !== 'undefined'){ limit = obj.limit; } if( typeof obj.correlation !== 'undefined'){ correlation = obj.correlation; } data =( parseInt( parseFloat( to ) / correlation[0] ) ) + obj.values[0] > limit ? ( parseInt( parseFloat( to ) / correlation[0] ) ) + obj.values[0] : limit; } settings.styleClass = className + '-' + i; settings.selectors = obj.selectors; bigStoreSetCss( settings, data ); i++; } } function bigStoreSetCss( settings, to ){ 'use strict'; var result = ''; var styleClass = jQuery( '.' + settings.styleClass ); if ( to !== null && typeof to === 'object' ){ jQuery.each( to, function ( key, value ) { var style_to_add; if ( settings.selectors === '.container' ){ style_to_add = settings.selectors + '{ ' + settings.cssProperty + ':' + value + settings.propertyUnit + '; max-width: 100%; }'; } else { style_to_add = settings.selectors + '{ ' + settings.cssProperty + ':' + value + settings.propertyUnit + '}'; } switch ( key ) { case 'desktop': result += style_to_add; break; case 'tablet': result += '@media (max-width: 767px){' + style_to_add + '}'; break; case 'mobile': result += '@media (max-width: 544px){' + style_to_add + '}'; break; } } ); if ( styleClass.length > 0 ) { styleClass.text( result ); } else { jQuery( 'head' ).append( '' ); } } else { jQuery( settings.selectors ).css( settings.cssProperty, to + 'px' ); } } //*****************************/ // Logo //*****************************/ wp.customize( 'big_store_logo_width', function (value){ 'use strict'; value.bind( function( to ) { var settings = { cssProperty: 'max-width', propertyUnit: 'px', styleClass: 'open-logo-width' }; var arraySizes = { size3: { selectors:'.thunk-logo img,.sticky-header .logo-content img', values: ['','',''] } }; bigStoreGetCss( arraySizes, settings, to ); } ); } ); //top header wp.customize('big_store_col1_texthtml', function(value){ value.bind(function(to){ $('.top-header-col1 .content-html').text(to); }); }); wp.customize('big_store_col2_texthtml', function(value){ value.bind(function(to) { $('.top-header-col2 .content-html').text(to); }); }); wp.customize('big_store_col3_texthtml', function(value){ value.bind(function(to) { $('.top-header-col3 .content-html').text(to); }); }); big_store_css( 'big_store_abv_hdr_botm_brd','border-bottom-width', '.top-header', 'px' ); big_store_css( 'big_store_above_brdr_clr','border-bottom-color', '.top-header,body.big-store-dark .top-header'); wp.customize( 'big_store_abv_hdr_hgt', function (value){ 'use strict'; value.bind( function( to ) { var settings = { cssProperty: 'line-height', propertyUnit: 'px', styleClass: '' }; var arraySizes = { size3: { selectors:'.top-header .top-header-bar', values: ['','',''] } }; bigStoreGetCss( arraySizes, settings, to ); } ); } ); wp.customize( 'big_store_abv_hdr_botm_brd', function (value){ 'use strict'; value.bind( function( to ) { var settings = { cssProperty: 'border-bottom-width', propertyUnit: 'px', styleClass: '' }; var arraySizes = { size3: { selectors:'.top-header', values: ['','',''] } }; bigStoreGetCss( arraySizes, settings, to ); } ); } ); /***************/ // MAIN HEADER /***************/ wp.customize('big_store_main_hdr_btn_txt', function(value){ value.bind(function(to){ $('.btn-main-header').text(to); }); }); wp.customize('big_store_main_hdr_calto_txt', function(value){ value.bind(function(to){ $('.sprt-tel b').text(to); }); }); wp.customize('big_store_main_hdr_calto_nub', function(value){ value.bind(function(to){ $('.sprt-tel a').text(to); }); }); wp.customize('big_store_main_hdr_calto_nub', function(value){ value.bind(function(to){ $('.sprt-tel a').text(to); }); }); wp.customize('big_store_main_hdr_calto_email', function(value){ value.bind(function(to) { $('.sprt-eml a').text(to); }); }); //cat slider heading wp.customize('big_store_cat_slider_heading', function(value){ value.bind(function(to) { $('.thunk-category-slide-section .thunk-title .title').text(to); }); }); //product slide wp.customize('big_store_product_slider_heading', function(value){ value.bind(function(to) { $('.thunk-product-slide-section .thunk-title .title').text(to); }); }); //product list wp.customize('big_store_product_list_heading', function(value){ value.bind(function(to) { $('.thunk-product-list-section .thunk-title .title').text(to); }); }); //product cat tab wp.customize('big_store_cat_tab_heading', function(value){ value.bind(function(to) { $('.thunk-product-tab-section .thunk-title .title').text(to); }); }); //product cat tab list wp.customize('big_store_list_cat_tab_heading', function(value){ value.bind(function(to) { $('.thunk-product-tab-list-section .thunk-title .title').text(to); }); }); //Highlight wp.customize('big_store_hglgt_heading', function(value){ value.bind(function(to) { $('.thunk-product-highlight-section .thunk-title .title').text(to); }); }); //Big Featured wp.customize('big_store_feature_product_heading', function(value){ value.bind(function(to) { $('.thunk-feature-product-section .thunk-title .title').text(to); }); }); //Ribbon Text wp.customize('big_store_ribbon_text', function(value){ value.bind(function(to) { $('.thunk-ribbon-content h3').text(to); }); }); wp.customize('big_store_ribbon_btn_text', function(value){ value.bind(function(to) { $('.thunk-ribbon-content a.ribbon-btn').text(to); }); }); //Custom section One wp.customize('big_store_custom_1_heading', function(value){ value.bind(function(to) { $('.thunk-custom-one-section .thunk-title .title').text(to); }); }); //Custom section two wp.customize('big_store_custom_2_heading', function(value){ value.bind(function(to) { $('.thunk-custom-two-section .thunk-title .title').text(to); }); }); //Custom section three wp.customize('big_store_custom_3_heading', function(value){ value.bind(function(to) { $('.thunk-custom-three-section .thunk-title .title').text(to); }); }); //Custom section four wp.customize('big_store_custom_4_heading', function(value){ value.bind(function(to){ $('.thunk-custom-four-section .thunk-title .title').text(to); }); }); /****************/ // footer /****************/ wp.customize('big_store_footer_col1_texthtml', function(value){ value.bind(function(to) { $('.top-footer-col1 .content-html').text(to); }); }); wp.customize('big_store_above_footer_col2_texthtml', function(value){ value.bind(function(to) { $('.top-footer-col2 .content-html').text(to); }); }); wp.customize('big_store_above_footer_col3_texthtml', function(value){ value.bind(function(to) { $('.top-footer-col3 .content-html').text(to); }); }); big_store_css( 'big_store_above_frt_brdr_clr','border-bottom-color', 'body.big-store-dark .top-footer,.top-footer'); wp.customize( 'big_store_above_ftr_hgt', function (value){ 'use strict'; value.bind( function( to ) { var settings = { cssProperty: 'line-height', propertyUnit: 'px', styleClass: '' }; var arraySizes = { size3: { selectors:'.top-footer .top-footer-bar', values: ['','',''] } }; bigStoreGetCss( arraySizes, settings, to ); } ); } ); wp.customize( 'big_store_abv_ftr_botm_brd', function (value){ 'use strict'; value.bind( function( to ) { var settings = { cssProperty: 'border-bottom-width', propertyUnit: 'px', styleClass: '' }; var arraySizes = { size3: { selectors:'.top-footer', values: ['','',''] } }; bigStoreGetCss( arraySizes, settings, to ); } ); } ); wp.customize('big_store_footer_bottom_col1_texthtml', function(value){ value.bind(function(to) { $('.below-footer-col1 .content-html').text(to); }); }); wp.customize('big_store_bottom_footer_col2_texthtml', function(value){ value.bind(function(to) { $('.below-footer-col2 .content-html').text(to); }); }); wp.customize('big_store_bottom_footer_col3_texthtml', function(value){ value.bind(function(to) { $('.below-footer-col3 .content-html').text(to); }); }); big_store_css( 'big_store_bottom_frt_brdr_clr','border-top-color', '.below-footer,body.big-store-dark .below-footer'); wp.customize( 'big_store_btm_ftr_hgt', function (value){ 'use strict'; value.bind( function( to ) { var settings = { cssProperty: 'line-height', propertyUnit: 'px', styleClass: '' }; var arraySizes = { size3: { selectors:'.below-footer .below-footer-bar', values: ['','',''] } }; bigStoreGetCss( arraySizes, settings, to ); } ); } ); wp.customize( 'big_store_btm_ftr_botm_brd', function (value){ 'use strict'; value.bind( function( to ) { var settings = { cssProperty: 'border-top-width', propertyUnit: 'px', styleClass: '' }; var arraySizes = { size3: { selectors:'.below-footer', values: ['','',''] } }; bigStoreGetCss( arraySizes, settings, to ); } ); } ); // loader big_store_css( 'big_store_loader_bg_clr','background-color','.big_store_overlayloader'); //*****************************/ // Global Color Custom Style //*****************************/ wp.customize( 'big_store_theme_clr', function( setting ){ setting.bind( function( cssval ){ var dynamicStyle = ''; dynamicStyle += 'a:hover, .big-store-menu li a:hover, .big-store-menu .current-menu-item a,.woocommerce .thunk-woo-product-list .price,.thunk-product-hover .th-button.add_to_cart_button, .woocommerce ul.products .thunk-product-hover .add_to_cart_button, .woocommerce .thunk-product-hover a.th-butto, .woocommerce ul.products li.product .product_type_variable, .woocommerce ul.products li.product a.button.product_type_grouped,.thunk-compare .compare-button a:hover, .thunk-product-hover .th-button.add_to_cart_button:hover, .woocommerce ul.products .thunk-product-hover .add_to_cart_button :hover, .woocommerce .thunk-product-hover a.th-button:hover,.thunk-product .yith-wcwl-wishlistexistsbrowse.show:before, .thunk-product .yith-wcwl-wishlistaddedbrowse.show:before,.woocommerce ul.products li.product.thunk-woo-product-list .price,.summary .yith-wcwl-add-to-wishlist.show .add_to_wishlist::before, .summary .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse.show a::before, .summary .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse.show a::before,.woocommerce .entry-summary a.compare.button.added:before,article.thunk-post-article .thunk-readmore.button:hover,.header-icon a:hover,.thunk-related-links .nav-links a:hover,.woocommerce .thunk-list-view ul.products li.product.thunk-woo-product-list .price,.woocommerce .woocommerce-error .button, .woocommerce .woocommerce-info .button, .woocommerce .woocommerce-message .button,.woocommerce .thunk-product-hover a.th-button,.page-contact .leadform-show-form label,.thunk-contact-col .fa{ color: ' + cssval + '} '; dynamicStyle += '.toggle-cat-wrap,#search-button,.thunk-icon .cart-icon,.single_add_to_cart_button.button.alt, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce #respond input#submit, .woocommerce button.button, .woocommerce input.button,.thunk-woo-product-list .thunk-quickview a,.btn-main-header{ background: ' + cssval + '} '; dynamicStyle += '.open-cart p.buttons a:hover,.woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover, .woocommerce #respond input#submit:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,.thunk-slide .owl-nav button.owl-prev:hover, .thunk-slide .owl-nav button.owl-next:hover, .big-store-slide-post .owl-nav button.owl-prev:hover, .big-store-slide-post .owl-nav button.owl-next:hover,.thunk-list-grid-switcher a.selected, .thunk-list-grid-switcher a:hover,.woocommerce .woocommerce-error .button:hover, .woocommerce .woocommerce-info .button:hover, .woocommerce .woocommerce-message .button:hover,#searchform [type="submit"]:hover,.page-contact .leadform-show-form input[type="submit"]{background-color: ' + cssval + '} '; dynamicStyle += '.thunk-product-hover .th-button.add_to_cart_button, .woocommerce ul.products .thunk-product-hover .add_to_cart_button, .woocommerce .thunk-product-hover a.th-butto, .woocommerce ul.products li.product .product_type_variable, .woocommerce ul.products li.product a.button.product_type_grouped,.open-cart p.buttons a:hover,.thunk-slide .owl-nav button.owl-prev:hover, .thunk-slide .owl-nav button.owl-next:hover, .big-store-slide-post .owl-nav button.owl-prev:hover, .big-store-slide-post .owl-nav button.owl-next:hover,body .woocommerce-tabs .tabs li a::before,.thunk-list-grid-switcher a.selected, .thunk-list-grid-switcher a:hover,.woocommerce .woocommerce-error .button, .woocommerce .woocommerce-info .button, .woocommerce .woocommerce-message .button,#searchform [type="submit"]:hover,.woocommerce .thunk-product-hover a.th-button,.page-contact .leadform-show-form input[type="submit"]{border-color: ' + cssval + '} '; big_store_add_dynamic_css( 'big_store_theme_clr', dynamicStyle ); } ); } ); big_store_css( 'big_store_text_clr','color','body,.woocommerce-error, .woocommerce-info, .woocommerce-message'); big_store_css( 'big_store_title_clr','color','.site-title span a,.sprt-tel b,.widget.woocommerce .widget-title, .open-widget-content .widget-title, .widget-title,.thunk-title .title,.thunk-hglt-box h6,h2.thunk-post-title a, h1.thunk-post-title ,#reply-title,h4.author-header,.page-head h1,.woocommerce div.product .product_title, section.related.products h2, section.upsells.products h2, .woocommerce #reviews #comments h2,.woocommerce table.shop_table thead th, .cart-subtotal, .order-total,.cross-sells h2, .cart_totals h2,.woocommerce-billing-fields h3,.page-head h1 a'); big_store_css( 'big_store_link_clr','color','a,#open-above-menu.big-store-menu > li > a'); big_store_css( 'big_store_link_hvr_clr','color','a:hover,#open-above-menu.big-store-menu > li > a:hover,#open-above-menu.big-store-menu li a:hover'); //Above Header big_store_css( 'big_store_above_hd_bg_clr','background', '.top-header:before,body.big-store-dark .top-header:before'); // above header bg image wp.customize('header_image', function (value){ value.bind(function (to){ $('.top-header').css('background-image', 'url( '+ to +')'); }); }); // above header content big_store_css( 'big_store_abv_content_txt_clr','color', '.top-header .top-header-bar,body.big-store-dark .top-header .top-header-bar'); big_store_css( 'big_store_abv_content_link_clr','color', '.top-header .top-header-bar a,body.big-store-dark .top-header .top-header-bar a'); big_store_css( 'big_store_abv_content_link_hvr_clr','color', '.top-header .top-header-bar a:hover,body.big-store-dark .top-header .top-header-bar a:hover'); //Main Header big_store_css( 'big_store_main_hd_bg_clr','background', '.main-header:before,.below-header:before,body.big-store-dark .main-header:before,body.big-store-dark .below-header:before'); // main header bg image wp.customize('big_store_main_header_background_image_url', function (value){ value.bind(function (to){ $('.main-header,.below-header').css('background-image', 'url( '+ to +')'); }); }); big_store_css( 'big_store_main_header_background_repeat','background-repeat', '.main-header,.below-header'); big_store_css( 'big_store_main_header_background_position','background-position', '.main-header,.below-header'); big_store_css( 'big_store_main_header_background_size','background-size', '.main-header,.below-header'); big_store_css( 'big_store_main_header_background_attach','background-attachment', '.main-header,.below-header'); big_store_css( 'big_store_main_header_sitetitle_clr','color', '.site-title span a,body.big-store-dark .site-title span a'); big_store_css( 'big_store_main_header_sitetitle_hvr_clr','color', '.site-title span a:hover,body.big-store-dark .site-title span a:hover'); big_store_css( 'big_store_main_header_sitetagline_clr','color', '.site-description p,body.big-store-dark .site-description p'); big_store_css( 'big_store_main_content_txt_clr','color', '.main-header-col3,.header-support-icon,body.big-store-dark .main-header-col3,body.big-store-dark .header-support-icon'); big_store_css( 'big_store_main_content_link_clr','color', '.main-header-col3 a,body.big-store-dark .main-header-col3 a'); big_store_css( 'big_store_main_content_link_hvr_clr','color', '.main-header-col3 a:hover,body.big-store-dark .main-header-col3 a:hover'); wp.customize( 'big_store_main_header_menu_link_clr', function( setting ){ setting.bind( function( cssval ){ var dynamicStyle = '@media screen and (min-width:1024px){#big-store-menu > li > a{ color: ' + cssval + '} }'; big_store_add_dynamic_css( 'big_store_main_header_menu_link_clr', dynamicStyle ); } ); } ); wp.customize( 'big_store_main_header_menu_link_hvr_clr', function( setting ){ setting.bind( function( cssval ){ var dynamicStyle = '@media screen and (min-width:1024px){#big-store-menu > li > a:hover{ color: ' + cssval + '} }'; big_store_add_dynamic_css( 'big_store_main_header_menu_link_hvr_clr', dynamicStyle ); } ); } ); wp.customize( 'big_store_main_header_sbmenu_bg_clr', function( setting ){ setting.bind( function( cssval ){ var dynamicStyle = '@media screen and (min-width:1024px){#big-store-menu ul.sub-menu{ background: ' + cssval + '} }'; big_store_add_dynamic_css( 'big_store_main_header_sbmenu_bg_clr', dynamicStyle ); } ); } ); wp.customize( 'big_store_main_header_sbmenu_link_clr', function( setting ){ setting.bind( function( cssval ){ var dynamicStyle = '@media screen and (min-width:1024px){#big-store-menu li ul.sub-menu li a{ color: ' + cssval + '} }'; big_store_add_dynamic_css( 'big_store_main_header_sbmenu_link_clr', dynamicStyle ); } ); } ); wp.customize( 'big_store_main_header_sbmenu_link_hvr_clr', function( setting ){ setting.bind( function( cssval ){ var dynamicStyle = '@media screen and (min-width:1024px){#big-store-menu li ul.sub-menu li a:hover{ color: ' + cssval + '} }'; big_store_add_dynamic_css( 'big_store_main_header_sbmenu_link_hvr_clr', dynamicStyle ); } ); } ); wp.customize( 'big_store_main_header_sbmenu_link_hvr_bg_clr', function( setting ){ setting.bind( function( cssval ){ var dynamicStyle = '@media screen and (min-width:1024px){#big-store-menu li ul.sub-menu li a:hover{ background: ' + cssval + '} }'; big_store_add_dynamic_css( 'big_store_main_header_sbmenu_link_hvr_bg_clr', dynamicStyle ); } ); } ); //category big_store_css( 'big_store_main_header_cat_bg_clr','background', '.toggle-cat-wrap,body.big-store-dark .toggle-cat-wrap'); big_store_css( 'big_store_main_header_cat_clr','color', '.toggle-cat-wrap,body.big-store-dark .toggle-cat-wrap'); big_store_css( 'big_store_main_header_cat_drp_bg_clr','background', '.menu-category-list ul[data-menu-style="vertical"],body.big-store-dark .menu-category-list ul[data-menu-style="vertical"] li ul.sub-menu,body.big-store-dark .menu-category-list ul[data-menu-style="vertical"],body.big-store-dark .menu-category-list ul[data-menu-style="vertical"] li ul.sub-menu'); big_store_css( 'big_store_main_header_cat_drp_clr','color', '.thunk-product-cat-list li a,body.big-store-dark .thunk-product-cat-list li a'); big_store_css( 'big_store_main_header_cat_drp_hvr_clr','color', '.thunk-product-cat-list li a:hover,body.big-store-dark .thunk-product-cat-list li a:hover'); //search big_store_css( 'big_store_main_header_srch_clr','color', '#search-box input[type="text"], select#product_cat,#search-box form,.below-header-bar #search-text::placeholder,body.big-store-dark #search-box input[type="text"],body.big-store-dark select#product_cat,body.big-store-dark #search-box form,body.big-store-dark .below-header-bar #search-text::placeholder'); wp.customize( 'big_store_main_header_srch_bg_clr', function( setting ){ setting.bind( function( cssval ){ var dynamicStyle = ''; dynamicStyle += '#search-box input[type="text"], select#product_cat,#search-box form,.below-header-bar #search-text::placeholder,body.big-store-dark #search-box input[type="text"], body.big-store-dark select#product_cat,body.big-store-dark #search-box form,body.big-store-dark .below-header-bar #search-text::placeholder{background: ' + cssval + '} '; dynamicStyle += '#search-box input[type="text"], select#product_cat,body.big-store-dark #search-box input[type="text"], body.big-store-dark select#product_cat{border: 1px solid ' + cssval + '} '; big_store_add_dynamic_css( 'big_store_main_header_srch_bg_clr', dynamicStyle ); } ); } ); big_store_css( 'big_store_main_header_srch_btn_bg_clr','background', '#search-button,body.big-store-dark #search-button'); big_store_css( 'big_store_main_header_srch_btn_clr','color', '#search-button,body.big-store-dark #search-button'); //shop icon wishlist big_store_css( 'big_store_main_header_shp_icon_whislist_bg','background', '.header-icon a.whishlist,body.big-store-dark .header-icon a.whishlist'); big_store_css( 'big_store_main_header_shp_icon_whislist_clr','color', '.header-icon a.whishlist,body.big-store-dark .header-icon a.whishlist'); //shop icon account big_store_css( 'big_store_main_header_shp_icon_account_bg','background', '.header-icon a.account,body.big-store-dark .header-icon a.account'); big_store_css( 'big_store_main_header_shp_icon_account_clr','color', '.header-icon a.account,body.big-store-dark .header-icon a.account'); //shop icon cart big_store_css( 'big_store_main_header_shp_icon_cart_bg','background', '.thunk-icon .cart-icon'); wp.customize( 'big_store_main_header_shp_icon_cart_clr', function( setting ){ setting.bind( function( cssval ){ var dynamicStyle = ''; dynamicStyle += '.thunk-icon .cart-icon a.cart-contents{color: ' + cssval + '} '; dynamicStyle += '.thunk-icon .cart-icon a.cart-contents i{border-right: 1px solid ' + cssval + '} '; big_store_add_dynamic_css( 'big_store_main_header_shp_icon_cart_clr', dynamicStyle ); } ); } ); // Footer // Above footer big_store_css( 'big_store_above_ftr_bg_clr','background', '.top-footer:before,body.big-store-dark .top-footer:before'); // above header bg image wp.customize('big_store_abv_ftr_background_image_url', function (value){ value.bind(function (to){ $('.top-footer').css('background-image', 'url( '+ to +')'); }); }); big_store_css( 'big_store_abv_ftr_background_repeat','background-repeat', '.top-footer,body.big-store-dark .top-footer'); big_store_css( 'big_store_abv_ftr_background_position','background-position', '.top-footer,body.big-store-dark .top-footer'); big_store_css( 'big_store_abv_ftr_background_size','background-size', '.top-footer,body.big-store-dark .top-footer'); big_store_css( 'big_store_abv_ftr_background_attach','background-attachment', '.top-footer,body.big-store-dark .top-footer'); // above footer content big_store_css( 'big_store_abv_ftr_content_txt_clr','color', '.top-footer .top-footer-bar,body.big-store-dark .top-footer .top-footer-bar'); big_store_css( 'big_store_abv_ftr_content_link_clr','color', '.top-footer .top-footer-bar a,body.big-store-dark .top-footer .top-footer-bar a'); big_store_css( 'big_store_abv_ftr_content_link_hvr_clr','color', '.top-footer .top-footer-bar a:hover,body.big-store-dark .top-footer .top-footer-bar a:hover'); // Below footer big_store_css( 'big_store_blw_ftr_bg_clr','background', '.below-footer:before,body.big-store-dark .below-footer:before'); // Below footer bg image wp.customize('big_store_blw_ftr_background_image_url', function (value){ value.bind(function (to){ $('.below-footer').css('background-image', 'url( '+ to +')'); }); }); big_store_css( 'big_store_blw_ftr_background_repeat','background-repeat', '.below-footer'); big_store_css( 'big_store_blw_ftr_background_position','background-position', '.below-footer'); big_store_css( 'big_store_blw_ftr_background_size','background-size', '.below-footer'); big_store_css( 'big_store_blw_ftr_background_attach','background-attachment', '.below-footer'); // Below footer content big_store_css( 'big_store_blw_ftr_content_txt_clr','color', '.below-footer .below-footer-bar,body.big-store-dark .below-footer .below-footer-bar'); big_store_css( 'big_store_blw_ftr_content_link_clr','color', '.below-footer .below-footer-bar a,body.big-store-dark .below-footer .below-footer-bar a'); big_store_css( 'big_store_blw_ftr_content_link_hvr_clr','color', '.below-footer .below-footer-bar a:hover,body.big-store-dark .below-footer .below-footer-bar a:hover'); // Widget footer big_store_css( 'big_store_footer_wgt_bg_clr','background', '.widget-footer:before,body.big-store-dark .widget-footer:before'); // Widget footer bg image wp.customize('big_store_footer_wgt_background_image_url', function (value){ value.bind(function (to){ $('.widget-footer').css('background-image', 'url( '+ to +')'); }); }); big_store_css( 'big_store_footer_wgt_background_repeat','background-repeat', '.widget-footer'); big_store_css( 'big_store_footer_wgt_background_position','background-position', '.widget-footer'); big_store_css( 'big_store_footer_wgt_background_size','background-size', '.widget-footer'); big_store_css( 'big_store_footer_wgt_background_attach','background-attachment', '.widget-footer'); // Below footer content big_store_css( 'big_store_footer_wgt_tle_clr','color', '.widget-footer h2.widget-title,body.big-store-dark .widget-footer h2.widget-title'); big_store_css( 'big_store_footer_wgt_text_clr','color', '.widget-footer .widget,body.big-store-dark .widget-footer .widget'); big_store_css( 'big_store_footer_wgt_link_clr','color', '.widget-footer .widget a,body.big-store-dark .widget -footer .widget a'); big_store_css( 'big_store_footer_wgt_link_hvr_clr','color', '.widget-footer .widget a:hover,body.big-store-dark .widget-footer .widget a:hover'); /*********************/ //Content Color /*********************/ big_store_css( 'big_store_content_bg_clr','background','.thunk-page .thunk-content-wrap,article.thunk-article, article.thunk-post-article, .single article,body.big-store-dark .thunk-page .thunk-content-wrap,body.big-store-dark article.thunk-article,body.big-store-dark article.thunk-post-article, body.big-store-dark .single article'); big_store_css( 'big_store_content_h1_clr','color','.entry-content h1,body.big-store-dark .entry-content h1'); big_store_css( 'big_store_content_h2_clr','color','.entry-content h2,body.big-store-dark .entry-content h2'); big_store_css( 'big_store_content_h3_clr','color','.entry-content h3,body.big-store-dark .entry-content h3'); big_store_css( 'big_store_content_h4_clr','color','.entry-content h4,body.big-store-dark .entry-content h4'); big_store_css( 'big_store_content_h5_clr','color','.entry-content h5,body.big-store-dark .entry-content h5'); big_store_css( 'big_store_content_h6_clr','color','.entry-content h6,body.big-store-dark .entry-content h6'); //Ribbon big_store_css( 'big_store_rbn_bg_clr','background', '.bigstore-site section.thunk-ribbon-section .content-wrap:before'); big_store_css( 'big_store_rbn_tle_clr','color', '.thunk-ribbon-content-col1 h3'); big_store_css( 'big_store_rbn_btn_bg_clr','background', '.ribbon-btn'); big_store_css( 'big_store_rbn_btn_txt_clr','color', '.ribbon-btn'); wp.customize('big_store_ribbon_bg_img_url', function (value){ value.bind(function (to){ $('section.thunk-ribbon-section .content-wrap').css('background-image', 'url( '+ to +')'); }); }); big_store_css( 'big_store_ribbon_bg_background_repeat','background-repeat', 'section.thunk-ribbon-section .content-wrap'); big_store_css( 'big_store_ribbon_bg_background_position','background-position', 'section.thunk-ribbon-section .content-wrap'); big_store_css( 'big_store_ribbon_bg_background_size','background-size', 'section.thunk-ribbon-section .content-wrap'); big_store_css( 'big_store_ribbon_bg_background_attach','background-attachment', 'section.thunk-ribbon-section .content-wrap'); //sticky header big_store_css( 'big_store_sticky_hdr_bg_clr','background', '.sticky-header:before,body.big-store-dark .sticky-header:before'); wp.customize('big_store_sticky_header_background_image_url', function (value){ value.bind(function (to){ $('.sticky-header,body.big-store-dark .sticky-header').css('background-image', 'url( '+ to +')'); }); }); big_store_css( 'big_store_sticky_header_background_repeat','background-repeat', '.sticky-header,body.big-store-dark .sticky-header'); big_store_css( 'big_store_sticky_header_background_position','background-position', '.sticky-header,body.big-store-dark .sticky-header'); big_store_css( 'big_store_sticky_header_background_size','background-size', '.sticky-header,body.big-store-dark .sticky-header'); big_store_css( 'big_store_sticky_header_background_attach','background-attachment', '.sticky-header,body.big-store-dark .sticky-header'); big_store_css( 'big_store_sticky_header_sitetitle_clr','color', '.sticky-header .site-title span a,body.big-store-dark .sticky-header .site-title span a'); big_store_css( 'big_store_sticky_header_sitetitle_hvr_clr','color', '.sticky-header .site-title span a:hover,body.big-store-dark .sticky-header .site-title span a:hover'); big_store_css( 'big_store_sticky_header_sitetagline_clr','color', '.sticky-header .site-description p,body.big-store-dark sticky-header .site-description p'); big_store_css( 'big_store_sticky_header_menu_link_clr','color', '.sticky-header .big-store-menu > li > a,body.big-store-dark .sticky-header .big-store-menu > li > a'); big_store_css( 'big_store_sticky_header_menu_link_hvr_clr','color', '.sticky-header .big-store-menu > li > a:hover,body.big-store-dark .sticky-header .big-store-menu > li > a:hover'); big_store_css( 'big_store_sticky_header_sbmenu_bg_clr','background', '.sticky-header .big-store-menu ul.sub-menu,body.big-store-dark .sticky-header .big-store-menu ul.sub-menu'); big_store_css( 'big_store_sticky_header_sbmenu_link_clr','color', '.sticky-header .big-store-menu li ul.sub-menu li a,body.big-store-dark .sticky-header .big-store-menu li ul.sub-menu li a'); big_store_css( 'big_store_sticky_header_sbmenu_link_hvr_clr','color', '.sticky-header .big-store-menu li ul.sub-menu li a:hover,body.big-store-dark .sticky-header .big-store-menu li ul.sub-menu li a:hover'); big_store_css( 'big_store_sticky_header_sbmenu_link_hvr_bg_clr','background', '.sticky-header .big-store-menu li ul.sub-menu li a:hover,body.big-store-dark .sticky-header .big-store-menu li ul.sub-menu li a:hover'); big_store_css( 'big_store_sticky_hdr_icon_bg_clr','background', '.sticky-header .header-icon a,.sticky-header-col3 .thunk-icon .cart-icon a.cart-contents,body.big-store-dark .sticky-header .header-icon a,body.big-store-dark .sticky-header-col3 .thunk-icon .cart-icon a.cart-contents'); big_store_css( 'big_store_sticky_icon_clr','color', '.sticky-header .header-icon a,.sticky-header-col3 .thunk-icon .cart-icon a.cart-contents,.search-wrapper .search-close-btn,body.big-store-dark .sticky-header .header-icon a,body.big-store-dark .sticky-header-col3 .thunk-icon .cart-icon a.cart-contents,body.big-store-dark .search-wrapper .search-close-btn'); big_store_css( 'big_store_sticky_icon_clr','background', '.sticky-header .menu-toggle .icon-bar,body.big-store-dark .sticky-header .menu-toggle .icon-bar'); //move to top big_store_css( 'big_store_move_to_top_bg_clr','background', '#move-to-top'); big_store_css( 'big_store_move_to_top_icon_clr','color', '#move-to-top'); })( jQuery );