$(document).ready(function(){		
	$(".content").load("quiensoy.html");
	
	var menuWidth = 290;			
	
	$(".menu > div").each(function(o){	
		if ($(this).attr("class") == "current"){
			$(".menu").css("background","url(imagenes/menu.png) -" + (menuWidth*(o+1)) + "px 0px no-repeat");						
		}					
		$(this).hover(function(){
			var optionNumber = parseInt($(this).attr("id").replace("option-",""));			
			$(".menu").css("background","url(imagenes/menu.png) -" + (menuWidth*optionNumber) + "px 0px no-repeat");												
		},function(){				
			$(".menu").css("background","url(imagenes/menu.png) 0px 0px no-repeat");								
			$(".menu > div").each(function(e){
				if ($(this).attr("class") == "current"){						
					$(".menu").css("background","url(imagenes/menu.png) -" + (menuWidth*(e+1)) + "px 0px no-repeat");						
				}
			});												
		});
		
		$(this).click(function(event){							
			var optionNumber = parseInt($(this).attr("id").replace("option-",""));			
			$(".menu").css("background","url(imagenes/menu.png) -" + (menuWidth*optionNumber) + "px 0px no-repeat");							
			$(".menu > div").removeClass("current");				
			$(this).addClass("current");								
			$(".content").hide().load($(this).attr("target"),function(){
				$(".content").fadeIn(50);
			});				
		});			
	});
	
	$(".poster").live("mouseenter", function(){
		$(this).fadeTo(250, 1.0);
	});
	
});

function LoadIntoContent(url,animation){
	$(".content").hide().load(url,function(){
		$(".content").fadeIn(0);
	});			
}






