$(document).ready(function(){
	initialize_blog();
});

function initialize_blog(){
	//removes the last border-bottom of the blog page
	$('div .articles:last').css({
		'border' : 'none'
    });
	
	//removes excess padding on the first item of the blog page
	$('div .article:first').css({
		'padding' : '0 20px 40px'
	});
	
	$('#article_0 a').addClass('selected');
	//$('#'+getCookie("selected_article")+' a').addClass('selected');
}

function viewArticle(artID){
	$('a').removeClass('selected');
	$('#article_'+artID+' a').addClass('selected');
}

function getCookie(c_name)
{
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
  x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
  y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
  x=x.replace(/^\s+|\s+$/g,"");
  if (x==c_name)
    {
    return unescape(y);
    }
  }
}
