	//	JQuery/JS functions
	
$(document).ready(function() 
{
//	Highlights the page the user is on by changing the cursor and underlining the item
	var sPath = window.location.pathname;	//	Holds the name of the path
	var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);	//	Holds the name of the page
	if (sPath == "/" || sPage == "index.php")
	{
		$("#homeitem").parent()	.css("border-bottom-style","solid")
								.css("border-width","1px")
								.css("border-color","#ffbc73");
	}
	else if (sPage == "about.php")
	{
		$("#aboutitem").parent().css("border-bottom-style","solid")
								.css("border-width","1px")
								.css("border-color","#ffbc73");
	}
	else if (sPath == "/contact/")
	{
		$("#contactitem").parent()	.css("border-bottom-style","solid")
									.css("border-width","1px")
									.css("border-color","#ffbc73");
	}
	else if (sPage == "newbuild.php")
	{
		$("#newbuilditem").parent()	.css("border-bottom-style","solid")
									.css("border-width","1px")
									.css("border-color","#ffbc73");
	}
	else if (sPage == "residential.php")
	{
		$("#residentialitem").parent()	.css("border-bottom-style","solid")
										.css("border-width","1px")
										.css("border-color","#ffbc73");
	}
	else if (sPage == "personal.php")
	{
		$("#personalitem").parent()	.css("border-bottom-style","solid")
									.css("border-width","1px")
									.css("border-color","#ffbc73");
	}
	else if (sPage == "testimonials.php")
	{
		$("#testimonialitem").parent()	.css("border-bottom-style","solid")
										.css("border-width","1px")
										.css("border-color","#ffbc73");
	}
	else if (sPage == "tips.php")
	{
		$("#tipsitem").parent()	.css("border-bottom-style","solid")
								.css("border-width","1px")
								.css("border-color","#ffbc73");
	}
	//	Animate index page
	$('#restOfHomeContent').hide(0);
	$('#restOfHomeContent').fadeIn('slow');
	//	Animate about/new buld/residential/personal/testimonial and tips pages
	$('#aboutContent').hide(0);
	$('#aboutContent').show('blind', '', 500);
	$('#newBuildContent').hide(0);
	$('#newBuildContent').show('blind', '', 500);
	$('#residentialContent').hide(0);
	$('#residentialContent').show('blind', '', 500);
	$('#personalContent').hide(0);
	$('#personalContent').show('blind', '', 500);
	$('#testimonialsContent').hide(0);
	$('#testimonialsContent').show('blind', '', 500);
	$('#tipsContent').hide(0);
	$('#tipsContent').show('blind', '', 500);
	//	Animate contact page
	$('#contact').hide(0);
	$('#contact').show('slide', '', 500)
	
	//	MENU
	if (sPath == "/" && sPage != "index.php")
	{
		$('ul.spritemenu').hide(0);
		$('ul.spritemenu').slideDown('slow');
	}


	//	Slideshow stuff
	$('#slideshow').hide(0)			//	Hides the slideshow
	$('#slideshow').fadeIn(2000)		//	Shows it again

	$('#slideshow').cycle()	//	Handles the slideshow

});
