ddaccordion.init({
	headerclass: "caAccordionMenu_Header", //Shared CSS class name of headers group
	contentclass: "caAccordionSubMenu", //Shared CSS class name of contents group
	revealtype: "mouseover", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
	mouseoverdelay: 300, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
	defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc] [] denotes no content
	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
	animatedefault: false, //Should contents open by default be animated into view?
	persiststate: false, //persist state of opened contents within browser session?
	toggleclass: ["", "caAccordionMenu_HeaderExpanded"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
	togglehtml: ["suffix", "<img src='/ca/img/plus.gif' alt='' class='caAccordionMenu_Statusicon' />", "<img src='/ca/img/empty.gif' alt='' class='caAccordionMenu_Statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
	animatespeed: 100, //speed of animation: "fast", "normal", or "slow"
	oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
	}
})

// ************BEGIN VARIABLES ****************
var $currentMonthYear = $('#currentMonthYear');
var $currentMonthYear_swap = $('#currentMonthYear_swap');
var $caAccordionMenu = $('#caAccordionMenu');
var $caTextBox =$('#caTextBox');

//************* END VARIABLES ****************
//*******************************************


// ************ BEGIN FUNCTIONS ***************

// Accordion Menu hoverIntent //
function shift (){
	$(this).animate({marginLeft: "+=10px"}, 500);
	$(this).append('<span id="doubleArrowsRight">&nbsp;&raquo;</span>');
}
function shiftBack (){
	$(this).animate({marginLeft: "-=10px"}, 700);
	$('#doubleArrowsRight').remove();
}

// logo hoverIntent //	
function logoOver(){
	$('#underline').animate({opacity: "0"}, 400);
	$currentMonthYear.animate({opacity: "0"}, 1000);
	$currentMonthYear_swap.fadeIn(1000);
	setTimeout('$("#doubleArrowsRight1").animate({opacity: ".5", marginLeft: "+=12px"}, 400)', 10);
	setTimeout('$("#doubleArrowsRight2").animate({opacity: ".7", marginLeft: "+=15px"}, 500)', 110);
	setTimeout('$("#doubleArrowsRight3").animate({opacity: "1", marginLeft: "+=25px"}, 625)', 210);
	setTimeout('$("#homeText").animate({opacity: "1"}, 600)', 310);
	$("#akLogo_Sub, #akLogo_noSub_195px, #akLogo_noSub").animate({marginLeft: "+=13px"}, 400).css({cursor: "pointer"});
}
function logoOut(){
	$("#akLogo_Sub, #akLogo_noSub_195px, #akLogo_noSub").animate({marginLeft: "-=13px"}, 600);
	$("#doubleArrowsRight1").animate({opacity: ".25", marginLeft: "-=12px"}, 300);
	$("#doubleArrowsRight2").animate({marginLeft: "-=15px", opacity: "0"}, 600);
	$("#doubleArrowsRight3").animate({marginLeft: "-=25px", opacity: "0"}, 600);
	$("#homeText").animate({opacity: "0"}, 400);
	$currentMonthYear_swap.fadeOut(1000);
	$currentMonthYear.animate({opacity: "1"}, 1000);
	setTimeout('$("#underline").animate({opacity: "1"}, 500)', 400);
}

function contentFade() {
	$('.pageContent, #caBanner, #caSubBanner, .subBanner, #topLogo, #homeWrapper').fadeOut();
}
// ********* END FUNCTIONS ***************
//*****************************************


// ********* BEGIN DOCUMENT READY CODE ************
	
$(document).ready(function(){
		setTimeout('$("html, body").animate({scrollTop: 20},1000)',300);
		setTimeout('$caAccordionMenu.fadeIn(350)', 100);
		setTimeout('$caTextBox.fadeIn(500)', 500);


//Accordion Menu hover//
	$('a.hoverLink').hoverIntent({
		sensitivity: 3,
		interval: 120,
		over: shift,
		out: shiftBack
	});
	
//menu clicks//
	$('#caAccordionMenu_RetouchingLink a').click(function () {
			contentFade();
		$('#retouchWrapper').fadeIn();
	});
				
	$('#caAccordionMenu_webDesignLink a').click(function () {
			contentFade();
		$("#webDesignWrapper").fadeIn();
	});
});

// ************ END DOCUMENT CODE ****************
// ********************************************

//****** NOTES

//logoOver and logoOut functions are called on each individual page's js file, to avoid occurance on the Home page.