/* - - - - - - - - - - - - - - - - - - - - -
Nav hover

	ULs: ".mainNav_" + navName + " ul"
	LIs: ".mN_" + navName + " a"

*/
var navHeight = 40;
var navName = ["Home", "Them", "Stor", "Gall", "Abou", "Memb"];
var navUL;
var navLI;
var oldNav;

kQuery(document).ready(function() {
	//if( /MSIE [1-5]/.test(navigator.userAgent )) return;
	var oldNav = kQuery("#navigation ul").attr("class");
	
	for (var i = 0; i<navName.length; i++){
		navLI = ".mN_" + navName[i] + " a";
		var navCounter = i * navHeight;
		if (navCounter > 0) { navCounter = "-" + navCounter}
		var navPosition = "left " + navCounter + "px";
	
		kQuery(navLI).hover(function() {
			var currHovered = kQuery(this).parent().attr("class");
			var switchTo = (currHovered.substr(3, 4));

			kQuery("#navigation ul").removeClass(oldNav).addClass('mainNav_'+switchTo);
 		}, function() {
			kQuery(this).parent().parent().removeClass().addClass(oldNav);
		});
	}
});




function getGalleryItemsResponseHandler(ajaxResponse) {
	//console.log("getGall Items called");
	kQuery('#galleryBox').fadeOut('slow', function(){
		kQuery(this).fadeIn('fast').html(ajaxResponse.responseText);
	});
	//window.successTimerId = setTimeout('$(\'#nextSButton\').click()',10000);
}
