<?php

$layout = smallbiz_get_current_layout();  

?>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

<head>

<!--Expand2Web SmallBiz Dynamic 2.2.2-->

<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />



<?php $real_layout = (get_option('smallbiz_layout')); ?>



<?php if(biz_option('smallbiz_mobile-layout-enabled') && $GLOBALS["smartphone"]){ ?>

<meta name="viewport" content="width=device-width" />



<?php } else {



if ($real_layout == "widgetized"){ ?>

<meta name="viewport" content="width=device-width" />



<?php } else { ?>

<meta name="viewport" content="width=1055,user-scalable=1" />

<?php }} ?>



<?php /* for custom fields start */ ?>

	<title><?php 

         /* Override the Title if the custom tag "_smallbiz_title" has been set. */

         /* if "_smallbiz_extra_title" has been set, append this. */

         $title = "";

         $is_smallbiz_frontpage = is_front_page() || (biz_option('smallbiz_page_on_front') == $wp_query->get_queried_object()->ID);

         if (is_singular() && 

             !$is_smallbiz_frontpage){

             if (get_post_meta($wp_query->get_queried_object()->ID, "_smallbiz_title", true) && get_post_meta($wp_query->get_queried_object()->ID, "_smallbiz_title", true) != ""){ ?><?php

                 $title = get_post_meta($wp_query->get_queried_object()->ID, "_smallbiz_title", true);

             }else {             

                 $title = wp_title('|', true, 'right').biz_option('smallbiz_name');

             }

             if(get_post_meta($wp_query->get_queried_object()->ID, "_smallbiz_extra_title", true)){

                 if($title != ""){

                     $title .= ",";

                 }

                 $title .= get_post_meta($wp_query->get_queried_object()->ID, "_smallbiz_extra_title", true);

             }

         } else if ($is_smallbiz_frontpage){

             $title = biz_option('smallbiz_title');

         }

         if(!$title){ $title = wp_title('|', true, 'right').biz_option('smallbiz_name');}

         echo $title;

         

	?></title>

<?php $hide = (biz_option('smallbiz_seo_disabled')); if($hide == ""){ ?>

	<meta name="description" content="<?php 

         /* Override the description if the custom tag "_smallbiz_description" has been set. */

         /* if "_smallbiz_extra_descrition" has been set, append this. */

         $description = biz_option('smallbiz_description');

         if (is_singular()  &&

             !($is_smallbiz_frontpage)

             ){

             

             if (get_post_meta($wp_query->get_queried_object()->ID, "_smallbiz_description", true) && get_post_meta($wp_query->get_queried_object()->ID, "_smallbiz_description", true) != ""){ ?><?php

                 $description = get_post_meta($wp_query->get_queried_object()->ID, "_smallbiz_description", true);

             }else {             

                 $description = "";

             }

             if(get_post_meta($wp_query->get_queried_object()->ID, "_smallbiz_extra_description", true)){

                 if($description != ""){

                     $description .= ",";

                 }

                 $description .= get_post_meta($wp_query->get_queried_object()->ID, "_smallbiz_extra_description", true);

             }

             echo $description;

         } else {

             $description = biz_option('smallbiz_description');

            echo $description;

         }	

	?>" />

	<meta name="keywords" content="<?php 

         

         /* Override the keywords if the custom tag "_smallbiz_keywords" has been set. */

         /* if "_smallbiz_extra_keywords" has been set, append this. */

         if (is_singular()  &&

             !($is_smallbiz_frontpage)

             ){

             $keywords = "";

             if (get_post_meta($wp_query->get_queried_object()->ID, "_smallbiz_keywords", true) && get_post_meta($wp_query->get_queried_object()->ID, "_smallbiz_keywords", true) != ""){ ?><?php

                 $keywords = get_post_meta($wp_query->get_queried_object()->ID, "_smallbiz_keywords", true);

             }else {             

                 $keywords = "";

             }

             if(get_post_meta($wp_query->get_queried_object()->ID, "_smallbiz_extra_keywords", true)){

                 if($keywords != ""){

                     $keywords .= ",";

                 }

                 $keywords .= get_post_meta($wp_query->get_queried_object()->ID, "_smallbiz_extra_keywords", true);

             }

             echo $keywords;

         } else {

             $keywords = biz_option('smallbiz_keywords');

             echo $keywords;

         }	     

	     ?>" />

<?php /* for custom fields end */ ?>

<?php } ?>	

<?php echo biz_option('smallbiz_webmaster');?>

        



<link rel="author" href="<?php echo biz_option('smallbiz_gplusauthor');?>"/>



<?php if(biz_option('smallbiz_gplusauthor') !== '#'): ?>

    <link rel="publisher" href="<?php echo biz_option('smallbiz_gpluspublisher');?>"/>

<?php endif; ?>



<!-- Styles -->



<link href="<?php bloginfo('template_url'); ?>/css/screen.css?v=<?php echo biz_option('smallbiz_version'); ?>" media="screen,projection,tv" rel="stylesheet" type="text/css" />

<link href="<?php echo get_bloginfo('template_url').'/layouts/'.$layout; ?>/css/screen.css?v=<?php echo biz_option('smallbiz_version'); ?>" media="screen,projection,tv" rel="stylesheet" type="text/css" />



 <!--[if lte IE 9]>

<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/ie.css" type="text/css" media="screen" />

<![endif]-->

<!--[if lte IE 7]>

 <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/ie7.css" type="text/css" media="screen" />

 <![endif]-->



<!-- RSS & Pingback -->

<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'); ?>" />



<!-- SmallBiz WordPress Theme by http://www.Expand2Web.com -->

<!-- WP Head -->	

<?php wp_head(); ?>

<?php echo biz_option('smallbiz_analytics');?>



<script>

(function($){

    $(function(){

    	// if we have only 1 widget, and it is slider, make it full width, and remove margins

        var widgets = $('.widgetized_before_content_widget');

        widgets.css('min-width', parseInt(100 / widgets.length, 10) + '%').css('margin-right', 0);

        if(widgets.length == 1 && widgets.find('.nivoSlider').length == 1) {

        	var before_content = $('#widgetize_before_content');

        	before_content.css('width', 'auto').css('padding', 0);

        	before_content.find('.slider-wrapper').css('margin', 0);

        }

        if(widgets.length == 0) {

        	$('#widgetize_before_content').css('display', 'none');

        }

    });

})(jQuery);

</script>



<link rel="stylesheet" href="<?php home_url(); ?>?css=smallbiz_expand2web_css_header&amp;v=<?php echo biz_option('smallbiz_version'); ?>" type="text/css" media="screen,projection,tv" />

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />



</head>

<body <?php body_class(); ?>>



<?php

    $header_box_theme_option = 'show';

    $hide = biz_option('smallbiz_header_box_disabled');

    if($hide != '') {

        $header_box_theme_option = 'hide';

    }

    $hide = biz_option('smallbiz_header_box_disabled_complete');

    if($hide != '') {

        $header_box_theme_option = 'hide_all';

    }

 ?>

    

<div id="site-wrap">

<div class="vcard header_box_<?php echo $header_box_theme_option; ?>" id="header" onClick="document.location='<?php bloginfo('url')?>';" style="cursor:pointer;">



<div id="logo">

<?php if(biz_option('smallbiz_logo')!=""){ ?>

<img src="<?php echo biz_option('smallbiz_logo')?>" alt="Logo" />

<?php }?>

</div>





<div style="clear: both;"></div>



<!-- Hide Name and Tagline if checkbox is not equal to by adding div id noheader -->

<?php $hide = (biz_option('smallbiz_header_box_disabled')); if($hide != ""){ ?>

<div id="noheader"> 		<?php } ?>	



<!-- Hide Comoplete header if checkbox is not equal to by adding div id noheader -->

<?php $hide = (biz_option('smallbiz_header_box_disabled_complete')); if($hide != ""){ ?>

<div id="noheader"> 		<?php } ?>	



<h1><span class="fn org"><a style="color:#<?php echo biz_option('smallbiz_name_color') ?>;text-decoration:none;" href="<?php bloginfo('url')?>"><?php echo biz_option('smallbiz_name');//bloginfo('name'); ?></a></span></h1>

<h2 style="color:#<?php echo biz_option('smallbiz_sub_header_color')?>;"><?php echo biz_option('smallbiz_sub_header'); //bloginfo('description'); ?></h2>



<?php $hide = (biz_option('smallbiz_header_box_disabled')); if($hide != ""){ ?> </div> <?php } ?>



<p>

<span class="adr">

<span class="tel" style="color:#<?php echo biz_option('smallbiz_telephone_color')?>;"><?php echo biz_option('smallbiz_telephone')?></span> 



<?php if(biz_option('smallbiz_headertwitter')!=""){ ?>

<a href="<?php echo biz_option('smallbiz_headertwitter'); ?>" class="headertwitter" title="Follow Us on Twitter!" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/twitterheader.png" alt="Follow Us on Twitter!" style="padding-left:3px;"/></a>

<?php }?>



<?php if(biz_option('smallbiz_headerfacebook')!=""){ ?>

<a href="<?php echo biz_option('smallbiz_headerfacebook'); ?>" class="headerfacebook" title="Follow Us on Facebook!" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/fbheader.png" alt="Follow Us on Facebook!" /></a>

<?php }?>



<?php if(biz_option('smallbiz_headergoogle')!=""){ ?>

<a href="<?php echo biz_option('smallbiz_headergoogle'); ?>" class="headergoogle" title="Follow Us on Google+!" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/googleheader.png" alt="Follow Us on Google+!" /></a>

<?php }?>



<br />



<span class="street-address" style="color:#<?php echo biz_option('smallbiz_street_color')?>;"><?php echo biz_option('smallbiz_street')?> - </span>

<span class="locality" style="color:#<?php echo biz_option('smallbiz_city_color')?>;"><?php echo biz_option('smallbiz_city')?></span>

<span class="region" style="color:#<?php echo biz_option('smallbiz_state_color')?>;"><?php echo biz_option('smallbiz_state')?></span>

<span class="postal-code" style="color:#<?php echo biz_option('smallbiz_zip_color')?>;"><?php echo biz_option('smallbiz_zip')?></span><br />

<span class="email"><a style="color:#<?php echo biz_option('smallbiz_headeremail_color')?>;" href="mailto:<?php echo biz_option('smallbiz_headeremail')?>"><?php echo biz_option('smallbiz_headeremail')?></a></span>

</span>

</p>



<?php $hide = (biz_option('smallbiz_header_box_disabled_complete')); if($hide != ""){ ?> </div> <?php } ?>

	

</div> <!--company logo-->

</div> <!--header-->



<div id="accesswrap">

<div id="access" role="navigation" class="menu">

<?php /* SmallBiz navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  

The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?>

<?php smallbiz_wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>

</div><!-- #access -->

<div style="clear: both;"></div>

</div><!-- accesswrap -->

<div id="accesswrap-responsive">
<div id="access-responsive" role="navigation" class="menu">
<?php /* SmallBiz navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  
The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?>
<?php smallbiz_wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
</div><!-- #access -->
<div style="clear: both;"></div>
</div><!-- accesswrap -->


<div id="contentwrap">

<div id="pagespace"></div>

<div id="contentsidespace">



<div id="page">

	

<!-- WIDGETIZED BEFORE CONTENT -->



<?php if(!(get_option('smallbiz_layout') == 'widgetized' && is_front_page() && get_option('smallbiz_page_on_front') == get_option('smallbiz_homepage_id'))): ?>

	<div id="content">

<?php endif; ?>