

/********************************************************************************************************************/
/***************************************** * HOME PAGE ANIMATION * ***********************************************************/
/********************************************************************************************************************/
					
function bannerRotator() {
		var $active = $('#homeMainImage img.active');
		
		if ( $active.length == 0 ) $active = $('#homeMainImage img:last');
	
		// display images in the order they appear
		var $next =  $active.next().length ? $active.next()
			: $('#homeMainImage img:first');
	
		$active.addClass('last-active');
	
		// add/remove class; transition speed
		$next.css({opacity: 0.0})
			.addClass('active')
			.animate({opacity: 1.0}, 1200, function() {
				$active.removeClass('active last-active');
			});
	}   
	
	// rotate image how often
	$(function() {
		setInterval( "bannerRotator()", 5000 );
	});
		
	

/********************************************************************************************************************/
/***************************************** * entire div hightlights, homepage * ***********************************************************/
/********************************************************************************************************************/

						   
	$(".pane-list li").click(function(){
		window.location=$(this).find("a").attr("href");return false;
	});
	
	
/*****************************************************************************************************************************/
/***************************************** * ACCORDION * ***********************************************************/
/*****************************************************************************************************************************/

$(document).ready(function() {
	$('ul#accordion a.view').click(function() {
		$(this).css('outline','none');
		if($(this).parent().hasClass('current')) {
				$(this).parent().animate({backgroundColor:"#ffffff"}, 500); 
				$(this).siblings('ul').slideUp('slow',function() {
				$(this).parent().removeClass('current');				
				//$.scrollTo('ul#accordion li.current img',1000);	
			});			
		} else {
			$('ul#accordion li.current ul').slideUp('slow',function() {
				$(this).parent().removeClass('current');
				$(this).parent().animate({backgroundColor:"#ffffff"}, 500); 
			});
			$(this).siblings('ul').slideToggle('slow',function() {
				$(this).parent().toggleClass('current');
				$(this).parent().animate({backgroundColor:"#eeeeee"}, 1500);
			});
			//$.scrollTo('ul#accordion li.current img',1000);
		}
		return false;
	});	
});
	





