/** * edited to remove Weaver Xtreme only settings from Absolute Weaver */ var wvrxCustFontMsg = 0; ( function( $ ) { var api = wp.customize; function aweaver_refresh_js() { // most of the resizing options need to force update of WeaverX JS aweaverBottomFooter(); aweaverFullWidth(); wvrxFlowColor(); aweaverOnResize(); aweaver_js_update(); } // Site Title api( 'blogname', function( value ) { value.bind( function( to ) { var content = $( '#site-title a' ); if ( !content.length ) { $( '#site-title' ).prepend( '' + to + '' ); } if ( !to ) { content.remove(); } content.text( to ); } ); } ); // Tagline api( 'blogdescription', function( value ) { value.bind( function( to ) { var content = $( '#site-tagline span' ); if ( !content.length ) { $( '#site-tagline' ).append( '' + to + '' ); } if ( !to ) { $content.remove(); } content.text( to ); } ); } ); // ---------- Colors function aweaverFixTo( to ) { // This function fixes empty color values to be 'inherit', which is what an empty // color value really means in Weaver. Without this fix, a blank color value will // revert to the original (Default ) value, which is not what a blank value really // means in Weaver. A blank really means 'inherit' ( or technically, none ) if ( !to ) return 'inherit'; return to; } api( 'aweaver_settings[body_bgcolor]', function( value ) { value.bind( function( to ) { $( 'body' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[wrapper_color]', function( value ) { value.bind( function( to ) { $( '#wrapper' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[wrapper_bgcolor]', function( value ) { value.bind( function( to ) { $( '#wrapper' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[container_color]', function( value ) { value.bind( function( to ) { $( '#container' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[container_bgcolor]', function( value ) { value.bind( function( to ) { $( '#container' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[footer_color]', function( value ) { value.bind( function( to ) { $( '#header' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[header_bgcolor]', function( value ) { value.bind( function( to ) { $( '#header' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[site_title_color]', function( value ) { value.bind( function( to ) { $( '.wrapper #site-title a,.site-title a' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[site_title_bgcolor]', function( value ) { value.bind( function( to ) { $( '.wrapper #site-title a,.wrapper .site-title a' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[tagline_color]', function( value ) { value.bind( function( to ) { $( '#site-tagline > span,.site-tagline > span' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[tagline_bgcolor]', function( value ) { value.bind( function( to ) { $( '#site-tagline > span,.site-tagline > span' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[header_sb_color]', function( value ) { value.bind( function( to ) { $( '#header-widget-area,.widget-area-header' ).css( 'color', aweaverFixTo( to ) ); } ); value.bind( function( to ) { $( '.widget-area-header .search-form .search-submit' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[header_sb_bgcolor]', function( value ) { value.bind( function( to ) { $( '#header-widget-area,.widget-area-header' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[title_tagline_bgcolor]', function( value ) { value.bind( function( to ) { $( '#title-tagline' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[header_html_color]', function( value ) { value.bind( function( to ) { $( '#header-html' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[header_html_bgcolor]', function( value ) { value.bind( function( to ) { $( '#header-html' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[hr_color]', function( value ) { value.bind( function( to ) { $( 'hr' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[content_h_color]', function( value ) { value.bind( function( to ) { $( '.entry-content h1,.entry-content h2,.entry-content h3,.entry-content h4,.entry-content h5,.entry-content h6' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[content_h_bgcolor]', function( value ) { value.bind( function( to ) { $( '.entry-content h1,.entry-content h2,.entry-content h3,.entry-content h4,.entry-content h5,.entry-content h6' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); /* LEAVE INJECT COLORS HERE IN COMMENTS IN CASE WE ADD INJECTION AREAS TO ABSOLUTE WEAVER LATER... api( 'aweaver_settings[inject_prewrapper_bgcolor]', function( value ) { value.bind( function( to ) { $( '#inject_prewrapper' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[inject_postfooter_bgcolor]', function( value ) { value.bind( function( to ) { $( '#inject_postfooter' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[inject_preheader_bgcolor]', function( value ) { value.bind( function( to ) { $( '#inject_preheader' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[inject_header_bgcolor]', function( value ) { value.bind( function( to ) { $( '#inject_header' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[inject_postheader_bgcolor]', function( value ) { value.bind( function( to ) { $( '#inject_postheader' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[inject_container_top_bgcolor]', function( value ) { value.bind( function( to ) { $( '#inject_container_top' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[inject_postinfobar_bgcolor]', function( value ) { value.bind( function( to ) { $( '#inject_postinfobar' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[inject_precontent_bgcolor]', function( value ) { value.bind( function( to ) { $( '#inject_precontent' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[inject_pagecontentbottom_bgcolor]', function( value ) { value.bind( function( to ) { $( '#inject_pagecontentbottom' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[inject_postpostcontent_bgcolor]', function( value ) { value.bind( function( to ) { $( '.inject_postpostcontent' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[inject_precomments_bgcolor]', function( value ) { value.bind( function( to ) { $( '#inject_precomments' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[inject_postcomments_bgcolor]', function( value ) { value.bind( function( to ) { $( '#inject_postcomments' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[inject_prefooter_bgcolor]', function( value ) { value.bind( function( to ) { $( '#inject_prefooter' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[inject_presidebar_bgcolor]', function( value ) { value.bind( function( to ) { $( '#inject_presidebar' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[inject_fixedtop_bgcolor]', function( value ) { value.bind( function( to ) { $( '#inject_fixedtop' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[inject_fixedbottom_bgcolor]', function( value ) { value.bind( function( to ) { $( '#inject_fixedbottom' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); ---------------------------- */ api( 'aweaver_settings[m_primary_top_margin_dec]', function( value ) { value.bind( function( to ) { $( '.menu-primary .wvrx-menu-container' ).css( 'margin-top', to + 'px' ); } ); } ); api( 'aweaver_settings[m_primary_bottom_margin_dec]', function( value ) { value.bind( function( to ) { $( '.menu-primary .wvrx-menu-container' ).css( 'margin-bottom', to + 'px' ); } ); } ); api( 'aweaver_settings[infobar_color]', function( value ) { value.bind( function( to ) { $( '#infobar' ).css( 'color', aweaverFixTo( to ) ); } ); value.bind( function( to ) { $( '#infobar .search-form .search-submit' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[infobar_bgcolor]', function( value ) { value.bind( function( to ) { $( '#infobar' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[content_color]', function( value ) { value.bind( function( to ) { $( '#content' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[content_bgcolor]', function( value ) { value.bind( function( to ) { $( '#content' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[page_title_color]', function( value ) { value.bind( function( to ) { $( '.page-title' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[page_title_bgcolor]', function( value ) { value.bind( function( to ) { $( '.page-title' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[archive_title_color]', function( value ) { value.bind( function( to ) { $( '.archive-title' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[archive_title_bgcolor]', function( value ) { value.bind( function( to ) { $( '.archive-title' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[content_h_color]', function( value ) { value.bind( function( to ) { $( '.entry-content h1,.entry-content h2,.entry-content h3,.entry-content h4,.entry-content h5,.entry-content h6' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[content_h_bgcolor]', function( value ) { value.bind( function( to ) { $( '.entry-content h1,.entry-content h2,.entry-content h3,.entry-content h4,.entry-content h5,.entry-content h6' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[input_color]', function( value ) { value.bind( function( to ) { $( 'input,textarea' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[input_bgcolor]', function( value ) { value.bind( function( to ) { $( 'input,textarea' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[search_color]', function( value ) { value.bind( function( to ) { $( '.search-field,#header-search .search-field:focus' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[search_bgcolor]', function( value ) { value.bind( function( to ) { $( '.search-field,#header-search .search-field:focus' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[comment_headings_color]', function( value ) { value.bind( function( to ) { $( '#comments-title h3, #comments-title h4, #respond h3' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[comment_content_bgcolor]', function( value ) { value.bind( function( to ) { $( '.commentlist li.comment, #respond' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[comment_submit_bgcolor]', function( value ) { value.bind( function( to ) { $( '#respond input#submit' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[post_color]', function( value ) { value.bind( function( to ) { $( '.post-area' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[post_bgcolor]', function( value ) { value.bind( function( to ) { $( '.post-area' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[stickypost_bgcolor]', function( value ) { value.bind( function( to ) { $( '.blog .sticky' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[post_title_color]', function( value ) { value.bind( function( to ) { $( '.wrapper .post-title a' ).css( 'color', aweaverFixTo( to ) ); } ); } ); // value.bind( function( to ) { $( '.wrapper .post-title a,.wrapper .post-title a:visited' ).css( 'color', aweaverFixTo( to ) ); } );} ); api( 'aweaver_settings[post_title_bgcolor]', function( value ) { value.bind( function( to ) { $( '.wrapper .post-title' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[post_info_top_color]', function( value ) { value.bind( function( to ) { $( '.entry-meta' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[post_info_top_bgcolor]', function( value ) { value.bind( function( to ) { $( '.entry-meta' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[post_info_bottom_color]', function( value ) { value.bind( function( to ) { $( '.entry-utility' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[post_info_bottom_bgcolor]', function( value ) { value.bind( function( to ) { $( '.entry-utility' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[post_author_bgcolor]', function( value ) { value.bind( function( to ) { $( '#author-info' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[primary_color]', function( value ) { value.bind( function( to ) { $( '#primary-widget-area,.widget-area-primary' ).css( 'color', aweaverFixTo( to ) ); } ) value.bind( function( to ) { $( '#primary-widget-area .search-form .search-submit' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[primary_bgcolor]', function( value ) { value.bind( function( to ) { $( '#primary-widget-area,.widget-area-primary' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[secondary_color]', function( value ) { value.bind( function( to ) { $( '#secondary-widget-area,.widget-area-secondary' ).css( 'color', aweaverFixTo( to ) ); } ); value.bind( function( to ) { $( '#secondary-widget-area .search-form .search-submit' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[secondary_bgcolor]', function( value ) { value.bind( function( to ) { $( '#secondary-widget-area,.widget-area-secondary' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[widget_color]', function( value ) { value.bind( function( to ) { $( '.widget' ).css( 'color', aweaverFixTo( to ) ); } ); value.bind( function( to ) { $( '.widget .search-form .search-submit' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[widget_bgcolor]', function( value ) { value.bind( function( to ) { $( '.widget' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[widget_title_color]', function( value ) { value.bind( function( to ) { $( '.widget-title' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[widget_title_bgcolor]', function( value ) { value.bind( function( to ) { $( '.widget-title' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[footer_color]', function( value ) { value.bind( function( to ) { $( '#colophon' ).css( 'color', aweaverFixTo( to ) ); } ); value.bind( function( to ) { $( '#colophon .search-form .search-submit' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[footer_bgcolor]', function( value ) { value.bind( function( to ) { $( '#colophon' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[footer_sb_color]', function( value ) { value.bind( function( to ) { $( '#footer-widget-area,.widget-area-footer' ).css( 'color', aweaverFixTo( to ) ); } ); value.bind( function( to ) { $( '.widget-area-footer .search-form .search-submit' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[footer_sb_bgcolor]', function( value ) { value.bind( function( to ) { $( '#footer-widget-area,.widget-area-footer' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[footer_html_color]', function( value ) { value.bind( function( to ) { $( '#footer-html' ).css( 'color', aweaverFixTo( to ) ); } ); } ); api( 'aweaver_settings[footer_html_bgcolor]', function( value ) { value.bind( function( to ) { $( '#footer-html' ).css( 'background-color', aweaverFixTo( to ) ); } ); } ); // --------------------------------- Typography --------------------------------- function aweaverFontSize( val ) { var cssVal = "inherit"; switch ( val ) { case "m-font-size": cssVal = '1.0em'; break; case "xxs-font-size": cssVal = '0.625em'; break; case "xs-font-size": cssVal = '0.75em'; break; case "s-font-size": cssVal = '0.875em'; break; case "l-font-size": cssVal = '1.125em'; break; case "xl-font-size": cssVal = '1.25em'; break; case "xxl-font-size": cssVal = '1.5em'; break; case "customA-font-size": cssVal = '1.125em'; break; case "customB-font-size": cssVal = '1.125em'; break; default: break; } return cssVal; } function aweaverFontSizeTitle( val ) { var cssVal = "inherit"; switch ( val ) { case "m-font-size": cssVal = '1.5em'; break; case "xxs-font-size": cssVal = '.875em'; break; case "xs-font-size": cssVal = '1em'; break; case "s-font-size": cssVal = '1.25em'; break; case "l-font-size": cssVal = '1.875em'; break; case "xl-font-size": cssVal = '2.25em'; break; case "xxl-font-size": cssVal = '2.625em'; break; case "customA-font-size": cssVal = '1.875em'; break; case "customB-font-size": cssVal = '1.875em'; break; default: break; } return cssVal; } function aweaverFontSizeHeight( val ) { var cssVal = "inherit"; switch ( val ) { case "m-font-size": cssVal = '1.555'; break; case "xxs-font-size": cssVal = '1.6'; break; case "xs-font-size": cssVal = '1.6'; break; case "s-font-size": cssVal = '1.3125'; break; case "l-font-size": cssVal = '1.555'; break; case "xl-font-size": cssVal = '1.5'; break; case "xxl-font-size": cssVal = '1.5'; break; case "customA-font-size": cssVal = '1.555'; break; case "customB-font-size": cssVal = '1.555'; break; default: break; } return cssVal; } /* * possible alternative implementation of title font sizes function aweaverFixFontSizeTitle( where, to ) { //alert( 'fixFontSize: ' + where + ' : ' + to ); $( where ).removeClass( 'xxs-font-size-title' ); $( where ).removeClass( 'xs-font-size-title' ); $( where ).removeClass( 's-font-size-title' ); $( where ).removeClass( 'm-font-size-title' ); $( where ).removeClass( 'l-font-size-title' ); $( where ).removeClass( 'xl-font-size-title' ); $( where ).removeClass( 'xxl-font-size-title' ); if ( to != 'default' ) $( where ).addClass( to + '-title' ); } */ function aweaverFontFamily( val ) { var cssVal = "inherit"; switch ( val ) { case "sans-serif": cssVal = 'Arial, "Helvetica Neue", Helvetica, sans-serif'; break; case "arialBlack": cssVal = '"Arial Black", Gadget, Helvetica, sans-serif'; break; case "arialNarrow": cssVal = '"Arial Narrow", Arial, sans-serif'; break; case "lucidaSans": cssVal = '"Lucida Sans", Geneva, Tahoma, sans-serif'; break; case "trebuchetMS": cssVal = '"Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif'; break; case "verdana": cssVal = 'Verdana, Geneva, Candara, sans-serif'; break; case "serif": cssVal = 'TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia, serif'; break; case "cambria": cssVal = 'Cambria, Didot, Georgia, "Times New Roman", "Times Roman", serif'; break; case "garamond": cssVal = 'Garamond, Baskerville, "Baskerville Old Face", "Hoefler Text", TimesNewRoman, "Times New Roman", serif'; break; case "georgia": cssVal = 'Georgia, Times, "Times New Roman", serif'; break; case "lucidaBright": cssVal = '"Lucida Bright", "Book Antiqua", Georgia, serif'; break; case "palatino": cssVal = '"Palatino Linotype", Palatino, "Lucida Bright", "Book Antiqua", serif'; break; case "monospace": cssVal = '"Courier New", Courier, "Lucida Sans Typewriter", "Lucida Typewriter", monospace'; break; case "consolas": cssVal = 'Consolas, monaco,"Andale Mono", AndaleMono, monospace'; break; case "papyrus": cssVal = 'Papyrus, fantasy, cursive, serif'; break; case "comicSans": cssVal = '"Comic Sans MS", cursive,serif'; break; // Integrated Google Fonts case 'alegreya-sans': cssVal = "'Alegreya Sans', sans-serif"; break; case 'alegreya-sans-sc': cssVal = "'Alegreya Sans SC', sans-serif"; break; case 'alegreya': cssVal = "'Alegreya', serif"; break; case 'alegreya-sc': cssVal = "'Alegreya SC', serif"; break; case 'roboto': cssVal = "'Roboto', sans-serif"; break; case 'roboto-condensed': cssVal = "'Roboto Condensed', sans-serif"; break; case 'roboto-mono': cssVal = "'Roboto Mono', monospace"; break; case 'roboto-slab': cssVal = "'Roboto Slab', serif"; break; case 'source-sans-pro': cssVal = "'Source Sans Pro', sans-serif"; break; case 'source-serif-pro': cssVal = "'Source Serif Pro', serif"; break; case 'handlee': cssVal = "'Handlee', cursive"; break; case 'inconsolata': cssVal = "'Inconsolata', monospace"; break; case 'open-sans': cssVal = "'Open Sans', sans-serif"; break; case 'open-sans-condensed': cssVal = "'Open Sans Condensed', sans-serif"; break; case 'droid-sans': cssVal = "'Droid Sans', sans-serif"; break; case 'droid-serif': cssVal = "'Droid Serif', serif"; break; case 'exo-2': cssVal = "'Exo 2', sans-serif"; break; case 'lato': cssVal = "'Lato', sans-serif"; break; case 'lora': cssVal = "'Lora', serif"; break; case 'arvo': cssVal = "'Arvo', serif"; break; case 'archivo-black': cssVal = "'Archivo Black', sans-serif"; break; case 'ultra': cssVal = "'Ultra', serif"; break; case 'tinos': cssVal = "'Tinos', serif"; break; case 'arimo': cssVal = "'Arimo', serif"; break; case 'vollkorn': cssVal = "'Vollkorn', serif"; break; case 'default': case 'inherit': cssVal = 'inherit'; break; default: cssVal = "'Handlee', cursive"; if ( wvrxCustFontMsg != 1 ) alert( 'PLEASE NOTE: Absolute Weaver Plus Custom Font Family will be temporarily displayed with the Handlee font in the live preview window. You can "Save and Publish" and then refresh the browser page to reload the Customizer to see the actual font.' ); wvrxCustFontMsg = 1; break; } return cssVal; } function aweaverFontWeight( val ) { var cssVal = "inherit"; switch ( val ) { case "on": cssVal = 'bold'; break; case "off": cssVal = 'normal'; break; default: break; } return cssVal; } function aweaverFontWeightNormal( val ) { if ( val ) return 'normal'; else return 'bold'; } function aweaverFontStyle( val ) { var cssVal = "inherit"; switch ( val ) { case "on": cssVal = 'italic'; break; case "off": cssVal = 'normal'; break; default: break; } return cssVal; } // ------ Wrapper api( 'aweaver_settings[wrapper_font_size]', function( value ) { value.bind( function( to ) { var wrapper = $( '#wrapper' ); wrapper.css( 'font-size', aweaverFontSize( to ) ); wrapper.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[wrapper_font_family]', function( value ) { value.bind( function( to ) { $( '#wrapper' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[wrapper_bold]', function( value ) { value.bind( function( to ) { $( '#wrapper' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '#wrapper a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[wrapper_italic]', function( value ) { value.bind( function( to ) { $( '#wrapper' ).css( 'font-style', aweaverFontStyle( to ) ); $( '#wrapper a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Container api( 'aweaver_settings[container_font_size]', function( value ) { value.bind( function( to ) { var container = $( '#container' ); container.css( 'font-size', aweaverFontSize( to ) ); container.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[container_font_family]', function( value ) { value.bind( function( to ) { $( '#container' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[container_bold]', function( value ) { value.bind( function( to ) { $( '#container' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '#container a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[container_italic]', function( value ) { value.bind( function( to ) { $( '#container' ).css( 'font-style', aweaverFontStyle( to ) ); $( '#container a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Header api( 'aweaver_settings[header_font_size]', function( value ) { value.bind( function( to ) { var header = $( '#header' ); header.css( 'font-size', aweaverFontSize( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[header_font_family]', function( value ) { value.bind( function( to ) { $( '#header' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[header_bold]', function( value ) { value.bind( function( to ) { $( '#header' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '#header a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[header_italic]', function( value ) { value.bind( function( to ) { $( '#header' ).css( 'font-style', aweaverFontStyle( to ) ); $( '#header a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Site Title ( title ) api( 'aweaver_settings[site_title_font_size]', function( value ) { value.bind( function( to ) { var header = $( '#site-title,.site-title' ); header.css( 'font-size', aweaverFontSizeTitle( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[site_title_font_family]', function( value ) { value.bind( function( to ) { $( '#site-title,.site-title' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[site_title_normal]', function( value ) { value.bind( function( to ) { $( '#site-title,.site-title' ).css( 'font-weight', aweaverFontWeightNormal( to ) ); $( '#site-title a,.site-title a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeightNormal( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[site_title_italic]', function( value ) { value.bind( function( to ) { $( '#site-title,.site-title' ).css( 'font-style', aweaverFontStyle( to ) ); $( '#site-title a,.site-title a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Site Tagline ( title ) api( 'aweaver_settings[tagline_font_size]', function( value ) { value.bind( function( to ) { var header = $( '#site-tagline,.site-tagline' ); header.css( 'font-size', aweaverFontSizeTitle( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[tagline_font_family]', function( value ) { value.bind( function( to ) { $( '#site-tagline,.site-tagline' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[tagline_normal]', function( value ) { value.bind( function( to ) { $( '#site-tagline,.site-tagline' ).css( 'font-weight', aweaverFontWeightNormal( to ) ); $( '#site-tagline a,.site-tagline a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeightNormal( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[tagline_italic]', function( value ) { value.bind( function( to ) { $( '#site-tagline,.site-tagline' ).css( 'font-style', aweaverFontStyle( to ) ); $( '#site-tagline a,.site-tagline a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Header Widget Area api( 'aweaver_settings[header_sb_font_size]', function( value ) { value.bind( function( to ) { var header = $( '#header-widget-area,.widget-area-header' ); header.css( 'font-size', aweaverFontSize( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[header_sb_font_family]', function( value ) { value.bind( function( to ) { $( '#header-widget-area,.widget-area-header' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[header_sb_bold]', function( value ) { value.bind( function( to ) { $( '#header-widget-area,.widget-area-header' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '#header-widget-area a,.widget-area-header a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[header_sb_italic]', function( value ) { value.bind( function( to ) { $( '#header-widget-area,.widget-area-header' ).css( 'font-style', aweaverFontStyle( to ) ); $( '#header-widget-area a,.widget-area-header a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Header HTML Area api( 'aweaver_settings[header_html_font_size]', function( value ) { value.bind( function( to ) { var header = $( '#header-html' ); header.css( 'font-size', aweaverFontSize( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[header_html_font_family]', function( value ) { value.bind( function( to ) { $( '#header-html' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[header_html_bold]', function( value ) { value.bind( function( to ) { $( '#header-html' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '#header-html a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[header_html_italic]', function( value ) { value.bind( function( to ) { $( '#header-html' ).css( 'font-style', aweaverFontStyle( to ) ); $( '#header-html a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Primary Menu api( 'aweaver_settings[m_primary_font_size]', function( value ) { value.bind( function( to ) { var header = $( '.menu-primary .wvrx-menu-container' ); header.css( 'font-size', aweaverFontSize( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[m_primary_font_family]', function( value ) { value.bind( function( to ) { $( '.menu-primary .wvrx-menu-container' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[m_primary_bold]', function( value ) { value.bind( function( to ) { $( '.menu-primary .wvrx-menu-container' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '.menu-primary .wvrx-menu-container a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[m_primary_italic]', function( value ) { value.bind( function( to ) { $( '.menu-primary .wvrx-menu-container' ).css( 'font-style', aweaverFontStyle( to ) ); $( '.menu-primary .wvrx-menu-container a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Header Mini Menu api( 'aweaver_settings[m_header_mini_font_size]', function( value ) { value.bind( function( to ) { var header = $( '#nav-header-mini' ); header.css( 'font-size', aweaverFontSize( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[m_header_mini_font_family]', function( value ) { value.bind( function( to ) { $( '#nav-header-mini' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[m_header_mini_bold]', function( value ) { value.bind( function( to ) { $( '#nav-header-mini' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '#nav-header-mini a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[m_header_mini_italic]', function( value ) { value.bind( function( to ) { $( '#nav-header-mini' ).css( 'font-style', aweaverFontStyle( to ) ); $( '#nav-header-mini a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Info Bar api( 'aweaver_settings[info_bar_font_size]', function( value ) { value.bind( function( to ) { var header = $( '#infobar' ); header.css( 'font-size', aweaverFontSize( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[info_bar_font_family]', function( value ) { value.bind( function( to ) { $( '#infobar' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[info_bar_bold]', function( value ) { value.bind( function( to ) { $( '#infobar' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '#infobar a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[info_bar_italic]', function( value ) { value.bind( function( to ) { $( '#infobar' ).css( 'font-style', aweaverFontStyle( to ) ); $( '#infobar a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Content api( 'aweaver_settings[content_font_size]', function( value ) { value.bind( function( to ) { var header = $( '#content' ); header.css( 'font-size', aweaverFontSize( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[content_font_family]', function( value ) { value.bind( function( to ) { $( '#content' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[content_bold]', function( value ) { value.bind( function( to ) { $( '#content' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '#content a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[content_italic]', function( value ) { value.bind( function( to ) { $( '#content' ).css( 'font-style', aweaverFontStyle( to ) ); $( '#content a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Page Title ( title ) api( 'aweaver_settings[page_title_font_size]', function( value ) { value.bind( function( to ) { var header = $( '.page-title' ); header.css( 'font-size', aweaverFontSizeTitle( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[page_title_font_family]', function( value ) { value.bind( function( to ) { $( '.page-title' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[page_title_normal]', function( value ) { value.bind( function( to ) { $( '.page-title' ).css( 'font-weight', aweaverFontWeightNormal( to ) ); $( '.page-title a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeightNormal( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[page_title_italic]', function( value ) { value.bind( function( to ) { $( '.page-title' ).css( 'font-style', aweaverFontStyle( to ) ); $( '.page-title a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Post Specific api( 'aweaver_settings[post_font_size]', function( value ) { value.bind( function( to ) { var header = $( '.post-area' ); header.css( 'font-size', aweaverFontSize( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[post_font_family]', function( value ) { value.bind( function( to ) { $( '.post-area' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[post_bold]', function( value ) { value.bind( function( to ) { $( '.post-area' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '.post-area a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[post_italic]', function( value ) { value.bind( function( to ) { $( '.post-area' ).css( 'font-style', aweaverFontStyle( to ) ); $( '.post-area a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Post Title ( title ) api( 'aweaver_settings[post_title_font_size]', function( value ) { value.bind( function( to ) { var header = $( '.wrapper .post-title a' ); // var header = $( '.wrapper .post-title a,.wrapper .post-title a:visited' ); header.css( 'font-size', aweaverFontSizeTitle( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[post_title_font_family]', function( value ) { value.bind( function( to ) { $( '.wrapper .post-title a' ).css( 'font-family', aweaverFontFamily( to ) ); // $( '.wrapper .post-title a,.wrapper .post-title a:visited' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[post_title_normal]', function( value ) { value.bind( function( to ) { $( '.wrapper .post-title a' ).css( 'font-weight', aweaverFontWeightNormal( to ) ); $( '.wrapper .post-title a,.wrapper .post-title a:visited' ).css( 'font-weight', aweaverFontWeightNormal( to ) ); } ); } ); api( 'aweaver_settings[post_title_italic]', function( value ) { value.bind( function( to ) { $( '.wrapper .post-title a' ).css( 'font-style', aweaverFontStyle( to ) ); // $( '.wrapper .post-title a,.wrapper .post-title a:visited' ).css( 'font-style', aweaverFontStyle( to ) ); } ); } ); // ------ Post Info Top api( 'aweaver_settings[post_info_top_font_size]', function( value ) { value.bind( function( to ) { var header = $( '.entry-meta' ); header.css( 'font-size', aweaverFontSize( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[post_info_top_font_family]', function( value ) { value.bind( function( to ) { $( '.entry-meta' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[post_info_top_bold]', function( value ) { value.bind( function( to ) { $( '.entry-meta' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '.entry-meta a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[post_info_top_italic]', function( value ) { value.bind( function( to ) { $( '.entry-meta' ).css( 'font-style', aweaverFontStyle( to ) ); $( '.entry-meta a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Post Info Bottom api( 'aweaver_settings[post_info_bottom_font_size]', function( value ) { value.bind( function( to ) { var header = $( '.entry-utility' ); header.css( 'font-size', aweaverFontSize( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[post_info_bottom_font_family]', function( value ) { value.bind( function( to ) { $( '.entry-utility' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[post_info_bottom_bold]', function( value ) { value.bind( function( to ) { $( '.entry-utility' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '.entry-utility a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[post_info_bottom_italic]', function( value ) { value.bind( function( to ) { $( '.entry-utility' ).css( 'font-style', aweaverFontStyle( to ) ); $( '.entry-utility a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Primary Widget area api( 'aweaver_settings[primary_font_size]', function( value ) { value.bind( function( to ) { var header = $( '#primary-widget-area,.widget-area-primary' ); header.css( 'font-size', aweaverFontSize( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[primary_font_family]', function( value ) { value.bind( function( to ) { $( '#primary-widget-area,.widget-area-primary' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[primary_bold]', function( value ) { value.bind( function( to ) { $( '#primary-widget-area,.widget-area-primary' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '#primary-widget-area a,.widget-area-primary a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[primary_italic]', function( value ) { value.bind( function( to ) { $( '.#primary-widget-area,.widget-area-primary' ).css( 'font-style', aweaverFontStyle( to ) ); $( '#primary-widget-area a,.widget-area-primary a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Secondary Widget area api( 'aweaver_settings[secondary_font_size]', function( value ) { value.bind( function( to ) { var header = $( '#secondary-widget-area,.widget-area-secondary' ); header.css( 'font-size', aweaverFontSize( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[secondary_font_family]', function( value ) { value.bind( function( to ) { $( '#secondary-widget-area,.widget-area-secondary' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[secondary_bold]', function( value ) { value.bind( function( to ) { $( '#secondary-widget-area,.widget-area-secondary' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '#secondary-widget-area a,.widget-area-secondary a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[secondary_italic]', function( value ) { value.bind( function( to ) { $( '.#secondary-widget-area,.widget-area-secondary' ).css( 'font-style', aweaverFontStyle( to ) ); $( '#secondary-widget-area a,.widget-area-secondary a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Widgets api( 'aweaver_settings[widget_font_size]', function( value ) { value.bind( function( to ) { var header = $( '.widget' ); header.css( 'font-size', aweaverFontSize( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[widget_font_family]', function( value ) { value.bind( function( to ) { $( '.widget' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[widget_bold]', function( value ) { value.bind( function( to ) { $( '.widget' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '.widget a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[widget_italic]', function( value ) { value.bind( function( to ) { $( '.widget' ).css( 'font-style', aweaverFontStyle( to ) ); $( '.widget a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Widget Title ( title ) api( 'aweaver_settings[widget_title_font_size]', function( value ) { value.bind( function( to ) { var header = $( '.widget-title' ); header.css( 'font-size', aweaverFontSizeTitle( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[widget_title_font_family]', function( value ) { value.bind( function( to ) { $( '.widget-title' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[widget_title_normal]', function( value ) { value.bind( function( to ) { $( '.widget-title' ).css( 'font-weight', aweaverFontWeightNormal( to ) ); $( '.widget-title a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeightNormal( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[widget_title_italic]', function( value ) { value.bind( function( to ) { $( '.widget-title' ).css( 'font-style', aweaverFontStyle( to ) ); $( '.widget-title a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Footer api( 'aweaver_settings[footer_font_size]', function( value ) { value.bind( function( to ) { var header = $( '#colophon' ); header.css( 'font-size', aweaverFontSize( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[footer_font_family]', function( value ) { value.bind( function( to ) { $( '#colophon' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[footer_bold]', function( value ) { value.bind( function( to ) { $( '#colophon' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '#colophon a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[footer_italic]', function( value ) { value.bind( function( to ) { $( '#colophon' ).css( 'font-style', aweaverFontStyle( to ) ); $( '#colophon a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Footer Widget Area api( 'aweaver_settings[footer_sb_font_size]', function( value ) { value.bind( function( to ) { var header = $( '#footer-widget-area,.widget-area-footer' ); header.css( 'font-size', aweaverFontSize( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[footer_sb_font_family]', function( value ) { value.bind( function( to ) { $( '#footer-widget-area,.widget-area-footer' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[footer_sb_bold]', function( value ) { value.bind( function( to ) { $( '#footer-widget-area,.widget-area-footer' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '#footer-widget-area a,.widget-area-footer a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[footer_sb_italic]', function( value ) { value.bind( function( to ) { $( '#footer-widget-area,.widget-area-footer' ).css( 'font-style', aweaverFontStyle( to ) ); $( '#footer-widget-area a,.widget-area-footer a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // ------ Footer HTML Area api( 'aweaver_settings[footer_html_font_size]', function( value ) { value.bind( function( to ) { var header = $( '#footer-html' ); header.css( 'font-size', aweaverFontSize( to ) ); header.css( 'line-height', aweaverFontSizeHeight( to ) ); } ); } ); api( 'aweaver_settings[footer_html_font_family]', function( value ) { value.bind( function( to ) { $( '#footer-html' ).css( 'font-family', aweaverFontFamily( to ) ); } ); } ); api( 'aweaver_settings[footer_html_bold]', function( value ) { value.bind( function( to ) { $( '#footer-html' ).css( 'font-weight', aweaverFontWeight( to ) ); $( '#footer-html a' ).each( function() { this.style.setProperty( 'font-weight', aweaverFontWeight( to ), 'important' ); } ); } ); } ); api( 'aweaver_settings[footer_html_italic]', function( value ) { value.bind( function( to ) { $( '#footer-html' ).css( 'font-style', aweaverFontStyle( to ) ); $( '#footer-html a' ).each( function() { this.style.setProperty( 'font-style', aweaverFontStyle( to ), 'important' ); } ); } ); } ); // Link Typography: link, ibarlink, contentlink, ilink, wlink, footerlink api( 'aweaver_settings[link_strong]', function( value ) { value.bind( function( to ) { $( 'a, .wrapper a' ).css( 'font-weight', aweaverFontWeight( to ) ); } ); } ); api( 'aweaver_settings[link_em]', function( value ) { value.bind( function( to ) { $( 'a, .wrapper a' ).css( 'font-style', aweaverFontStyle( to ) ); } ); } ); api( 'aweaver_settings[link_u]', function( value ) { value.bind( function( to ) { if ( to ) $( 'a, .wrapper a' ).css( 'text-decoration', 'underline' ); else $( 'a, .wrapper a' ).css( 'text-decoration', 'none' ); } ); } ); api( 'aweaver_settings[contentlink_strong]', function( value ) { value.bind( function( to ) { $( '.content a' ).css( 'font-weight', aweaverFontWeight( to ) ); } ); } ); api( 'aweaver_settings[contentlink_em]', function( value ) { value.bind( function( to ) { $( '.content a' ).css( 'font-style', aweaverFontStyle( to ) ); } ); } ); api( 'aweaver_settings[contentlink_u]', function( value ) { value.bind( function( to ) { if ( to ) $( '.content a' ).css( 'text-decoration', 'underline' ); else $( '.content a' ).css( 'text-decoration', 'none' ); } ); } ); api( 'aweaver_settings[ilink_strong]', function( value ) { value.bind( function( to ) { $( '.wrapper .entry-meta a, .wrapper .entry-utility a' ).css( 'font-weight', aweaverFontWeight( to ) ); } ); } ); api( 'aweaver_settings[ilink_em]', function( value ) { value.bind( function( to ) { $( '.wrapper .entry-meta a, .wrapper .entry-utility a' ).css( 'font-style', aweaverFontStyle( to ) ); } ); } ); api( 'aweaver_settings[ilink_u]', function( value ) { value.bind( function( to ) { if ( to ) $( '.wrapper .entry-meta a, .wrapper .entry-utility a' ).css( 'text-decoration', 'underline' ); else $( 'a, .wrapper a.wrapper .entry-meta a, .wrapper .entry-utility a' ).css( 'text-decoration', 'none' ); } ); } ); api( 'aweaver_settings[wlink_strong]', function( value ) { value.bind( function( to ) { $( '.wrapper .widget a' ).css( 'font-weight', aweaverFontWeight( to ) ); } ); } ); api( 'aweaver_settings[wlink_em]', function( value ) { value.bind( function( to ) { $( '.wrapper .widget a' ).css( 'font-style', aweaverFontStyle( to ) ); } ); } ); api( 'aweaver_settings[wlink_u]', function( value ) { value.bind( function( to ) { if ( to ) $( '.wrapper .widget a' ).css( 'text-decoration', 'underline' ); else $( '.wrapper .widget a' ).css( 'text-decoration', 'none' ); } ); } ); api( 'aweaver_settings[ibarlink_strong]', function( value ) { value.bind( function( to ) { $( '#infobar a' ).css( 'font-weight', aweaverFontWeight( to ) ); } ); } ); api( 'aweaver_settings[ibarlink_em]', function( value ) { value.bind( function( to ) { $( '#infobar a' ).css( 'font-style', aweaverFontStyle( to ) ); } ); } ); api( 'aweaver_settings[ibarlink_u]', function( value ) { value.bind( function( to ) { if ( to ) $( '#infobar a' ).css( 'text-decoration', 'underline' ); else $( '#infobar a' ).css( 'text-decoration', 'none' ); } ); } ); api( 'aweaver_settings[footerlink_strong]', function( value ) { value.bind( function( to ) { $( '.colophon a' ).css( 'font-weight', aweaverFontWeight( to ) ); } ); } ); api( 'aweaver_settings[footerlink_em]', function( value ) { value.bind( function( to ) { $( '.colophon a' ).css( 'font-style', aweaverFontStyle( to ) ); } ); } ); api( 'aweaver_settings[footerlink_u]', function( value ) { value.bind( function( to ) { if ( to ) $( '.colophon a' ).css( 'text-decoration', 'underline' ); else $( '.colophon a' ).css( 'text-decoration', 'none' ); } ); } ); // Borders ------------------------------------------- // general settings api( 'aweaver_settings[border_width_int]', function( value ) { value.bind( function( to ) { $( '.border,.border-bottom' ).css( 'border-width', to + 'px' ); } ); } ); api( 'aweaver_settings[border_color]', function( value ) { value.bind( function( to ) { $( '.border,.border-bottom' ).css( 'border-color', aweaverFixTo( to ) ); } ); } ); function aweaverSetBorder( to, tag ) { if ( to ) $( tag ).addClass( 'border' ); else $( tag ).removeClass( 'border' ); } api( 'aweaver_settings[wrapper_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '#wrapper' ); } ); } ); api( 'aweaver_settings[container_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '#container' ); } ); } ); api( 'aweaver_settings[widget_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '.widget' ); } ); } ); api( 'aweaver_settings[primary_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '#primary-widget-area,.widget-area-primary' ); } ); } ); api( 'aweaver_settings[secondary_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '#secondary-widget-area,.widget-area-secondary' ); } ); } ); api( 'aweaver_settings[top_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '.widget-area-top' ); } ); } ); api( 'aweaver_settings[bottom_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '.widget-area-bottom' ); } ); } ); api( 'aweaver_settings[header_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '#header' ); } ); } ); api( 'aweaver_settings[header_sb_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '#header-widget-area,.widget-area-header' ); } ); } ); api( 'aweaver_settings[header_html_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '#header-html' ); } ); } ); // menus api( 'aweaver_settings[m_primary_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '.menu-primary .wvrx-menu-container' ); } ); } ); api( 'aweaver_settings[m_primary_sub_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '.menu-primary .wvrx-menu ul li a' ); } ); } ); // InfoBar api( 'aweaver_settings[infobar_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '#infobar' ); } ); } ); // Content Area api( 'aweaver_settings[content_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '#content' ); } ); } ); // Post Specific api( 'aweaver_settings[post_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '.post-area' ); } ); } ); // Footer api( 'aweaver_settings[footer_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '#colophon' ); } ); } ); api( 'aweaver_settings[footer_sb_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '#footer-widget-area,.widget-area-footer' ); } ); } ); api( 'aweaver_settings[footer_html_border]', function( value ) { value.bind( function( to ) { aweaverSetBorder( to, '#footer-html' ); } ); } ); // Shadows ------------------------------------------- function aweaverSetShadow( to, tag ) { var item = $( tag ); item.removeClass( 'shadow-0' ); // remove any existing shadow item.removeClass( 'shadow-1' ); item.removeClass( 'shadow-2' ); item.removeClass( 'shadow-3' ); item.removeClass( 'shadow-4' ); item.removeClass( 'shadow-rb' ); item.removeClass( 'shadow-lb' ); item.removeClass( 'shadow-tr' ); item.removeClass( 'shadow-tl' ); item.removeClass( 'shadow-custom' ); item.addClass( 'shadow' + to ); // add the new one } api( 'aweaver_settings[wrapper_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '#wrapper' ); } ); } ); api( 'aweaver_settings[container_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '#container' ); } ); } ); api( 'aweaver_settings[widget_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '.widget' ); } ); } ); api( 'aweaver_settings[primary_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '#primary-widget-area,.widget-area-primary' ); } ); } ); api( 'aweaver_settings[secondary_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '#secondary-widget-area,.widget-area-secondary' ); } ); } ); api( 'aweaver_settings[top_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '.widget-area-top' ); } ); } ); api( 'aweaver_settings[bottom_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '.widget-area-bottom' ); } ); } ); api( 'aweaver_settings[header_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '#header' ); } ); } ); api( 'aweaver_settings[header_sb_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '#header-widget-area,.widget-area-header' ); } ); } ); api( 'aweaver_settings[header_html_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '#header-html' ); } ); } ); // menus api( 'aweaver_settings[m_primary_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '.menu-primary .wvrx-menu-container' ); } ); } ); // InfoBar api( 'aweaver_settings[infobar_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '#infobar' ); } ); } ); // Content Area api( 'aweaver_settings[content_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '#content' ); } ); } ); // Post Specific api( 'aweaver_settings[post_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '.post-area' ); } ); } ); // Footer api( 'aweaver_settings[footer_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '#colophon' ); } ); } ); api( 'aweaver_settings[footer_sb_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '#footer-widget-area,.widget-area-footer' ); } ); } ); api( 'aweaver_settings[footer_html_shadow]', function( value ) { value.bind( function( to ) { aweaverSetShadow( to, '#footer-html' ); } ); } ); // Rounded Corners ------------------------------------------- function aweaverSetRounded( to, tag ) { var item = $( tag ); item.removeClass( 'rounded-all' ); // remove any existing rounded classes item.removeClass( 'rounded-left' ); item.removeClass( 'rounded-right' ); item.removeClass( 'rounded-top' ); item.removeClass( 'rounded-bottom' ); if ( to != 'none' ) { $( tag ).addClass( 'rounded' + to ); // add the new one } } api( 'aweaver_settings[wrapper_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '#wrapper' ); } ); } ); api( 'aweaver_settings[container_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '#container' ); } ); } ); api( 'aweaver_settings[widget_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '.widget' ); } ); } ); api( 'aweaver_settings[primary_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '#primary-widget-area,.widget-area-primary' ); } ); } ); api( 'aweaver_settings[secondary_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '#secondary-widget-area,.widget-area-secondary' ); } ); } ); api( 'aweaver_settings[top_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '.widget-area-top' ); } ); } ); api( 'aweaver_settings[bottom_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '.widget-area-bottom' ); } ); } ); api( 'aweaver_settings[header_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '#header' ); } ); } ); api( 'aweaver_settings[header_sb_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '#header-widget-area,.widget-area-header' ); } ); } ); api( 'aweaver_settings[header_html_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '#header-html' ); } ); } ); // menus api( 'aweaver_settings[m_primary_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '.menu-primary .wvrx-menu-container' ); } ); } ); // InfoBar api( 'aweaver_settings[infobar_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '#infobar' ); } ); } ); // Content Area api( 'aweaver_settings[content_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '#content' ); } ); } ); // Post Specific api( 'aweaver_settings[post_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '.post-area' ); } ); } ); // Footer api( 'aweaver_settings[footer_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '#colophon' ); } ); } ); api( 'aweaver_settings[footer_sb_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '#footer-widget-area,.widget-area-footer' ); } ); } ); api( 'aweaver_settings[footer_html_rounded]', function( value ) { value.bind( function( to ) { aweaverSetRounded( to, '#footer-html' ); } ); } ); // ---------------- SPACING --------------- // wrapper api( 'aweaver_settings[theme_width_int]', function( value ) { value.bind( function( to ) { $( '#wrapper' ).css( 'max-width', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[wrapper_padding_T]', function( value ) { value.bind( function( to ) { $( '#wrapper' ).css( 'padding-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[wrapper_padding_B]', function( value ) { value.bind( function( to ) { $( '#wrapper' ).css( 'padding-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[wrapper_padding_L]', function( value ) { value.bind( function( to ) { $( '#wrapper' ).css( 'padding-left', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[wrapper_padding_R]', function( value ) { value.bind( function( to ) { $( '#wrapper' ).css( 'padding-right', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[wrapper_margin_T]', function( value ) { value.bind( function( to ) { $( '#wrapper' ).css( 'margin-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[wrapper_margin_B]', function( value ) { value.bind( function( to ) { $( '#wrapper' ).css( 'margin-bottom', to + 'px' ); /* -bottom */ } ); } ); // container api( 'aweaver_settings[container_padding_T]', function( value ) { value.bind( function( to ) { $( '#container' ).css( 'padding-top', to + 'px' ); } ); } ); api( 'aweaver_settings[container_padding_B]', function( value ) { value.bind( function( to ) { $( '#container' ).css( 'padding-bottom', to + 'px' ); } ); } ); api( 'aweaver_settings[container_padding_L]', function( value ) { value.bind( function( to ) { $( '#container' ).css( 'padding-left', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[container_padding_R]', function( value ) { value.bind( function( to ) { $( '#container' ).css( 'padding-right', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[container_margin_T]', function( value ) { value.bind( function( to ) { $( '#container' ).css( 'margin-top', to + 'px' ); } ); } ); api( 'aweaver_settings[container_margin_B]', function( value ) { value.bind( function( to ) { $( '#container' ).css( 'margin-bottom', to + 'px' ); } ); } ); api( 'aweaver_settings[container_width_int]', function( value ) { value.bind( function( to ) { //$( '#container' ).each( function(){this.style.setProperty( 'width', to +'%','important' );} ); if ( to === 0 ) $( '#container' ).css( 'width', 'auto' ); else $( '#container' ).css( 'width', to + '%' ); aweaver_refresh_js(); } ); } ); // widgets api( 'aweaver_settings[widget_padding_T]', function( value ) { value.bind( function( to ) { $( '.widget' ).css( 'padding-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[widget_padding_B]', function( value ) { value.bind( function( to ) { $( '.widget' ).css( 'padding-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[widget_padding_L]', function( value ) { value.bind( function( to ) { $( '.widget' ).css( 'padding-left', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[widget_padding_R]', function( value ) { value.bind( function( to ) { $( '.widget' ).css( 'padding-right', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[widget_margin_T]', function( value ) { value.bind( function( to ) { $( '.widget' ).css( 'margin-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[widget_margin_B]', function( value ) { value.bind( function( to ) { $( '.widget' ).css( 'margin-bottom', to + 'px' ); /* -bottom */ } ); } ); // primary widget area api( 'aweaver_settings[primary_padding_T]', function( value ) { value.bind( function( to ) { $( '#primary-widget-area,.widget-area-primary' ).css( 'padding-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[primary_padding_B]', function( value ) { value.bind( function( to ) { $( '#primary-widget-area,.widget-area-primary' ).css( 'padding-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[primary_padding_L]', function( value ) { value.bind( function( to ) { $( '#primary-widget-area,.widget-area-primary' ).css( 'padding-left', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[primary_padding_R]', function( value ) { value.bind( function( to ) { $( '#primary-widget-area,.widget-area-primary' ).css( 'padding-right', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[primary_margin_T]', function( value ) { value.bind( function( to ) { $( '#primary-widget-area,.widget-area-primary' ).css( 'margin-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[primary_margin_B]', function( value ) { value.bind( function( to ) { $( '#primary-widget-area,.widget-area-primary' ).css( 'margin-bottom', to + 'px' ); /* -bottom */ } ); } ); // secondary widget area api( 'aweaver_settings[secondary_padding_T]', function( value ) { value.bind( function( to ) { $( '#secondary-widget-area,.widget-area-secondary' ).css( 'padding-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[secondary_padding_B]', function( value ) { value.bind( function( to ) { $( '#secondary-widget-area,.widget-area-secondary' ).css( 'padding-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[secondary_padding_L]', function( value ) { value.bind( function( to ) { $( '#secondary-widget-area,.widget-area-secondary' ).css( 'padding-left', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[secondary_padding_R]', function( value ) { value.bind( function( to ) { $( '#secondary-widget-area,.widget-area-secondary' ).css( 'padding-right', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[secondary_margin_T]', function( value ) { value.bind( function( to ) { $( '#secondary-widget-area,.widget-area-secondary' ).css( 'margin-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[secondary_margin_B]', function( value ) { value.bind( function( to ) { $( '#secondary-widget-area,.widget-area-secondary' ).css( 'margin-bottom', to + 'px' ); /* -bottom */ } ); } ); // Header api( 'aweaver_settings[header_padding_T]', function( value ) { value.bind( function( to ) { $( '#header' ).css( 'padding-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[header_padding_B]', function( value ) { value.bind( function( to ) { $( '#header' ).css( 'padding-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[header_padding_L]', function( value ) { value.bind( function( to ) { $( '#header' ).css( 'padding-left', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[header_padding_R]', function( value ) { value.bind( function( to ) { $( '#header' ).css( 'padding-right', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[header_margin_T]', function( value ) { value.bind( function( to ) { $( '#header' ).css( 'margin-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[header_margin_B]', function( value ) { value.bind( function( to ) { $( '#header' ).css( 'margin-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[header_width_int]', function( value ) { value.bind( function( to ) { if ( to === 0 ) $( '#header' ).css( 'width', 'auto' ); else $( '#header' ).css( 'width', to + '%' ); aweaver_refresh_js(); } ); } ); // Header Widget Area api( 'aweaver_settings[header_sb_padding_T]', function( value ) { value.bind( function( to ) { $( '#header-widget-area,.widget-area-header' ).css( 'padding-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[header_sb_padding_B]', function( value ) { value.bind( function( to ) { $( '#header-widget-area,.widget-area-header' ).css( 'padding-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[header_sb_padding_L]', function( value ) { value.bind( function( to ) { $( '#header-widget-area,.widget-area-header' ).css( 'padding-left', to + 'px' ); } ); } ); api( 'aweaver_settings[header_sb_padding_R]', function( value ) { value.bind( function( to ) { $( '#header-widget-area,.widget-area-header' ).css( 'padding-right', to + 'px' ); } ); } ); api( 'aweaver_settings[header_sb_margin_T]', function( value ) { value.bind( function( to ) { $( '#header-widget-area,.widget-area-header' ).css( 'margin-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[header_sb_margin_B]', function( value ) { value.bind( function( to ) { $( '#header-widget-area,.widget-area-header' ).css( 'margin-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[header_sb_width_int]', function( value ) { value.bind( function( to ) { if ( to === 0 ) $( '#header-widget-area,.widget-area-header' ).css( 'width', 'auto' ); else $( '#header-widget-area,.widget-area-header' ).css( 'width', to + '%' ); aweaver_refresh_js(); } ); } ); // Header HTML Area api( 'aweaver_settings[header_html_padding_T]', function( value ) { value.bind( function( to ) { $( '#header-html' ).css( 'padding-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[header_html_padding_B]', function( value ) { value.bind( function( to ) { $( '#header-html' ).css( 'padding-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[header_html_padding_L]', function( value ) { value.bind( function( to ) { $( '#header-html' ).css( 'padding-left', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[header_html_padding_R]', function( value ) { value.bind( function( to ) { $( '#header-html' ).css( 'padding-right', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[header_html_margin_T]', function( value ) { value.bind( function( to ) { $( '#header-html' ).css( 'margin-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[header_html_margin_B]', function( value ) { value.bind( function( to ) { $( '#header-html' ).css( 'margin-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[header_html_width_int]', function( value ) { value.bind( function( to ) { if ( to === 0 ) $( '#header-html' ).css( 'width', 'auto' ); else $( '#header-html' ).css( 'width', to + '%' ); aweaver_refresh_js(); //$( '#header-html' ).css( 'max-width', to + '%' );aweaver_refresh_js(); } ); } ); // Footer api( 'aweaver_settings[footer_padding_T]', function( value ) { value.bind( function( to ) { $( '#colophon' ).css( 'padding-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[footer_padding_B]', function( value ) { value.bind( function( to ) { $( '#colophon' ).css( 'padding-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[footer_padding_L]', function( value ) { value.bind( function( to ) { $( '#colophon' ).css( 'padding-left', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[footer_padding_R]', function( value ) { value.bind( function( to ) { $( '#colophon' ).css( 'padding-right', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[footer_margin_T]', function( value ) { value.bind( function( to ) { $( '#colophon' ).css( 'margin-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[footer_margin_B]', function( value ) { value.bind( function( to ) { $( '#colophon' ).css( 'margin-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[footer_width_int]', function( value ) { value.bind( function( to ) { if ( to === 0 ) $( '#colophon' ).css( 'width', 'auto' ); else $( '#colophon' ).css( 'width', to + '%' ); aweaver_refresh_js(); } ); } ); // Footer Widget Area api( 'aweaver_settings[footer_sb_padding_T]', function( value ) { value.bind( function( to ) { $( '#footer-widget-area,.widget-area-footer' ).css( 'padding-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[footer_sb_padding_B]', function( value ) { value.bind( function( to ) { $( '#footer-widget-area,.widget-area-footer' ).css( 'padding-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[footer_sb_padding_L]', function( value ) { value.bind( function( to ) { $( '#footer-widget-area,.widget-area-footer' ).css( 'padding-left', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[footer_sb_padding_R]', function( value ) { value.bind( function( to ) { $( '#footer-widget-area,.widget-area-footer' ).css( 'padding-right', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[footer_sb_margin_T]', function( value ) { value.bind( function( to ) { $( '#footer-widget-area,.widget-area-footer' ).css( 'margin-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[footer_sb_margin_B]', function( value ) { value.bind( function( to ) { $( '#footer-widget-area,.widget-area-footer' ).css( 'margin-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[footer_sb_width_int]', function( value ) { value.bind( function( to ) { if ( to === 0 ) $( '#footer-widget-area,.widget-area-footer' ).css( 'width', 'auto' ); else $( '#footer-widget-area,.widget-area-footer' ).css( 'width', to + '%' ); aweaver_refresh_js(); } ); } ); // Footer HTML Area api( 'aweaver_settings[footer_html_padding_T]', function( value ) { value.bind( function( to ) { $( '#footer-html' ).css( 'padding-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[footer_html_padding_B]', function( value ) { value.bind( function( to ) { $( '#footer-html' ).css( 'padding-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[footer_html_padding_L]', function( value ) { value.bind( function( to ) { $( '#footer-html' ).css( 'padding-left', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[footer_html_padding_R]', function( value ) { value.bind( function( to ) { $( '#footer-html' ).css( 'padding-right', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[footer_html_margin_T]', function( value ) { value.bind( function( to ) { $( '#footer-html' ).css( 'margin-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[footer_html_margin_B]', function( value ) { value.bind( function( to ) { $( '#footer-html' ).css( 'margin-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[footer_html_width_int]', function( value ) { value.bind( function( to ) { //$( '#footer-html' ).css( 'max-width', to + '%' ); if ( to === 0 ) $( '#footer-html' ).css( 'width', 'auto' ); else $( '#footer-html' ).css( 'width', to + '%' ); aweaver_refresh_js(); } ); } ); // Info Bar api( 'aweaver_settings[infobar_padding_T]', function( value ) { value.bind( function( to ) { $( '#infobar' ).css( 'padding-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[infobar_padding_B]', function( value ) { value.bind( function( to ) { $( '#infobar' ).css( 'padding-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[infobar_padding_L]', function( value ) { value.bind( function( to ) { $( '#infobar' ).css( 'padding-left', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[infobar_padding_R]', function( value ) { value.bind( function( to ) { $( '#infobar' ).css( 'padding-right', to + 'px' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[infobar_margin_T]', function( value ) { value.bind( function( to ) { $( '#infobar' ).css( 'margin-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[infobar_margin_B]', function( value ) { value.bind( function( to ) { $( '#infobar' ).css( 'margin-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[infobar_width_int]', function( value ) { value.bind( function( to ) { if ( to === 0 ) $( '#infobar' ).css( 'width', 'auto' ); else $( '#infobar' ).css( 'width', to + '%' ); aweaver_refresh_js(); } ); } ); // content api( 'aweaver_settings[content_padding_T]', function( value ) { value.bind( function( to ) { $( '#content' ).css( 'padding-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[content_padding_B]', function( value ) { value.bind( function( to ) { $( '#content' ).css( 'padding-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[content_padding_L]', function( value ) { value.bind( function( to ) { $( '#content' ).css( 'padding-left', to + '%' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[content_padding_R]', function( value ) { value.bind( function( to ) { $( '#content' ).css( 'padding-right', to + '%' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[content_margin_T]', function( value ) { value.bind( function( to ) { $( '#content' ).css( 'margin-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[content_margin_B]', function( value ) { value.bind( function( to ) { $( '#content' ).css( 'margin-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[space_after_title_dec]', function( value ) { value.bind( function( to ) { $( '.entry-summary,.entry-content' ).css( 'padding-top', to + 'em' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[content_p_list_dec]', function( value ) { value.bind( function( to ) { $( '#content ul,#content ol' ).css( 'margin-bottom', to + 'em' ); aweaver_refresh_js(); } ); } ); // mini menu api( 'aweaver_settings[m_header_mini_top_margin_dec]', function( value ) { value.bind( function( to ) { $( '#nav-header-mini' ).css( 'margin-top', to + 'em' ); aweaver_refresh_js(); } ); } ); // posts api( 'aweaver_settings[post_padding_T]', function( value ) { value.bind( function( to ) { $( '.post-area' ).css( 'padding-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[post_padding_B]', function( value ) { value.bind( function( to ) { $( '.post-area' ).css( 'padding-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[post_padding_L]', function( value ) { value.bind( function( to ) { $( '.post-area' ).css( 'padding-left', to + '%' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[post_padding_R]', function( value ) { value.bind( function( to ) { $( '.post-area' ).css( 'padding-right', to + '%' ); aweaver_refresh_js(); } ); } ); api( 'aweaver_settings[post_margin_T]', function( value ) { value.bind( function( to ) { $( '.post-area' ).css( 'margin-top', to + 'px' ); /* -top */ } ); } ); api( 'aweaver_settings[post_margin_B]', function( value ) { value.bind( function( to ) { $( '.post-area' ).css( 'margin-bottom', to + 'px' ); /* -bottom */ } ); } ); api( 'aweaver_settings[post_title_bottom_margin_dec]', function( value ) { value.bind( function( to ) { $( '.post-title' ).css( 'margin-bottom', to + 'em' ); aweaver_refresh_js(); } ); } ); // ------------------- Align ---------------------------- function aweaverSetAlign( to, tag ) { var item = $( tag ); item.removeClass( 'float-left' ); // remove any existing shadow item.removeClass( 'align-enter' ); item.removeClass( 'float-right' ); item.addClass( to ); // add the new one aweaver_refresh_js(); } api( 'aweaver_settings[container_align]', function( value ) { value.bind( function( to ) { aweaverSetAlign( to, '#container' ); } ); } ); api( 'aweaver_settings[header_align]', function( value ) { value.bind( function( to ) { aweaverSetAlign( to, '#header' ); } ); } ); api( 'aweaver_settings[footer_align]', function( value ) { value.bind( function( to ) { aweaverSetAlign( to, '#colophon' ); } ); } ); /*api( 'aweaver_settings[header_sb_align]', function( value ) { value.bind( function( to ) { aweaverSetAlign( to, '#header-widget-area,.widget-area-header' ); $( '#header-widget-area,.widget-area-header' ).css( 'z-index',10 ); } );} ); */ api( 'aweaver_settings[footer_sb_align]', function( value ) { value.bind( function( to ) { aweaverSetAlign( to, '#footer-widget-area,.widget-area-footer' ); } ); } ); api( 'aweaver_settings[infobar_align]', function( value ) { value.bind( function( to ) { aweaverSetAlign( to, '#infobar' ); } ); } ); api( 'aweaver_settings[header_html_center_content]', function( value ) { value.bind( function( to ) { if ( to ) $( '#header-html' ).css( 'text-align', 'center' ); else $( '#header-html' ).css( 'text-align', 'left' ); } ); } ); api( 'aweaver_settings[footer_html_center_content]', function( value ) { value.bind( function( to ) { if ( to ) $( '#footer-html' ).css( 'text-align', 'center' ); else $( '#footer-html' ).css( 'text-align', 'left' ); } ); } ); api( 'aweaver_settings[top_align]', function( value ) { value.bind( function( to ) { aweaverSetAlign( to, '.widget-area-top' ); } ); } ); api( 'aweaver_settings[bottom_align]', function( value ) { value.bind( function( to ) { aweaverSetAlign( to, '.widget-area-bottom' ); } ); } ); api( 'aweaver_settings[header_image_align]', function( value ) { value.bind( function( to ) { aweaverSetAlign( to, '#branding #header-image img' ); } ); } ); api( 'aweaver_settings[header_actual_size]', function( value ) { value.bind( function( to ) { //#branding #header-image img,html.ie8 #branding #header-image img {width:auto;} if ( to ) $( '#branding #header-image img' ).css( 'width', 'auto' ); else $( '#branding #header-image img' ).css( 'width', '100%' ); } ); } ); // -------------------- Title / Tagline ----------------- //aweaver_f_write( $sout, sprintf( "#site-title{margin-right:%.5f%% !important;margin-top:%.5f%% !important;}\n",$tx,$ty ) ) api( 'aweaver_settings[site_title_position_xy_X]', function( value ) { value.bind( function( to ) { $( '#site-title' ).each( function() { this.style.setProperty( 'margin-left', to + '%', 'important' ); } ); } ); } ); api( 'aweaver_settings[site_title_position_xy_Y]', function( value ) { value.bind( function( to ) { $( '#site-title' ).each( function() { this.style.setProperty( 'margin-top', to + '%', 'important' ); } ); } ); } ); api( 'aweaver_settings[site_title_max_w]', function( value ) { value.bind( function( to ) { $( '#site-title' ).css( 'max-width', to + '%' ); } ); } ); api( 'aweaver_settings[tagline_xy_X]', function( value ) { value.bind( function( to ) { $( '#site-tagline' ).each( function() { this.style.setProperty( 'margin-left', to + '%', 'important' ); } ); } ); } ); api( 'aweaver_settings[tagline_xy_Y]', function( value ) { value.bind( function( to ) { $( '#site-tagline' ).each( function() { this.style.setProperty( 'margin-top', to + '%', 'important' ); } ); } ); } ); api( 'aweaver_settings[tagline_xy_X]', function( value ) { value.bind( function( to ) { $( '#site-tagline' ).each( function() { this.style.setProperty( 'margin-left', to + '%', 'important' ); } ); } ); } ); api( 'aweaver_settings[title_tagline_xy_T]', function( value ) { value.bind( function( to ) { $( '#title-tagline' ).css( 'padding-top', to + 'px' ); } ); } ); api( 'aweaver_settings[title_tagline_xy_B]', function( value ) { value.bind( function( to ) { $( '#title-tagline' ).css( 'padding-bottom', to + 'px' ); } ); } ); // HTML Areas function aweaverSetHTMLContent( tag, to ) { var content = $( tag ); if ( !to ) { content.html( to ); content.css( 'display', 'inline' ); } else { content.html( to ); content.each( function() { this.style.setProperty( 'display', 'inline-block', 'important' ); } ); } } api( 'aweaver_settings[header_html_text]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#header-html", to ); } ); } ); api( 'aweaver_settings[footer_html_text]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#footer-html", to ); } ); } ); api( 'aweaver_settings[postfooter_insert]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#inject_postfooter", to ); } ); } ); /* KEEP FOR POSSIBLE ADD BACK LATER api( 'aweaver_settings[container_top_insert]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#inject_container_top", to ); } ); } ); api( 'aweaver_settings[prewrapper_insert]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#inject_prewrapper", to ); } ); } ); api( 'aweaver_settings[preheader_insert]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#inject_preheader", to ); } ); } ); api( 'aweaver_settings[header_insert]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#inject_header", to ); } ); } ); api( 'aweaver_settings[postheader_insert]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#inject_postheader", to ); } ); } ); api( 'aweaver_settings[postinfobar_insert]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#inject_postinfobar", to ); } ); } ); api( 'aweaver_settings[precontent_insert]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#inject_precontent", to ); } ); } ); api( 'aweaver_settings[pagecontentbottom_insert]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#inject_pagecontentbottom", to ); } ); } ); api( 'aweaver_settings[postpostcontent_insert]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( ".inject_postpostcontent", to ); } ); } ); api( 'aweaver_settings[precomments_insert]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#inject_precomments", to ); } ); } ); api( 'aweaver_settings[postcomments_insert]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#inject_postcomments", to ); } ); } ); api( 'aweaver_settings[prefooter_insert]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#inject_prefooter", to ); } ); } ); api( 'aweaver_settings[presidebar_insert]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#inject_presidebar", to ); } ); } ); api( 'aweaver_settings[fixedtop_insert]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#inject_fixedtop", to ); } ); } ); api( 'aweaver_settings[fixedbottom_insert]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( "#inject_fixedbottom", to ); } ); } ); ---------------------------------- */ api( 'aweaver_settings[m_primary_html_left]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( ".menu-primary .wvrx-menu-left", to ); } ); } ); api( 'aweaver_settings[m_primary_html_right]', function( value ) { value.bind( function( to ) { aweaverSetHTMLContent( ".menu-primary .wvrx-menu-right", to ); } ); } ); api( 'aweaver_settings[excerpt_more_msg]', function( value ) { value.bind( function( to ) { var content = $( ".more-msg" ); if ( !to ) { to = wvrxPRE.more_msg; } content.html( to ); content.each( function() { this.style.setProperty( 'display', 'inline-block', 'important' ); } ); } ); } ); api( 'aweaver_settings[copyright]', function( value ) { value.bind( function( to ) { var content = $( "#site-info" ); if ( !to ) { to = wvrxPRE.copyright; } content.html( to ); content.each( function() { this.style.setProperty( 'display', 'inline-block', 'important' ); } ); } ); } ); //Custom CSS function aweaverStyle( select, to, cssid ) { // generate a CSS+ style rule in the DOM var css_plus = $( '#wvrx-css-plus' ), // the css+