<!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" lang="zh-CN">
<head>
<title><?php if (is_home() ) {?><?php bloginfo('name'); ?> - <?php bloginfo('description'); ?><?php } else {?><?php wp_title('-', true, 'right'); ?> <?php bloginfo('name'); ?> <?php } ?></title>
	<?php if (is_home())
	{
	$description = get_option('swt_description');
	$keywords = get_option('swt_keywords');
	}
	elseif (is_category())
	{
	$description = category_description();
	$keywords = single_cat_title('', false);
	}
	elseif (is_tag())
	{
	$description = tag_description();
    $keywords = single_tag_title('', false);
	}
	elseif (is_single())
	{
     if ($post->post_excerpt) {$description = $post->post_excerpt;} 
	 else {$description = substr(strip_tags($post->post_content),0,240);}
    $keywords = "";
    $tags = wp_get_post_tags($post->ID);
    foreach ($tags as $tag ) {$keywords = $keywords . $tag->name . ", ";}
	}
	?>
	<meta name="keywords" content="<?php echo $keywords ?>" />
	<meta name="description" content="<?php echo $description?>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" type="text/css">
<script src="<?php bloginfo('template_directory'); ?>/js/jquery.js"></script>
<?php if (is_single()) { ?>
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/img/style.css" />
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.min.js" ></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/pirobox.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$().piroBox({
my_speed: 400, //animation speed
bg_alpha: 0.3, //background opacity
slideShow : true, // true == slideshow on, false == slideshow off
slideSpeed : 4, //slideshow duration in seconds(3 to 6 Recommended)
close_all : '.piro_close,.piro_overlay'// add class .piro_overlay(with comma)if you want overlay click close piroBox
});
});
</script>
<?php } else {} ?>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/pptBox.js"></script>
</head>
    <body>
    	<div id="wrapper">
	    	<div id="topbar">
	    		<ol>
	    			<li><a href="<?php echo stripslashes(get_option('swt_sinamblog')); ?>">新浪微博</a></li>
	    			<li><a href="<?php echo get_option('swt_rsssub'); ?>">RSS订阅</a></li>
	    			<li><a href="<?php echo stripslashes(get_option('swt_about')); ?>">关于我们</a></li>
	    			<li><a href="<?php bloginfo('url'); ?>/wp-admin">登录</a></li>
	    		</ol>
	    		<div id="search">
					<form action="<?php echo get_option('home'); ?>" id="searchform" method="get">
							<input type="text" onblur="if (this.value == &quot;&quot;) { this.value = &quot;Search here..&quot;; }" onfocus="if (this.value == &quot;Search here..&quot;) { this.value = &quot;&quot;; }" value="Search here.." id="s" name="s">
							<input type="image" id="search-button" value="" src="<?php bloginfo('template_directory'); ?>/images/search-button.png">
					</form>					
				</div>
	    	</div>
	    	<div id="header">
	    		<div id="header-middle">
	    			<div id="logo">
						<a href="<?php echo get_option('home'); ?>"><img alt="<?php bloginfo('name');?>" src="<?php bloginfo('template_directory'); ?>/images/logo.png"></a>
					</div>
	    			<div id="header-banner">
						<a href="#" title="oss"><img width="400" src="<?php bloginfo('template_directory'); ?>/images/banner.jpg" alt="oss" class="alignnone size-full wp-image-17472"></a>					
					</div>
	    		</div>
	    		<div id="wrapper-navigation">				
					<div id="navigation">
					<nav>
						<div class="menu-main-meun-container" id="navig">
									<?php wp_nav_menu('container_id=navmenu'); ?>
						</div>
					</nav>	
					</div>
				
				</div>
	    	</div>
    	