$(document).ready(function(){
						   
	 //$.preloadCssImages();
	
	if($("#projects .item").length) { // on the index page
		$(".item").bind("mouseenter",function(){
			$(this).toggleClass("itemHover");
		}).bind("mouseleave",function(){
		   $(this).toggleClass("itemHover");
		});
		$(".info").bind("click",function(){
		   window.location = $(this).parent().children("a").attr("href");
		});
		$("#eof").bind("click",function(){
			self.scrollTo(0, 0);								
		});
	}
	
	if($("#items .item").length) { 
		$(".thumb").lightbox({fitToScreen: false});
		
		$(".item").bind("mouseenter",function(){
			$(this).toggleClass("itemHover");
		}).bind("mouseleave",function(){
		   $(this).toggleClass("itemHover");
		});
	}
	
	//control/nav  panels
	/*
	if($("#controls").length) {
		$("div.panel").hide();
		$("#archive").show();
		$("#archiveLink").addClass("active");
		$("#navigation a").removeAttr("href");
		
		$("#navigation li").bind("mousedown",function(){
			$("div.panel").hide();
			$("#navigation a").removeClass("active");
			$("#"+$(this).children("a").attr("id")).addClass("active");
			$("#"+$(this).children("a").attr("id").slice(0,-4)).fadeIn();			
		});
	}
	
	if($("#panels").length) {
		$("div.panel").hide();
		$("#navBar a.panel").removeAttr("href");
		$("div.panel .closePanel").bind("click",function(){
		   $("div.panel").fadeOut();
		   $("#navBar a.panel").removeClass("active");
		});
		
		$("#navBar li").bind("mousedown",function(){				  
			$("div.panel").hide();
			$("#navBar a.panel").removeClass("active");
			$("#"+$(this).children("a").attr("id")).addClass("active");
			$("#"+$(this).children("a").attr("id").slice(0,-4)).fadeIn();
		});
	}*/
	

});