//////////////////////////////////
//////////////////////////////////
//								//
// DO NOT EDIT THIS				//
//								//
//////////////////////////////////
//////////////////////////////////

$(document).ready(function(){
	
//////////////////////////////////////////////
//											//
// declare the function for					//
// the background changer					//
//											//
//////////////////////////////////////////////


function bgChanger(numBackgrounds, bgChangerControl) {
	$("#bgChangerAnchor" + bgChangerControl).click(function () {
		$("#mainContainer").css("background","url(backgrounds/bg_" + bgChangerControl + ".jpg)");
	});
}
	
for (bgChangerControl=1;bgChangerControl<=numBackgrounds;bgChangerControl++) {
		
	bgChanger(numBackgrounds, bgChangerControl);
	
}

//////////////////////////////////////////////
//											//
// end of the background changer stuff		//
//											//
//////////////////////////////////////////////

//////////////////////////////////////////////
//											//
// stuff for the control of the LH nav		//
// side naviation menu						//
//											//
//////////////////////////////////////////////

// fades the main menu in when mouseOver of the "menu.jpg"
// image and accompanying DIV occurs

$("#tempLinksDivControl").mouseover(function () {
	$("#tempLinksDiv").fadeIn(400);
});


// this closes the LH side links div when the cross is clicked

$("#closeLinksDivImage").click(function () {
	$("#tempLinksDiv").fadeOut(400);
});

//////////////////////////////////////////////
//											//
// end of the LH menu stuff					//
//											//
//////////////////////////////////////////////


//////////////////////////////////////////////
//											//
// start of lightbox functions				//
//											//
//////////////////////////////////////////////

$(function() {
	$('a.lightbox').lightBox(); // Select all links with lightbox class

});
 
//////////////////////////////////////////////
//											//
// end of lightbox functions				//
//											//
//////////////////////////////////////////////


//////////////////////////////////////////////
//											//
// start of main content divs control stuff	//
//											//
//////////////////////////////////////////////

// this closes all the main content DIVS which
// should have the class "contentDiv"

$(".closeImage").click(function () {
	$(".contentDiv").hide();
});


// this opens the correct main content DIV 
// and closes the rest (again only one should
// ever show at one time, but just in case . . .)

function contentDivs (numContentDivs, contentDivsControl) {
	
	$("#link"+contentDivsControl).click(function () {	
			
		for (eachLineControl = 1;eachLineControl<=numContentDivs;eachLineControl++) {
			
			if (contentDivsControl == eachLineControl) {
				$("#mainContentDiv"+eachLineControl).slideDown(600);
			}
			else {
				$("#mainContentDiv"+eachLineControl).hide();
			}
			
		}
		
	});
		
}



for (contentDivsControl = 1;contentDivsControl<=numContentDivs;contentDivsControl++) {
	
	 contentDivs (numContentDivs, contentDivsControl);
	
}


//////////////////////////////////////////////
//											//
// end of main content divs control stuff	//
//											//
//////////////////////////////////////////////


});