
//  START Faux Transparency Nav Strips Code

		$(document).ready(function(){
			var navStripOrigPos=$("#nav-list").css("background-position");
			$("#nav-list li")
				.mouseenter(function(){
					var liIndex=$("#nav-list li").index(this);
					var stripPos="(0px "+(((liIndex)*(20))+5)+"px)";
					
					$("#nav-list").stop().animate(
						{backgroundPosition:stripPos},
						{duration:300}
						);
					})
				.mouseleave(function(){
					$("#nav-list").stop().animate(
						{backgroundPosition:"("+navStripOrigPos+")"},
						{duration:300}
						);
					});
			});
		
/* The following is the old nav code. The new incorporates jQuery, which streamlines a lot of the following code and MORE. */
//
////
//
//	//Temporary signal to check Javascript availability on the browser
//	//alert("javascript is on!");
//	
////
//	//define navList strip positions;
//	var navStripPosition=new Array; 
//	navStripPosition[0]="0px -5px"; //Make strip out of range
//	navStripPosition[1]="0px 5px"; //home
//	navStripPosition[2]="0px 25px"; //portfolio
//	navStripPosition[3]="0px 45px"; //blog
//	navStripPosition[4]="0px 65px"; //experiments
//	navStripPosition[5]="0px 85px"; //about
//	navStripPosition[6]="0px 105px"; //archive
//
////
//
//	//define the faux transparency strip that goes over the nav items
//	var navList=document.getElementById("nav-list");
//	
//	//define the li of the nav items
//	var navHome=document.getElementById("nav-home");
//	var navPortfolio=document.getElementById("nav-portfolio");
//	var navBlog=document.getElementById("nav-blog");
//	var navExperiments=document.getElementById("nav-experiments");
//	var navAbout=document.getElementById("nav-about");
//	var navArchives=document.getElementById("nav-archives");
//	
//	//assign numbers to nav items
//	var navListItem=new Array;
//	navListItem[0]="0"; // placeholder value;
//	navListItem[1]=navHome;
//	navListItem[2]=navPortfolio;
//	navListItem[3]=navBlog;
//	navListItem[4]=navExperiments;
//	navListItem[5]=navAbout;
//	navListItem[6]=navArchives;
//	
////
//
//	//define a default/return state for fauxTransparencyNav strip
//	function navStripDefaultState(){
//		navList.style.backgroundPosition=navStripPosition[pageType];
//		}
//		
//	//loads the default state on page load;
//	window.onload=navStripDefaultState;
//	
////
//	//Change CSS of nav strip positions
//	//Without JS, the strips only show the section name, without "IVANWLAM.COM" before it.
//	//With JS, the strips with use a different position and will show "IVANWLAM.COM" before the section name when it's hovered
//	//Also, the "IVANWLAM.COM" before the current section name will disappear, so only one "IVANWLAM.COM" can show up at a time
//
//	// Define position change of nav item being hovered as well as "current page" nav item
//	function hoverListItemPos(x,i){
//		if (x!=navListItem[pageType]){ //only execute if the nav item that you hover is not of the current page
//			x.style.backgroundPosition="0px -50px"; //move the bg position of the list item being hovered to show "IVANWLAM.COM"
//			if(document.body.className.indexOf("page_photo")>=0){ // hide the text for photo experiment page
//				navListItem[pageType].style.backgroundPosition="1000px 1000px"; //Take out "IVANWLAM.COM" from the nav list item of the current page by moving its bg position
//				} else {
//				navListItem[pageType].style.backgroundPosition="0px -150px"; //Take out "IVANWLAM.COM" from the nav list item of the current page by moving its bg position
//				}
//		} else {
//		//090518 for page_photo:
//		x.style.backgroundPosition="0px -150px"; //move the bg position of the list item being hovered to show "IVANWLAM.COM"
//		navListItem[pageType].style.backgroundPosition="0px -50px"; //Take out "IVANWLAM.COM" from the nav list item of the current page by moving its bg position
//		}
//	}
//
////
//
//	//Combine ONMOUSEOVER function of faux nav strip code with strip bg image position code
//
//	//change strip position on mouse over nav items
//	navListItem[1].onmouseover=function(){
//		navList.style.backgroundPosition=navStripPosition[1]; // faux nav strip code
//		hoverListItemPos(this,1); // strip bg position
//		}
//
//	navListItem[2].onmouseover=function(){
//		navList.style.backgroundPosition=navStripPosition[2]; // faux nav strip code
//		hoverListItemPos(this,2); // strip bg position
//		}
//
//	navListItem[3].onmouseover=function(){
//		navList.style.backgroundPosition=navStripPosition[3]; // faux nav strip code
//		hoverListItemPos(this,3); // strip bg position
//		}
//		
//	navListItem[4].onmouseover=function(){
//		navList.style.backgroundPosition=navStripPosition[4]; // faux nav strip code
//		hoverListItemPos(this,4); // strip bg position
//		}
//	/* TEMPORARILY MADE UNAVAILABLE. REMOVE WHEN PAGE IS AVAILABLE
//	navListItem[5].onmouseover=function(){
//		navList.style.backgroundPosition=navStripPosition[5]; // faux nav strip code
//		hoverListItemPos(this,5); // strip bg position
//		} */
//	/* TEMPORARILY MADE UNAVAILABLE. REMOVE WHEN PAGE IS AVAILABLE */
//	navListItem[6].onmouseover=function(){
//		navList.style.backgroundPosition=navStripPosition[6]; // faux nav strip code
//		hoverListItemPos(this,6); // strip bg position
//		}
//
////
//
//	//Combine ONMOUSEOUT functions of faux nav strip code with strip bg image position code
//	
//	//return nav list image position to default state;
//	for(var i=1;i<=6;i++){
//		navListItem[i].onmouseout=function(){
//			navStripDefaultState(); // return faux nav strip position to default state;
//			if(document.body.className.indexOf("page_photo")>=0){ // hide the text on rollout for photo experiment page
//				this.style.backgroundPosition="1000px 1000px";
//				} else {
//				this.style.backgroundPosition="0px 0px"; // return bg image position of recently hovered nav strip
//				navListItem[pageType].style.backgroundPosition="0px -50px"; // return the nav strip bg image position of the current section
//				}
//			}
//		}
//		
//	// backup for onmouseout
//	//	navListItem[1].onmouseout=function(){
//	//		navLiMouseOut(1,this);
//	//		}
//	//	
//	//	navListItem[2].onmouseout=function(){
//	//		navLiMouseOut(2,this);
//	//		}
//	//	
//	//	navListItem[3].onmouseout=function(){
//	//		navLiMouseOut(3,this);
//	//		}
//	//	
//	//	navListItem[4].onmouseout=function(){
//	//		navLiMouseOut(4,this);
//	//		}
//	//	
//	//	navListItem[5].onmouseout=function(){
//	//		navLiMouseOut(5,this);
//	//		}
//	//	
//	//	navListItem[6].onmouseout=function(){
//	//		navLiMouseOut(6,this);
//	//		}
//	//	
//	//	function navLiMouseOut(i,navLi){
//	//		navStripDefaultState(); // return faux nav strip position to default state;
//	//		if(document.body.className.indexOf("page_photo")>=0){ // hide the text on rollout for photo experiment page
//	//			navLi.style.backgroundPosition="1000px 1000px";
//	//			} else {
//	//			navLi.style.backgroundPosition="0px 0px"; // return bg image position of recently hovered nav strip
//	//			navListItem[pageType].style.backgroundPosition="0px -50px"; // return the nav strip bg image position of the current section
//	//			}
//	//		}
//	
////
//	
//	//Shows that the scripts are processed without any undefined code;
//	//alert("all scripts are processed!");
//	

//  END Faux nav strips

/////////////////////////////////////////////////////////////////////////////////////////////////////

