<?php
header('Content-Type: text/css');
//*****
$css_path = $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php';
if (!is_file($css_path)) {
    $css_path = '../../../../wp-load.php';
}
include_once $css_path;
//*****


wp_reset_query();
//*****
$links_color = get_option(THEMEMAKERS_THEME_PREFIX . 'links_color');
$heading_font = get_option(THEMEMAKERS_THEME_PREFIX . 'heading_font');
$content_fonts = get_option(THEMEMAKERS_THEME_PREFIX . 'content_fonts');
//colors
//main navigation
$main_nav_def_text_color = get_option(THEMEMAKERS_THEME_PREFIX . 'main_nav_def_text_color');
$main_nav_curr_text_color = get_option(THEMEMAKERS_THEME_PREFIX . 'main_nav_curr_text_color');
$main_nav_hover_text_color = get_option(THEMEMAKERS_THEME_PREFIX . 'main_nav_hover_text_color');

$main_nav_def_item_bg_color = get_option(THEMEMAKERS_THEME_PREFIX . 'main_nav_def_item_bg_color');
$main_nav_curr_item_bg_color = get_option(THEMEMAKERS_THEME_PREFIX . 'main_nav_curr_item_bg_color');
$main_nav_hover_item_bg_color = get_option(THEMEMAKERS_THEME_PREFIX . 'main_nav_hover_item_bg_color');

$main_nav_font = get_option(THEMEMAKERS_THEME_PREFIX . 'main_nav_font');
$main_nav_font_size = get_option(THEMEMAKERS_THEME_PREFIX . 'main_nav_font_size');

//content
$content_text_color = get_option(THEMEMAKERS_THEME_PREFIX . 'content_text_color');
$content_link_color = get_option(THEMEMAKERS_THEME_PREFIX . 'content_link_color');
$content_link_hover_color = get_option(THEMEMAKERS_THEME_PREFIX . 'content_link_hover_color');

$content_font_family = get_option(THEMEMAKERS_THEME_PREFIX . 'content_font_family');
$content_font_size = get_option(THEMEMAKERS_THEME_PREFIX . 'content_font_size');

//buttons
$buttons_text_color = get_option(THEMEMAKERS_THEME_PREFIX . 'buttons_text_color');
$buttons_font_family = get_option(THEMEMAKERS_THEME_PREFIX . 'buttons_font_family');
$buttons_font_size = get_option(THEMEMAKERS_THEME_PREFIX . 'buttons_font_size');

//widgets
$widgets_heading_font_family = get_option(THEMEMAKERS_THEME_PREFIX . 'widgets_heading_font_family');
$widgets_heading_font_size = get_option(THEMEMAKERS_THEME_PREFIX . 'widgets_heading_font_size');

$widget_def_bg_color = get_option(THEMEMAKERS_THEME_PREFIX . 'widget_def_bg_color');
$widget_def_title_color = get_option(THEMEMAKERS_THEME_PREFIX . 'widget_def_title_color');
$widget_def_text_color = get_option(THEMEMAKERS_THEME_PREFIX . 'widget_def_text_color');
$widget_def_link_color = get_option(THEMEMAKERS_THEME_PREFIX . 'widget_def_link_color');
$widget_def_link_hover_color = get_option(THEMEMAKERS_THEME_PREFIX . 'widget_def_link_hover_color');
$widget_def_title_bg_color = get_option(THEMEMAKERS_THEME_PREFIX . "widget_def_title_bg_color");


$widget_colored_bg_color = get_option(THEMEMAKERS_THEME_PREFIX . 'widget_colored_bg_color');
$widget_colored_title_color = get_option(THEMEMAKERS_THEME_PREFIX . 'widget_colored_title_color');
$widget_colored_title_bg_color = get_option(THEMEMAKERS_THEME_PREFIX . 'widget_colored_title_bg_color');
$widget_colored_text_color = get_option(THEMEMAKERS_THEME_PREFIX . 'widget_colored_text_color');
$widget_colored_link_color = get_option(THEMEMAKERS_THEME_PREFIX . 'widget_colored_link_color');
$widget_colored_link_hover_color = get_option(THEMEMAKERS_THEME_PREFIX . 'widget_colored_link_hover_color');


$widget_colored_testimonials_text_color = get_option(THEMEMAKERS_THEME_PREFIX . 'widget_colored_testimonials_text_color');
$widget_colored_testimonials_author_text_color = get_option(THEMEMAKERS_THEME_PREFIX . 'widget_colored_testimonials_author_text_color');
$widget_colored_testimonials_bg_color = get_option(THEMEMAKERS_THEME_PREFIX . 'widget_colored_testimonials_bg_color');

//images
$image_frame_bg_color = get_option(THEMEMAKERS_THEME_PREFIX . 'image_frame_bg_color');
$image_frame_bg_hover_color = get_option(THEMEMAKERS_THEME_PREFIX . 'image_frame_bg_hover_color');
$image_frame_border_color = get_option(THEMEMAKERS_THEME_PREFIX . 'image_frame_border_color');
$image_frame_border_color_hover = get_option(THEMEMAKERS_THEME_PREFIX . 'image_frame_border_color_hover');
//heding
$h1_font_family = get_option(THEMEMAKERS_THEME_PREFIX . 'h1_font_family');
$h1_font_size = get_option(THEMEMAKERS_THEME_PREFIX . 'h1_font_size');

$h2_font_family = get_option(THEMEMAKERS_THEME_PREFIX . 'h2_font_family');
$h2_font_size = get_option(THEMEMAKERS_THEME_PREFIX . 'h2_font_size');

$h3_font_family = get_option(THEMEMAKERS_THEME_PREFIX . 'h3_font_family');
$h3_font_size = get_option(THEMEMAKERS_THEME_PREFIX . 'h3_font_size');

$h4_font_family = get_option(THEMEMAKERS_THEME_PREFIX . 'h4_font_family');
$h4_font_size = get_option(THEMEMAKERS_THEME_PREFIX . 'h4_font_size');

$h5_font_family = get_option(THEMEMAKERS_THEME_PREFIX . 'h5_font_family');
$h5_font_size = get_option(THEMEMAKERS_THEME_PREFIX . 'h5_font_size');

$h6_font_family = get_option(THEMEMAKERS_THEME_PREFIX . 'h6_font_family');
$h6_font_size = get_option(THEMEMAKERS_THEME_PREFIX . 'h6_font_size');

/* * ************************************************************************************************* */

$disable_header_color = get_option(THEMEMAKERS_THEME_PREFIX . 'disable_header_color');
$header_color = "";
if (!$disable_header_color) {
    $header_color = get_option(THEMEMAKERS_THEME_PREFIX . 'header_color');
}

$disable_header_bg_color = get_option(THEMEMAKERS_THEME_PREFIX . 'disable_header_bg_color');
$header_bg_color = "";
if (!$disable_header_bg_color) {
    $header_bg_color = get_option(THEMEMAKERS_THEME_PREFIX . 'header_bg_color');
}



$disable_footer_color = get_option(THEMEMAKERS_THEME_PREFIX . 'disable_footer_color');
$footer_color = "";
if (!$disable_footer_color) {
    $footer_color = get_option(THEMEMAKERS_THEME_PREFIX . 'footer_color');
}

$disable_footer_bg_color = get_option(THEMEMAKERS_THEME_PREFIX . 'disable_footer_bg_color');
$footer_bg_color = "";
if (!$disable_footer_bg_color) {
    $footer_bg_color = get_option(THEMEMAKERS_THEME_PREFIX . 'footer_bg_color');
}

$disable_footer_widget_title_color = get_option(THEMEMAKERS_THEME_PREFIX . 'disable_footer_widget_title_color');
$footer_widget_title_color = "";
if (!$disable_footer_widget_title_color) {
    $footer_widget_title_color = get_option(THEMEMAKERS_THEME_PREFIX . 'footer_widget_title_color');
}

/* * ************************************************************************************************* */


//$fonts = ThemeMakersHelperFonts::get_google_fonts();
/*
  $google_fonts = "";
  foreach ($fonts as $key => $font_name) {
  $font_name = str_replace(" ", "+", $font_name);
  if ($key > 0) {
  $google_fonts.="|";
  }
  $google_fonts.=$font_name;
  }
 */
//*****
//ADD COLORIZED WIDGETS CLASSES HERE
$colorized_widget_array = array('widget_categories', 'widget_nav_menu', 'widget_archive');
?>

<?php if ($header_color) echo 'header{color:' . $header_color . '!important;}' ?>
<?php if ($header_bg_color) echo '.top-holder{background:' . $header_bg_color . '!important;}' ?>

<?php if ($footer_color) echo 'footer{color:' . $footer_color . '!important;}' ?>
<?php if ($footer_color) echo 'footer p{color:' . $footer_color . '!important;}' ?>
<?php if ($footer_bg_color) echo 'footer{background:' . $footer_bg_color . '!important;}' ?>
<?php if ($footer_widget_title_color) echo 'footer .widget-title{color:' . $footer_widget_title_color . '!important;}' ?>


<?php if ($links_color) echo '#content-wrapper a, .developed a,#jstwitter .tweet a,#sidebar .latest_posts .teaser-title,#sidebar .archive ul li a:hover,.widget_text a,.testimonials .quote-author{color:' . $links_color . ';}'; ?>
<?php if ($heading_font) echo "h1, h2, h3, h4, h5, h6 { font-family: " . $heading_font . " !important; }"; ?>
<?php if ($content_fonts) echo 'body,p { font-family:' . $content_fonts . ', Helvetica, sans-serif ; }'; ?>
/********************************************/


/********************************************/
<?php if (!empty($main_nav_def_text_color)): ?>
   #navigation ul.menu a{color:<?php echo $main_nav_def_text_color ?> ;}
<?php endif; ?>
<?php if (!empty($main_nav_curr_text_color)): ?>
    ul.menu li.current_page_item a{color:<?php echo $main_nav_curr_text_color ?> !important;}
<?php endif; ?>
<?php if (!empty($main_nav_hover_text_color)): ?>
    ul.menu li a:hover{color:<?php echo $main_nav_hover_text_color ?> !important;}
<?php endif; ?>



<?php if (!empty($main_nav_def_item_bg_color)): ?>
    .navigation > ul > li > a,
    .navigation > div > ul > li > a{background-color: <?php echo $main_nav_def_item_bg_color ?> !important;}
<?php endif; ?>
<?php if (!empty($main_nav_curr_item_bg_color)): ?>
    .navigation > ul > li.current-menu-item > a,
    .navigation > ul > li.current-menu-parent > a,
    .navigation > div > ul > li.current-menu-item > a,
    .navigation > div > ul > li.current-menu-parent > a,
    .navigation > ul > li.current-menu-ancestor > a,
    .navigation > div > ul > li.current-menu-ancestor > a {background-color: <?php echo $main_nav_curr_item_bg_color ?> !important;}
<?php endif; ?>
<?php if (!empty($main_nav_hover_item_bg_color)): ?>
    .navigation > ul > li.current-menu-item > a:hover,
    .navigation > ul > li.current-menu-parent > a:hover,
    .navigation > div > ul > li.current-menu-item > a:hover,
    .navigation > div > ul > li.current-menu-parent > a:hover,
    .navigation > ul > li.current-menu-ancestor > a:hover,
    .navigation > div > ul > li.current-menu-ancestor > a:hover{background-color: <?php echo $main_nav_hover_item_bg_color ?> !important;}
<?php endif; ?>
<?php if (!empty($main_nav_font)): ?>
    .navigation > ul > li > a,
    .navigation > div > ul > li > a{font-family: <?php echo $main_nav_font ?> !important;}
<?php endif; ?>
<?php if (!empty($main_nav_font_size)): ?>
    .navigation > ul > li > a,
    .navigation > div > ul > li > a{font-size: <?php echo $main_nav_font_size ?>px !important;}
<?php endif; ?>

<?php if (!empty($content_text_color)): ?>
    .content-wrapper{color:<?php echo $content_text_color ?> !important}
<?php endif; ?>
<?php if (!empty($content_link_color)): ?>
    .content-wrapper a{color:<?php echo $content_link_color ?>}
<?php endif; ?>
<?php if (!empty($content_link_hover_color)): ?>
    .content-wrapper a:hover{color:<?php echo $content_link_hover_color ?>}
<?php endif; ?>
<?php if (!empty($content_font_family)): ?>
    .content-wrapper{font-family:<?php echo $content_font_family ?>}
    .content-wrapper p{font-family:<?php echo $content_font_family ?> !important}
<?php endif; ?>
<?php if (!empty($content_font_size)): ?>
    .content-wrapper{font-size:<?php echo $content_font_size ?>px !important}
    .content-wrapper p{font-size:<?php echo $content_font_size ?>px !important}
<?php endif; ?>

<?php if (!empty($buttons_text_color)): ?>
    input.button{color:<?php echo $buttons_text_color ?> !important}
<?php endif; ?>
<?php if (!empty($buttons_font_family)): ?>
    input.button{font-family:<?php echo $buttons_font_family ?>}
<?php endif; ?>
<?php if (!empty($buttons_font_size)): ?>
    input.button{font-size:<?php echo $buttons_font_size ?>px !important}
<?php endif; ?>

/********************************************************/

<?php if (!empty($widgets_heading_font_family)): ?>
    h3.widget-title{font-family:<?php echo $widgets_heading_font_family ?> !important}
<?php endif; ?>
<?php if (!empty($widgets_heading_font_size)): ?>
    h3.widget-title{font-size:<?php echo $widgets_heading_font_size ?>px !important}
<?php endif; ?>

<?php if (!empty($widget_def_bg_color)): ?>
    #sidebar > div.widget {background-color:<?php echo $widget_def_bg_color ?> !important}
<?php endif; ?>
<?php if (!empty($widget_def_title_color)): ?>
    #sidebar > div.widget h3.widget-title {color:<?php echo $widget_def_title_color ?> !important}
<?php endif; ?>
<?php if (!empty($widget_def_title_bg_color)): ?>
	<?php if ($widget_def_title_bg_color=='#ECECEC'): ?>
	
	.ie7 #sidebar .widget_recent_entries .widget-title{
		background: <?php echo $widget_def_title_bg_color ?> !important;
	}
	.ie7  #sidebar > div.widget h3.widget-title{
		background-color: <?php echo $widget_def_title_bg_color ?> !important;
	}
    #sidebar > div.widget h3.widget-title {
    	
		background: #85b602;
		background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#ececec));
		background: -moz-linear-gradient(top,  #fff,  #ececec);
		background: -o-linear-gradient(rgb(255,255,255),rgb(236,236,236));
		background-color: #f4f4f4;
	
    }	
	<?php else: ?>
	.ie7 #sidebar .widget_recent_entries .widget-title{
		background: <?php echo $widget_def_title_bg_color ?> !important;
	}
	.ie7  #sidebar > div.widget h3.widget-title{
		background-color: <?php echo $widget_def_title_bg_color ?> !important;
	}
    #sidebar > div.widget h3.widget-title {
    background: <?php echo $widget_def_title_bg_color ?> !important;
    background: -webkit-gradient(linear, left top, left bottom, from(<?php echo $widget_def_title_bg_color ?>), to(<?php echo $widget_def_title_bg_color ?>)) !important;
    background: -moz-linear-gradient(top, <?php echo $widget_def_title_bg_color ?>,  <?php echo $widget_def_title_bg_color ?>) !important;
    background: -o-linear-gradient(<?php echo $widget_def_title_bg_color ?>,<?php echo $widget_def_title_bg_color ?>) !important;
    background-color:<?php echo $widget_def_title_bg_color ?> !important;
    }
		<?php endif; ?>
<?php endif; ?>
	
<?php if (!empty($widget_def_text_color)): ?>
    #sidebar > div.widget {color:<?php echo $widget_def_text_color ?> !important}
<?php endif; ?>
<?php if (!empty($widget_def_link_color)): ?>
    #sidebar > div.widget a {color:<?php echo $widget_def_link_color ?> !important}
<?php endif; ?>
<?php if (!empty($widget_def_link_hover_color)): ?>
    #sidebar > div.widget a:hover {color:<?php echo $widget_def_link_hover_color ?> !important}
<?php endif; ?>

/**************************/
<?php if (!empty($colorized_widget_array)): ?>
    <?php foreach ($colorized_widget_array as $widget_class) : ?>

        <?php if (!empty($widget_colored_bg_color)): ?>
            #sidebar > div.<?php echo $widget_class ?> {background-color:<?php echo $widget_colored_bg_color ?> !important}
            #sidebar > div.<?php echo $widget_class ?> h3.widget-title {background-color:<?php echo $widget_colored_bg_color ?> !important;}
        <?php endif; ?>
        <?php if (!empty($widget_colored_title_color)): ?>
            #sidebar > div.<?php echo $widget_class ?> h3.widget-title {color:<?php echo $widget_colored_title_color ?> !important}
        <?php endif; ?>
        <?php if (!empty($widget_colored_title_bg_color)): ?>
			<?php if ($widget_colored_title_bg_color=='#85B602'):?>
			
			 #sidebar > div.<?php echo $widget_class ?> h3.widget-title {
				background: -moz-linear-gradient(top,  rgba(255,255,255,0) 0%, rgba(0,0,0,0.23) 100%) !important; /* FF3.6+ */
				background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0)), color-stop(100%,rgba(0,0,0,0.23))) !important; /* Chrome,Safari4+ */
				background: -webkit-linear-gradient(top,  rgba(255,255,255,0) 0%,rgba(0,0,0,0.23) 100%) !important; /* Chrome10+,Safari5.1+ */
				background: -o-linear-gradient(top,  rgba(255,255,255,0) 0%,rgba(0,0,0,0.23) 100%) !important; /* Opera 11.10+ */
				background: -ms-linear-gradient(top,  rgba(255,255,255,0) 0%,rgba(0,0,0,0.23) 100%) !important; /* IE10+ */
				background: linear-gradient(top,  rgba(255,255,255,0) 0%,rgba(0,0,0,0.23) 100%) !important; /* W3C */
				/*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#85b602', endColorstr='#5a9c01',GradientType=0 ); */
            }
			
			<?php else: ?>
			
            #sidebar > div.<?php echo $widget_class ?> h3.widget-title {
            background: <?php echo $widget_colored_title_bg_color ?>;
            background: -webkit-gradient(linear, left top, left bottom, from(<?php echo $widget_colored_title_bg_color ?>), to(<?php echo $widget_colored_title_bg_color ?>)) !important;
            background: -moz-linear-gradient(top, <?php echo $widget_colored_title_bg_color ?>,  <?php echo $widget_colored_title_bg_color ?>) !important;
            background: -o-linear-gradient(<?php echo $widget_colored_title_bg_color ?>,<?php echo $widget_colored_title_bg_color ?>) !important;
            background-color:<?php echo $widget_colored_title_bg_color ?> !important;
            }
				<?php endif; ?>
		<?php endif; ?>
        <?php if (!empty($widget_colored_text_color)): ?>
            #sidebar > div.<?php echo $widget_class ?> .textwidget {color:<?php echo $widget_colored_text_color ?> !important}
        <?php endif; ?>
        <?php if (!empty($widget_colored_link_color)): ?>
            #sidebar > div.<?php echo $widget_class ?> .textwidget a {color:<?php echo $widget_colored_link_color ?> !important}
        <?php endif; ?>
        <?php if (!empty($widget_colored_link_hover_color)): ?>
            #sidebar > div.<?php echo $widget_class ?> .textwidget a:hover {color:<?php echo $widget_colored_link_hover_color ?> !important}
        <?php endif; ?>

    <?php endforeach; ?>
<?php endif; ?>


<?php if (!empty($widget_colored_testimonials_text_color)): ?>
    #sidebar > .testimonials .quote-text {color:<?php echo $widget_colored_testimonials_text_color ?> !important}
<?php endif; ?>

<?php if (!empty($widget_colored_testimonials_author_text_color)): ?>
    #sidebar > .testimonials .quote-author {color:<?php echo $widget_colored_testimonials_author_text_color ?> !important}
<?php endif; ?>

<?php if (!empty($widget_colored_testimonials_bg_color)): ?>
    #sidebar > .testimonials{background:<?php echo $widget_colored_testimonials_bg_color ?> !important}
<?php endif; ?>

/********************************************************/

<?php if (!empty($image_frame_bg_color)): ?>
    img.add-border {background-color:<?php echo $image_frame_bg_color ?> !important}
<?php endif; ?>
<?php if (!empty($image_frame_bg_hover_color)): ?>
    img.add-border:hover {background-color:<?php echo $image_frame_bg_hover_color ?> !important}
<?php endif; ?>
<?php if (!empty($image_frame_border_color)): ?>
    img.add-border {border-color:<?php echo $image_frame_border_color ?> !important}
<?php endif; ?>
<?php if (!empty($image_frame_border_color_hover)): ?>
    img.add-border:hover {border-color:<?php echo $image_frame_border_color_hover ?> !important}
<?php endif; ?>

<?php if (!empty($h1_font_family)): ?>
    .content-wrapper h1{font-family:<?php echo $h1_font_family ?> !important}
<?php endif; ?>
<?php if (!empty($h1_font_size)): ?>
    .content-wrapper h1{font-size:<?php echo $h1_font_size ?>px !important}
<?php endif; ?>

<?php if (!empty($h2_font_family)): ?>
    .content-wrapper h2{font-family:<?php echo $h2_font_family ?> !important}
<?php endif; ?>
<?php if (!empty($h2_font_size)): ?>
    .content-wrapper h2{font-size:<?php echo $h2_font_size ?>px !important}
<?php endif; ?>

<?php if (!empty($h3_font_family)): ?>
    .content-wrapper h3{font-family:<?php echo $h3_font_family ?> !important}
<?php endif; ?>
<?php if (!empty($h3_font_size)): ?>
    .content-wrapper h3{font-size:<?php echo $h3_font_size ?>px !important}
<?php endif; ?>

<?php if (!empty($h4_font_family)): ?>
    .content-wrapper h4{font-family:<?php echo $h4_font_family ?> !important}
<?php endif; ?>
<?php if (!empty($h4_font_size)): ?>
    .content-wrapper h4{font-size:<?php echo $h4_font_size ?>px !important}
<?php endif; ?>

<?php if (!empty($h5_font_family)): ?>
    .content-wrapper h5{font-family:<?php echo $h5_font_family ?> !important}
<?php endif; ?>
<?php if (!empty($h5_font_size)): ?>
    .content-wrapper h5{font-size:<?php echo $h5_font_size ?>px !important}
<?php endif; ?>

<?php if (!empty($h6_font_family)): ?>
    .content-wrapper h6{font-family:<?php echo $h6_font_family ?> !important}
<?php endif; ?>
<?php if (!empty($h6_font_size)): ?>
    .content-wrapper h6{font-size:<?php echo $h6_font_size ?>px !important}
<?php endif; ?>

	