animatedcollapse.addDiv('panel0', 'speed=250,fade=1')
animatedcollapse.addDiv('panel1', 'speed=250,group=menusystem,fade=1')

//not all of these panels are always here
animatedcollapse.addDiv('panel3a', 'speed=250,group=menusystem,fade=1')
animatedcollapse.addDiv('panel3b', 'speed=250,group=menusystem,fade=1')
animatedcollapse.addDiv('panel3c', 'speed=250,group=menusystem,fade=1')
animatedcollapse.addDiv('panel3d', 'speed=250,group=menusystem,fade=1')
animatedcollapse.addDiv('panel3e', 'speed=250,group=menusystem,fade=1')
animatedcollapse.addDiv('panel3f', 'speed=250,group=menusystem,fade=1')
animatedcollapse.addDiv('panel3g', 'speed=250,group=menusystem,fade=1')
animatedcollapse.addDiv('panel3h', 'speed=250,group=menusystem,fade=1')
animatedcollapse.addDiv('panel4a', 'speed=250,group=menusystem,fade=1')
animatedcollapse.addDiv('panel4b', 'speed=250,group=menusystem,fade=1')
animatedcollapse.addDiv('photo1', 'speed=250,group=projects,fade=1')
animatedcollapse.addDiv('photo2', 'speed=250,group=projects,fade=1')
animatedcollapse.addDiv('photo3', 'speed=250,group=projects,fade=1')
animatedcollapse.addDiv('photo4', 'speed=250,group=projects,fade=1')
animatedcollapse.addDiv('photo5', 'speed=250,group=projects,fade=1')
animatedcollapse.addDiv('photo6', 'speed=250,group=projects,fade=1')

animatedcollapse.ontoggle=function($, divobj, state){ //fires each time a DIV is expanded/contracted
	try{ //added by cpeltier - 12Nov2009 - to handle projects with fewer than 6 photos
		if ($('#'+divobj.id+"-toggle").length==1){ //if toggler link exists
			$('#'+divobj.id+"-toggle").css('font-weight', (state=='block')? 'bold' : 'normal')
			if ($('#'+divobj.id+"-toggle").hasClass('cat2a')){
				$('#'+divobj.id+"-toggle").css('color', (state=='block')? '#E31937' : '#313131')
				$('#'+divobj.id+"-toggle").css('font-weight', (state=='block')? 'bold' : 'normal')
			}
			if ($('#'+divobj.id+"-toggle").hasClass('cat2b')){
				$('#'+divobj.id+"-toggle").css('color', (state=='block')? '#313131' : '#313131')
				$('#'+divobj.id+"-toggle").css('font-weight', (state=='block')? 'bold' : 'normal')
			}
			if ($('#'+divobj.id+"-toggle").hasClass('cat2c')){
				$('#'+divobj.id+"-toggle").css('color', (state=='block')? '#1b4298' : '#313131')
				$('#'+divobj.id+"-toggle").css('font-weight', (state=='block')? 'bold' : 'normal')
			}
			if ($('#'+divobj.id+"-toggle").hasClass('cat2d')){
				$('#'+divobj.id+"-toggle").css('color', (state=='block')? '#D79D2A' : '#313131')
				$('#'+divobj.id+"-toggle").css('font-weight', (state=='block')? 'bold' : 'normal')
			}
		}
		if ($('#'+divobj.id+"-thumbnail").length==1){ //if toggler link exists
			$('#'+divobj.id+"-thumbnail").css('border-bottom', (state=='block')? '1px solid #1b4298' : '0 solid #1b4298')
		}
	}
	catch(err){
		myErr = "divobj missing";
	}
}

animatedcollapse.init()

$(document).ready(function(){

	$(".carousel li a").append("<em></em>");
	
	$(".carousel li a").hover(function() {
		$(this).find("em").animate({opacity: "show", top: "-15"}, 100);
		var hoverText = $(this).attr("title");
	    $(this).find("em").text(hoverText);
	}, function() {
		$(this).find("em").animate({opacity: "hide", top: "-15"}, 100);
	});


});

$(document).ready(function(){

	$("#imageCaddy a").hover(function() {
		$(this).next("em").animate({opacity: "show", top: "-59"}, "fast");
	}, function() {
		$(this).next("em").animate({opacity: "hide", top: "-75"}, "fast");
	});


});



