// init & start
$(function() {
	
	// if homepage investor services panel
	if( $('#investorservices').length ){
	
		// dan cyclen
		$('#investorservices')
		.cycle({
			fx: 'fade',
			delay:-4000, // additional delay (in ms) for first transition
			timeout:8500,
			speed: 4000,
			sync:1,
			pause:1,     // true to enable "pause on hover" 
			//random:random,	// niet in cycle.lite
			before:alt2src
		});
		
		
		// switch panels hover
		$('#investorservices td:not(.active)')
		.mouseover(
			function () {
				
				var thisclass= $('a',$(this)).attr('class');
				
				$('#investorservices').cycle('stop');
							
				$('#investorservices div.service:not(.' + thisclass + ')').fadeOut(150);
				
				$('#investorservices div.' + thisclass)
				.css({
					opacity:'1'
					//'zIndex':1000,
					//display:'block'
				});
				
				$('#investorservices div.' + thisclass).fadeIn(150);
				
			}
		);
		
	}
	
	
	// transfer alt of elem to src of elem
	function alt2src(){
				
		//window.console.log( $('td:first',$(this)).attr('class') );
		
	}
	
});