var defaultTextHighlighted;
var defaultPhotoHighlighted;

var theBackgroundPosition;
var imagePositionY;
var reflectionPositionY;


var theX;
var theY;
var theReflectionX;
var theReflectionY;


function menuReveal(position) {

	if (position != $('#textMenu > li').index(defaultTextHighlighted)) {



		theX = "0px";
		theY = -59*position+"px";
		theReflectionX = "0px";
		theReflectionY = -15*position+"px";
		

		$('#textMenu > li.current').removeClass('current'); // remove the .current class from the 'default' <li>

		$('#textMenu > li').eq(position).addClass('current'); // add the .current class to the hovered <li>




		$('#photoMenu > li').eq(position).children('.images').children('a').eq(0).stop().animate({backgroundPosition:"(-188px "+theY+")", opacity:'0'}, {duration:400}); // animate the bars

		$('#photoMenu > li').eq(position).children('.reflection').children('a').eq(0).stop().animate({backgroundPosition:"(-188px "+theReflectionY+")", opacity:'0'}, {duration:400}); // animate the bar reflection

		$('#photoMenu > li').eq(position).children('.images').children('div').eq(0).stop().animate({opacity:'1'}, {duration:500}); // animate the photo

		$('#photoMenu > li').eq(position).children('.reflection').children('div').eq(0).stop().animate({opacity:'1'}, {duration:1000});// animate the photo reflection

	} // close the if statement



} //close the function







function menuHide(position) {

	if (position != $('#textMenu > li').index(defaultTextHighlighted)) {

		theX = "0px";
		theY = -59*position+"px";
		theReflectionX = "0px";
		theReflectionY = -15*position+"px";



		$('#textMenu > li.current').removeClass('current'); // remove the .current class from the current hovered <li>

		defaultTextHighlighted.addClass('current'); // add the .current class from the 'default' <li>
		
		

		$('#photoMenu > li').eq(position).children('.images').children('a').eq(0).stop().animate({backgroundPosition:"(0px "+theY+")", opacity:'1'}, {duration:400}); // animate the bars

		$('#photoMenu > li').eq(position).children('.reflection').children('a').eq(0).stop().animate({backgroundPosition:"(0px "+theReflectionY+")", opacity:'1'}, {duration:400}); // animate the bar reflection

		$('#photoMenu > li').eq(position).children('.images').children('div').eq(0).stop().animate({opacity:'0'}, {duration:500}); // animate the photo
	
		$('#photoMenu > li').eq(position).children('.reflection').children('div').eq(0).stop().animate({opacity:'0'}, {duration:1000});// animate the photo reflection

		
		
	} // close the if statement



} //close the function
