//AÑADIR TAMAÑO DE LA VENTANA AL VIEWPORT
	$(window).load(function() {
		var width = 0;
		$('.scroll-content .element img').each(function() {
		width += $(this).outerWidth( true );
		});
		$('.scroll-content').css('width', width + 5);
	});
	


//AJUSTAR EL TAMAÑO DEL VIEWPORT CON EL DEL MENÚ
	var photoItems = $('#content_wrapper .inner .card').length;
	var photoWidth = parseInt($('#gallery_width').val())+20;
	var scrollArea = photoWidth * photoItems;
	var scrollWidth = $('#wrapper').width() - 265;
	
	$('#content_wrapper').css({width: scrollWidth+'px'});
	
	$(document).ready(function() {
		var scrollWidth = $('#wrapper').width() - 265;
  		$('#content_wrapper').css({width: scrollWidth+'px'});
	});	
	$(window).resize(function() {
		var scrollWidth = $('#wrapper').width() - 265;
  		$('#content_wrapper').css({width: scrollWidth+'px'});
	});
	$(window).load(function() {
		var scrollWidth = $('#wrapper').width() - 265;
  		$('#content_wrapper').css({width: scrollWidth+'px'});
	});

	

//EFECTO HOVER SOBRE EL MENU
	$(document).ready(function(){ 
		$('.menu ul li a').each(function(){	
		$(this).hover(function(){	
			$(this).addClass('hover');
			$(this).animate({left: 10}, 200);
			},
		function(){	
			$(this).removeClass('hover');
			$(this).animate({left: 0}, 200);
			});	
		});
	});	
	
	
//CAPTION IMAGENES
$(document).ready(function(){ 
	$("#content_wrapper .element").hover(
    	function() {
        	$(this).find('.caption').animate({ opacity: .8 }, 300);
    	},
    	function() { 
    		$(this).find('.caption').animate({ opacity: 0 }, 300);
    	}
	);	
});	
