
function scaleButtons(){
	//ajuste del tamaño de la botonera
	var windowWidth = $(window).width();
	var linkInsideWrapper = 350;
	var widthAdjust = (windowWidth - $('#wrapper').width()) / 2;
	var newNavWidth = widthAdjust + linkInsideWrapper;
	if(windowWidth > 960){
		$('#menu-nav').width(newNavWidth);	
		if($('#menu-nav').css('right') != 0){
			$('#menu-nav').css('right', 0 )
		}
	} else {
		var right =  (newNavWidth - $('#menu-nav').width());
		$('#menu-nav').css('right', right * 2 );
	}
	
} 	

$('document').ready(function(){
	
	scaleButtons();
	
	$(window).resize(function(e){
		scaleButtons();
	});
	
	//cambio de imagen central en eventos de mouse sobre la botonera
	$('#performance-link').hover(
		function(){
			$('#part-image').toggleClass('performance-img');
		},
		function(){
			$('#part-image').toggleClass('performance-img');
		}
	);
	
	$('#oem-link').hover(
		function(){
			$('#part-image').toggleClass('oem-img');
		},
		function(){
			$('#part-image').toggleClass('oem-img');
		}
	);
});

