// JavaScript Document
jQuery(document).ready(function(){

jQuery("#archive").children().each(function() {
									   var child = jQuery(this);
									   var linkk=child.attr("href").replace("/date/","/category/news/date/");
									   child.attr("href", linkk);
									   })

var year;

if (document.location.href.indexOf('/news/date/')!=-1)
{
	year=document.location.href.split("/")[6];
}

else if (jQuery("#year").length>0)
{
	year=jQuery(".posts_single .post_single #year").attr('year');
}

else
{
	year=jQuery(".posts .post:last .postdate").attr('year');
	/*var currentYear = new Date().getFullYear();*/
}

jQuery("a[title*='"+year+"']").addClass("lighted");

if (document.location.pathname==('/'))
{
	jQuery(".wp-paginate li a").each(function() {
									   var linkk=jQuery(this).attr("href").replace("/page/","/category/news/page/");
									   jQuery(this).attr("href", linkk);
									   })
}


})