// Main effects script for animation
// and site traversal
// Alexander Boyd
// Updated August 7 2009
<!--
$(document).ready(function() {
	// global vars 
	var curPage = alinkRef = '#homePanel';
	var locationImg = 'home';

	// start bookmarking
	// this will load the correct div if
	// a user loads the site with an 
	// attached anchor (users able to 
	// bookmark pages)
	var retLocation = document.location.toString();
	if (retLocation.match('#')) {
		var newLocation = '#' + retLocation.split('#')[1] + 'Panel';
		$('.pages').hide();
		$(newLocation).stop().fadeIn('slow');
		curPage = newLocation.replace(/Panel/g,"");
	}
	// end bookmarking

	// create lightbox image galleries
	$('#c_gallery a').lightBox({fixedNavigation:true});
	$('#am_gallery a').lightBox({fixedNavigation:true});
	$('#ct_gallery a').lightBox({fixedNavigation:true});

	// start navigation
	// will load the corresponding divs once
	// a user has clicked on a menu link
	$('#menu a').click(function() {
		alinkRef = $(this).attr('href') + 'Panel';
		var locationNewImg = alinkRef.replace(/#/g,"").split('Panel')[0];
		if (curPage == alinkRef) {
			return false;
		} else {
			if (alinkRef == "#shopPanel") {
				$('#location').removeClass(locationImg);
			} else {
				$('#location').addClass(locationNewImg).removeClass(locationImg);
			}
			$('.pages').hide();
			$(alinkRef).stop().fadeIn('slow');
			curPage = alinkRef;
			locationImg = locationNewImg;
			document.title = 'Voluptuous // ' + locationImg.toUpperCase();
		}
	});
	
/*
added Feb, 16, 2010 - Paul Watson:
this just fades the menu on mouseover.
*/
$("#menu a").fadeTo(2000,.5);
fademenu("menu a",1,.5,1000);
fademenu("divflashfooter",1,.2,1000);


$("#PartyMamas").fadeIn("5000");
$("#divStoreIndex ").fadeIn("8000");

// end navigation
});


/*
added Feb, 16, 2010 - Paul Watson:
this just fades the menu on mouseover.
*/
function fademenu(menu,to,from,speed){
	$('#' + menu).hover(
 function(){
   $(this).fadeTo(speed, to);
   return true;
 },
 function(){
	 $(this).fadeTo(speed,from);
	 return true;
});
}
-->