$(document).ready(function(){

	/* what we do homepage switch */
	$('.box.what_we_do_content a').hover(function() {
		// hover
		var className = $(this).parent().attr('class');
		$('.what_we_do_label')
			.addClass(className);
	}, function() {
		// out
		$('.what_we_do_label')
			.removeClass()
			.addClass('box')
			.addClass('what_we_do_label');
	})

	/* who we are swap */
//	$('.who-avatar').hover(function() {
//		// hover
//		var user_login = $(this).attr('class');
//		user_login = user_login.replace('who-avatar', '').trim();
//		$(this).attr('src', '/img/who-'+user_login+'.jpg');
//	}, function() {
//		// out
//	})

    /* who we are swap */
	$.swapImage(".swapImage");

	/**
	 * Front page quote rotator
	 * Source: http://www.caodesigns.com/blog/tutorials/create-a-javascript-rotating-quote-section.php?postID=33
	 */
	var fadeTime = 1000;
	var pauseTime = 2000;
	$(".client_quotes_content blockquote:not(:first)").hide();
	$('.client_quotes_content blockquote');
	setInterval(function(){
		$('.client_quotes_content blockquote').filter(':visible').fadeOut(pauseTime,function(){
			if($(this).next('blockquote').size()){
				$(this).next().fadeIn(fadeTime).delay(pauseTime);
			} else{
				$('.client_quotes_content blockquote').eq(0).fadeIn(fadeTime).delay(pauseTime);
			}
		});
	}, pauseTime);

});
