/* SET STYLES */ var theStyles = ''; var theFields = JSON.parse(bpCustomFields); /* body */ var bodyBG = typeof theFields['style_body_background'] != 'string' || theFields['style_body_background'].trim() == '' ? '' : 'background-color:'+theFields['style_body_background']+';'; var bodyClr = typeof theFields['style_body_text_color'] != 'string' || theFields['style_body_text_color'].trim() == '' ? '' : 'color:'+theFields['style_body_text_color']+';'; theStyles += 'body{'+bodyClr+'}' + '\n'; theStyles += 'body > div.container{'+bodyBG+bodyClr+'}' + '\n'; /* body content */ var intMaxWidth = typeof theFields['style_content_max_width'] != 'string' || theFields['style_content_max_width'].trim() == '' ? '' : 'max-width:'+theFields['style_content_max_width']+';'; var intPadCalc = intMaxWidth == '' ? '' : parseInt( intMaxWidth.replace(/\D/g,'') ) / 2; var intColPadDesk = typeof theFields['style_column_pad_desk'] != 'string' || theFields['style_column_pad_desk'].trim() == '' ? '' : 'padding-left:'+theFields['style_column_pad_desk']+';padding-right:'+theFields['style_column_pad_desk']+';'; var intColPadLap = typeof theFields['style_column_pad_lap'] != 'string' || theFields['style_column_pad_lap'].trim() == '' ? '' : 'padding-left:'+theFields['style_column_pad_lap']+';padding-right:'+theFields['style_column_pad_lap']+';'; var intColPadTab = typeof theFields['style_column_pad_tab'] != 'string' || theFields['style_column_pad_tab'].trim() == '' ? '' : 'padding-left:'+theFields['style_column_pad_tab']+';padding-right:'+theFields['style_column_pad_tab']+';'; var intColPadMob = typeof theFields['style_column_pad_mob'] != 'string' || theFields['style_column_pad_mob'].trim() == '' ? '' : 'padding-left:'+theFields['style_column_pad_mob']+';padding-right:'+theFields['style_column_pad_mob']+';'; var intRowMargDesk = typeof theFields['style_row_marg_desk'] != 'string' || theFields['style_row_marg_desk'].trim() == '' ? '' : 'margin-top:'+theFields['style_row_marg_desk']+';margin-bottom:'+theFields['style_row_marg_desk']+';'; var intRowMargLap = typeof theFields['style_row_marg_lap'] != 'string' || theFields['style_row_marg_lap'].trim() == '' ? '' : 'margin-top:'+theFields['style_row_marg_lap']+';margin-bottom:'+theFields['style_row_marg_lap']+';'; var intRowMargTab = typeof theFields['style_row_marg_tab'] != 'string' || theFields['style_row_marg_tab'].trim() == '' ? '' : 'margin-top:'+theFields['style_row_marg_tab']+';margin-bottom:'+theFields['style_row_marg_tab']+';'; var intRowMargMob = typeof theFields['style_row_marg_mob'] != 'string' || theFields['style_row_marg_mob'].trim() == '' ? '' : 'margin-top:'+theFields['style_row_marg_mob']+';margin-bottom:'+theFields['style_row_marg_mob']+';'; var intRowPadDesk = typeof theFields['style_row_pad_desk'] != 'string' || theFields['style_row_pad_desk'].trim() == '' ? '' : 'padding-top:'+theFields['style_row_pad_desk']+';padding-bottom:'+theFields['style_row_pad_desk']+';'; var intRowPadLap = typeof theFields['style_row_pad_lap'] != 'string' || theFields['style_row_pad_lap'].trim() == '' ? '' : 'padding-top:'+theFields['style_row_pad_lap']+';padding-bottom:'+theFields['style_row_pad_lap']+';'; var intRowPadTab = typeof theFields['style_row_pad_tab'] != 'string' || theFields['style_row_pad_tab'].trim() == '' ? '' : 'padding-top:'+theFields['style_row_pad_tab']+';padding-bottom:'+theFields['style_row_pad_tab']+';'; var intRowPadMob = typeof theFields['style_row_pad_mob'] != 'string' || theFields['style_row_pad_mob'].trim() == '' ? '' : 'padding-top:'+theFields['style_row_pad_mob']+';padding-bottom:'+theFields['style_row_pad_mob']+';'; var calcNavOffset = $('div[id*="header-smartblock-"]').css('position') == 'fixed' && intMaxWidth !== '' ? parseInt(intMaxWidth.split(':')[1]) : 0; var deskBreakPoint = calcNavOffset == 0 ? parseInt(intMaxWidth.split(':')[1])+ (parseInt(intColPadDesk.split(':')[1])*2) : calcNavOffset; if (intMaxWidth !== '' && parseInt(intMaxWidth.replace(/[^0-9]/g,'')) > 800) { theStyles += '.interior-inset{width:100%;'+intMaxWidth+'margin:0 auto;float:none;}' + '\n'; theStyles += '.interior-pad-inset{padding:auto;}' + '\n'; theStyles += '.interior-left-pad-inset{padding:auto;}' + '\n'; theStyles += '.interior-right-pad-inset{padding:auto;}' + '\n'; theStyles += '.interior-pad-inset,' + '\n'; theStyles += '.interior-pad-inset.column-pad{padding-left:calc(50% - '+intPadCalc+'px);padding-right:calc(50% - '+intPadCalc+'px);}' + '\n'; theStyles += '.interior-left-pad-inset,' + '\n'; theStyles += '.interior-left-pad-inset.column-pad{padding-left:calc(50% - '+intPadCalc+'px);}' + '\n'; theStyles += '.interior-right-pad-inset,' + '\n'; theStyles += '.interior-right-pad-inset.column-pad{padding-right:calc(50% - '+intPadCalc+'px);}' + '\n'; theStyles += '.interior-inset.column-pad{padding-left:0;padding-right:0;}' + '\n'; theStyles += '.interior-inset.row-margin,' + '\n'; } theStyles += '.row-margin{'+intRowMargDesk+'}' + '\n'; theStyles += '.row-pad{'+intRowPadDesk+'}' + '\n'; theStyles += '.column-pad{'+intColPadDesk+'}' + '\n'; theStyles += '@media (max-width:'+deskBreakPoint+'px) {' + '\n'; theStyles += ' .interior-inset.row-margin,' + '\n'; theStyles += ' .row-margin{'+intRowMargLap+'}' + '\n'; theStyles += ' .row-pad{'+intRowPadLap+'}' + '\n'; theStyles += ' .column-pad[class*="interior-"],' + '\n'; theStyles += ' .column-pad{'+intColPadLap+'}' + '\n'; theStyles += '}' + '\n'; theStyles += '@media (max-width:999px) {' + '\n'; theStyles += ' .interior-inset.row-margin,' + '\n'; theStyles += ' .row-margin{'+intRowMargTab+'}' + '\n'; theStyles += ' .row-pad{'+intRowPadTab+'}' + '\n'; theStyles += ' .column-pad[class*="interior-"],' + '\n'; theStyles += ' .column-pad{'+intColPadTab+'}' + '\n'; theStyles += '}' + '\n'; theStyles += '@media (max-width:599px) {' + '\n'; theStyles += ' .interior-inset.row-margin,' + '\n'; theStyles += ' .row-margin{'+intRowMargMob+'}' + '\n'; theStyles += ' .row-pad{'+intRowPadMob+'}' + '\n'; theStyles += ' .column-pad[class*="interior-"],' + '\n'; theStyles += ' .column-pad{'+intColPadMob+'}' + '\n'; theStyles += '}' + '\n'; /* text headings */ var themeHyperlink = typeof theFields['style_theme_link'] != 'string' || theFields['style_theme_link'].trim() == '' ? '' : theFields['style_theme_link']; var h1FontWt = typeof theFields['style_h1_font_weight'] != 'string' || theFields['style_h1_font_weight'].trim() == '' ? '' : 'font-weight:'+theFields['style_h1_font_weight']+';'; var h1FontFam = typeof theFields['style_h1_font_family'] != 'string' || theFields['style_h1_font_family'].trim() == '' ? '' : 'font-family:'+theFields['style_h1_font_family']+';'; var h1MobSize = typeof theFields['style_h1_mobile_size'] != 'string' || theFields['style_h1_mobile_size'].trim() == '' ? '' : 'font-size:'+theFields['style_h1_mobile_size']+';'; var h1MobMarg = typeof theFields['style_h1_mobile_margin'] != 'string' || theFields['style_h1_mobile_margin'].trim() == '' ? '' : 'margin:0 0 '+theFields['style_h1_mobile_margin']+';'; var h1DeskSize = typeof theFields['style_h1_desktop_size'] != 'string' || theFields['style_h1_desktop_size'].trim() == '' ? '' : 'font-size:'+theFields['style_h1_desktop_size']+';'; var h1DeskMarg = typeof theFields['style_h1_desktop_margin'] != 'string' || theFields['style_h1_desktop_margin'].trim() == '' ? '' : 'margin:0 0 '+theFields['style_h1_desktop_margin']+';'; var h1Spacing = typeof theFields['style_h1_spacing'] != 'string' || theFields['style_h1_spacing'].trim() == '' ? '' : 'letter-spacing:'+theFields['style_h1_spacing']+';'; var h2FontWt = typeof theFields['style_h2_font_weight'] != 'string' || theFields['style_h2_font_weight'].trim() == '' ? '' : 'font-weight:'+theFields['style_h2_font_weight']+';'; var h2FontFam = typeof theFields['style_h2_font_family'] != 'string' || theFields['style_h2_font_family'].trim() == '' ? '' : 'font-family:'+theFields['style_h2_font_family']+';'; var h2MobSize = typeof theFields['style_h2_mobile_size'] != 'string' || theFields['style_h2_mobile_size'].trim() == '' ? '' : 'font-size:'+theFields['style_h2_mobile_size']+';'; var h2MobMarg = typeof theFields['style_h2_mobile_margin'] != 'string' || theFields['style_h2_mobile_margin'].trim() == '' ? '' : 'margin:0 0 '+theFields['style_h2_mobile_margin']+';'; var h2DeskSize = typeof theFields['style_h2_desktop_size'] != 'string' || theFields['style_h2_desktop_size'].trim() == '' ? '' : 'font-size:'+theFields['style_h2_desktop_size']+';'; var h2DeskMarg = typeof theFields['style_h2_desktop_margin'] != 'string' || theFields['style_h2_desktop_margin'].trim() == '' ? '' : 'margin:0 0 '+theFields['style_h2_desktop_margin']+';'; var h2Spacing = typeof theFields['style_h2_spacing'] != 'string' || theFields['style_h2_spacing'].trim() == '' ? '' : 'letter-spacing:'+theFields['style_h2_spacing']+';'; var h3FontWt = typeof theFields['style_h3_font_weight'] != 'string' || theFields['style_h3_font_weight'].trim() == '' ? '' : 'font-weight:'+theFields['style_h3_font_weight']+';'; var h3FontFam = typeof theFields['style_h3_font_family'] != 'string' || theFields['style_h3_font_family'].trim() == '' ? '' : 'font-family:'+theFields['style_h3_font_family']+';'; var h3MobSize = typeof theFields['style_h3_mobile_size'] != 'string' || theFields['style_h3_mobile_size'].trim() == '' ? '' : 'font-size:'+theFields['style_h3_mobile_size']+';'; var h3MobMarg = typeof theFields['style_h3_mobile_margin'] != 'string' || theFields['style_h3_mobile_margin'].trim() == '' ? '' : 'margin:0 0 '+theFields['style_h3_mobile_margin']+';'; var h3DeskSize = typeof theFields['style_h3_desktop_size'] != 'string' || theFields['style_h3_desktop_size'].trim() == '' ? '' : 'font-size:'+theFields['style_h3_desktop_size']+';'; var h3DeskMarg = typeof theFields['style_h3_desktop_margin'] != 'string' || theFields['style_h3_desktop_margin'].trim() == '' ? '' : 'margin:0 0 '+theFields['style_h3_desktop_margin']+';'; var h3Spacing = typeof theFields['style_h3_spacing'] != 'string' || theFields['style_h3_spacing'].trim() == '' ? '' : 'letter-spacing:'+theFields['style_h3_spacing']+';'; var h4FontWt = typeof theFields['style_h4_font_weight'] != 'string' || theFields['style_h4_font_weight'].trim() == '' ? '' : 'font-weight:'+theFields['style_h4_font_weight']+';'; var h4FontFam = typeof theFields['style_h4_font_family'] != 'string' || theFields['style_h4_font_family'].trim() == '' ? '' : 'font-family:'+theFields['style_h4_font_family']+';'; var h4MobSize = typeof theFields['style_h4_mobile_size'] != 'string' || theFields['style_h4_mobile_size'].trim() == '' ? '' : 'font-size:'+theFields['style_h4_mobile_size']+';'; var h4MobMarg = typeof theFields['style_h4_mobile_margin'] != 'string' || theFields['style_h4_mobile_margin'].trim() == '' ? '' : 'margin:0 0 '+theFields['style_h4_mobile_margin']+';'; var h4DeskSize = typeof theFields['style_h4_desktop_size'] != 'string' || theFields['style_h4_desktop_size'].trim() == '' ? '' : 'font-size:'+theFields['style_h4_desktop_size']+';'; var h4DeskMarg = typeof theFields['style_h4_desktop_margin'] != 'string' || theFields['style_h4_desktop_margin'].trim() == '' ? '' : 'margin:0 0 '+theFields['style_h4_desktop_margin']+';'; var h4Spacing = typeof theFields['style_h4_spacing'] != 'string' || theFields['style_h4_spacing'].trim() == '' ? '' : 'letter-spacing:'+theFields['style_h4_spacing']+';'; theStyles += '.row.block a.link{'+themeHyperlink+'}' + '\n'; theStyles += 'h1,.h1{'+h1MobMarg+h1MobSize+h1FontWt+h1FontFam+h1Spacing+'}' + '\n'; theStyles += 'h2,.h2{'+h2MobMarg+h2MobSize+h2FontWt+h2FontFam+h2Spacing+'}' + '\n'; theStyles += 'h3,.h3{'+h3MobMarg+h3MobSize+h1FontWt+h3FontFam+h3Spacing+'}' + '\n'; theStyles += 'h4,.h4{'+h4MobMarg+h4MobSize+h4FontWt+h4FontFam+h4Spacing+'}' + '\n'; theStyles += '@media(min-width:1000px) {' + '\n'; theStyles += ' h1,.h1{'+h1DeskMarg+h1DeskSize+'}' + '\n'; theStyles += ' h2,.h2{'+h2DeskMarg+h2DeskSize+'}' + '\n'; theStyles += ' h3,.h3{'+h3DeskMarg+h3DeskSize+'}' + '\n'; theStyles += ' h4,.h4{'+h4DeskMarg+h4DeskSize+'}' + '\n'; theStyles += '}' + '\n'; /* fonts */ var priFontFam = typeof theFields['style_font_primary_family'] != 'string' || theFields['style_font_primary_family'].trim() == '' ? '' : 'font-family:"'+theFields['style_font_primary_family']+'"' ; var priFontBackup = typeof theFields['style_font_primary_websafe_backup'] != 'string' || theFields['style_font_primary_websafe_backup'].trim() == '' ? '' : ','+theFields['style_font_primary_websafe_backup'] ; var priFontSerif = typeof theFields['style_font_primary_serif_type'] != 'string' || theFields['style_font_primary_serif_type'].trim() == '' ? '' : ','+theFields['style_font_primary_serif_type']+';' ; var priFontURL = theFields['style_font_primary_url'], priFontLink='', priFontSrc=''; if (typeof priFontURL == 'string' && priFontURL.trim() != '') { if (priFontURL.toLowerCase().indexOf('woff') !== -1 || priFontURL.toLowerCase().indexOf('otf') !== -1 || priFontURL.toLowerCase().indexOf('ttf') !== -1) { var fontArrP = priFontURL.split(','); for (var x=0;x'); } } else { priFontLink = ''; } var secFontFam = typeof theFields['style_font_secondary_family'] != 'string' || theFields['style_font_secondary_family'] == '' ? '' : 'font-family:"'+theFields['style_font_secondary_family']+'";' ; var secFontURL = theFields['style_font_secondary_url'], secFontLink='', secFontSrc=''; if (typeof secFontURL == 'string' && secFontURL.trim() !== '') { if (secFontURL.toLowerCase().indexOf('woff') !== -1 || secFontURL.toLowerCase().indexOf('otf') !== -1 || secFontURL.toLowerCase().indexOf('ttf') !== -1) { var fontArrS = secFontURL.split(','); for (var x=0;x'); } } else { secFontLink = ''; } var terFontFam = typeof theFields['style_font_tertiary_family'] != 'string' || theFields['style_font_tertiary_family'] == '' ? '' : 'font-family:"'+theFields['style_font_tertiary_family']+'";' ; var terFontURL = theFields['style_font_tertiary_url'], terFontLink='', terFontSrc=''; if (typeof terFontURL == 'string' && terFontURL.trim() !== '') { if (terFontURL.toLowerCase().indexOf('woff') !== -1 || terFontURL.toLowerCase().indexOf('otf') !== -1 || terFontURL.toLowerCase().indexOf('ttf') !== -1) { var fontArrT = terFontURL.split(','); for (var x=0;x'); } } else { terFontLink = ''; } var priHighlightClr = typeof theFields['style_text_primary_highlight_color'] != 'string' || theFields['style_text_primary_highlight_color'].trim() == '' ? '' : 'color:'+theFields['style_text_primary_highlight_color']+' !important;' ; var secHighlightClr = typeof theFields['style_text_secondary_highlight_color'] != 'string' || theFields['style_text_secondary_highlight_color'].trim() == '' ? '' : 'color:'+theFields['style_text_secondary_highlight_color']+' !important;' ; var terHighlightClr = typeof theFields['style_text_tertiary_highlight_color'] != 'string' || theFields['style_text_tertiary_highlight_color'].trim() == '' ? '' : 'color:'+theFields['style_text_tertiary_highlight_color']+' !important;' ; var quatHighlightClr = typeof theFields['style_text_quaternary_highlight_color'] != 'string' || theFields['style_text_quaternary_highlight_color'].trim() == '' ? '' : 'color:'+theFields['style_text_quaternary_highlight_color']+' !important;' ; theStyles += priFontLink; theStyles += '.font-primary{'+priFontFam+priFontBackup+priFontSerif+'}' + '\n'; theStyles += secFontLink; theStyles += '.font-secondary{'+secFontFam+'}' + '\n'; theStyles += terFontLink; theStyles += '.font-tertiary{'+terFontFam+'}' + '\n'; theStyles += '.highlight-primary-text{'+priHighlightClr+'}' + '\n'; theStyles += '.highlight-secondary-text{'+secHighlightClr+'}' + '\n'; theStyles += '.highlight-tertiary-text{'+terHighlightClr+'}' + '\n'; theStyles += '.highlight-quaternary-text{'+quatHighlightClr+'}' + '\n'; /* backgrounds */ var priHighlightBg = typeof theFields['style_background_primary_highlight'] != 'string' || theFields['style_background_primary_highlight'].trim() == '' ? '' : 'background-color:'+theFields['style_background_primary_highlight']+' !important;' ; var priHighlightTxt = typeof theFields['style_background_primary_highlight_textcolor_override'] != 'string' || theFields['style_background_primary_highlight_textcolor_override'].trim() == '' ? '' : 'color:'+theFields['style_background_primary_highlight_textcolor_override']+' !important;' ; var secHighlightBg = typeof theFields['style_background_secondary_highlight'] != 'string' || theFields['style_background_secondary_highlight'].trim() == '' ? '' : 'background-color:'+theFields['style_background_secondary_highlight']+' !important;' ; var secHighlightTxt = typeof theFields['style_background_secondary_highlight_textcolor_override'] != 'string' || theFields['style_background_secondary_highlight_textcolor_override'].trim() == '' ? '' : 'color:'+theFields['style_background_secondary_highlight_textcolor_override']+' !important;' ; var terHighlightBg = typeof theFields['style_background_tertiary_highlight'] != 'string' || theFields['style_background_tertiary_highlight'].trim() == '' ? '' : 'background-color:'+theFields['style_background_tertiary_highlight']+' !important;' ; var terHighlightTxt = typeof theFields['style_background_tertiary_highlight_textcolor_override'] != 'string' || theFields['style_background_tertiary_highlight_textcolor_override'].trim() == '' ? '' : 'color:'+theFields['style_background_tertiary_highlight_textcolor_override'] +' !important;' ; var quatHighlightBg = typeof theFields['style_background_quaternary_highlight'] != 'string' || theFields['style_background_quaternary_highlight'].trim() == '' ? '' : 'background-color:'+theFields['style_background_quaternary_highlight']+' !important;' ; var quatHighlightTxt = typeof theFields['style_background_quaternary_highlight_textcolor_override'] != 'string' || theFields['style_background_quaternary_highlight_textcolor_override'].trim() == '' ? '' : 'color:'+theFields['style_background_quaternary_highlight_textcolor_override'] +' !important;' ; var quinHighlightBg = typeof theFields['style_background_quinary_highlight'] != 'string' || theFields['style_background_quinary_highlight'].trim() == '' ? '' : 'background-color:'+theFields['style_background_quinary_highlight']+' !important;' ; var quinHighlightTxt = typeof theFields['style_background_quinary_highlight_textcolor_override'] != 'string' || theFields['style_background_quinary_highlight_textcolor_override'].trim() == '' ? '' : 'color:'+theFields['style_background_quinary_highlight_textcolor_override'] +' !important;' ; var senHighlightBg = typeof theFields['style_background_senary_highlight'] != 'string' || theFields['style_background_senary_highlight'].trim() == '' ? '' : 'background-color:'+theFields['style_background_senary_highlight']+' !important;' ; var senHighlightTxt = typeof theFields['style_background_senary_highlight_textcolor_override'] != 'string' || theFields['style_background_senary_highlight_textcolor_override'].trim() == '' ? '' : 'color:'+theFields['style_background_senary_highlight_textcolor_override'] +' !important;' ; theStyles += '.highlight-primary{'+priHighlightBg+priHighlightTxt+'}' + '\n'; theStyles += '.highlight-secondary{'+secHighlightBg+secHighlightTxt+'}' + '\n'; theStyles += '.highlight-tertiary{'+terHighlightBg+terHighlightTxt+'}' + '\n'; theStyles += '.highlight-quaternary{'+quatHighlightBg+quatHighlightTxt+'}' + '\n'; theStyles += '.highlight-quinary{'+quinHighlightBg+quinHighlightTxt+'}' + '\n'; theStyles += '.highlight-senary{'+senHighlightBg+senHighlightTxt+'}' + '\n'; /* buttons */ var buttonPad = typeof theFields['style_button_padding'] != 'string' || theFields['style_button_padding'].trim() == '' ? '' : 'padding:'+theFields['style_button_padding']+';' ; var buttonTrans = typeof theFields['style_button_transition'] != 'string' || theFields['style_button_transition'].trim() == '' ? '' : 'transition:background '+theFields['style_button_transition']+';' ; /* primary button */ var priButtonBg = typeof theFields['style_button_primary_background'] != 'string' || theFields['style_button_primary_background'].trim() == '' ? '' : 'background-color:'+theFields['style_button_primary_background']+' !important;' ; var priButtonClr = typeof theFields['style_button_primary_text_color'] != 'string' || theFields['style_button_primary_text_color'].trim() == '' ? '' : 'color:'+theFields['style_button_primary_text_color']+' !important;' ; var priButtonSize = typeof theFields['style_button_primary_text_size'] != 'string' || theFields['style_button_primary_text_size'].trim() == '' ? '' : 'font-size:'+theFields['style_button_primary_text_size']+';' ; var priButtonWeight = typeof theFields['style_button_primary_text_weight'] != 'string' || theFields['style_button_primary_text_weight'].trim() == '' ? '' : 'font-weight:'+theFields['style_button_primary_text_weight']+';' ; var priButtonSpace = typeof theFields['style_button_primary_text_spacing'] != 'string' || theFields['style_button_primary_text_spacing'].trim() == '' ? '' : 'letter-spacing:'+theFields['style_button_primary_text_spacing']+';' ; var priButtonStyle = typeof theFields['style_button_primary_text_style'] != 'string' || theFields['style_button_primary_text_style'].trim() == '' ? '' : 'font-style:'+theFields['style_button_primary_text_style']+';' ; var priButtonBdrW = typeof theFields['style_button_primary_border_width'] != 'string' || theFields['style_button_primary_border_width'].trim() == '' ? '' : 'border-width:'+theFields['style_button_primary_border_width']+';' ; var priButtonBdrClr = typeof theFields['style_button_primary_border_color'] != 'string' || theFields['style_button_primary_border_color'].trim() == '' ? '' : 'border-color:'+theFields['style_button_primary_border_color']+' !important;' ; var priButtonRad = typeof theFields['style_button_primary_border_radius'] != 'string' || theFields['style_button_primary_border_radius'].trim() == '' ? '' : 'border-radius:'+theFields['style_button_primary_border_radius']+';' ; var priButtonBgHvr = typeof theFields['style_button_primary_hover_background'] != 'string' || theFields['style_button_primary_hover_background'].trim() == '' ? '' : 'background-color:'+theFields['style_button_primary_hover_background']+' !important;' ; var priButtonClrHvr = typeof theFields['style_button_primary_hover_text_color'] != 'string' || theFields['style_button_primary_hover_text_color'].trim() == '' ? '' : 'color:'+theFields['style_button_primary_hover_text_color']+' !important;' ; var priButtonBdrHvr = typeof theFields['style_button_primary_hover_border_color'] != 'string' || theFields['style_button_primary_hover_border_color'].trim() == '' ? '' : 'border-color:'+theFields['style_button_primary_hover_border_color']+' !important;' ; /* secondary button */ var secButtonBg = typeof theFields['style_button_secondary_background'] != 'string' || theFields['style_button_secondary_background'].trim() == '' ? '' : 'background-color:'+theFields['style_button_secondary_background']+' !important;' ; var secButtonClr = typeof theFields['style_button_secondary_text_color'] != 'string' || theFields['style_button_secondary_text_color'].trim() == '' ? '' : 'color:'+theFields['style_button_secondary_text_color']+' !important;' ; var secButtonSize = typeof theFields['style_button_secondary_text_size'] != 'string' || theFields['style_button_secondary_text_size'].trim() == '' ? '' : 'font-size:'+theFields['style_button_secondary_text_size']+';' ; var secButtonWeight = typeof theFields['style_button_secondary_text_weight'] != 'string' || theFields['style_button_secondary_text_weight'].trim() == '' ? '' : 'font-weight:'+theFields['style_button_secondary_text_weight']+';' ; var secButtonSpace = typeof theFields['style_button_secondary_text_spacing'] != 'string' || theFields['style_button_secondary_text_spacing'].trim() == '' ? '' : 'letter-spacing:'+theFields['style_button_secondary_text_spacing']+';' ; var secButtonStyle = typeof theFields['style_button_secondary_text_style'] != 'string' || theFields['style_button_secondary_text_style'].trim() == '' ? '' : 'font-style:'+theFields['style_button_secondary_text_style']+';' ; var secButtonBdrW = typeof theFields['style_button_secondary_border_width'] != 'string' || theFields['style_button_secondary_border_width'].trim() == '' ? '' : 'border-width:'+theFields['style_button_secondary_border_width']+';' ; var secButtonBdrClr = typeof theFields['style_button_secondary_border_color'] != 'string' || theFields['style_button_secondary_border_color'].trim() == '' ? '' : 'border-color:'+theFields['style_button_secondary_border_color']+' !important;' ; var secButtonRad = typeof theFields['style_button_secondary_border_radius'] != 'string' || theFields['style_button_secondary_border_radius'].trim() == '' ? '' : 'border-radius:'+theFields['style_button_secondary_border_radius']+';' ; var secButtonBgHvr = typeof theFields['style_button_secondary_hover_background'] != 'string' || theFields['style_button_secondary_hover_background'].trim() == '' ? '' : 'background-color:'+theFields['style_button_secondary_hover_background']+' !important;' ; var secButtonClrHvr = typeof theFields['style_button_secondary_hover_text_color'] != 'string' || theFields['style_button_secondary_hover_text_color'].trim() == '' ? '' : 'color:'+theFields['style_button_secondary_hover_text_color']+' !important;' ; var secButtonBdrHvr = typeof theFields['style_button_secondary_hover_border_color'] != 'string' || theFields['style_button_secondary_hover_border_color'].trim() == '' ? '' : 'border-color:'+theFields['style_button_secondary_hover_border_color']+' !important;' ; /* tertiary button */ var terButtonBg = typeof theFields['style_button_tertiary_background'] != 'string' || theFields['style_button_tertiary_background'].trim() == '' ? '' : 'background-color:'+theFields['style_button_tertiary_background']+' !important;' ; var terButtonClr = typeof theFields['style_button_tertiary_text_color'] != 'string' || theFields['style_button_tertiary_text_color'].trim() == '' ? '' : 'color:'+theFields['style_button_tertiary_text_color']+' !important;' ; var terButtonSize = typeof theFields['style_button_tertiary_text_size'] != 'string' || theFields['style_button_tertiary_text_size'].trim() == '' ? '' : 'font-size:'+theFields['style_button_tertiary_text_size']+';' ; var terButtonWeight = typeof theFields['style_button_tertiary_text_weight'] != 'string' || theFields['style_button_tertiary_text_weight'].trim() == '' ? '' : 'font-weight:'+theFields['style_button_tertiary_text_weight']+';' ; var terButtonSpace = typeof theFields['style_button_tertiary_text_spacing'] != 'string' || theFields['style_button_tertiary_text_spacing'].trim() == '' ? '' : 'letter-spacing:'+theFields['style_button_tertiary_text_spacing']+';' ; var terButtonStyle = typeof theFields['style_button_tertiary_text_style'] != 'string' || theFields['style_button_tertiary_text_style'].trim() == '' ? '' : 'font-style:'+theFields['style_button_tertiary_text_style']+';' ; var terButtonBdrW = typeof theFields['style_button_tertiary_border_width'] != 'string' || theFields['style_button_tertiary_border_width'].trim() == '' ? '' : 'border-width:'+theFields['style_button_tertiary_border_width']+';' ; var terButtonBdrClr = typeof theFields['style_button_tertiary_border_color'] != 'string' || theFields['style_button_tertiary_border_color'].trim() == '' ? '' : 'border-color:'+theFields['style_button_tertiary_border_color']+' !important;' ; var terButtonRad = typeof theFields['style_button_tertiary_border_radius'] != 'string' || theFields['style_button_tertiary_border_radius'].trim() == '' ? '' : 'border-radius:'+theFields['style_button_tertiary_border_radius']+';' ; var terButtonBgHvr = typeof theFields['style_button_tertiary_hover_background'] != 'string' || theFields['style_button_tertiary_hover_background'].trim() == '' ? '' : 'background-color:'+theFields['style_button_tertiary_hover_background']+' !important;' ; var terButtonClrHvr = typeof theFields['style_button_tertiary_hover_text_color'] != 'string' || theFields['style_button_tertiary_hover_text_color'].trim() == '' ? '' : 'color:'+theFields['style_button_tertiary_hover_text_color']+' !important;' ; var terButtonBdrHvr = typeof theFields['style_button_tertiary_hover_border_color'] != 'string' || theFields['style_button_tertiary_hover_border_color'].trim() == '' ? '' : 'border-color:'+theFields['style_button_tertiary_hover_border_color']+' !important;' ; /* default button */ var defButtonBg = typeof theFields['style_button_default_background'] != 'string' || theFields['style_button_default_background'].trim() == '' ? '' : 'background-color:'+theFields['style_button_default_background']+' !important;' ; var defButtonClr = typeof theFields['style_button_default_text_color'] != 'string' || theFields['style_button_default_text_color'].trim() == '' ? '' : 'color:'+theFields['style_button_default_text_color']+' !important;' ; var defButtonSize = typeof theFields['style_button_default_text_size'] != 'string' || theFields['style_button_default_text_size'].trim() == '' ? '' : 'font-size:'+theFields['style_button_default_text_size']+';' ; var defButtonWeight = typeof theFields['style_button_default_text_weight'] != 'string' || theFields['style_button_default_text_weight'].trim() == '' ? '' : 'font-weight:'+theFields['style_button_default_text_weight']+';' ; var defButtonSpace = typeof theFields['style_button_default_text_spacing'] != 'string' || theFields['style_button_default_text_spacing'].trim() == '' ? '' : 'letter-spacing:'+theFields['style_button_default_text_spacing']+';' ; var defButtonStyle = typeof theFields['style_button_default_text_style'] != 'string' || theFields['style_button_default_text_style'].trim() == '' ? '' : 'font-style:'+theFields['style_button_default_text_style']+';' ; var defButtonBdrW = typeof theFields['style_button_default_border_width'] != 'string' || theFields['style_button_default_border_width'].trim() == '' ? '' : 'border-width:'+theFields['style_button_default_border_width']+';' ; var defButtonBdrClr = typeof theFields['style_button_default_border_color'] != 'string' || theFields['style_button_default_border_color'].trim() == '' ? '' : 'border-color:'+theFields['style_button_default_border_color']+' !important;' ; var defButtonRad = typeof theFields['style_button_default_border_radius'] != 'string' || theFields['style_button_default_border_radius'].trim() == '' ? '' : 'border-radius:'+theFields['style_button_default_border_radius']+';' ; var defButtonBgHvr = typeof theFields['style_button_default_hover_background'] != 'string' || theFields['style_button_default_hover_background'].trim() == '' ? '' : 'background-color:'+theFields['style_button_default_hover_background']+' !important;' ; var defButtonClrHvr = typeof theFields['style_button_default_hover_text_color'] != 'string' || theFields['style_button_default_hover_text_color'].trim() == '' ? '' : 'color:'+theFields['style_button_default_hover_text_color']+' !important;' ; var defButtonBdrHvr = typeof theFields['style_button_default_hover_border_color'] != 'string' || theFields['style_button_default_hover_border_color'].trim() == '' ? '' : 'border-color:'+theFields['style_button_default_hover_border_color']+' !important;' ; theStyles += '.btn.btn-default{'+defButtonBdrW+defButtonBdrClr+defButtonRad+defButtonBg+defButtonClr+defButtonSize+defButtonWeight+defButtonSpace+defButtonStyle+'}' + '\n'; theStyles += '.btn.btn-default:focus{'+defButtonBdrClr+defButtonRad+defButtonBg+defButtonClr+'}' + '\n'; theStyles += '.btn.btn-default:hover{'+defButtonBdrHvr+defButtonBgHvr+defButtonClrHvr+'}' + '\n'; theStyles += '.btn[class*="btn-"]{'+buttonPad+buttonTrans+'}' + '\n'; theStyles += '.btn.btn-primary{'+priButtonBdrW+priButtonBdrClr+priButtonRad+priButtonBg+priButtonClr+priButtonSize+priButtonWeight+priButtonSpace+priButtonStyle+'}' + '\n'; theStyles += '.btn.btn-primary:focus{'+priButtonBdrClr+priButtonRad+priButtonBg+priButtonClr+'}' + '\n'; theStyles += '.btn.btn-primary:hover{'+priButtonBdrHvr+priButtonBgHvr+priButtonClrHvr+'}' + '\n'; theStyles += '.btn.btn-secondary{'+secButtonBdrW+secButtonBdrClr+secButtonRad+secButtonBg+secButtonClr+secButtonSize+secButtonWeight+secButtonSpace+secButtonStyle+'}' + '\n'; theStyles += '.btn.btn-secondary:focus{'+secButtonBdrClr+secButtonRad+secButtonBg+secButtonClr+'}' + '\n'; theStyles += '.btn.btn-secondary:hover{'+secButtonBdrHvr+secButtonBgHvr+secButtonClrHvr+'}' + '\n'; theStyles += '.btn.btn-tertiary{'+terButtonBdrW+terButtonBdrClr+terButtonRad+terButtonBg+terButtonClr+terButtonSize+terButtonWeight+terButtonSpace+terButtonStyle+'}' + '\n'; theStyles += '.btn.btn-tertiary:focus{'+terButtonBdrClr+terButtonRad+terButtonBg+terButtonClr+'}' + '\n'; theStyles += '.btn.btn-tertiary:hover{'+terButtonBdrHvr+terButtonBgHvr+terButtonClrHvr+'}' + '\n'; var looseStyles = typeof theFields['style_loose_theme_rules'] != 'string' || theFields['style_loose_theme_rules'].trim() == '' ? '' : theFields['style_loose_theme_rules']; theStyles += looseStyles.replace(/content:;/g,"content:'';"); /* CREATE STYLE SHEET */ $('body').prepend(''); $('#dynamicStylesheet').text(theStyles); $('body > #content.container').addClass('ready');