<!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>
	<title><?php bloginfo('name'); ?></title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="title" content="<?php bloginfo('name'); ?>" />
	<meta name="description" content="Information Technology and Telecommunications Technologist. Web & mobile app development, Database administration, Multimedia & graphics design, Domain and hosting services, Wireless and wired networks administration, Software & hardware engineering." />
	<meta name="msapplication-TileColor" content="#ffffff">
	<meta name="msapplication-TileImage" content="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/ms-icon-144x144.png">
	<meta name="theme-color" content="#ffffff">
	<link rel="apple-touch-icon" sizes="57x57" href="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/apple-icon-57x57.png">
	<link rel="apple-touch-icon" sizes="60x60" href="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/apple-icon-60x60.png">
	<link rel="apple-touch-icon" sizes="72x72" href="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/apple-icon-72x72.png">
	<link rel="apple-touch-icon" sizes="76x76" href="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/apple-icon-76x76.png">
	<link rel="apple-touch-icon" sizes="114x114" href="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/apple-icon-114x114.png">
	<link rel="apple-touch-icon" sizes="120x120" href="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/apple-icon-120x120.png">
	<link rel="apple-touch-icon" sizes="144x144" href="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/apple-icon-144x144.png">
	<link rel="apple-touch-icon" sizes="152x152" href="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/apple-icon-152x152.png">
	<link rel="apple-touch-icon" sizes="180x180" href="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/apple-icon-180x180.png">
	<link rel="icon" type="image/png" sizes="192x192"  href="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/android-icon-192x192.png">
	<link rel="icon" type="image/png" sizes="32x32" href="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/favicon-32x32.png">
	<link rel="icon" type="image/png" sizes="96x96" href="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/favicon-96x96.png">
	<link rel="icon" type="image/png" sizes="16x16" href="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/favicon-16x16.png">
	<link rel="manifest" href="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/manifest.json">
	<link rel="shortcut icon" href="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/favicon.ico" type="image/x-icon">
	<link rel="icon" href="<?php bloginfo('template_directory') ?>/css/images/icons/favicon/favicon.ico" type="image/x-icon">
	<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
	<link rel="stylesheet" href="<?php bloginfo('template_directory') ?>/css/print.css" type="text/css" media="print"  />
	
	<script type="text/javascript">var mail = "<?php bloginfo('template_directory') ?>/js/mail.php";</script>
	<script type="text/javascript" src="<?php bloginfo('template_directory') ?>/js/jquery-1.7.1.min.js"></script>
	<script type="text/javascript" src="<?php bloginfo('template_directory') ?>/js/fancybox/jquery.fancybox-1.3.4.js"></script>
	<script type="text/javascript" src="<?php bloginfo('template_directory') ?>/js/paper.js"></script>
</head>

<body style="background: url(<?php bloginfo('template_directory'); echo "/css/images/colors/" . rsm_option('background_image'); ?>) repeat;">

<div id="container" style="background: url(<?php bloginfo('template_directory'); echo "/css/images/colors/" . rsm_option('paper'); ?>) repeat-y top center;">

	<div id="contact">
		<form id="contact_form" action="" method="post"> 
				
			<h2>Contact Me</h2>
			<?php if(rsm_option('contact_form_text')) : ?>
				<p><?php echo rsm_option('contact_form_text'); ?></p>
			<?php endif; ?>

			<label for="name">
				<span>Name</span>
				<input type="text" class="req" name="name" id="name" value="" />
				<input type="text" class="req2" name="last" id="last" value="" />
			</label>
			
			<label for="email">
				<span>Email</span>
				<input type="text" class="req email" name="email" id="email" value="" />
			</label>

			<label for="subject">
				<span>Subject</span>
				<input type="text" class="req" name="subject" id="subject" value="" />
			</label>

			<label for="message">
				<span>Your Message</span>
				<textarea name="message" class="req" id="message" cols="" rows=""></textarea>
			</label>
			
			<input type="submit" name="submit" id="submit" value="" />

		</form>
	</div>

<?php	$categories = get_categories('orderby=name&hide_empty=0&parent=15');
	foreach($categories as $section => $category) { ?>
		<div class="section" style="background-image: url(<?php bloginfo('template_url') ?>/css/images/colors/<?php echo rsm_option($category->slug); ?>);">
			<span class="title"><?php echo $category->name; ?></span>

		<?php if($section==0) { ?>
			<div id="sidebar">
				<div id="portrait">
					<a id="image" href="<?php echo rsm_option('portrait_link'); ?>">
						<img src="<?php bloginfo('template_directory') ?>/js/timthumb.php?src=<?php echo rsm_option('portrait_link'); ?>&w=152" alt="" />
					</a>
					
					<?php
						$socialArr = array("facebook", "twitter", "linkedin", "flickr", "youtube", "vimeo");
						foreach ($socialArr as $network) {
							if(rsm_option($network)) { ?>
								<a href="<?php echo rsm_option($network); ?>"><img src="<?php bloginfo('template_url') ?>/css/images/icons/<?php echo $network; ?>.png" title="<?php echo $network; ?>" alt="" /></a>
					<?php }
						} ?>
						
					<div class="shadow"></div>		
				</div> <!-- #portrait -->
				<?php if(rsm_option('vcard')) : ?>
					<a class="vcard" href="<?php echo rsm_option('vcard_link'); ?>">vCard</a>
				<?php endif; ?>
				<?php if(rsm_option('show_print_link')) : ?>
				<a class="print" onclick="javascript:window.print();">Print</a>
				<?php endif; ?>
			</div>
		
			<h1><?php echo rsm_option('page_title'); ?></h1>
			<?php if(rsm_option('page_description'))
						echo '<p>' . rsm_option('page_description') . '</p>'; ?>

			<ul id="info">
				<?php if(rsm_option('full_name')) : ?>
					<li class="name">Full Name <span><?php echo rsm_option('full_name'); ?></span></li>
				<?php else : ?>
					<li class="name">Full Name <span><?php echo rsm_option('page_title'); ?></span></li>
				<?php endif; ?>
				
				<?php if(rsm_option('date_of_birth')) : ?>
					<li class="date">Date of Birth <span><?php echo rsm_option('date_of_birth'); ?></span></li>
				<?php endif; ?>
	
				<?php if(rsm_option('address')) : ?>
					<li class="addr">Address <span><?php echo rsm_option('address'); ?></span></li>
				<?php endif; ?>
	
				<?php if(rsm_option('phone_number')) : ?>
					<li class="cell">Phone <span><?php echo rsm_option('phone_number'); ?></span></li>
				<?php endif; ?>
	
				<?php if(rsm_option('email_address')) : ?>
					<li class="mail">Email <span>
						<?php if(rsm_option('enable_contact_form')) : ?>
							<a class="mail" href="mailto:<?php echo rsm_option('email_address'); ?>" target="_blank"><?php echo rsm_option('email_address'); ?></a>
						<?php else : ?>
							<?php echo rsm_option('email_address'); ?>
						<?php endif; ?>
					</span></li>		
				<?php endif; ?>
				
				<?php if(rsm_option('website_label_1') and rsm_option('website_link_1')) : ?>
					<li class="link"><?php echo rsm_option('website_label_1'); ?> <span><a href="<?php echo rsm_option('website_link_1'); ?>"><?php echo rsm_option('website_link_1'); ?></a></span></li>
				<?php endif; ?>
	
				<?php if(rsm_option('website_label_2') and rsm_option('website_link_2')) : ?>
					<li class="link"><?php echo rsm_option('website_label_2'); ?> <span><a href="<?php echo rsm_option('website_link_2'); ?>"><?php echo rsm_option('website_link_2'); ?></a></span></li>
				<?php endif; ?>
				
				<?php if(rsm_option('website_label_3') and rsm_option('website_link_3')) : ?>
					<li class="link"><?php echo rsm_option('website_label_3'); ?> <span><a href="<?php echo rsm_option('website_link_3'); ?>"><?php echo rsm_option('website_link_3'); ?></a></span></li>
				<?php endif; ?>
	
			</ul>
		</div> <!-- end #personal -->

			<?php	} else { 
				
				query_posts(array('category__in' => array($category->term_id)));
				
				if(have_posts()) : while(have_posts()) : the_post(); 
					the_title('<h2>','</h2>');	

					// period
					$period = get_post_meta($post->ID, 'date', true);
					if($period) echo '<span class="period">' . $period . '</span>';

					// subtitle
					$tags = wp_get_post_terms(get_the_ID(), 'post_tag', 'fields=names');
					if($tags) echo '<h3>' . implode(', ', $tags ) . '</h3>'; 
						
					the_content(); 
				endwhile; endif;

			echo "</div>"; } // </div section>
		} // foreach $cat
	?>

	</div> <!-- end #container -->
<div id="container-bottom"></div>

<?php echo rsm_option('tracker_code'); ?>

</body>
</html>
