                                                        /* JavaScript Document


	:: NOTES ::
	
	Project: Hanaford Law
	Author: RR
	Description: This is the javascript used throughout the Hanaford Law site. It is currently using the JQuery Library version 1.3.2.min
	Recent Modified Date: 06/22/09 
	Recent Notes:

	6-22-09	** added selected states for navigation

*/

// SLIDE SWITCH FUNCTION

function slideSwitch() {
    try{
		var $active = $('#slideshow .active');

		if ( $active.length == 0 ) $active = $('#slideshow .slideShowContent:last');
	
		var $next =  $active.next().length ? $active.next()
			: $('#slideshow .slideShowContent:first');
	
	
		$active.animate({opacity: 0.0}, 2000, function(){
			$(this).removeClass('active').addClass('last-active');
		});
	
		$next.css({opacity: 0.0})
			.addClass('active').removeClass('last-active')
			.animate({opacity: 1.0}, 2000, function() {
				$active.animate({opacity: 0.0}, 2000).removeClass('active').addClass('last-active');
			});
	}catch(err){}
}





$(function(){

// run list of functions
$('#slideshow .slideShowContent:first').addClass("active");
setInterval( "slideSwitch()", 15000 );



// Adds the Selected  states for main navigation
	
	try{
		var hiddenNav = $(".hiddenNav").attr("id");
		$("#ddmenu li[rel="+hiddenNav+"]").addClass("selected");
	}
	catch(err){}
	
});
    

    

    

    

    

    

    