$(document).ready(function() {
// strategy wheel		
	$('.intro').fadeIn(750);
	$('.strategy-nav ul').last().css('padding','0');
	
	var selected = {
		design: false,
		digital: false,
		marketing: false,
		technology: false
	};
	
	$('.design-move, .digital-move, .marketing-move, .technology-move').hide();
	$('#design-move, #digital-move, #marketing-move, #technology-move').each(function(index, element)
	{
		element = $(element);
		
		var currentSection = element.attr('id').replace(/\-.*$/, '');
		
		$('.' + currentSection + '-btn').hover(
			function() {
				if (selected[currentSection] == false)
					$('.' + currentSection + '-img').stop('true','true').fadeTo(250, 0);
			},
			function() {
				if (selected[currentSection] == false)
					$('.' + currentSection + '-img').stop('true','true').fadeTo(250, 1.0);
			}
		);
		
		$('.' + currentSection + '-btn').click(
			function() {
				var previousSection;
				
				for (var i in selected)
				{
					if (selected[i])
					{
						previousSection = i;
						break;
					}
				}
				
				if (previousSection == currentSection)
					return;
				
				$('.' + currentSection + '-move').show();
				$('.' + currentSection + '-move').animate({top : 2, left : 357 }, 750 );
				$('.' + previousSection + '-info, .intro').hide();
				$('.' + currentSection + '-info').fadeIn('slow');
				
				selected[previousSection] = false;
				selected[currentSection] = true;
				
				$('.' + previousSection + '-move').hide().css({top: '', left: ''});
				$('.' + previousSection + '-img').stop('true','true').fadeTo(250, 1.0);
			}
		);
	});
	return;
//end jQuery
});
