<?php
function style_tag_cloud($tags){
	return '<div style="padding:5px 15px 5px 15px;">'.$tags.'</div>';
}

add_action('wp_tag_cloud', 'style_tag_cloud');

function templatelite_wp_head(){
	global $tpinfo;
	$stylesheet=!empty($_REQUEST['style'])? $_REQUEST['style'].".css":$tpinfo[$tpinfo['tb_prefix'].'_stylesheet'];

	if(empty($stylesheet)) $stylesheet='default.css';

	$customjs='/styles/'.basename($stylesheet,'.css').'/custom.js';

	echo '<link href="'. get_bloginfo('template_directory') .'/styles/'. $stylesheet .'" rel="stylesheet" type="text/css" />'."\n";
	echo '<script type="text/javascript" src="'.get_bloginfo("template_directory").'/includes/js/templatelite-general.js"></script>'; //load before custom js
	if(file_exists(TEMPLATEPATH.$customjs)) echo '<script type="text/javascript" src="'.get_bloginfo('template_directory').$customjs.'"></script>';
	if($tpinfo['templatelite_ie6warning']=='true'){
		echo "<!--[if lte IE 6]>";
		echo "<script type='text/javascript'>var template_directory='".get_bloginfo("template_directory")."';</script>";
		echo "<script type='text/javascript' src='".get_bloginfo("template_directory")."/includes/js/jquery.ie6blocker.js'></script>";
		echo "<![endif]-->";
	}
}

add_action('wp_head', 'tp_header');
add_action('wp_head', 'templatelite_wp_head');

add_theme_support('post-thumbnails',array( 'post', 'page'));
?>