<?php
/*
Template Name: 4 - Citrus Sales Page
*/
?>
<!doctype html>
<html> 
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' - '; } ?><?php bloginfo('name'); ?></title>
<link href="<?php bloginfo('template_directory'); ?>/ctstyles.php" rel="stylesheet" type="text/css" />
<?php 
if(get_option('flex_page_noindex')) {
global $wp_query;
$thePostID = $wp_query->post->ID;
$noindex = get_option('flex_page_noindex');
$noindexpageids = explode (",", $noindex);
if (in_array($thePostID, $noindexpageids)) { echo '<meta name="robots" content="noindex, nofollow" />' . "\n";}}?>
<?php if(comments_open()) : ?>
    <?php wp_enqueue_script( 'comment-reply' ); ?>
<?php endif; ?>
<?php $sp = 4; ?>
<style type="text/css">
p {margin:0;padding:8px 0; line-height:150%;}
body { 
background: #<?php if(get_post_meta($post->ID, 'bgcolor', true)) { echo get_post_meta($post->ID, 'bgcolor', true); } else { echo 'f2f2f2'; } ?>  url(<?php if(get_post_meta($post->ID, 'bodybg', true)) { echo get_post_meta($post->ID, 'bodybg', true); } else { echo bloginfo('template_url'); ?>/images/page-elements/sales-<?php echo $sp; ?>-bg.png<?php } ?>) repeat-x top center;}
#content { background: url(<?php if(get_post_meta($post->ID, 'pagebg', true)) { echo get_post_meta($post->ID, 'pagebg', true); } else { echo bloginfo('template_url'); ?>/images/page-elements/sales-<?php echo $sp; ?>-fill.png<?php } ?> ) repeat-y top center; padding:10px 0;
}
#footer { background: url(<?php if(get_post_meta($post->ID, 'footerbg', true)) { echo get_post_meta($post->ID, 'footerbg', true); } else { echo bloginfo('template_url'); ?>/images/page-elements/sales-<?php echo $sp; ?>-footer.png<?php } ?> ) no-repeat top center;
padding-top:40px;
height: <?php if(get_post_meta($post->ID, 'footerheight', true)) { echo get_post_meta($post->ID, 'footerheight', true); } else { echo '70'; } ?>px;
}
#footer, #footer a {
color: #<?php if(get_post_meta($post->ID, 'footertext', true)) { echo get_post_meta($post->ID, 'footertext', true); } else { echo '999999'; } ?>;}
</style>
<?php wp_head(); ?>
<link rel="shortcut icon" href="<?php if (get_option('flex_favicon')) { echo get_option('flex_favicon'); } else { echo bloginfo('template_url') . '/favicon.ico'; } ?>" type="image/x-icon" />
<!--[if lte IE 6]>
  <script>
  DD_belatedPNG.fix('div');
</script>
  <![endif]-->
</head>
<body class="sp4">
<div id="wrapper">
<div id="bg" style="font-size: 15px; font-family: Arial, Helvetica, sans-serif; padding-top: 0px; z-index: -2;">
<div id="spwrap" style="margin: 0pt auto; width: 840px; text-align: center;">
<div id="content" style="text-align: left; width: 840px;">
<div style="padding: 0 95px;">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content();?>
<?php endwhile;?>
<?php endif; ?>

<?php if (get_option('flex_metadata_comoff') == "yes") { ?>
    <?php if(comments_open()) : ?>
    <?php comments_template('', true); ?>
    <?php endif; ?>
<?php } ?>

</div></div>
<div id="footer" style="text-align: center;"><?php if (get_post_meta($post->ID, 'footer', true)) { echo get_post_meta($post->ID, 'footer', true); } ?></div>
</div>
<?php wp_footer(); ?>
</div>
</div>
<?php if (get_option('flex_analytics_id')) { ?>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("<?php echo get_option('flex_analytics_id'); ?>");
pageTracker._trackPageview();
} catch(err) {}
</script>
<?php } ?>
</body>
</html>