<?php

//	Admin Styles
function restorator_admin_style() {
    
	$protocol = is_ssl() ? 'https' : 'http';
	
	#CSS
	wp_enqueue_style('restorator_admin', get_template_directory_uri() . '/inc/assets/css/cstheme-admin.css');
	wp_enqueue_style('restorator_redux', get_template_directory_uri() . '/inc/assets/css/evatheme-redux-options.css');
    wp_enqueue_style("admin_font", "$protocol://fonts.googleapis.com/css?family=Lato:400,700,900,300");
	
	#JS
	wp_enqueue_script('restorator_admin', get_template_directory_uri() . '/inc/assets/js/cstheme-admin.js', array( 'jquery' ), '', true);
	
}
add_action('admin_enqueue_scripts', 'restorator_admin_style');

#Frontend
if ( !function_exists('restorator_css_js_register')) {
	function restorator_css_js_register(){
		
		global $post, $restorator_options;
		
		$restorator_postId = ( isset( $post->ID ) ? get_the_ID() : NULL );
		
		$restorator_post_single_style = '';
		$restorator_post_single_style = get_post_meta( $restorator_postId, 'restorator_post_single_style', true );
		
		$restorator_header_style = 'header-top';
		
		#CSS
		wp_enqueue_style('bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min.css', array(), '3.3.4');
		wp_enqueue_style('fontawesome', get_template_directory_uri() . '/assets/css/font-awesome.min.css', array(), '4.5.0');
		wp_enqueue_style('restorator-evathemeicons', get_template_directory_uri() . '/assets/css/Evatheme-Icon-Fonts.css');
		wp_enqueue_style('restorator-fluidbox', get_template_directory_uri() . '/assets/css/fluidbox.css');
		wp_enqueue_style('restorator-owlcarousel', get_template_directory_uri() . '/assets/css/owl.carousel.css');
		if (restorator_woo_enabled()) {
			wp_enqueue_style('restorator-woo', get_template_directory_uri() . '/assets/css/woo.css');
		}
		wp_enqueue_style('restorator-theme', get_template_directory_uri() . '/assets/css/theme-style.css');
		wp_enqueue_style('restorator-responsive', get_template_directory_uri() . '/assets/css/responsive.css');
		wp_enqueue_style('restorator-default', get_stylesheet_uri());
		
		if( ! class_exists( 'ReduxFrameworkPlugin' ) ) {
			wp_enqueue_style('google-fonts', 'https://fonts.googleapis.com/css?family=Lato:300,400,500,600,700');
		}

		#JS
		wp_enqueue_script('bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array(), '3.3.4', true);
		wp_enqueue_script('restorator-popup', get_template_directory_uri() . '/assets/js/cstheme-popup.min.js', array(), false, true);
		wp_enqueue_script('mousewheel', get_template_directory_uri() . '/assets/js/jquery.mousewheel.js', array( 'jquery' ), '3.1.9', true);
		wp_enqueue_script('restorator-fluidbox', get_template_directory_uri() . '/assets/js/cstheme-fluidbox.min.js', array(), false, true);
		wp_enqueue_script('restorator-owlcarousel', get_template_directory_uri() . '/assets/js/cstheme-owlcarousel.js', array('jquery'), false, true);
		wp_enqueue_script('restorator-isotope', get_template_directory_uri() . '/assets/js/cstheme-isotope.js', array('jquery'), false, true);
		wp_enqueue_script('restorator-parallax', get_template_directory_uri() . '/assets/js/cstheme-parallax.js', 'jquery', false, true);
		
		$restorator_func_fixed_sidebar = isset( $restorator_options['func_fixed_sidebar'] ) ? $restorator_options['func_fixed_sidebar'] : '0';
		if( $restorator_func_fixed_sidebar != '0' && $restorator_post_single_style != 'fullscreen' ) {
			wp_enqueue_script('restorator-stickysidebar', get_template_directory_uri() . '/assets/js/ctheme-stickysidebar.js', array(), false, true);
		}
		if (restorator_woo_enabled()) {
			wp_enqueue_script('restorator-woo', get_template_directory_uri() . '/assets/js/cstheme-woo.js', array( 'jquery' ), false, true);
		}
		wp_enqueue_script('restorator-script', get_template_directory_uri() . '/assets/js/cstheme-script.js', array( 'jquery' ), '', true);
		
		if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
			wp_enqueue_script( 'comment-reply' );
		}
		
		//	Coming Soon Page
		if( get_page_template_slug() == "page-comingsoon.php" ) {
			
			wp_enqueue_script('restorator-downCount', get_template_directory_uri() . '/assets/js/cstheme-downCount.js', array(), false, true);
			
			$restorator_comings_soon_years 		= get_post_meta( $post->ID, 'restorator_comings_soon_years', true );
			$restorator_comings_soon_months 	= get_post_meta( $post->ID, 'restorator_comings_soon_months', true );
			$restorator_comings_soon_days 		= get_post_meta( $post->ID, 'restorator_comings_soon_days', true );
			
			wp_add_inline_script( 'restorator-downCount', '
				
				jQuery(document).ready(function() {
					jQuery(".countdown").downCount({
						date: "' . esc_html( $restorator_comings_soon_months ) . '/' . esc_html( $restorator_comings_soon_days ) . '/' . esc_html( $restorator_comings_soon_years ) . ' 12:00:00"
					});
				});
			
			' );
			
		}

	}
}
add_action('wp_enqueue_scripts', 'restorator_css_js_register');


/* Custom styles */
function restorator_custom_styles() {
	
	global $post, $restorator_options;
	
	wp_enqueue_style( 'restorator_inline_custom_style', get_template_directory_uri() . '/assets/css/cstheme_custom_styles.css' );
	
	$restorator_postId = ( isset( $post->ID ) ? get_the_ID() : NULL );
	
	$restorator_theme_color 					= isset( $restorator_options['theme_color'] ) ? $restorator_options['theme_color'] : '#c0a66f ';
	$restorator_header_bg_style 				= isset( $restorator_options['header_bg_style'] ) ? $restorator_options['header_bg_style'] : 'bgcolor';
	$restorator_header_page_bg_style 			= get_post_meta( $restorator_postId, 'restorator_header_page_bg_style', true );
	$restorator_header_bgcolor 					= isset( $restorator_options['header_bgcolor'] ) ? $restorator_options['header_bgcolor'] : '#000000';
	$restorator_header_color 					= isset( $restorator_options['header_color'] ) ? $restorator_options['header_color'] : '#ffffff';
	$restorator_headersubmenu_font_family 		= isset( $restorator_options['headersubmenu_font']['font-family'] ) ? $restorator_options['headersubmenu_font']['font-family'] : 'Lato';
	$restorator_headersubmenu_font_transform 	= isset( $restorator_options['headersubmenu_font']['text-transform'] ) ? $restorator_options['headersubmenu_font']['text-transform'] : 'none';
	$restorator_headersubmenu_font_weight 		= isset( $restorator_options['headersubmenu_font']['font-weight'] ) ? $restorator_options['headersubmenu_font']['font-weight'] : '400';
	$restorator_headersubmenu_font_height 		= isset( $restorator_options['headersubmenu_font']['line-height'] ) ? $restorator_options['headersubmenu_font']['line-height'] : '20px';
	$restorator_headersubmenu_font_size 		= isset( $restorator_options['headersubmenu_font']['font-size'] ) ? $restorator_options['headersubmenu_font']['font-size'] : '13px';
	$restorator_headersubmenu_font_color 		= isset( $restorator_options['headersubmenu_font']['color'] ) ? $restorator_options['headersubmenu_font']['color'] : '#ffffff';
	$restorator_headersubmenu_font_spacing 		= isset( $restorator_options['headersubmenu_font']['letter-spacing'] ) ? $restorator_options['headersubmenu_font']['letter-spacing'] : '0px';
	$restorator_headermenu_hover_color 			= isset( $restorator_options['headermenu_hover_color'] ) ? $restorator_options['headermenu_hover_color'] : '#c0a66f ';
	$restorator_headersubmenu_bgcolor 			= isset( $restorator_options['headersubmenu_bgcolor'] ) ? $restorator_options['headersubmenu_bgcolor'] : '#000000';
	$restorator_headersubmenu_hover_bgcolor 	= isset( $restorator_options['headersubmenu_hover_bgcolor'] ) ? $restorator_options['headersubmenu_hover_bgcolor'] : '#191919';
	$restorator_header_style 					= 'header-top';
	$restorator_header_left_bgcolor 			= isset( $restorator_options['header_left_bgcolor'] ) ? $restorator_options['header_left_bgcolor'] : '#2d2f31';
	$restorator_header_left_color 				= isset( $restorator_options['header_left_color'] ) ? $restorator_options['header_left_color'] : '#ffffff';
	$restorator_prefooter_bgcolor 				= isset( $restorator_options['prefooter_bgcolor'] ) ? $restorator_options['prefooter_bgcolor'] : '#2d2f31';
	$restorator_prefooter_color 				= isset( $restorator_options['prefooter_color'] ) ? $restorator_options['prefooter_color'] : '#999999';
	$restorator_footer_bgcolor 					= isset( $restorator_options['footer_bgcolor'] ) ? $restorator_options['footer_bgcolor'] : '#242628';
	$restorator_footer_color 					= isset( $restorator_options['footer_color'] ) ? $restorator_options['footer_color'] : '#999999';
	$restorator_portfolio_overlay 				= isset( $restorator_options['portfolio_overlay'] ) ? $restorator_options['portfolio_overlay'] : '#333333';
	$restorator_portfolio_overlay_opacity 		= isset( $restorator_options['portfolio_overlay_opacity'] ) ? $restorator_options['portfolio_overlay_opacity'] : '85';
	$restorator_portfolio_filter_color 			= isset( $restorator_options['portfolio_filter_color'] ) ? $restorator_options['portfolio_filter_color'] : '#333333';
	$restorator_prefooter_headings_family 		= isset( $restorator_options['prefooter_headings']['font-family'] ) ? $restorator_options['prefooter_headings']['font-family'] : 'Lato';
	$restorator_prefooter_headings_transform 	= isset( $restorator_options['prefooter_headings']['text-transform'] ) ? $restorator_options['prefooter_headings']['text-transform'] : 'none';
	$restorator_prefooter_headings_weight 		= isset( $restorator_options['prefooter_headings']['font-weight'] ) ? $restorator_options['prefooter_headings']['font-weight'] : '500';
	$restorator_prefooter_headings_height 		= isset( $restorator_options['prefooter_headings']['line-height'] ) ? $restorator_options['prefooter_headings']['line-height'] : '28px';
	$restorator_prefooter_headings_size 		= isset( $restorator_options['prefooter_headings']['font-size'] ) ? $restorator_options['prefooter_headings']['font-size'] : '18px';
	$restorator_prefooter_headings_color 		= isset( $restorator_options['prefooter_headings']['color'] ) ? $restorator_options['prefooter_headings']['color'] : '#ffffff';
	$restorator_prefooter_headings_spacing 		= isset( $restorator_options['prefooter_headings']['letter-spacing'] ) ? $restorator_options['prefooter_headings']['letter-spacing'] : '0px';
	$restorator_headermenu_font_family 			= isset( $restorator_options['headermenu_font']['font-family'] ) ? $restorator_options['headermenu_font']['font-family'] : 'Lato';
	$restorator_headermenu_font_transform 		= isset( $restorator_options['headermenu_font']['text-transform'] ) ? $restorator_options['headermenu_font']['text-transform'] : 'uppercase';
	$restorator_headermenu_font_weight 			= isset( $restorator_options['headermenu_font']['font-weight'] ) ? $restorator_options['headermenu_font']['font-weight'] : '700';
	$restorator_headermenu_font_height 			= isset( $restorator_options['headermenu_font']['line-height'] ) ? $restorator_options['headermenu_font']['line-height'] : '20px';
	$restorator_headermenu_font_size 			= isset( $restorator_options['headermenu_font']['font-size'] ) ? $restorator_options['headermenu_font']['font-size'] : '12px';
	$restorator_headermenu_font_color 			= isset( $restorator_options['headermenu_font']['color'] ) ? $restorator_options['headermenu_font']['color'] : '#ffffff';
	$restorator_headermenu_font_spacing 		= isset( $restorator_options['headermenu_font']['letter-spacing'] ) ? $restorator_options['headermenu_font']['letter-spacing'] : '1px';
	$restorator_body_font_family 				= isset( $restorator_options['body-font']['font-family'] ) ? $restorator_options['body-font']['font-family'] : 'Lato';
	$restorator_body_font_transform 			= isset( $restorator_options['body-font']['text-transform'] ) ? $restorator_options['body-font']['text-transform'] : 'none';
	$restorator_body_font_weight 				= isset( $restorator_options['body-font']['font-weight'] ) ? $restorator_options['body-font']['font-weight'] : '400';
	$restorator_body_font_height 				= isset( $restorator_options['body-font']['line-height'] ) ? $restorator_options['body-font']['line-height'] : '24px';
	$restorator_body_font_size 					= isset( $restorator_options['body-font']['font-size'] ) ? $restorator_options['body-font']['font-size'] : '14px';
	$restorator_body_font_color 				= isset( $restorator_options['body-font']['color'] ) ? $restorator_options['body-font']['color'] : '#666666';
	$restorator_body_font_spacing 				= isset( $restorator_options['body-font']['letter-spacing'] ) ? $restorator_options['body-font']['letter-spacing'] : '0px';

	// Theme / Page Background Stylings
	$restorator_page_bg_styles = $restorator_page_bg_image = $restorator_page_bg_image_repeat = $restorator_page_bg_color = $restorator_page_bg_attachment = $restorator_page_bg_position = $restorator_page_bg_cover = $restorator_page_text_color = $restorator_theme_boxed_margin = '';
	$restorator_page_bg_image = get_post_meta( $restorator_postId, 'restorator_page_bg_image', true );

	if ( $restorator_page_bg_image ) {
		if ( is_numeric( $restorator_page_bg_image ) ) {
			$restorator_page_bg_image = wp_get_attachment_image_src( $restorator_page_bg_image, 'full' );
			$restorator_page_bg_image = $restorator_page_bg_image[0];
		}
	}

	$restorator_page_bg_image_repeat 		= get_post_meta( $restorator_postId, 'restorator_page_bg_repeat', true );
	$restorator_page_bg_color 			= get_post_meta( $restorator_postId, 'restorator_page_bg_color', true );
	$restorator_page_bg_attachment 		= get_post_meta( $restorator_postId, 'restorator_page_bg_attachment', true );
	$restorator_page_bg_position 			= get_post_meta( $restorator_postId, 'restorator_page_bg_position', true );
	$restorator_page_bg_cover 			= get_post_meta( $restorator_postId, 'restorator_page_bg_full', true );
	$restorator_page_text_color 			= get_post_meta( $restorator_postId, 'restorator_page_text_color', true );

	$restorator_theme_bg_image = $restorator_theme_bg_image_repeat = $restorator_theme_bg_color = $restorator_theme_bg_attachment = $restorator_theme_bg_position = $restorator_theme_bg_cover = '';
	if( isset( $restorator_options['theme_bg_image'] ) ) {
		if( isset( $restorator_options['theme_bg_image']['background-image'] ) && $restorator_options['theme_bg_image']['background-image'] != '' ) {
			$restorator_theme_bg_image = $restorator_options['theme_bg_image']['background-image'];
		}
		if( isset( $restorator_options['theme_bg_image']['background-repeat'] ) && $restorator_options['theme_bg_image']['background-repeat'] != '' ) {
			$restorator_theme_bg_image_repeat = $restorator_options['theme_bg_image']['background-repeat'];
		}
		if( isset( $restorator_options['theme_bg_image']['background-attachment'] ) && $restorator_options['theme_bg_image']['background-attachment'] != '' ) {
			$restorator_theme_bg_attachment = $restorator_options['theme_bg_image']['background-attachment'];
		}
		if( isset( $restorator_options['theme_bg_image']['background-position'] ) && $restorator_options['theme_bg_image']['background-position'] != '' ) {
			$restorator_theme_bg_position = $restorator_options['theme_bg_image']['background-position'];
		}
		if( isset( $restorator_options['theme_bg_image']['background-size'] ) && $restorator_options['theme_bg_image']['background-size'] != '' ) {
			$restorator_theme_bg_cover = $restorator_options['theme_bg_image']['background-size'];
		}
	}
	if( isset( $restorator_options['theme_bg_image']['background-color'] ) && $restorator_options['theme_bg_image']['background-color'] != '' ) {
		$restorator_theme_bg_color = $restorator_options['theme_bg_image']['background-color'];
	}

	$restorator_page_bg_image 			= ! empty( $restorator_page_bg_image ) ? $restorator_page_bg_image : $restorator_theme_bg_image;
	$restorator_page_bg_color 			= ! empty( $restorator_page_bg_color ) ? $restorator_page_bg_color : $restorator_theme_bg_color;
	$restorator_page_bg_image_repeat 		= ! empty( $restorator_page_bg_image_repeat ) ? $restorator_page_bg_image_repeat : $restorator_theme_bg_image_repeat;
	$restorator_page_bg_attachment 		= ! empty( $restorator_page_bg_attachment ) ? $restorator_page_bg_attachment : $restorator_theme_bg_attachment;
	$restorator_page_bg_position 			= ! empty( $restorator_page_bg_position ) ? $restorator_page_bg_position : $restorator_theme_bg_position;
	$restorator_page_bg_cover 			= ! empty( $restorator_page_bg_cover ) ? $restorator_page_bg_cover : $restorator_theme_bg_cover;

	if( isset( $restorator_page_bg_image ) && $restorator_page_bg_image != '' ) {
		$restorator_page_bg_styles .= 'background-image: url('. $restorator_page_bg_image .');';
		if( isset( $restorator_page_bg_image_repeat ) && $restorator_page_bg_image_repeat != '' ) {
			$restorator_page_bg_styles .= 'background-repeat: '. $restorator_page_bg_image_repeat .';';
		}
		if( isset( $restorator_page_bg_attachment ) && $restorator_page_bg_attachment != '' ) {
			$restorator_page_bg_styles .= 'background-attachment: '. $restorator_page_bg_attachment .';';
		}
		if( isset( $restorator_page_bg_position ) && $restorator_page_bg_position != '' ) {
			$restorator_page_bg_styles .= 'background-position: '. $restorator_page_bg_position .';';
		}
		if( isset( $restorator_page_bg_cover ) && $restorator_page_bg_cover != '' ) {
			$restorator_page_bg_styles .= 'background-size: '. $restorator_page_bg_cover .';';
			$restorator_page_bg_styles .= '-moz-background-size: '. $restorator_page_bg_cover .';';
			$restorator_page_bg_styles .= '-webkit-background-size: '. $restorator_page_bg_cover .';';
			$restorator_page_bg_styles .= '-o-background-size: '. $restorator_page_bg_cover .';';
			$restorator_page_bg_styles .= '-ms-background-size: '. $restorator_page_bg_cover .';';
		}
	}

	if( isset( $restorator_page_bg_color ) && $restorator_page_bg_color != '' ) {
		$restorator_page_bg_styles .= 'background-color: '. $restorator_page_bg_color .';';
	}

	
	$restorator_theme_boxed_margin = isset( $restorator_options['theme_boxed_margin'] ) ? $restorator_options['theme_boxed_margin'] : '0';
	
	$restorator_header_bg_style = !empty( $restorator_header_page_bg_style ) ? $restorator_header_page_bg_style : $restorator_header_bg_style;
	
	if ( isset( $restorator_header_bg_style ) ) {
		$restorator_header_bgcolor_opacity = $restorator_options['header_bgcolor_opacity'];
	} else {
		$restorator_header_bgcolor_opacity = '99';
	}
	
	$restorator_header_gradient_from = isset( $restorator_options['header_gradient']['from'] ) ? $restorator_options['header_gradient']['from'] : '#262729';
	$restorator_header_gradient_to = isset( $restorator_options['header_gradient']['to'] ) ? $restorator_options['header_gradient']['to'] : 'transparent';
	
	if ( ( $restorator_header_bg_style != 'gradient' ) || ( is_singular('portfolio') && $restorator_options['portfolio_single_pagetitle'] != 'show' ) ) {
		$restorator_headertop_bg = '
			body.header-top header.header-top .header_bg{
				opacity: 0.' . $restorator_header_bgcolor_opacity . ' ;
				background-color: ' . $restorator_header_bgcolor . ';
			}
		';
	} else {
		$restorator_headertop_bg = '
			body.header-top header.header-top .header_bg{
				height:200%;
				opacity:1;
				background: -moz-linear-gradient(top, ' . $restorator_header_gradient_from . ' 0%, ' . $restorator_header_gradient_to . ' 100%);
				background: -webkit-linear-gradient(top, ' . $restorator_header_gradient_from . ' 0%,' . $restorator_header_gradient_to . ' 100%);
				background: linear-gradient(to bottom, ' . $restorator_header_gradient_from . ' 0%,' . $restorator_header_gradient_to . ' 100%);
				filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="' . $restorator_header_gradient_from . '", endColorstr="' . $restorator_header_gradient_to . '",GradientType=0 );
			}
			body.header-top.pagetitle_hide.header-fixed .header_bg {height:100%; background-color: ' . $restorator_header_bgcolor . ';}
			body.single-product.header-top.pagetitle_hide .header_bg {height:auto; background-color: ' . $restorator_header_bgcolor . ';}
			header.header-top .menu-primary-menu-container-wrap ul.nav-menu > li:hover > a,
			header.header-top .menu-primary-menu-container-wrap ul.nav-menu > li.current_page_item > a,
			header.header-top .menu-primary-menu-container-wrap ul.nav-menu > li.current-menu-item > a{
				color: ' . $restorator_headermenu_hover_color . ' !important;
			}
		';
	}
	
	// Breadcrumbs
	$restorator_breadcrumbs_bgcolor = isset( $restorator_options['breadcrumbs_bgcolor'] ) ? $restorator_options['breadcrumbs_bgcolor'] : '#f2f2f2';
	$restorator_breadcrumbs_color = isset( $restorator_options['breadcrumbs_color'] ) ? $restorator_options['breadcrumbs_color'] : '#999999';
	
	
	// Page Title Background Stylings
	$restorator_pagetitle_bg_styles = $restorator_pagetitle_bg_image = $restorator_pagetitle_bg_image_repeat = $restorator_pagetitle_bg_color = $restorator_pagetitle_bg_attachment = $restorator_pagetitle_bg_position = $restorator_pagetitle_bg_cover = $restorator_pagetitle_text_color = $restorator_post_single_style = '';
	$restorator_pagetitle_bg_image = get_post_meta( $restorator_postId, 'restorator_pagetitle_bg_image', true );
	$restorator_post_single_style = get_post_meta( $restorator_postId, 'restorator_post_single_style', true );

	if ( $restorator_pagetitle_bg_image ) {
		if ( is_numeric( $restorator_pagetitle_bg_image ) ) {
			$restorator_pagetitle_bg_image = wp_get_attachment_image_src( $restorator_pagetitle_bg_image, 'full' );
			$restorator_pagetitle_bg_image = $restorator_pagetitle_bg_image[0];
		}
	}

	$restorator_pagetitle_bg_image_repeat 	= get_post_meta( $restorator_postId, 'restorator_pagetitle_bg_repeat', true );
	$restorator_pagetitle_bg_color 			= get_post_meta( $restorator_postId, 'restorator_pagetitle_bg_color', true );
	$restorator_pagetitle_bg_attachment 		= get_post_meta( $restorator_postId, 'restorator_pagetitle_bg_attachment', true );
	$restorator_pagetitle_bg_position 		= get_post_meta( $restorator_postId, 'restorator_pagetitle_bg_position', true );
	$restorator_pagetitle_bg_cover 			= get_post_meta( $restorator_postId, 'restorator_pagetitle_bg_full', true );
	$restorator_pagetitle_text_color 			= get_post_meta( $restorator_postId, 'restorator_pagetitle_text_color', true );

	$restorator_theme_pagetitle_bg_image = $restorator_theme_pagetitle_bg_image_repeat = $restorator_theme_pagetitle_bg_color = $restorator_theme_pagetitle_bg_attachment = $restorator_theme_pagetitle_bg_position = $restorator_theme_pagetitle_bg_cover = $restorator_theme_pagetitle_text_color = '';
	if( isset( $restorator_options['pagetitle_bg_image'] ) ) {
		if( isset( $restorator_options['pagetitle_bg_image']['background-image'] ) && $restorator_options['pagetitle_bg_image']['background-image'] != '' ) {
			$restorator_theme_pagetitle_bg_image = $restorator_options['pagetitle_bg_image']['background-image'];
		}
		if( isset( $restorator_options['pagetitle_bg_image']['background-repeat'] ) && $restorator_options['pagetitle_bg_image']['background-repeat'] != '' ) {
			$restorator_theme_pagetitle_bg_image_repeat = $restorator_options['pagetitle_bg_image']['background-repeat'];
		}
		if( isset( $restorator_options['pagetitle_bg_image']['background-attachment'] ) && $restorator_options['pagetitle_bg_image']['background-attachment'] != '' ) {
			$restorator_theme_pagetitle_bg_attachment = $restorator_options['pagetitle_bg_image']['background-attachment'];
		}
		if( isset( $restorator_options['pagetitle_bg_image']['background-position'] ) && $restorator_options['pagetitle_bg_image']['background-position'] != '' ) {
			$restorator_theme_pagetitle_bg_position = $restorator_options['pagetitle_bg_image']['background-position'];
		}
		if( isset( $restorator_options['pagetitle_bg_image']['background-size'] ) && $restorator_options['pagetitle_bg_image']['background-size'] != '' ) {
			$restorator_theme_pagetitle_bg_cover = $restorator_options['pagetitle_bg_image']['background-size'];
		}
		if( isset( $restorator_options['pagetitle_text_color'] ) && $restorator_options['pagetitle_text_color'] != '' ) {
			$restorator_theme_pagetitle_text_color = $restorator_options['pagetitle_text_color'];
		}
	}
	if( isset( $restorator_options['pagetitle_bg_image']['background-color'] ) && $restorator_options['pagetitle_bg_image']['background-color'] != '' ) {
		$restorator_theme_pagetitle_bg_color = $restorator_options['pagetitle_bg_image']['background-color'];
	}

	//	If Blog
	if ( ( is_home() || is_singular('post') || is_category() || is_tag() || is_search() || is_day() || is_month() || is_year() ) && isset( $restorator_options['blog_pagetitle_bg_image'] ) ) {
		if( isset( $restorator_options['blog_pagetitle_bg_image']['background-image'] ) && $restorator_options['blog_pagetitle_bg_image']['background-image'] != '' ) {
			$restorator_theme_pagetitle_bg_image = $restorator_options['blog_pagetitle_bg_image']['background-image'];
		}
		if( isset( $restorator_options['blog_pagetitle_bg_image']['background-repeat'] ) && $restorator_options['blog_pagetitle_bg_image']['background-repeat'] != '' ) {
			$restorator_theme_pagetitle_bg_image_repeat = $restorator_options['blog_pagetitle_bg_image']['background-repeat'];
		}
		if( isset( $restorator_options['blog_pagetitle_bg_image']['background-attachment'] ) && $restorator_options['blog_pagetitle_bg_image']['background-attachment'] != '' ) {
			$restorator_theme_pagetitle_bg_attachment = $restorator_options['blog_pagetitle_bg_image']['background-attachment'];
		}
		if( isset( $restorator_options['blog_pagetitle_bg_image']['background-position'] ) && $restorator_options['blog_pagetitle_bg_image']['background-position'] != '' ) {
			$restorator_theme_pagetitle_bg_position = $restorator_options['blog_pagetitle_bg_image']['background-position'];
		}
		if( isset( $restorator_options['blog_pagetitle_bg_image']['background-size'] ) && $restorator_options['blog_pagetitle_bg_image']['background-size'] != '' ) {
			$restorator_theme_pagetitle_bg_cover = $restorator_options['blog_pagetitle_bg_image']['background-size'];
		}
		if( isset( $restorator_options['pagetitle_text_color'] ) && $restorator_options['pagetitle_text_color'] != '' ) {
			$restorator_theme_pagetitle_text_color = $restorator_options['pagetitle_text_color'];
		}
	} else if ( is_singular('portfolio') && isset( $restorator_options['portfolio_single_pagetitle_bg_image'] ) ) {
		if( isset( $restorator_options['portfolio_single_pagetitle_bg_image']['background-image'] ) && $restorator_options['portfolio_single_pagetitle_bg_image']['background-image'] != '' ) {
			$restorator_theme_pagetitle_bg_image = $restorator_options['portfolio_single_pagetitle_bg_image']['background-image'];
		}
		if( isset( $restorator_options['portfolio_single_pagetitle_bg_image']['background-repeat'] ) && $restorator_options['portfolio_single_pagetitle_bg_image']['background-repeat'] != '' ) {
			$restorator_theme_pagetitle_bg_image_repeat = $restorator_options['portfolio_single_pagetitle_bg_image']['background-repeat'];
		}
		if( isset( $restorator_options['portfolio_single_pagetitle_bg_image']['background-attachment'] ) && $restorator_options['portfolio_single_pagetitle_bg_image']['background-attachment'] != '' ) {
			$restorator_theme_pagetitle_bg_attachment = $restorator_options['portfolio_single_pagetitle_bg_image']['background-attachment'];
		}
		if( isset( $restorator_options['portfolio_single_pagetitle_bg_image']['background-position'] ) && $restorator_options['portfolio_single_pagetitle_bg_image']['background-position'] != '' ) {
			$restorator_theme_pagetitle_bg_position = $restorator_options['portfolio_single_pagetitle_bg_image']['background-position'];
		}
		if( isset( $restorator_options['portfolio_single_pagetitle_bg_image']['background-size'] ) && $restorator_options['portfolio_single_pagetitle_bg_image']['background-size'] != '' ) {
			$restorator_theme_pagetitle_bg_cover = $restorator_options['portfolio_single_pagetitle_bg_image']['background-size'];
		}
		if( isset( $restorator_options['portfolio_single_pagetitle_text_color'] ) && $restorator_options['portfolio_single_pagetitle_text_color'] != '' ) {
			$restorator_theme_pagetitle_text_color = $restorator_options['portfolio_single_pagetitle_text_color'];
		}
	}
	if( ( is_home() || is_singular('post') || is_category() || is_tag() || is_search() || is_day() || is_month() || is_year() ) && isset( $restorator_options['blog_pagetitle_bg_image']['background-color'] ) && $restorator_options['blog_pagetitle_bg_image']['background-color'] != '' ) {
		$restorator_theme_pagetitle_bg_color = $restorator_options['blog_pagetitle_bg_image']['background-color'];
	}

	$restorator_pagetitle_bg_image 			= ! empty( $restorator_pagetitle_bg_image ) ? $restorator_pagetitle_bg_image : $restorator_theme_pagetitle_bg_image;
	$restorator_pagetitle_bg_color 			= ! empty( $restorator_pagetitle_bg_color ) ? $restorator_pagetitle_bg_color : $restorator_theme_pagetitle_bg_color;
	$restorator_pagetitle_bg_image_repeat 	= ! empty( $restorator_pagetitle_bg_image_repeat ) ? $restorator_pagetitle_bg_image_repeat : $restorator_theme_pagetitle_bg_image_repeat;
	$restorator_pagetitle_bg_attachment 		= ! empty( $restorator_pagetitle_bg_attachment ) ? $restorator_pagetitle_bg_attachment : $restorator_theme_pagetitle_bg_attachment;
	$restorator_pagetitle_bg_position 		= ! empty( $restorator_pagetitle_bg_position ) ? $restorator_pagetitle_bg_position : $restorator_theme_pagetitle_bg_position;
	$restorator_pagetitle_bg_cover 			= ! empty( $restorator_pagetitle_bg_cover ) ? $restorator_pagetitle_bg_cover : $restorator_theme_pagetitle_bg_cover;
	$restorator_pagetitle_text_color 			= ! empty( $restorator_pagetitle_text_color ) ? $restorator_pagetitle_text_color : $restorator_theme_pagetitle_text_color;

	if( isset( $restorator_pagetitle_bg_image ) && $restorator_pagetitle_bg_image != '' ) {
		$restorator_pagetitle_bg_styles .= 'background-image: url('. $restorator_pagetitle_bg_image .');';
		if( isset( $restorator_pagetitle_bg_image_repeat ) && $restorator_pagetitle_bg_image_repeat != '' ) {
			$restorator_pagetitle_bg_styles .= 'background-repeat: '. $restorator_pagetitle_bg_image_repeat .';';
		}
		if( isset( $restorator_pagetitle_bg_attachment ) && $restorator_pagetitle_bg_attachment != '' ) {
			$restorator_pagetitle_bg_styles .= 'background-attachment: '. $restorator_pagetitle_bg_attachment .';';
		}
		if( isset( $restorator_pagetitle_bg_position ) && $restorator_pagetitle_bg_position != '' ) {
			$restorator_pagetitle_bg_styles .= 'background-position: '. $restorator_pagetitle_bg_position .';';
		}
		if( isset( $restorator_pagetitle_bg_cover ) && $restorator_pagetitle_bg_cover != '' ) {
			$restorator_pagetitle_bg_styles .= 'background-size: '. $restorator_pagetitle_bg_cover .';';
			$restorator_pagetitle_bg_styles .= '-moz-background-size: '. $restorator_pagetitle_bg_cover .';';
			$restorator_pagetitle_bg_styles .= '-webkit-background-size: '. $restorator_pagetitle_bg_cover .';';
			$restorator_pagetitle_bg_styles .= '-o-background-size: '. $restorator_pagetitle_bg_cover .';';
			$restorator_pagetitle_bg_styles .= '-ms-background-size: '. $restorator_pagetitle_bg_cover .';';
		}
	}

	if( isset( $restorator_pagetitle_bg_color ) && $restorator_pagetitle_bg_color != '' ) {
		$restorator_pagetitle_bg_styles .= 'background-color: '. $restorator_pagetitle_bg_color .';';
	}

	if( isset( $restorator_pagetitle_text_color ) && $restorator_pagetitle_text_color != '' ) {
		$restorator_pagetitle_bg_styles .= 'color: '. $restorator_pagetitle_text_color .';';
	}
	
	if ( is_singular('post') && $restorator_post_single_style == 'fullscreen' ) {
		$restorator_featured_image_url = wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) );
		$restorator_pagetitle_bg_styles .= 'background-image: url('. $restorator_featured_image_url .');';
	}
	
	
	//	Page 404
	$restorator_page404_bg_styles = '';
	if ( is_404() ) {

		$restorator_page404_bg_image = $restorator_page404_bg_image_repeat = $restorator_page404_bg_color = $restorator_page404_bg_attachment = $restorator_page404_bg_position = $restorator_page404_bg_cover = '';
		if( isset( $restorator_options['page404_bg_image'] ) ) {
			if( isset( $restorator_options['page404_bg_image']['background-image'] ) && $restorator_options['page404_bg_image']['background-image'] != '' ) {
				$restorator_page404_bg_image = $restorator_options['page404_bg_image']['background-image'];
			}
			if( isset( $restorator_options['page404_bg_image']['background-repeat'] ) && $restorator_options['page404_bg_image']['background-repeat'] != '' ) {
				$restorator_page404_bg_image_repeat = $restorator_options['page404_bg_image']['background-repeat'];
			}
			if( isset( $restorator_options['page404_bg_image']['background-attachment'] ) && $restorator_options['page404_bg_image']['background-attachment'] != '' ) {
				$restorator_page404_bg_attachment = $restorator_options['page404_bg_image']['background-attachment'];
			}
			if( isset( $restorator_options['page404_bg_image']['background-position'] ) && $restorator_options['page404_bg_image']['background-position'] != '' ) {
				$restorator_page404_bg_position = $restorator_options['page404_bg_image']['background-position'];
			}
			if( isset( $restorator_options['page404_bg_image']['background-size'] ) && $restorator_options['page404_bg_image']['background-size'] != '' ) {
				$restorator_page404_bg_cover = $restorator_options['page404_bg_image']['background-size'];
			}
		}
		if( isset( $restorator_options['page404_bg_image']['background-color'] ) && $restorator_options['page404_bg_image']['background-color'] != '' ) {
			$restorator_page404_bg_color = $restorator_options['page404_bg_image']['background-color'];
		}

		if( isset( $restorator_page404_bg_image ) && $restorator_page404_bg_image != '' ) {
			$restorator_page404_bg_styles .= 'background-image: url('. $restorator_page404_bg_image .');';
			if( isset( $restorator_page404_bg_image_repeat ) && $restorator_page404_bg_image_repeat != '' ) {
				$restorator_page404_bg_styles .= 'background-repeat: '. $restorator_page404_bg_image_repeat .';';
			}
			if( isset( $restorator_page404_bg_attachment ) && $restorator_page404_bg_attachment != '' ) {
				$restorator_page404_bg_styles .= 'background-attachment: '. $restorator_page404_bg_attachment .';';
			}
			if( isset( $restorator_page404_bg_position ) && $restorator_page404_bg_position != '' ) {
				$restorator_page404_bg_styles .= 'background-position: '. $restorator_page404_bg_position .';';
			}
			if( isset( $restorator_page404_bg_cover ) && $restorator_page404_bg_cover != '' ) {
				$restorator_page404_bg_styles .= 'background-size: '. $restorator_page404_bg_cover .';';
				$restorator_page404_bg_styles .= '-moz-background-size: '. $restorator_page404_bg_cover .';';
				$restorator_page404_bg_styles .= '-webkit-background-size: '. $restorator_page404_bg_cover .';';
				$restorator_page404_bg_styles .= '-o-background-size: '. $restorator_page404_bg_cover .';';
				$restorator_page404_bg_styles .= '-ms-background-size: '. $restorator_page404_bg_cover .';';
			}
		}

		if( isset( $restorator_page404_bg_color ) && $restorator_page404_bg_color != '' ) {
			$restorator_page404_bg_styles .= 'background-color: '. $restorator_page404_bg_color .';';
		}
	}
	
	
	//	WooCommerce
	$restorator_pageshop_bg_styles = $restorator_pageshop_bg_image = $restorator_pageshop_bg_image_repeat = $restorator_pageshop_bg_color = $restorator_pageshop_bg_attachment = $restorator_pageshop_bg_position = $restorator_pageshop_bg_cover = $restorator_shop_pagetitle_text_color = $restorator_shop_pagetitle_text_color_set = '';
	if( class_exists('WooCommerce') && ( is_woocommerce() || is_shop() || is_cart() || is_checkout() || is_account_page() ) ) {

		if( isset( $restorator_options['pageshop_bg_image'] ) ) {
			if( isset( $restorator_options['pageshop_bg_image']['background-image'] ) && $restorator_options['pageshop_bg_image']['background-image'] != '' ) {
				$restorator_pageshop_bg_image = $restorator_options['pageshop_bg_image']['background-image'];
			}
			if( isset( $restorator_options['pageshop_bg_image']['background-repeat'] ) && $restorator_options['pageshop_bg_image']['background-repeat'] != '' ) {
				$restorator_pageshop_bg_image_repeat = $restorator_options['pageshop_bg_image']['background-repeat'];
			}
			if( isset( $restorator_options['pageshop_bg_image']['background-attachment'] ) && $restorator_options['pageshop_bg_image']['background-attachment'] != '' ) {
				$restorator_pageshop_bg_attachment = $restorator_options['pageshop_bg_image']['background-attachment'];
			}
			if( isset( $restorator_options['pageshop_bg_image']['background-position'] ) && $restorator_options['pageshop_bg_image']['background-position'] != '' ) {
				$restorator_pageshop_bg_position = $restorator_options['pageshop_bg_image']['background-position'];
			}
			if( isset( $restorator_options['pageshop_bg_image']['background-size'] ) && $restorator_options['pageshop_bg_image']['background-size'] != '' ) {
				$restorator_pageshop_bg_cover = $restorator_options['pageshop_bg_image']['background-size'];
			}
			if( isset( $restorator_options['shop_pagetitle_text_color'] ) && $restorator_options['shop_pagetitle_text_color'] != '' ) {
				$restorator_shop_pagetitle_text_color = $restorator_options['shop_pagetitle_text_color'];
			}
		}
		if( isset( $restorator_options['pageshop_bg_image']['background-color'] ) && $restorator_options['pageshop_bg_image']['background-color'] != '' ) {
			$restorator_pageshop_bg_color = $restorator_options['pageshop_bg_image']['background-color'];
		}

		if( isset( $restorator_pageshop_bg_image ) && $restorator_pageshop_bg_image != '' ) {
			$restorator_pageshop_bg_styles .= 'background-image: url('. $restorator_pageshop_bg_image .');';
			if( isset( $restorator_pageshop_bg_image_repeat ) && $restorator_pageshop_bg_image_repeat != '' ) {
				$restorator_pageshop_bg_styles .= 'background-repeat: '. $restorator_pageshop_bg_image_repeat .';';
			}
			if( isset( $restorator_pageshop_bg_attachment ) && $restorator_pageshop_bg_attachment != '' ) {
				$restorator_pageshop_bg_styles .= 'background-attachment: '. $restorator_pageshop_bg_attachment .';';
			}
			if( isset( $restorator_pageshop_bg_position ) && $restorator_pageshop_bg_position != '' ) {
				$restorator_pageshop_bg_styles .= 'background-position: '. $restorator_pageshop_bg_position .';';
			}
			if( isset( $restorator_pageshop_bg_cover ) && $restorator_pageshop_bg_cover != '' ) {
				$restorator_pageshop_bg_styles .= 'background-size: '. $restorator_pageshop_bg_cover .';';
				$restorator_pageshop_bg_styles .= '-moz-background-size: '. $restorator_pageshop_bg_cover .';';
				$restorator_pageshop_bg_styles .= '-webkit-background-size: '. $restorator_pageshop_bg_cover .';';
				$restorator_pageshop_bg_styles .= '-o-background-size: '. $restorator_pageshop_bg_cover .';';
				$restorator_pageshop_bg_styles .= '-ms-background-size: '. $restorator_pageshop_bg_cover .';';
			}
		}

		if( isset( $restorator_pageshop_bg_color ) && $restorator_pageshop_bg_color != '' ) {
			$restorator_pageshop_bg_styles .= 'background-color: '. $restorator_pageshop_bg_color .';';
		}
		
		if( isset( $restorator_shop_pagetitle_text_color ) && $restorator_shop_pagetitle_text_color != '' ) {
			$restorator_shop_pagetitle_text_color_set .= 'color: '. $restorator_shop_pagetitle_text_color .';';
		}
	}
	
	
	/* Custom CSS from Theme Options */
	$restorator_options_custom_css = isset( $restorator_options['custom_css'] ) ? $restorator_options['custom_css'] : '';
	
	
	$restorator_inline_custom_css = "
	
	body{
		font-family: $restorator_body_font_family ;
		text-transform: $restorator_body_font_transform ;
		font-weight: $restorator_body_font_weight ;
		line-height: $restorator_body_font_height ;
		font-size: $restorator_body_font_size ;
		color: $restorator_body_font_color ;
		letter-spacing: $restorator_body_font_spacing ;
	}
	body.boxed {  }
	body.boxed{
		padding-top: $restorator_theme_boxed_margin px;
		padding-bottom: $restorator_theme_boxed_margin px;
		$restorator_page_bg_styles
	}
	body.boxed footer.fixed.active{
		bottom: $restorator_theme_boxed_margin px;
	}
	
	
	/* header */
	$restorator_headertop_bg
	
	.header_wrap .menu_creative_btn span{
		background-color: $restorator_headermenu_font_color !important;
	}
	.header_wrap .menu_creative_btn:hover span{ background-color: $restorator_headermenu_hover_color !important; }
	.header_search_icon{ color: $restorator_headermenu_font_color !important; }
	.header_search_icon:hover{ color: $restorator_headermenu_hover_color !important; }
	.menu_creative_btn span{ background-color: $restorator_header_color ; }
	.header_tagline:before{ background-color: $restorator_header_color ; }
	.tagline_text_wrap a{ color: $restorator_header_color !important; }
	.tagline_text_wrap a:hover i{ color: $restorator_theme_color ; }
	header.header-top .social_links_wrap .social_link{ color: $restorator_header_color !important; }
	.restorator-logo h1 a{ color: $restorator_header_color !important; }
	body.header-fixed header.header-top .header_wrap{ background-color: $restorator_header_bgcolor ; }
	#page-wrap > header#header_mobile_wrap{ background-color: $restorator_header_bgcolor ; }

	header.header-top .menu-primary-menu-container-wrap > div > ul > li > a,
	.menu_creative_block .menu-primary-menu-container-wrap > div > ul > li > a{
		font-family: $restorator_headermenu_font_family ;
		text-transform: $restorator_headermenu_font_transform ;
		font-weight: $restorator_headermenu_font_weight ;
		line-height: $restorator_headermenu_font_height ;
		font-size: $restorator_headermenu_font_size ;
		color: $restorator_headermenu_font_color ;
		letter-spacing: $restorator_headermenu_font_spacing ;
	}
	header.header-top .menu-primary-menu-container-wrap .sub-menu li.menu-item a,
	.menu_creative_block li li a{
		font-family: $restorator_headersubmenu_font_family ;
		text-transform: $restorator_headersubmenu_font_transform ;
		font-weight: $restorator_headersubmenu_font_weight ;
		line-height: $restorator_headersubmenu_font_height;
		font-size: $restorator_headersubmenu_font_size ;
		color: $restorator_headersubmenu_font_color ;
		letter-spacing: $restorator_headersubmenu_font_spacing ;
	}
	
	
	/* Menu */
	header.header-top .menu-primary-menu-container-wrap .sub-menu,
	header.header-top .menu-primary-menu-container-wrap .sub-menu .sub-menu{
		border-color: $restorator_theme_color ;
		background-color: $restorator_headersubmenu_bgcolor ;
	}
	header.header-top .menu-primary-menu-container-wrap > div > ul > li > a:hover,
	header.header-top .menu-primary-menu-container-wrap ul li.current_page_item > a,
	header.header-top .menu-primary-menu-container-wrap ul li.current-menu-item > a,
	header.header-top .menu-primary-menu-container-wrap li.current-menu-parent > a,
	header.header-top .menu-primary-menu-container-wrap li.current-menu-ancestor > a{
		color: $restorator_headermenu_hover_color ;
	}
	#header_mobile_wrap .menu-primary-menu-container-wrap li a:hover,
	#header_mobile_wrap .menu-primary-menu-container-wrap ul li.current_page_item > a,
	#header_mobile_wrap .menu-primary-menu-container-wrap ul li.current-menu-item > a,
	#header_mobile_wrap .menu-primary-menu-container-wrap li.current-menu-parent > a,
	#header_mobile_wrap .menu-primary-menu-container-wrap li.current-menu-ancestor > a{
		color: $restorator_theme_color ;
	}
	header.header-top .menu-primary-menu-container-wrap ul.nav-menu > li.current-menu-ancestor.menu-item > a{
		color: $restorator_theme_color !important;
	}
	header.header-top .menu-primary-menu-container-wrap .sub-menu li a:after{
		color: $restorator_headersubmenu_font_color ;
	}
	header.header-top .menu-primary-menu-container-wrap .sub-menu li.menu-item a:hover,
	header.header-top .menu-primary-menu-container-wrap .sub-menu li.current-menu-parent a,
	header.header-top .menu-primary-menu-container-wrap .sub-menu li.current_page_item a,
	header.header-top .menu-primary-menu-container-wrap .sub-menu .sub-menu li.menu-item a:hover,
	header.header-top .menu-primary-menu-container-wrap .sub-menu .sub-menu li.current-menu-parent a,
	header.header-top .menu-primary-menu-container-wrap .sub-menu .sub-menu li.current_page_item a{
		background-color: $restorator_headersubmenu_hover_bgcolor ;
	}

	
	/* Mobile Menu */
	#header_mobile_wrap ul.nav-menu li a{
		color: $restorator_headermenu_font_color ;
	}
	
	
	/* Page Title Background Stylings */
	#pagetitle { $restorator_pagetitle_bg_styles }
	#pagetitle h2, #pagetitle a, #pagetitle p { color: $restorator_pagetitle_text_color ; }
	

	/* Page 404 */
	#error404_container { $restorator_page404_bg_styles }
	

	/* Breadcrumbs */
	#breadcrumbs{ background-color: $restorator_breadcrumbs_bgcolor ; }
	#breadcrumbs a, #breadcrumbs span{ color: $restorator_breadcrumbs_color ; }
	#breadcrumbs a:hover{ color: $restorator_theme_color ; }
	
	/* Footer */
	footer #prefooter_area{ color: $restorator_prefooter_color ; background-color: $restorator_prefooter_bgcolor ; }
	footer #prefooter_area a{ color: $restorator_prefooter_color ; }
	footer #prefooter_area a:hover{ color: $restorator_theme_color ; }
	footer #prefooter_area .cstheme_widget_sociallinks .social_link{ color: $restorator_prefooter_bgcolor ; }
	footer #footer_bottom{ color: $restorator_footer_color ; background-color: $restorator_footer_bgcolor ; }
	footer #footer_bottom .social_links_wrap .social_link{ color: $restorator_footer_color !important; }
	footer #footer_bottom .social_links_wrap .social_link:hover{ color: $restorator_theme_color !important; }
	footer .widget-title{
		font-family: $restorator_prefooter_headings_family ;
		text-transform: $restorator_prefooter_headings_transform ;
		font-weight: $restorator_prefooter_headings_weight ;
		line-height: $restorator_prefooter_headings_height ;
		font-size: $restorator_prefooter_headings_size ;
		color: $restorator_prefooter_headings_color ;
		letter-spacing: $restorator_prefooter_headings_spacing ;
	}
	
	
	/* WooCommerce */
	.woocommerce #pagetitle, .woocommerce-page #pagetitle { $restorator_pageshop_bg_styles }
	.woocommerce #pagetitle h2, .woocommerce #pagetitle p, .woocommerce-page #pagetitle h2, .woocommerce-page #pagetitle p{ $restorator_shop_pagetitle_text_color_set }
	
	
	/* Shortcodes */
	.btn:hover,
	.btn-default:hover{
		border-color: $restorator_theme_color ;
	}
	.btn:focus,
	.btn-default.active,
	.btn-default.active:hover,
	.btn-default.focus,
	.btn-default:active,
	.btn-default:focus,
	.btn-primary,
	.btn.btn-primary,
	.btn-primary.active,
	.btn-primary.focus,
	.btn-primary:active,
	.btn-primary:focus{
		border-color: $restorator_theme_color ;
		background: $restorator_theme_color ;
	}
	
	blockquote:before, blockquote cite:before, blockquote small:before{ background-color: $restorator_theme_color ; }
	blockquote cite, blockquote small, blockquote:after{ color: $restorator_theme_color ; }
	
	/* Custom Colors */
	a:hover, a:focus{ color: $restorator_theme_color ; }
	.single-post-content p a, .contentarea p a{ color: $restorator_theme_color ; }
	::selection{ background: $restorator_theme_color ; color:#fff; }
	::-moz-selection{ background: $restorator_theme_color ; color:#fff; }
	.theme_color{ color: $restorator_theme_color ; }
	.bg_primary{ background-color: $restorator_theme_color ; }
	button:hover, input[type='button'], input[type='reset'], input[type='submit']:hover{ background-color: $restorator_theme_color ; }
	input[type='text']:focus, input[type='email']:focus, input[type='url']:focus, input[type='password']:focus, input[type='search']:focus, textarea:focus, .wpcf7-form input:focus, .wpcf7-form textarea:focus{ color:#333; border-color: $restorator_theme_color !important; background-color:#fff; }
	#blog-single-wrap.fullscreen .form_field:focus{ color:#333; border-color: $restorator_theme_color ; background-color:#fff; }
	#loader .bar{ background-color: $restorator_theme_color ; }
	.header_search i.fa-search:hover{ color: $restorator_theme_color ; }
	.menu_creative_btn:hover span{ background-color: $restorator_theme_color ; }
	.widget_meta li a:hover, .widget_archive li a:hover, .widget_categories li a:hover, .widget_product_categories li a:hover{ color: $restorator_theme_color ; }
	.single_post_meta_tags a:hover, .tagcloud a:hover{ border-color: $restorator_theme_color ; }
	.cstheme_widget_sociallinks .social_link:hover{ background-color: $restorator_theme_color ; }
	#blog-single-wrap .sharebox .social_link:hover{ background-color: $restorator_theme_color ; }
	.eva-pagination .page-numbers:hover{ border-color: $restorator_theme_color ; }
	.eva-pagination .page-numbers.current{ border-color: $restorator_theme_color ; background-color: $restorator_theme_color ; }
	.post_content_readmore:before{ background-color: $restorator_theme_color ; }
	.owl-controls .owl-dot:hover, .owl-controls .owl-dot.active{ box-shadow: 0 0 0 10px $restorator_theme_color inset; }
	.format-link .post_format_content .featured_img_bg:before{ background-color: $restorator_theme_color ; }
	#related_posts_list .post-title:before{ background-color: $restorator_theme_color ; }
	.commentlist .comment-meta .comment-reply-link i{ color: $restorator_theme_color ; }
	.form_search_block input[type='text']{ border-color: $restorator_theme_color !important; }
	.form_search_block i.fa.fa-search{ background-color: $restorator_theme_color ; }
	.post-image .play_btn i{ background-color: $restorator_theme_color ; }
	.portfolio_descr_wrap .portfolio_title:before{ background-color: $restorator_theme_color ; }
	#portfolio_list.grid .portfolio_descr_wrap .portfolio_title a:hover{ color: $restorator_theme_color ; }
	#portfolio_list.masonry .portfolio_format_content i:hover:before, #portfolio_list.masonry .portfolio_format_content i:hover:after{ background-color: $restorator_theme_color ; }
	aside h4.widget-title:before{ background-color: $restorator_theme_color ; }
	.cstheme_comment_count:hover i{ color: $restorator_theme_color ; }
	.cstheme_widget_instagram li a i:hover:before, .cstheme_widget_instagram li a i:hover:after{ background-color: $restorator_theme_color ; }
	#portfolio_list.masonry_card .portfolio_title:before, #portfolio_list.grid_card .portfolio_title:before{ background-color: $restorator_theme_color ; }
	#portfolio_list.left_img .portfolio_meta_category:before, #portfolio_list.chess .portfolio_meta_category:before, #portfolio_list.carousel .portfolio_meta_category:before{ background-color: $restorator_theme_color ; }
	#portfolio_list.chess .portfolio_content_wrapper .portfolio_descr_wrap:before{ background-color: $restorator_theme_color ; }
	#portfolio_list.carousel .portfolio_title a:hover{ color: $restorator_theme_color ; }
	.partner_wrap.with_descr .partner_descr h6:before{ background-color: $restorator_theme_color ; }
	#blog_list.grid_bg_img .post_format_content:before, #blog_list.masonry_bg_img .post_format_content:before{ background-color: $restorator_theme_color ; }
	#blog_list.grid_card .post-descr-wrap .post-title:before{ background-color: $restorator_theme_color ; }
	#blog_list.grid_card_min .post-descr-wrap .post-meta i, #blog_list.masonry_card_min .post-descr-wrap .post-meta i{ color: $restorator_theme_color ; }
	#portfolio_list.rounded .portfolio_descr_wrap:before{ background-color: $restorator_theme_color ; }
	#portfolio_list.grid_bg_img .portfolio_content_wrapper .portfolio_format_content:before,
	#portfolio_list.masonry_bg_img .portfolio_content_wrapper .portfolio_format_content:before,
	#portfolio_list.rounded .portfolio_format_content:after,
	#portfolio_list.masonry_top_img .portfolio_format_content:before,
	#portfolio_list.grid_top_img .portfolio_format_content:before,
	#portfolio_list.left_img .portfolio_format_content:before,
	#portfolio_list.masonry_card .portfolio_format_content > a:before,
	#portfolio_list.grid_card .portfolio_format_content > a:before,
	#portfolio_list.chess .portfolio_format_content a:before,
	#portfolio_list.carousel .portfolio_format_content a:before{
		background-color: $restorator_portfolio_overlay ;
	}
	#portfolio_list.grid_bg_img .portfolio_content_wrapper:hover .portfolio_format_content:before,
	#portfolio_list.masonry_bg_img .portfolio_content_wrapper:hover .portfolio_format_content:before,
	#portfolio_list.rounded .portfolio_format_content:hover:after,
	#portfolio_list.masonry_top_img .portfolio_content_wrapper:hover .portfolio_format_content:before,
	#portfolio_list.grid_top_img .portfolio_content_wrapper:hover .portfolio_format_content:before,
	#portfolio_list.left_img .portfolio_format_content:hover:before,
	#portfolio_list.masonry_card .portfolio_content_wrapper:hover .portfolio_format_content a:before,
	#portfolio_list.grid_card .portfolio_content_wrapper:hover .portfolio_format_content a:before,
	#portfolio_list.chess .portfolio_format_content:hover a:before,
	#portfolio_list.carousel .portfolio_content_wrapper:hover .portfolio_format_content a:before{
		opacity: 0.$restorator_portfolio_overlay_opacity ;
	}
	.vc_tta-style-classic.vc_tta.vc_general .vc_tta-tabs-list .vc_tta-tab.vc_active > a{ border-top: 2px solid $restorator_theme_color !important; }
	.vc_tta-style-classic.vc_tta.vc_general.vc_tta-o-no-fill .vc_tta-tabs-list .vc_tta-tab.vc_active > a{ border-bottom: 3px solid $restorator_theme_color !important; }
	.vc_tta-style-classic.vc_tta.vc_general .vc_tta-tabs-list .vc_tta-tab.vc_active > a, .vc_tta-style-classic.vc_tta.vc_general .vc_tta-tabs-list .vc_tta-tab > a:hover{ color: $restorator_theme_color !important; }
	.vc_tta-style-classic.vc_tta.vc_general.vc_tta-o-no-fill.vc_tta-shape-round .vc_tta-tabs-list .vc_tta-tab > a:hover{ border-color: $restorator_theme_color !important; }
	.vc_tta-style-classic.vc_tta.vc_general.vc_tta-tabs-position-left .vc_tta-tabs-list .vc_tta-tab.vc_active > a{ border-left: 2px solid $restorator_theme_color !important; }
	.vc_tta-color-white.vc_tta-style-classic .vc_tta-panel .vc_tta-panel-title > a:hover, .vc_tta-color-white.vc_tta-style-classic .vc_tta-panel.vc_active .vc_tta-panel-title > a{ color: $restorator_theme_color !important; }
	.vc_tta-style-classic .vc_tta-panel.vc_active .vc_tta-panel-heading{ border-left:2px solid $restorator_theme_color !important; }
	.vc_tta.vc_tta-accordion .vc_active .vc_tta-controls-icon.vc_tta-controls-icon-plus{ background-color: $restorator_theme_color !important; }
	.ult_design_5 .ult_pricing_table .ult_price_link .ult_price_action_button:hover{ background-color: $restorator_theme_color !important; }
	.ult-team-member-wrap.ult-style-1 .ult-team-member-name-wrap .member-name-divider{ background-color: $restorator_theme_color !important; }
	#blog_list.grid_card .post-descr-wrap .post-title:before, #blog_list.masonry_card .post-descr-wrap .post-title:before{ background-color: $restorator_theme_color ; }
	#page-content .wpb_image_grid_uls.hover_style3 li a i{ background-color: $restorator_theme_color ; }
	.ult-carousel-wrapper .slick-dots li.slick-active i{ color: $restorator_theme_color !important; }
	#error404_container .btnback{ background-color: $restorator_theme_color ; }
	.coming_soon_wrapper h6 a{ color: $restorator_theme_color ; }
	.coming_soon_wrapper ul.countdown{ border-color: $restorator_theme_color ; }
	.coming_soon_wrapper ul.countdown:before, .coming_soon_wrapper ul.countdown:after, .coming_soon_wrapper ul.countdown i:before, .coming_soon_wrapper ul.countdown i:after{ background-color: $restorator_theme_color ; }
	#blog_list.frame_min .post-content-wrapper:hover{ box-shadow: 0 0 0 2px $restorator_theme_color inset; }
	#blog_list.frame_min .post-content-wrapper:hover .post_bottom_inf .text-left, #blog_list.frame_min .post-content-wrapper:hover .post_bottom_inf .text-right, #blog_list.frame_min .post-content-wrapper:hover .cstheme_comment_count, #blog_list.frame_min .post-content-wrapper:hover .cstheme_comment_count i, #blog_list.frame_min .post-content-wrapper:hover .post_bottom_inf .text-left i{color: $restorator_theme_color ;}
	#portfolio_single_wrap .sharebox .social_link:hover{ background-color: $restorator_theme_color ; }
	.shop_wrap .sharebox .social_link:hover{ background-color: $restorator_theme_color ; }
	.cstheme_contactform_type5 span.focus:before{ background-color: $restorator_theme_color ; }
	.cstheme_contactform_type5 span input:focus, .cstheme_contactform_type5 textarea:focus{ color: $restorator_theme_color ; }
	.cstheme_contactform_type6 span.focus:before{ background-color: $restorator_theme_color ; opacity:0.1; }
	.cstheme_contactform_type6 span input:focus, .cstheme_contactform_type6 textarea:focus, .cstheme_contactform_type6 p.focus i.icon{ color: $restorator_theme_color ; }
	.cstheme_contactform_type8 p.focus i.icon{ color: $restorator_theme_color ; }
	.cstheme_contactform_type10 span.focus:before{ background-color: $restorator_theme_color ; }
	.cstheme_contactform_type10 input:focus, .cstheme_contactform_type10 textarea:focus{border-color:#e4e4e4 !important; background-color:#f9f9f9 !important;}
	.cstheme_contactform_type4 span input:focus, .cstheme_contactform_type4 textarea:focus{ border-color:transparent !important; }
	.button_with_icon .play_btn i{ background-color: $restorator_theme_color ; }
	.portfolio_single_nav a i.last{ color: $restorator_theme_color ; }
	.portfolio_single_nav a.back-to-portfolio:hover{ color: $restorator_theme_color ; }
	.filter_block li a{ color: $restorator_portfolio_filter_color ; }
	.filter_block li a:after{ background-color: $restorator_portfolio_filter_color ; }
	.filter_block li a:hover{ color: $restorator_theme_color ; }
	#blog_list.frame_min .post-title:hover a{ color: $restorator_theme_color !important; }
	#blog_list.bg_img_card .post-title:hover a, #blog_list.bg_img_card .format-quote h2.post-title:hover a{ color: $restorator_theme_color ; }
	#blog_list.bg_img_card .post-content-quote-wrapper .overlay_border:before, #blog_list.bg_img_card .post-content-quote-wrapper .overlay_border:after{border-color: $restorator_theme_color ;}
	#blog_list.bg_img_card .post-content-link-wrapper{background-color: $restorator_theme_color ;}
	#blog_list.bg_img_card .post_meta_category{ background-color: $restorator_theme_color ; }
	#blog_list.bg_img_card .read_more:before{ background-color: $restorator_theme_color ; }
	#blog_list.bg_img_card .read_more:hover{ color: $restorator_theme_color ; }
	.widget_categories .current-cat a{ color: $restorator_theme_color ; }
	#blog_list.default article.post.sticky:before{
		background-color: $restorator_theme_color ;
	}
	
	.mobile_menu_btn span{
		background-color: $restorator_headermenu_font_color ;
	}
	
	/* MailChimp Plugin */
	.mc4wp-form .mc4wp_email_wrap.focus i{ color: $restorator_theme_color ; }
	
	/* WooCommerce */
	.woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt{ background-color: $restorator_theme_color ; }
	.woocommerce ul.products .product_wrap.products_list_type1 .shop_list_product_image:before, .woocommerce-page ul.products .product_wrap.products_list_type1 .shop_list_product_image:before{ background-color: $restorator_theme_color ; }
	.woocommerce .star-rating span:before{ color: $restorator_theme_color ; }
	.woocommerce div.product div.images .thumbnails a:after, .woocommerce-page div.product div.images .thumbnails a:after{ background-color: $restorator_theme_color ; }
	.woocommerce div.product span.price, .woocommerce div.product p.price, .woocommerce-page div.product span.price, .woocommerce-page div.product p.price{ color: $restorator_theme_color ; }
	.summary .product_meta a:hover{ color: $restorator_theme_color ; }
	.shop_wrap .cswoo_sharebox .cswoo_social_link:hover{ color: $restorator_theme_color ; }
	.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover, .woocommerce-page div.product .woocommerce-tabs ul.tabs li a:hover, .woocommerce div.product .woocommerce-tabs ul.tabs li.active a, .woocommerce-page div.product .woocommerce-tabs ul.tabs li.active a{ color: $restorator_theme_color ; }
	.woocommerce div.product .woocommerce-tabs ul.tabs li.active a, .woocommerce-page div.product .woocommerce-tabs ul.tabs li.active a{ border-top: 2px solid $restorator_theme_color ; border-bottom-color: #fff; }
	#woo-nav-cart ul.cart_list li a,
	#woo-nav-cart ul.product_list_widget li a,
	#woo-nav-cart .widget_shopping_cart .cart_list li.mini_cart_item a.remove{
		color: $restorator_headermenu_font_color !important;
	}
	#woo-nav-cart ul.cart_list li a:hover, #woo-nav-cart ul.product_list_widget li a:hover{ color: $restorator_theme_color !important; }
	#woo-nav-cart .nav-cart-content i{ color: $restorator_headermenu_font_color ; }
	#woo-nav-cart .nav-cart-content i:hover{ color: $restorator_headermenu_hover_color ; }
	#woo-nav-cart .woo-cart-count{ background-color: $restorator_theme_color ; }
	.woocommerce #review_form #respond input#submit{ background-color: $restorator_theme_color ; }
	.woocommerce table.cart input, .woocommerce-page table.cart input{ background-color: $restorator_theme_color ; }
	.woocommerce .widget_price_filter .ui-slider .ui-slider-range{ background-color: $restorator_theme_color ; }
	#woo-nav-cart .widget_shopping_cart_content a.button, .woocommerce .widget_shopping_cart_content a.button:hover, .woocommerce .widget_price_filter .price_slider_amount .button:hover{ background-color: $restorator_theme_color !important; }
	.woocommerce .widget_shopping_cart .total:before, .woocommerce-page.widget_shopping_cart .total:before, .woocommerce-page .widget_shopping_cart .total:before{ background-color: $restorator_theme_color ; }
	.woocommerce .widget_price_filter .ui-slider .ui-slider-handle, .woocommerce-page .widget_price_filter .ui-slider .ui-slider-handle{ background-color: $restorator_theme_color ; }
	.woocommerce .widget .star-rating span:before, .woocommerce-page .widget .star-rating span:before{ color: $restorator_theme_color ; }
	.woocommerce div.product .woocommerce-product-rating .woocommerce-review-link:hover{ color: $restorator_theme_color ; }
	.woocommerce-message .button:hover{ background-color: $restorator_theme_color !important; }
	#coupon_code:focus{ border-color: $restorator_theme_color !important; }
	#customer_login .button{ background-color: $restorator_theme_color !important; }
	.woocommerce ul.products li.product-category.product h3 .count, .woocommerce-page ul.products li.product-category.product h3 .count{ background-color: $restorator_theme_color ; }
	.woocommerce ul.products li.product .product_wrap.products_list_type2 .shop_list_product_descr .add_to_cart_button:hover,
	.woocommerce-page ul.products li.product .product_wrap.products_list_type2 .shop_list_product_descr .add_to_cart_button:hover,
	.woocommerce ul.products li.product .product_wrap.products_list_type5 .add_to_cart_button:hover,
	.woocommerce-page ul.products li.product .product_wrap.products_list_type5 .add_to_cart_button:hover{
		background-color: $restorator_theme_color ;
	}
	body.archive.woocommerce.header-top.pagetitle_hide .header_bg,
	body.woocommerce-page.header-top.pagetitle_hide .header_bg{
		height:auto;
		background-color: $restorator_header_bgcolor ;
	}
	
	#woo-nav-cart .nav-cart-products{background-color: $restorator_headersubmenu_bgcolor ;}
	#woo-nav-cart ul.product_list_widget li:before{
		background-color: $restorator_headersubmenu_hover_bgcolor ;
	}
	
	
	/* Custom CSS from Theme Options */
	$restorator_options_custom_css
	
	";
	wp_add_inline_style( 'restorator_inline_custom_style', $restorator_inline_custom_css );
}
add_action( 'wp_enqueue_scripts', 'restorator_custom_styles' );


/* Custom js */
add_action('wp_footer', 'restorator_custom_js', 100);
function restorator_custom_js() {
	
	global $restorator_options;
	
	if( ( isset( $restorator_options['custom-js'] ) ) && ( !empty( $restorator_options['custom-js'] ) ) ) {
		echo $restorator_options['custom-js'];
	}
}

add_action( 'wp_head','restorator_wp_head_custom_code', 100 );
function restorator_wp_head_custom_code() {
    
    global $restorator_options;
    
    if( ( isset( $restorator_options['head_custom_js'] ) ) && ( !empty( $restorator_options['head_custom_js'] ) ) ) {
        $head_custom_code = $restorator_options['head_custom_js'];
    }
    
    echo isset( $head_custom_code ) ? $head_custom_code : '';
}