"use strict";
jQuery(window).load(function($) {
	wp.customize(
		'header-style',
		function(header_style) {
			var header_height = '90';
			var header_bgcolor = 'white';
			var global_color = '#ea693f';
			var light_bg_color = '#f8f8f6';
			var blackish_bg_color = '#373737';
			var secondary_color = '#373737';
			var menu_bgcolor = 'white';
			var main_menu_typography = {
				'font-family': 'Teko',
				'variant': '500',
				'font-size': '17px',
				'line-height': '20px',
				'letter-spacing': '0px',
				'color': '#232e35',
				'text-transform': 'uppercase',
				'font-backup': ''
			};
			var header_box_title_typography = {
				'font-family': 'Barlow',
				'variant': '800',
				'font-size': '17px',
				'line-height': '27px',
				'letter-spacing': '0px',
				'color': '#0c121d',
				'text-transform': 'none',
				'font-backup': ''
			};
			var header_box_content_typography = {
				'font-family': 'Barlow',
				'variant': '700',
				'font-size': '15px',
				'line-height': '25px',
				'letter-spacing': '1px',
				'color': '#b0b6bf',
				'text-transform': 'none',
				'font-backup': ''
			};
			var sticky_header_bgcolor = 'white';
			var main_menu_active_color = 'globalcolor';
			var main_menu_sticky_color = '#232e35';
			var preheader_enable = false;
			var logo_height = '40';
			var preheader_bgcolor = 'blackish ';
			var preheader_text_color = 'white';
			var titlebar_height = '200';
			var titlebar_bgcolor = 'secondarycolor';
			var titlebar_background = {
				'background-color': '#f6f6f6',
				'background-repeat': 'no-repeat',
				'background-position': 'center center',
				'background-size': 'cover',
				'background-attachment': 'scroll',
				'background-image': dsvy_admin_js_variables.theme_path + '/images/titlebar-bg.jpg',
			};
			var titlebar_heading_typography = {
				'font-family': 'Teko',
				'variant': '600',
				'font-size': '48px',
				'line-height': '60px',
				'letter-spacing': '0px',
				'color': '#fff',
				'text-transform': 'uppercase',
				'font-backup': ''
			};
			var titlebar_subheading_typography = {
				'font-family': 'Yantramanav',
				'variant': 'regular',
				'font-size': '16px',
				'line-height': '1.5',
				'letter-spacing': '0px',
				'color': '#fff',
				'text-transform': 'none',
				'font-backup': ''
			};
			var titlebar_breadcrumb_typography = {
				'font-family': 'Yantramanav',
				'variant': '500',
				'font-size': '16px',
				'line-height': '1.5',
				'letter-spacing': '0px',
				'color': '#ffffff',
				'text-transform': 'uppercase',
				'font-backup': ''
			};
			var logo = dsvy_admin_js_variables.theme_path + '/images/logo.png';
			var sticky_logo = '';
			header_style.bind(function(value) {
			if (value == '1') { // Default header style 
					wp.customize('global-color').set(global_color);
					wp.customize('light-bg-color').set(light_bg_color);
					wp.customize('blackish-bg-color').set(blackish_bg_color);
					wp.customize('secondary-color').set(secondary_color);
					wp.customize('header-height').set(header_height);
					wp.customize('header-bgcolor').set(header_bgcolor);
					wp.customize('menu-bgcolor').set(menu_bgcolor);
					wp.customize('main-menu-typography').set(main_menu_typography);
					wp.customize('header-search').set(false);
					wp.customize('header-btn-text').set('');
					wp.customize('header-btn-text2').set('');
					wp.customize('header-btn-url').set('');
					wp.customize('sticky-header-bgcolor').set(sticky_header_bgcolor);
					wp.customize('main-menu-active-color').set('globalcolor');
					wp.customize('main-menu-sticky-color').set(main_menu_sticky_color);
					wp.customize('preheader-enable').set(preheader_enable);
					wp.customize('logo-height').set(logo_height);
					wp.customize('preheader-bgcolor').set(preheader_bgcolor);
					wp.customize('preheader-text-color').set(preheader_text_color);
					wp.customize('titlebar-height').set(titlebar_height);
					wp.customize('titlebar-bgcolor').set(titlebar_bgcolor);
					wp.customize('titlebar-background').set(titlebar_background);
					wp.customize('titlebar-heading-typography').set(titlebar_heading_typography);
					wp.customize('titlebar-subheading-typography').set(titlebar_subheading_typography);
					wp.customize('titlebar-breadcrumb-typography').set(titlebar_breadcrumb_typography);
					wp.customize('logo').set(logo);
					wp.customize('sticky-logo').set(sticky_logo);
				} else if (value == '2') { // Header style 2
					wp.customize('global-color').set('#d72323');
					wp.customize('light-bg-color').set('#f8f8f6');
					wp.customize('blackish-bg-color').set('#232e35');
					wp.customize('secondary-color').set(secondary_color);
					wp.customize('header-height').set('125');
					wp.customize('header-bgcolor').set('white');
					wp.customize('menu-bgcolor').set(menu_bgcolor);
					wp.customize('main-menu-typography').set({
						'font-family': 'Oswald',
						'variant': '500',
						'font-size': '14px',
						'line-height': '20px',
						'letter-spacing': '0px',
						'color': '#232e35',
						'text-transform': 'uppercase',
						'font-backup': '',
					});
					wp.customize('header-search').set(true);
					wp.customize('preheader-enable').set(true);
					wp.customize('preheader-left').set('<ul class="dsvy-contact-info"><li><i class="dsvy-base-icon-phone-volume-solid"></i>Telephone  : +1 (212) 255-5511</li><li><i class="dsvy-base-icon-mail-alt"></i> Email Address  : info@example.com</li><li><i class="dsvy-base-icon-location"></i>Location  : Los Angeles Gournadi, 1230  Bariasl</li></ul>');
					wp.customize('preheader-right').set('[dsvy-social-links]');
					wp.customize('sticky-header-bgcolor').set(sticky_header_bgcolor);
					wp.customize('main-menu-active-color').set('globalcolor');
					wp.customize('header-btn-text').set('login or signup?');
					wp.customize('header-btn-text2').set('');
					wp.customize('header-btn-url').set('#');
					wp.customize('logo-height').set('45');
					wp.customize('titlebar-height').set('300');
					wp.customize('titlebar-bgcolor').set('secondarycolor');
					wp.customize('titlebar-background').set({
						'background-color': '#f6f6f6',
						'background-repeat': 'no-repeat',
						'background-position': 'center center',
						'background-size': 'cover',
						'background-attachment': 'scroll',
						'background-image': '',
						'background-image': dsvy_admin_js_variables.theme_path + '/images/titlebar-bg.jpg',
					});
					wp.customize('titlebar-heading-typography').set({
						'font-family': 'Oswald',
						'variant': '600',
						'font-size': '44px',
						'line-height': '60px',
						'letter-spacing': '-0.5px',
						'color': '#ffffff',
						'text-transform': 'uppercase',
						'font-backup': ''
					});
					wp.customize('titlebar-subheading-typography').set({
						'font-family': 'Yantramanav',
						'variant': '400',
						'font-size': '18px',
						'line-height': '1.5',
						'letter-spacing': '0px',
						'color': '#ffffff',
						'text-transform': 'none',
						'font-backup': '',
					});
					wp.customize('titlebar-breadcrumb-typography').set({
						'font-family': 'Oswald',
						'variant': '600',
						'font-size': '16px',
						'line-height': '1.5',
						'letter-spacing': '-0.2px',
						'color': '#ffffff',
						'text-transform': 'uppercase',
					});
					wp.customize('logo').set(dsvy_admin_js_variables.theme_path + '/images/logo.png');
					wp.customize('sticky-logo').set(dsvy_admin_js_variables.theme_path + '/images/logo.png');
				} else if (value == '3') { // Header style 3
					wp.customize('global-color').set('#e0523a');
					wp.customize('light-bg-color').set('#f4f1ec');
					wp.customize('blackish-bg-color').set('#000000');
					wp.customize('secondary-color').set('#312f2d');
					wp.customize('header-height').set('120');
					wp.customize('header-bgcolor').set('transparent');
					wp.customize('menu-bgcolor').set(menu_bgcolor);
					wp.customize('main-menu-typography').set({
						'font-family': 'PT Serif',
						'variant': '400',
						'font-size': '15px',
						'line-height': '20px',
						'letter-spacing': '0px',
						'color': '#312f2d',
						'text-transform': 'uppercase',
						'font-backup': '',
					});
					wp.customize('header-search').set(true);
					wp.customize('preheader-enable').set(preheader_enable);
					wp.customize('sticky-header-bgcolor').set(sticky_header_bgcolor);
					wp.customize('main-menu-active-color').set('globalcolor');
					wp.customize('header-btn-text').set('Have any Question ?');
					wp.customize('header-btn-text2').set('+0 123 888 555');
					wp.customize('header-btn-url').set('#');
					wp.customize('logo-height').set('50');
					wp.customize('titlebar-height').set('500');
					wp.customize('titlebar-bgcolor').set('secondarycolor');
					wp.customize('titlebar-background').set({
						'background-color': '#f6f6f6',
						'background-repeat': 'no-repeat',
						'background-position': 'center center',
						'background-size': 'cover',
						'background-attachment': 'scroll',
						'background-image': '',
						'background-image': dsvy_admin_js_variables.theme_path + '/images/titlebar-bg.jpg',
					});
					wp.customize('titlebar-heading-typography').set({
						'font-family': 'PT Serif',
						'variant': '400',
						'font-size': '48px',
						'line-height': '60px',
						'letter-spacing': '-0.5px',
						'color': '#312f2d',
						'text-transform': 'none',
						'font-backup': ''
					});
					wp.customize('titlebar-subheading-typography').set({
						'font-family': 'Source Sans Pro',
						'variant': '600',
						'font-size': '18px',
						'line-height': '1.5',
						'letter-spacing': '0px',
						'color': '#312f2d',
						'text-transform': 'none',
						'font-backup': '',
					});
					wp.customize('titlebar-breadcrumb-typography').set({
						'font-family': 'Source Sans Pro',
						'variant': '600',
						'font-size': '16px',
						'line-height': '1.5',
						'letter-spacing': '-0.2px',
						'color': '#312f2d',
						'text-transform': 'uppercase',
					});
					wp.customize('logo').set(dsvy_admin_js_variables.theme_path + '/images/logo.png');
					wp.customize('sticky-logo').set(dsvy_admin_js_variables.theme_path + '/images/logo.png');
				} else if (value == '4') { // Header style 4 
					wp.customize('global-color').set('#ea693f');
					wp.customize('light-bg-color').set('#f8f8f6');
					wp.customize('blackish-bg-color').set('#373737');
					wp.customize('secondary-color').set('#373737');
					wp.customize('header-height').set('90');
					wp.customize('header-bgcolor').set('white');
					wp.customize('menu-bgcolor').set(menu_bgcolor);
					wp.customize('main-menu-typography').set({
						'font-family': 'Teko',
						'variant': '500',
						'font-size': '17px',
						'line-height': '20px',
						'letter-spacing': '0px',
						'color': '#232e35',
						'text-transform': 'uppercase',
						'font-backup': '',
					});
					wp.customize('header-search').set(true);
					wp.customize('preheader-enable').set(true);
					wp.customize('preheader-left').set('<ul class="dsvy-contact-info"><li><i class="dsvy-base-icon-phone-volume-solid"></i>Telephone  : +1 (212) 255-5511</li><li><i class="dsvy-base-icon-mail-alt"></i> Email Address  : info@example.com</li></ul>');
					wp.customize('preheader-right').set('[dsvy-social-links]');
					wp.customize('sticky-header-bgcolor').set(sticky_header_bgcolor);
					wp.customize('main-menu-active-color').set('globalcolor');
					wp.customize('header-btn-text').set('login or signup');
					wp.customize('header-btn-text2').set('');
					wp.customize('header-btn-url').set('#');
					wp.customize('logo-height').set('40');
					wp.customize('titlebar-height').set('400');
					wp.customize('titlebar-bgcolor').set('secondarycolor');
					wp.customize('titlebar-background').set({
						'background-color': '#f6f6f6',
						'background-repeat': 'no-repeat',
						'background-position': 'center center',
						'background-size': 'cover',
						'background-attachment': 'scroll',
						'background-image': '',
						'background-image': dsvy_admin_js_variables.theme_path + '/images/titlebar-bg.jpg',
					});
					wp.customize('titlebar-heading-typography').set({
						'font-family': 'Teko',
						'variant': '600',
						'font-size': '48px',
						'line-height': '60px',
						'letter-spacing': '0px',
						'color': '#ffffff',
						'text-transform': 'uppercase',
						'font-backup': ''
					});
					wp.customize('titlebar-subheading-typography').set({
						'font-family': 'Yantramanav',
						'variant': 'regular',
						'font-size': '16px',
						'line-height': '1.5',
						'letter-spacing': '0px',
						'color': '#ffffff',
						'text-transform': 'none',
						'font-backup': '',
					});
					wp.customize('titlebar-breadcrumb-typography').set({
						'font-family': 'Yantramanav',
						'variant': '500',
						'font-size': '17px',
						'line-height': '1.5',
						'letter-spacing': '0px',
						'color': '#ffffff',
						'text-transform': 'uppercase',
						'font-backup': '',
					});
					wp.customize('logo').set(dsvy_admin_js_variables.theme_path + '/images/logo-white.png');
					wp.customize('sticky-logo').set(dsvy_admin_js_variables.theme_path + '/images/logo-white.png');
				}
			});
		});

}); // window.load