<?php
/**
* Socrates Premium Theme for Wordpress
* (c) 2012 Handy Investments LLC
* http://www.socratestheme.com
* Version 3.01
*
*
* @File header.php
*
*/
$layout = get_option("layoutOptions");
$header = get_option("headerOptions");
$style = get_option("styleOptions");
$topNav = get_option("navOptions");
$primaryNav = get_option("primaryNavOptions");
$bg = get_option("bgOptions");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="msvalidate.01" content="2312C12E470B1A268D16D606DC958D6A" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Comments Feed" href="<?php bloginfo('comments_rss2_url'); ?>" />
<?php if(is_home()) { socrates_get_meta(); }
$topAd = get_option("socratesOptions");
$custom_fields = get_post_custom($post->ID);
if($custom_fields['_mcf_nofollowfullpage'][0] || $custom_fields['_mcf_nofollowsqueeze'][0] || $custom_fields['_mcf_nofollowsales'][0]) {
echo '<meta name="ROBOTS" content="NOINDEX,NOFOLLOW">';
}
$metaSettings = get_option("metaSettings"); ?>
<title><?php $metaSettings = get_option("metaSettings"); if(is_home()) { if($metaSettings['sitetitle'] and $metaSettings['sitetitle'] != '') {echo $metaSettings['sitetitle'];} else {bloginfo('name'); }} else { the_title(); }?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
<?php if (!$layout['sidebar']){
echo '<link rel="stylesheet" href="'.get_bloginfo('template_url').'/css/styleRightSide300.css" type="text/css"/>';
} else {
echo '<link rel="stylesheet" href="'.get_bloginfo('template_url').'/css/'.$layout['sidebar'].'" type="text/css"/>';
}?>
<?php wp_enqueue_script("jquery"); ?>
<?php wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?>
<?php if(empty($bg)){
//set default background color to white if not set
$bg['bgColor'] = 'FFFFFF';
update_option("bgOptions", $bg);
} ?>
<!-- Style for custom elements -->
<style type="text/css">
body {font-family:<?php if ($style['themeBodyFont'] != '') echo stripslashes($style['themeBodyFont']); else echo "'lucida grande', Verdana, Sans-Serif"; ?>;}
h2, h3, h4, h5 ,h6 {color:#<?php echo $style['hColor']; ?>}
h2 a, h3 a, h4 a, h5 a ,h6 a {color:#<?php echo $style['hColor']; ?>}
h2 a:hover, h3 a:hover, h4 a:hover, h5a:hover ,h6 a:hover {color:#<?php echo $style['hHover']; ?>}
.single a,.archive a,.blog a,.page a, .sidebar a {color:#<?php echo $style['postColor']; ?>}
.single a:hover,.archive a:hover,.blog a:hover,.page a:hover, .sidebar a:hover {color:#<?php echo $style['postHover']; ?>}
.post { padding: <?php echo $style['themeContentPadding']; ?>px;}
.navigation a, .sidebar a {color:#<?php echo $style['postColor']; ?>}
.titleText {margin:20px 0px 0px;}
.titleText h1 {color:#<?php echo $header['hColor']; ?>;}
.titleText h1 a:hover {color:#<?php echo $header['hColor']; ?>;}
.titleText a {color:#<?php echo $header['hColor']; ?>; margin:20px 0px 0px;}
.titleText a:hover {color:#<?php echo $header['hColor']; ?>;text-decoration:none;}
.titleText a:visited {color:#<?php echo $header['hColor']; ?>;}
.titleText {font-family:<?php echo stripslashes($header['titleFont']); ?>}
.titleText {font-size:<?php echo $header['titleFontSize']; ?>;}
.descText {color:#<?php echo $header['dColor']; ?>;}
.descText {font-family:<?php echo stripslashes($header['descFont']); ?>}
.descText {font-size:<?php echo $header['descFontSize']; ?>}
#header {text-align:<?php echo $header['align']; ?>; font-size:90%;}
<?php if($bg['bg'] != 'none' && $bg['bg'] ){ ?>
body {background:url(<?php bloginfo('template_url'); ?>/background-images/<?php echo $bg['bg']; ?>) <?php echo $bg['repeat']; ?> #<?php echo $style['bgColor']; ?>;
<?php if($bg['fixed']){ ?>
background-attachment: fixed;
<?php } ?>
}
<?php } else {?>
body {background:#<?php echo $style['bgColor']; ?>;
<?php if($bg['fixed']){ ?>
background-attachment: fixed;
<?php } ?>
}
<?php } ?>
.post h1 a, .post h2 a {color:#<?php echo $style['hColor']; ?>}
.post h1 a:hover, .post h2 a:hover {color:#<?php echo $style['hHover']; ?>}
.post a {color:#<?php echo $style['postColor']; ?>}
.post a:hover {color:#<?php echo $style['postHover']; ?>}
.post h1, .post h2 {color:#<?php echo $style['hColor']; ?>}
.page h1 a, .page h2 a {color:#<?php echo $style['hColor']; ?>}
.page h1, .page h2 {color:#<?php echo $style['hColor']; ?>}
.page a {color:#<?php echo $style['postColor']; ?>}
.page a:hover {color:#<?php echo $style['postHover']; ?>}
.menu-top a {color:#<?php echo $style['topNavColor']; ?>}
.menu-top li a:hover a:hover {color:#<?php echo $style['topNavHover']; ?>}
#access a { color: #<?php echo $style['primaryNavColor']; ?>}
#access a:hover { color: #<?php echo $style['primaryNavHover']; ?>}
.menu-primary li a, {color: #<?php echo $style['primaryNavColor']; ?>;}
.menu-primary li a:hover, {color: #<?php echo $style['primaryNavHover']; ?>}
.menu-bottomleft li a,.menu-bottomright li a {color:#<?php echo $style['footerNavColor']; ?>}
.menu-bottomleft li a:hover,.menu-bottomright li a:hover {color:#<?php echo $style['footerNavHover']; ?>}
#header {width:940px; height:150px; overflow:hidden; padding:5px 10px 0px; <?php if($header['headerType']=='color') { echo 'background-color:#'.$header['bgColor']; } else {?>background:url(<?php echo $header['headerUrl']; ?>) no-repeat;<?php } ?>}
<?php echo $style['themeExtraCSS']; ?>
</style>
<?php $analytic = get_option("analyticOptions");
echo stripslashes($analytic['analytics']); ?>
</head>
<body <?php body_class(); ?>>
<div class="im-wrapper" align="center">
<div class="topBar"></div>
<div class="im-frame">
<!-- Upper Navigation -->
<?php if (!$topNav['display'] || $topNav['display'] == 'none' ){ ?>
<div class="im-topNav" style="background:none"></div>
<?php } else {
$custom_fields = get_post_custom($post->ID);
if((!(is_page_template('squeezepage.php') and !$custom_fields['_mcf_squeezeheader-on'][0])
&& !(is_page_template('squeezepage2.php')))
&& (!(is_page_template('fullpage.php') and !$custom_fields['_mcf_fullpagehead'][0]))) { ?>
<?php
echo '<div class="im-topNav" style="background:none">';
// put a native menu here
$menu = wp_nav_menu(array('theme_location'=>'top', 'fallback_cb'=>false, 'depth'=>1, 'menu_class'=>'menu-top', 'echo'=>false));
if ( $menu == ''){
echo '<div class="menu-top" style="background:none"></div>';
} else {
echo $menu;
}
echo '</div>';
?>
<?php } else {
echo '<div class="im-topNav" style="background:none"></div>';
}
} ?>
<!-- Main Header -->
<?php
//echo 'Custom Fields: '.$custom_fields['_mcf_salesheader-on'][0][0];
//if this is a sales or squeeze page don't print the header unless it was specified in the custom meta fields
if(!(is_page_template('squeezepage.php') and !$custom_fields['_mcf_squeezeheader-on'][0]) and !(is_page_template('squeezepage2.php')) and !(is_page_template('salespage.php') and !$custom_fields['_mcf_salesheader-on'][0]) and !(is_page_template('fullpage.php') and !$custom_fields['_mcf_fullpagehead'][0])) {
?>
<div class="im-header">
<div id="header" <?php if(!is_home()) { echo 'onclick="location.href=\''; bloginfo('url'); echo '\';" style="cursor: pointer;"'; } ?> >
<!-- hyperlink blog title -->
<?php if (empty($header)) { ?>
<div class="titleText socshadow" style="margin-bottom:-5px;font-weight:bold;"><h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1></div>
<div class="descText"><?php bloginfo('description'); ?></div>
<?php } else { ?>
<div class="titleText socshadow" style="margin-bottom:-5px;font-weight:bold;"><h1><?php if(!is_home()) { ?><a href="<?php bloginfo('url'); ?>"><?php } ?><?php echo stripslashes($header['titleText']); ?><?php if(!is_home()) { ?></a><?php } ?></h1></div>
<div class="descText socshadow"><?php echo stripslashes($header['descText']); ?></div>
<!-- end hyperlink blog title -->
<?php } ?>
</div><!-- /header -->
</div><!-- /im-header -->
<!-- Main Nav -->
<?php
echo '<div id="access">';
// put a native menu here
$menu = wp_nav_menu(array('theme_location'=>'primary', 'fallback_cb'=>false, 'menu_class'=>'menu-primary', 'echo'=>false));
echo $menu;
echo '<div class="clear-fix"></div>';
echo '</div>';
?>
<!-- Search Form -->
<div id="im-searchForm">
<?php
// see if we want to display the search form at all
// if we are displaying it, they might want to show a custom search box
if ($topAd['displaySearch']){
if ($topAd['customSearchBox'] == ''){
?>
<form method="get" action="<?php bloginfo('home'); ?>/">
<input type="text" name="s" class="searchBox" id="s"
onblur="this.value=(this.value=='') ? 'search' : this.value;"
onfocus="clearText(this);" value="" />
<input type="image" id="searchBtn" name="searchBtn"
src="<?php bloginfo('template_url'); ?>/images/search.png"
onmouseover="this.src='<?php bloginfo('template_url'); ?>/images/searchOv.png'"
onmouseout="this.src='<?php bloginfo('template_url'); ?>/images/search.png'" />
</form>
<?php } else { // display their custom search box code ?>
<?php echo stripslashes( $topAd['customSearchBox'] ); ?>
<?php } // end if $topAd['customSearchBox'] == '' ?>
<?php } // end if $topAd['displaySearch'] ?>
</div>
<?php } ?>
<!-- END HEADER SECTION -->