$(document).ready(function() {
	
	$('#nav_capabilities').mouseover(function() {
	  	$('#bubble').show();
		$('#bubble').html('<img src="/images/wordbubble_capabilities.png">');
		$('#bubble').css({ top:'10px', left:'240px' });
	});
	
	$('#nav_work').mouseover(function() {
	  	$('#bubble').show();
		$('#bubble').html('<img src="/images/wordbubble_work.png">');
		$('#bubble').css({ top:'5px', left:'375px' });
	});
	
	$('#nav_team').mouseover(function() {
	  	$('#bubble').show();
		$('#bubble').html('<img src="/images/wordbubble_team.png">');
		$('#bubble').css({ top:'6px', left:'420px' });
	});
	
	$('#nav_pulse').mouseover(function() {
	  	$('#bubble').show();
		$('#bubble').html('<img src="/images/wordbubble_pulse.png">');
		$('#bubble').css({ top:'8px', left:'520px' });
	});
	
	$('#nav_howweredifferent').mouseover(function() {
	  	$('#bubble').show();
		$('#bubble').html('<img src="/images/wordbubble_different.png">');
		$('#bubble').css({ top:'13px', left:'695px' });
	});
	
	$('.header_nav').mouseout(function() {
		$('#bubble').html('');
		$('#bubble').hide();
	});
	
	// picking clients in the portfolio....
	$('.switchClient').click(function(event) {
		event.preventDefault();
		fn_switchClient($(this).attr("num"));
		pageTracker._trackPageview($(this).attr("href"));
		
		$('.slide').mouseover(function(event) {
			$('#slide_' + $(this).attr("num") + '_desc').show();
		});

		$('.slide').mouseout(function(event) {
			$('#slide_' + $(this).attr("num") + '_desc').hide();
		});
	});
	
	$('.slide').mouseover(function(event) {
		$('#slide_' + $(this).attr("num") + '_desc').show();
	});
	
	$('.slide').mouseout(function(event) {
		$('#slide_' + $(this).attr("num") + '_desc').hide();
	});
	    	
});

// THESE ARE SHARED! DO NOT EDIT. -- JQUERY
function jmoveRight(w) {	
	if ($('#current_div').val() < $('#total_div').val() - 1) {
		x = $('#current_div').val();
		x++;
		$('#current_div').val(x);
		$('#slider_container').animate({ left:'-='+w }, 400, function() { /* Animation complete.*/ });		
	}
}

function jmoveLeft(w) {
	if ($('#current_div').val() > 0) {
		x = $('#current_div').val();
		x--;
		$('#current_div').val(x);
		$('#slider_container').animate({ left:'+='+w }, 400, function() { /* Animation complete.*/ });
	}
}

function jmoveUp(w) {
	var position = $("#slider_container").position();
	if (position.top <= 285) $('#slider_container').animate({ top:'+='+w }, 400, function() { /*Animation complete.*/ });
}

function jmoveDown(w) {	
	var position = $("#slider_container").position();
	$('#slider_container').animate({ top:'-='+w }, 400, function() { /*Animation complete.*/ });		
}

function workOver(x){
   var target = (x);
   $('.' + target).addClass('workOver');
}
function workOff(x){
	var target = (x);
	$('.' + target).removeClass('workOver');
}

function clientOver(x){
	var target = (x);
	$('#' + target).addClass('workOver')
}
function clientOff(x){
	var target = (x);
	$('#' + target).removeClass('workOver')
}




