<?php global  $page, $paged, $_opt;?><!doctype html>
<html <?php language_attributes(); ?>>
<head>

<meta charset="<?php bloginfo('charset'); ?>" />
<meta http-equiv="content-type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php
	/*
	 * Print the <title> tag based on what is being viewed.
	 */

	wp_title( '|', true, 'right' );

	// Add the blog name.
	bloginfo( 'name' );

	// Add a page number if necessary:
	if ( $paged >= 2 || $page >= 2 )
		echo ' | ' . sprintf( __( 'Page %s', 'cloudfw' ), max( $paged, $page ) );

	?></title>

<?php wp_head(); ?>
<?php /*Favicon*/ if (!empty($_opt[PFIX."_favicon"])) echo '<link rel="shortcut icon" href="'.$_opt[PFIX."_favicon"].'" />'; ?>
<?php cloudfw_skin_render(cloudfw_get_the_skin_id()); ?>
<?php if(!empty($_opt[PFIX."_custom_codes"]["css"])) echo "<style>".$_opt[PFIX."_custom_codes"]["css"]."</style>"; ?>
<?php cloudfw_font_engine(); ?>
<?php echo $_opt[PFIX."_custom_codes"]["header"]; ?>
   
</head>
<body <?php body_class('wait-js'); ?>> 

	<div id="body-pattern">
    
	<div id="body-head">
    	
        <div id="body-head-pattern">
    
            <div id="header">
            
                <div id="header-background">
                       
                    <div id="header-pattern">
                        
                        <div id="header-container" class="the-page" style="<?php echo cloudfw_skin_engine_make_attribute(NULL,'height',$_opt[PFIX.'_header']['height']);?>">
                            <?php 
                            
                                $logo = $_opt[PFIX."_logo"];
                                $logo_style = NULL;
                                
                                if (empty($logo["image"]))$logo["image"] = TMP_URL.'/lib/imgs/logo.png';
                                
                                $custom_logo = cloudfw_get_custom_skin_logo( cloudfw_get_the_skin_id() );
                                if ($custom_logo) $logo["image"] = $custom_logo;
                                    
                                $logo_style .= 'top:'.$logo["margin-top"].'px;';
                                $logo_style .= 'left:'.$logo["margin-left"].'px;';
                                
                                echo '<div id="logo-image" style="'.$logo_style.'"><a href="'.__url(get_bloginfo("url")).'"><img src="'.$logo["image"].'" alt="Logo" /></a></div>';
                            
                            ?>
                            
                            <!-- /#logo -->
                            
                            <div id="header-right-sector" style="<?php if (!_isOnOff($_opt[PFIX.'_header']['overwrite'])) {
                                echo 	cloudfw_skin_engine_make_attribute(NULL,'top',$_opt[PFIX.'_header_widget']['margin-top']).
                                        cloudfw_skin_engine_make_attribute(NULL,'right',$_opt[PFIX.'_header_widget']['margin-right']);
                                }?>">
                            
                                <div id="header-widget">
                                
                                    <?php $header_widget_area_ID = apply_filters('cloudfw_header_widget', 'header-widget-area'); ?>

                                    <?php if ( is_active_sidebar( $header_widget_area_ID ) ) : ?>
                                        
                                        <?php dynamic_sidebar( $header_widget_area_ID ); ?>
                                            
                                    <?php endif; ?>
    
                                </div><!-- /#header-widget -->
    
                            </div><!-- /#header-right-sector -->
                            
                        </div><!-- /#header-container -->
                        
                    </div><!-- /#header-pattern -->
                
                </div><!-- /#header-back -->
                <?php
                
                if (cloudfw_get_custom_skin_attr( cloudfw_get_the_skin_id(), 'menu-width') == 'fixed')
                    $nav_menu_class = ' global-radius';
                
                ?>
                <div id="navigation" class="navigation-height<?php echo $nav_menu_class; if ($nav_menu_class) echo ' the-page';?>">
                
                    <div id="navigation-background" class="navigation-height<?php echo $nav_menu_class;?>"></div><!-- /#navigation-background - .navigation-height global-radius -->
                    <div id="navigation-gradient" class="navigation-height<?php echo $nav_menu_class;?>"></div><!-- /#navigation-gradient - .navigation-height global-radius -->           
                    <div id="navigation-pattern" class="navigation-height<?php echo $nav_menu_class;?>"></div><!-- /#navigation-pattern - .navigation-height global-radius -->
                    
                    <?php 
                    
                    // Navigation Menu
                    
                    wp_nav_menu( array(	
                        'fallback_cb'	  => 'cloudfw_wp_page_menu_none', 
                        'theme_location'  => 'primary',
                        'container'       => 'div', 
                        'container_class' => 'the-page navigation-height'.$nav_menu_class, 
                        'container_id'    => 'navigation-menu', 
                        'menu_class'      => '', 
                        'menu_id'         => 'navigation-menu-items',
                        'before'          => '',
                        'after'           => '',
                        'link_before'     => '',
                        'link_after'      => '',
                        'depth'           => 0,
                        'walker'		  => new _walker(),
                        'show_home' 	  => true
                        ) 
                    );
                    
                    ?>
        
                    <!-- /#navigation-menu - .navigation-height global-radius -->
                     
                </div><!-- /#navigation - .navigation-height global-radius -->
                
            </div><!-- /#header -->
            
            <div id="middle">
            
                <div id="middle-background">
                
                    <div id="middle-pattern">
                        
                        <div id="middle-highlight" class="middle-height">
                                
                                <?php 
                                if (!get_the_slider()) {
                                    echo '<div id="middle-height" class="middle-height">'.make_blurb().'</div>';
                                    $height_fix = false;
                                } else {
                                  $height_fix = true;
                                }
                                ?>
                         
                        </div><!-- /#middle-highlight - .middle-height -->
                        
                    </div><!-- /#middle-pattern -->
        
                </div><!-- /#middle-background -->
                
            </div><!-- /#middle -->
            
		</div><!-- /#body-head-pattern -->
        
	</div><!-- /#body-head -->
        
        
                <div id="content" class="the-page" <?php if ($height_fix) echo 'style="margin-top:-70px !important;"';?>>
                
