// KEEPS TRACK OF THE CURRENT LINK THAT HAS BEEN SELECTED
curr = -1;


// EXPECTS A NUMBER OF THE LINK THAT WAS CLICKED
function slideOver(which){
	xLoc = -312 * which;// MOVE THE CONTENT BASED ON THE WIDTH OF THE DIV
	
	//alert();
	
	/*if(which == -1){
		$("#contentMod").css({display: 'block'}, 10);
		$("#sliderContentArea").css({display: 'none'}, 10);
	}else{*/
		if(curr != which){// CHECK TO SEE IF THEY CLICKED A DIFFERENT LINK
			if(which == -1){
				$("#contentMod").animate({opacity:1}, 500);
				$("#sliderContentArea").css({display: 'none'}, 10);
			}else{
				$("#contentMod").animate({opacity:0}, 10);
				$("#sliderContentArea").css({display: 'block'}, 10);
			}
			$("#contentHolder").animate({opacity:.5}, 10);
			$("#contentHolder").animate({left:xLoc}, 500);
			$("#contentHolder").animate({opacity:1}, 300);
			$("#button"+curr).animate({opacity:.5}, 100);
			$("#button"+which).animate({opacity:1}, 1000);
			$("#sliderImage").css({opacity: 0, background: "#000 url(../img/bgImage"+which+".jpg) no-repeat top"});
			$("#sliderImage").animate({opacity:1}, 500);
			curr = which;// SET CURRENT TO LAST CLICK
		}
	//}

}

function overState(which){
	$("#button"+which).css({opacity:1},100);
}

function outState(which){
	if(curr != which){
		$("#button"+which).css({opacity:.5},100);
	}
}

/*$(document).ready(function(){
  $('#contentControl img').css({opacity:1},10);
});*/
