<?php
/**
 * @package WordPress
 * @subpackage Labs_Project
 */
?>
<!DOCTYPE html>

<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Mozilla Labs &raquo; <?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" media="screen">
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>">
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.png" type="image/png"> 

<?php wp_head(); ?>

<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/includes/font.js"></script>

<style type="text/css" media="screen">
    <?php if($linkColor = get_option('labs_link_color')) { ?>
        a:link, a:visited {
            color: #<?php echo $linkColor ?>;
        }
    <?php } ?>
    
    <?php if($hoverColor = get_option('labs_link_hover_color')) { ?>
        a:hover {
            color: #<?php echo $hoverColor ?>;
        }
    <?php } ?>
    
    <?php if($pageBg = get_option('labs_page_bg')) { ?>
        body.<?php echo blog_shortname(); ?> #blogBg{
            background-image: url(<?php echo $pageBg ?>);
        }
    <?php } ?>
    
    <?php if($headerBg = get_option('labs_header_bg')) { ?>
        #projectpage.<?php echo blog_shortname(); ?> #pageheader h1 {
            background-image: url(<?php echo $headerBg ?>);
        }
    <?php } ?>
    
    
</style>



</head>

<?php if (is_home()) { ?>
<body id="projectpage" class="<?php echo blog_shortname(); ?>">
<?php } elseif (is_search()) { ?>
<body id="projectpage" class="<?php echo blog_shortname(); ?> subpage search">
<?php } elseif (is_archive()) { ?>
<body id="projectpage" class="<?php echo blog_shortname(); ?> subpage archive">
<?php } else { ?>
<body id="projectpage" class="<?php echo blog_shortname(); ?> subpage">
<?php } ?>

<div id="blogBg">

	<div id="page">
		
		<div id="header">
		
			<div id="topnav">
			
			<h1 id="logo"><a href="/" title="Mozilla Labs homepage"><img src="<?php bloginfo('template_directory'); ?>/img/labs-logo.png" alt="labs-logo" width="161" height="34"></a></h1>
				
			<ul id="mainnav">
			<li><a href="/projects/">Projects</a></li>
			<li><a href="/hacks/">Hacks</a></li>
			<li><a href="/discussions/">Discussions</a></li>
			<li><a href="/get-involved/">Get Involved</a></li>
			<li><a href="/about/">About</a></li>
			</ul>
			
			<!--<form id="search" action="<?php bloginfo('url'); ?>">
			<p><label for="searchfield">Search</label><input type="text" value="Search Labs" onfocus="value=''" onblur="value='Search Labs'" name="s" id="searchfield"></p>
			</form> -->
			
			</div> <!-- END topnav -->
			
			<div id="spotlight">
				
				<?php if ((!is_home())) { ?> 
				<?php } else { ?>
				
				<div id="pageheader">
				<h1>Mozilla Labs <?php bloginfo('name'); ?></h1>
				</div>
				
				<div class="projectintro">
		 			
		 			<span class="name"><?php bloginfo('name'); ?></span>
		 			<?php dynamic_sidebar('Project Intro'); ?>
				
				</div> <!-- END projectintro -->
				
				<?php } ?>
			
			</div> <!-- END SPOTLIGHT -->
		
		</div> <!-- END HEADER -->
