jQuery().ready(function()
{
	$(document).pngFix(); 
	Cufon.replace('div.post.date');
	Cufon.replace('#description h2');
	Cufon.replace('a.pagination');
	
	$('.post:not(.date)').hoverIntent(postRollOver, postRollOut);
	$('a.pagination').hoverIntent(paginationRollOver, paginationRollOut);
	
	$('.post:not(.date)').append('<div class="highlighter"></div>');
	$('.post:not(.date) .photo img').each(function(){
			return;
			var url = $(this).attr("src");
			

			$(this).wrap('<a href="'+url+'" class="thickbox"></a>');
	});
	
	
});

function postRollOver()
{
	var w = $(this).width();
	$(this).children('.highlighter').animate({width:w},{queue:true, duration:500, easing:'easeInOutCubic'})
	
	var c = $(this).attr('class');
	var ndx = c.indexOf('post ');
	
	if(ndx==-1) return
	c=c.substring(ndx+5);
	$('div.'+c+'.date').stop();
	
	var bgColor = $('meta[name="color:Date Background Rollover"]').attr('content');
	$('div.'+c+'.date').animate({backgroundColor:bgColor},{queue:false, duration:500, easing:'easeInOutCubic'});
}

function postRollOut()
{
	$(this).children('.highlighter').animate({width:0},{queue:true, duration:500, easing:'easeInOutCubic'})
	
	var c = $(this).attr('class');
	var ndx = c.indexOf('post ');
	
	if(ndx==-1) return
	
	c=c.substring(ndx+5);
	$('div.'+c+'.date').stop();
	var bgColor = $('meta[name="color:Date Background"]').attr('content');
	$('div.'+c+'.date').animate({backgroundColor:bgColor},{queue:false, duration:800, easing:'easeInOutCubic'});
	
}

function paginationRollOver()
{
	var bgColor = $('meta[name="color:Pagination Background Rollover"]').attr('content');
	$(this).animate({backgroundColor:bgColor},{queue:true, duration:500, easing:'easeInOutCubic'});
}

function paginationRollOut()
{
	var bgColor = $('meta[name="color:Pagination Background"]').attr('content');
	$(this).animate({backgroundColor:bgColor},{queue:true, duration:500, easing:'easeInOutCubic'});
}