Здравствуйте подскажите где ошибка
$(function(){
if(location.href[location.href.length - 1] == "/")
{
var locs = location.href.substring(0, location.href.length - 1);
var $year = decodeURIComponent(locs).slice(1).split('/');
}
else
var $year = decodeURIComponent(location.href).slice(1).split('/');
$year = eval(Number($year[$year.length - 1]) + 1);
$("#id").attr("href", "http://site.com/" + $year).text($year);
$year1 = eval(Number($year]) - 2);
$("#id1").attr("href", "http://site.com/" + $year1).text($year1);
});
И как применить к ссылке style?