var containerWidth=10000; //nPosts gets updated in index.php


window.onload = function() {


	var content=document.getElementById('content');
		content.style.width=containerWidth+'px';

	//if(content!=null){setTimeout(function(){scrollSlideWoo(containerWidth);},500);}
	
	}






function loadSingleContainer(_link){
makeHttpRequest(_link, function(response){
document.getElementById('container-single').innerHTML=response;

} );






}




function scrollSlideWoo(_position)
{
	_position = _position*.94;
	scrollTo(parseInt(containerWidth-_position),0);	
	if(parseInt(_position)>2)setTimeout(function(){ scrollSlideWoo(_position);},10);
}

function scrollSlide(_start,_stop)
{
	_start = _start*.93;
	scrollTo(parseInt(_stop-_start),0);	
	if(parseInt(_start)>1)setTimeout(function(){ scrollSlide(_start,_stop);},10);
}


var movingF = false;

function showExcerpt(_el){
	_el.style.visibility="visible";
	var op=_el.style.opacity;
	if(op<=0)op=.1;
	fadeUp(_el,op,.8);
}

function hideExcerpt(_el){
	setTimeout(function(){
		fadeDown(_el,_el.style.opacity,0.0);
	},2000);
	
	
	
}



function fadeDown(_el,_moves,_end)
{
	_moves = _moves-.1;

	_el.style.opacity= _moves;
	
	if(_moves>_end)
	{
		setTimeout(function(){fadeDown(_el,_moves,_end)},10);	
	}
	else{
	_el.style.visibility="hidden";
	}

}

function fadeUp(_el,_moves,_end)
{
	_moves = _moves+.1;

	_el.style.opacity= _moves;
	
	if(_moves<_end)
	{
		setTimeout(function(){fadeUp(_el,_moves,_end)},10);	
	}

}
