<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
<link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Droid+Serif' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/images/tango/skin.css" type="text/css" />
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/js/colorbox/colorbox.css" type="text/css" />
<?php if(get_option('pyre_feedburner')): ?>
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php echo get_option('pyre_feedburner'); ?>" />
<?php endif; ?>
<?php if(get_option('pyre_favicon')): ?>
<link rel="shortcut icon" href="<?php echo get_option('pyre_favicon'); ?>" />
<?php endif; ?>
<?php wp_enqueue_script('jquery'); ?>
<?php wp_enqueue_script('jCarousel', get_bloginfo('template_directory'). '/js/jquery.jcarousel.min.js'); ?>
<?php if(is_home()): ?>
<?php wp_enqueue_script('nivo', get_bloginfo('template_directory'). '/js/jquery.nivo.slider.pack.js'); ?>
<?php endif; ?>
<?php wp_enqueue_script('jquery.colorbox', get_bloginfo('template_directory'). '/js/colorbox/jquery.colorbox-min.js'); ?>
<?php wp_enqueue_script('jtwt', get_bloginfo('template_directory'). '/js/jtwt.js'); ?>
<?php wp_enqueue_script('superfish', get_bloginfo('template_directory'). '/js/superfish.js'); ?>
<?php wp_enqueue_script('hoverIntent', get_bloginfo('template_directory'). '/js/hoverIntent.js'); ?>
<?php if(is_single()): ?>
<?php wp_enqueue_script('jquery.raty', get_bloginfo('template_directory'). '/js/jquery.raty.js'); ?>
<?php endif; ?>
<?php wp_enqueue_script('jquery.cookie', get_bloginfo('template_directory'). '/js/jquery.cookie.js'); ?>
<?php wp_enqueue_script('Broadway', get_bloginfo('template_directory'). '/js/scripts.js'); ?>
<?php
wp_localize_script('Broadway', 'BroadwayVars', array(
'ajaxUrl' => admin_url('admin-ajax.php'),
));
?>
<?php if(is_singular()) { wp_enqueue_script('comment-reply'); } ?>
<?php wp_head(); ?>
<script type='text/javascript'>
jQuery(window).load(function() {
jQuery('#posts-carousel').jcarousel({scroll: 4, visible: 4});
<?php if(is_home()): ?>
// Implementation of Nivo Slider
jQuery('#slider').nivoSlider({
effect: '<?php echo get_option('pyre_slider_effect'); ?>',
pauseTime: '<?php echo get_option('pyre_slider_speed'); ?>',
controlNavThumbs: true,
controlNavThumbsFromRel: true,
directionNav: false,
directionNavHide: false,
captionOpacity: 1
});
<?php endif; ?>
/**
* We use the initCallback callback
* to assign functionality to the controls
*/
function media_initCallback(carousel) {
jQuery('.jcarousel-control a').bind('click', function() {
carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
return false;
});
};
jQuery('.jcarousel-skin-media').jcarousel({scroll: 3, visible: 3});
jQuery('#navigation ul, .topNav').superfish({autoArrows: false, dropShadows: false});
<?php if(is_single()): ?>
if(jQuery.cookie('rating_<?php echo $post->ID; ?>') == 'true') {
rating_readOnly = true;
} else {
rating_readOnly = false;
}
jQuery('.user-rating').raty({
half: true,
size: 13,
path: '<?php bloginfo("template_directory"); ?>/images/stars/',
starHalf: 'star-half.png',
starOff: 'star-off.png',
starOn: 'star-on.png',
width: 75,
readOnly: rating_readOnly,
hintList: ['bad', 'poor', 'okay', 'good', 'excellent'],
space: false,
start: <?php echo ts_get_post_score($post->ID); ?>,
click: function(s, e) {
jQuery.cookie('rating_<?php echo $post->ID; ?>', true);
jQuery.ajax({
url: '<?php echo admin_url("admin-ajax.php"); ?>',
data: 'action=themesector_rating&rating='+s+'&ip=<?php echo $_SERVER["REMOTE_ADDR"]; ?>&post_id=<?php echo $post->ID; ?>',
type: 'POST',
dataType: 'json',
success: function(data) {
if(data.success == false) {
alert('You have already rated this post.');
jQuery('.user-rating').raty('readOnly', true);
jQuery('.user-rating').raty('start', <?php echo ts_get_post_score($post->ID); ?>);
}
}
});
}
});
<?php endif; ?>
});
</script>
<style type="text/css">
body {
background-color: #<?php echo get_option('pyre_bg_color'); ?>;
<?php if(get_option('pyre_show_pattern') == 'On'): ?>
background-image: url('<?php bloginfo('template_directory'); ?>/images/patterns/<?php echo get_option('pyre_pattern'); ?>.png');
<?php elseif(get_option('pyre_bg_image')): ?>
background-image: url('<?php echo get_option('pyre_bg_image'); ?>');
background-repeat: <?php echo get_option('pyre_bg_repeat'); ?>;
<?php endif; ?>
}
.menu-top-container, #header-container { background-color: #<?php echo get_option('pyre_header_bg_color'); ?>; }
#navigation { background-color: #<?php echo get_option('pyre_nav_bg_color'); ?>;}
</style>
</head>
<body <?php body_class($class); ?>>
<a name='top'></a>
<div id="full-header-container">
<!-- BEGIN HEADER-TOP -->
<?php wp_nav_menu(array('theme_location' => 'topNav', 'depth' => 3, 'fallback_cb' => false, 'menu_class' => 'topNav')); ?>
<!-- END HEADER-TOP -->
<!-- BEGIN HEADER -->
<div id="header-container">
<div id="header">
<!-- BEGIN HEADER-MIDDLE -->
<div id="header-middle" class="clearfix">
<div id="logo">
<?php
if(get_option('pyre_logo')) {
$logo = get_option('pyre_logo');
} else {
$logo = get_bloginfo('template_directory') . '/images/logo.png';
}
?>
<a href='<?php bloginfo('wpurl'); ?>'><img src="<?php echo $logo; ?>" alt="<?php bloginfo('name'); ?>" /></a>
</div>
<?php if(get_option('pyre_header_banner')): ?>
<div id="header-banner">
<?php echo get_option('pyre_header_banner'); ?>
</div>
<?php endif; ?>
</div>
<!-- END HEADER-MIDDLE -->
<!-- BEGIN WRAPPER-NAVIGATION -->
<div id="wrapper-navigation">
<div id="navigation">
<?php wp_nav_menu(array('theme_location' => 'mainNav', 'depth' => 3)); ?>
</div>
</div>
<!-- END WRAPPER-NAVIGATION -->
</div>
</div>
<!-- END HEADER -->
</div>
<!-- BEGIN WRAPPER -->
<div id="wrapper" class="clearfix">
<?php if(get_option('pyre_carousel') == 'On' && get_option('pyre_carousel_category')): ?>
<?php
if(get_option('pyre_carousel_category') != 'recent_posts') {
$posts_carousel = new WP_Query('showposts=10&cat='.get_option('pyre_carousel_category'));
} else {
$posts_carousel = new WP_Query('showposts=10');
}
if($posts_carousel->have_posts()):
?>
<ul id="posts-carousel" class="jcarousel-skin-tango">
<?php while($posts_carousel->have_posts()): $posts_carousel->the_post(); ?>
<?php if(has_post_thumbnail()): ?>
<li>
<div class="post-thumb-container">
<?php
if(has_post_format('video') || has_post_format('audio') || has_post_format('gallery')) {
$icon = '<span class="post-format-big ' . get_post_format($post->ID) . '"></span>';
} else {
$icon = '';
}
echo $icon;
?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail('scroller-thumbnail', array('alt' => get_the_title(), 'title' => get_the_title())); ?>
</a>
<?php if(get_post_meta($post->ID, 'pyre_overall_score', true)): ?>
<div class="post-score"><img src="<?php bloginfo('template_directory'); ?>/images/stars/<?php echo get_post_meta($post->ID, 'pyre_overall_score', true); ?>.png" alt="" /></div>
<?php endif; ?>
</div>
<h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
<span class="post-meta"><?php the_time('F j, Y'); ?>, by <?php the_author_posts_link(); ?></span>
</li>
<?php endif; endwhile; ?>
</ul>
<?php endif; ?>
<?php endif; ?>
<!-- BEGIN WRAPPER-CONTENT -->
<div id="wrapper-content" class="clearfix <?php if(is_page_template('fullwidth.php')): echo 'full-width'; endif; ?>">