$('document').ready(function()	//when the document loads
{
	//get the divs containing the article information
	$artstext = $('.artstext')

	//make them grow on mouseover
	$artstext.mouseover(function(){
		//grow to full width of the box (32.66em)
		$(this).stop().animate({width:'32.66em'});
	}); 

	//and shrink on mouseout
	$artstext.mouseout(function(){
		//shrink to the width of the title box (8em)
		$(this).stop().animate({width:'8em'});
	});
});

/* add_onload_function(function(){init_resize()});

function init_resize()
{
	artstextdivs = document.getElementsByClassName('artstext');
	for (i=0;i<artstextdivs.length;i++)
	{
		artstextdivs[i].onmouseover=function(){this.hasMouseOver=true;grow(this,8,32.66);};
		artstextdivs[i].onmouseout =function(){this.hasMouseOver=false;shrink(this,8,32.66);};
	}
}

function grow(that,minwidth,maxwidth)
{
	if(that.hasMouseOver==false){return;}
	if(!that.style.width){that.style.width='8em';}
	if(parseInt(that.style.width)<maxwidth)
	{
		that.style.width=((parseFloat(that.style.width)+2)+'em');
		setTimeout(function(){grow(that,minwidth,maxwidth)},10);
	}
	else if (parseInt(that.style.width)>=maxwidth)
	{
		that.style.width=maxwidth+'em';
	}
	else
	{
		return true;
	}

}

function shrink(that,minwidth,maxwidth)
{
	if(that.hasMouseOver==true){return;}
	if(!that.style.width){that.style.width='32.66em';}
	if(parseInt(that.style.width)>minwidth)
	{
		that.style.width=((parseFloat(that.style.width)-2)+'em');
		setTimeout(function(){shrink(that,minwidth,maxwidth)},10);
	}
	else if (parseInt(that.style.width)<=minwidth)
	{
		that.style.width=minwidth+'em';
	}
	else
	{
		return true;
	}
} */
