function previous_click(){
	$("#main").fadeOut("slow");
	setTimeout("window.location = previous_page_url",1000);
}
function previous_enterHover(){
	$("#previous_container").css("background-image","url('images/previous_green.png')");
}
function previous_exitHover(){
	$("#previous_container").css("background-image","url('images/previous.png')");
}
function next_click(){
	$("#main").fadeOut("slow");
	setTimeout("window.location = next_page_url",1000);
}
function next_enterHover(){
	$("#next_container").css("background-image","url('images/next_green.png')");
}
function next_exitHover(){
	$("#next_container").css("background-image","url('images/next.png')");
}
function showNav(){
	if(jQuery.browser.msie){
		$("#previous_container").show();
		$("#next_container").show();
	}
	else{
		$("#previous_container").fadeIn("normal");
		$("#next_container").fadeIn("normal");
	}
}
function hideNav(){
	if(jQuery.browser.msie){
		$("#previous_container").hide();
		$("#next_container").hide();
	}
	else{
		$("#previous_container").fadeOut("normal");
		$("#next_container").fadeOut("normal");
	}
}
addLoadEvent(function() {
	$.preloadImages("images/facebook_blue.png","images/twitter_blue.png","images/t_blue.png","images/f_blue.png");
	$("#previous_container").html("&nbsp;");
	$("#previous_container").css("width","50px");
	$("#previous_container").css("height","50px");
	$("#previous_container").css("background-image","url('images/previous.png')");
	$("#previous_container").css("background-repeat","no-repeat");
	$("#previous_container").css("cursor","pointer");
	$("#previous_container").css("float","left");
	$("#previous_container").css("position","relative");
	$("#previous_container").css("top",float_up);
	$("#previous_container").css("left","8px");
	$("#previous_container").click(function(){previous_click();});
	$("#previous_container").mouseenter(function(){previous_enterHover();}).mouseleave(function(){previous_exitHover();});	
	//$("#previous_container").hide();
	$("#next_container").html("&nbsp;");
	$("#next_container").css("width","50px");
	$("#next_container").css("height","50px");
	$("#next_container").css("background-image","url('images/next.png')");
	$("#next_container").css("background-repeat","no-repeat");
	$("#next_container").css("cursor","pointer");
	$("#next_container").css("float","right");
	$("#next_container").css("position","relative");
	$("#next_container").css("top",float_up);
	$("#next_container").click(function(){next_click();});
	$("#next_container").mouseenter(function(){next_enterHover();}).mouseleave(function(){next_exitHover();});
	//$("#next_container").hide();
	//$("#image_container").mouseenter(function(){showNav();}).mouseleave(function(){hideNav();});
	$("#image_container").css("font-size","0px");
	$("#facebook").hover(
		function(){this.src = this.src.replace("_grey","_blue");},
		function(){this.src = this.src.replace("_blue","_grey");}
	);
	$("#twitter").hover(
		function(){this.src = this.src.replace("_grey","_blue");},
		function(){this.src = this.src.replace("_blue","_grey");}
	);
	$("#nav").css("position","relative");
	$("#nav").css("top","-1.0em");
	if(slide_position==0){
		$("#nav").css("width","322px"); //322
		$("#nav").css("height","37px");
	}
	else{
		$("#nav").css("width","79px"); //79
		if(jQuery.browser.msie&&jQuery.browser.version=="6.0"){
			$("#nav").css("width","81px");
			//$("#follow").css("left","28px");
		}
		$("#nav").css("height","30px");
	}
	$("#nav").html('<div id="about"><a href="about.php">&nbsp;About&nbsp;</a></div><div class="break"></div><div id="blog"><a href="">&nbsp;Blog&nbsp;</a></div><div class="break"></div><div id="contact"><a href="contact.php">&nbsp;Contact&nbsp;</a></div>');
	$("#about").html('&nbsp;');
	if(slide_position==0){
		$("#about").css("width","89px");
		$("#about").css("height","34px");
		$("#about").css("background-image","url('images/about.png')");
		$("#about").mouseenter(function(){$("#about").css("background-image","url('images/about_green.png')");}).mouseleave(function(){$("#about").css("background-image","url('images/about.png')");});
	}
	else{
		$("#about").css("width","14px");
		$("#about").css("height","27px");
		$("#about").css("background-image","url('images/a.png')");
		$("#about").mouseenter(function(){$("#about").css("background-image","url('images/a_green.png')");}).mouseleave(function(){$("#about").css("background-image","url('images/a.png')");});
	}
	$("#about").css("margin","0 5px");
	$("#about").css("float","left");
	$("#about").css("cursor","pointer");
	$("#about").css("background-repeat","no-repeat");
	$("#about").mousedown(function(){window.location='about.php';});
	$("#blog").html('&nbsp;');
	if(slide_position==0){
		$("#blog").css("width","66px");
		$("#blog").css("height","34px");
		$("#blog").css("background-image","url('images/blog.png')");
		$("#blog").mouseenter(function(){$("#blog").css("background-image","url('images/blog_green.png')");}).mouseleave(function(){$("#blog").css("background-image","url('images/blog.png')");});
	}
	else{
		$("#blog").css("width","17px");
		$("#blog").css("height","27px");
		$("#blog").css("background-image","url('images/b.png')");
		$("#blog").mouseenter(function(){$("#blog").css("background-image","url('images/b_green.png')");}).mouseleave(function(){$("#blog").css("background-image","url('images/b.png')");});
	}
	$("#blog").css("margin","0 5px");
	$("#blog").css("float","left");
	$("#blog").css("cursor","pointer");
	$("#blog").css("background-repeat","no-repeat");
	$("#blog").mousedown(function(){window.location='blog.php';});
	$("#contact").html('&nbsp;');
	if(slide_position==0){
		$("#contact").css("width","113px");
		$("#contact").css("height","34px");
		$("#contact").css("background-image","url('images/contact.png')");
		$("#contact").mouseenter(function(){$("#contact").css("background-image","url('images/contact_green.png')");}).mouseleave(function(){$("#contact").css("background-image","url('images/contact.png')");});
	}
	else{
		$("#contact").css("width","14px");
		$("#contact").css("height","27px");
		$("#contact").css("background-image","url('images/c.png')");
		$("#contact").mouseenter(function(){$("#contact").css("background-image","url('images/c_green.png')");}).mouseleave(function(){$("#contact").css("background-image","url('images/c.png')");});
	}
	$("#contact").css("margin","0 5px");
	$("#contact").css("float","left");
	$("#contact").css("cursor","pointer");
	$("#contact").css("background-repeat","no-repeat");
	$("#contact").mousedown(function(){window.location='contact.php';});
	if(!(jQuery.browser.msie&&jQuery.browser.version=="6.0")){ 
		$(".break").css("float","left");
		$(".break").css("width","1px");
		$(".break").css("height","16px");
		$(".break").css("border-right","1px solid #AAA");
		$(".break").css("position","relative");
		$(".break").css("top","10px");
		if(slide_position==0) $(".break").css("margin","0 5px");
	}
});
