$(document).ready(function(){


	
	//cycle the testimonials in the sidebar
	
	$("#testimony_cycle")
	.cycle({
		fx: 'fade',
		speed: 1000,
		timeout: 10000
	});
	
	$("#testimony_cycle").click(function() {
        $("#testimony_cycle").cycle('toggle'); 
	});
	
	
	
	//remove links on images in headline feature area on home page
	
	$('#headline_image img').unwrap();
	
	// hide ugly branding on google directions plugin (on contact-us page)
	
	$('.gadget tr').eq(2).siblings().hide();
		
})

$(window).load(function(){
	
		// Home page Hero Cycle 
	
	$('#hero #image_container')
	.cycle({
		fx: 'fade',
		speed: 1500,
		timeout: 6000,
		pager: '#pager'
	});
	

	$("#story_container")
	.cycle({
		fx: 'scrollHorz',
		speed: '1000',
		timeout: 9000,
		next: '#nav_right',
		prev: '#nav_left'
	});
	
	//cycle the Employees on the About Us page
	$('#emp_slider')
	.jcarousel({
		 auto: 3,
		wrap: 'circular',
		animation: 600,
		scroll: 1,
		initCallback: mycarousel_initCallback
	})
		
		function mycarousel_initCallback(carousel){
			
			
			// Pause autoscrolling if the user moves with the cursor over the clip.
			carousel.clip.hover(function(){
				carousel.stopAuto();
			}, function(){
				carousel.startAuto();
			});
		};
	
})
