<?php
/*
 * @package WordPreciousss
 * @subpackage Precious_Parent_Theme
*/

/* EasyTheme supports multiple sidebars */
if ( function_exists('register_sidebar') )
register_sidebar(array('name'=>'Right Sidebar',
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h6 class="widgettitle">',
'after_title' => '</h6>',
));
if ( function_exists('register_sidebar') )
register_sidebar(array('name'=>'Top',
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h6 class="widgettitle">',
'after_title' => '</h6>',
));
if ( function_exists('register_sidebar') )
register_sidebar(array('name'=>'Bottom',
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h6 class="widgettitle">',
'after_title' => '</h6>',
));

/* language support 
- .mo files  should be added to the /lang directory */
load_theme_textdomain('precious', get_theme_root()  . '/precious/lang');

/*detect WordPreciousss*/
function is_precious() {
	return;
}

/* detect WPMU */
function is_precious_wpmu() {
	return function_exists('is_site_admin');
}

/*detect bbPress*/
function is_precious_bbpress() {
	return function_exists('is_bb_admin');
}

/* body class filters 

browser body class - http://www.nathanrice.net/blog/browser-detection-and-the-body_class-function/*/
function browser_body_class($classes) {
	global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;

	if($is_lynx) $classes[] = 'lynx';
	elseif($is_gecko) $classes[] = 'gecko';
	elseif($is_opera) $classes[] = 'opera';
	elseif($is_NS4) $classes[] = 'ns4';
	elseif($is_safari) $classes[] = 'safari';
	elseif($is_chrome) $classes[] = 'chrome';
	elseif($is_IE) $classes[] = 'ie';
	else $classes[] = 'unknown';

	if($is_iphone) $classes[] = 'iphone';
	return $classes;
}
/**/

add_filter('body_class','browser_body_class');





require_once('lib/comment-functions.php');
require_once('lib/widget-functions.php');
require_once('lib/template-tags.php');
?>
