$(function() {		   
	$(".nav").mouseover(function(){ 
		$(".nav").each(function(){
			$(this).removeClass("active");			   
		});
		$(this).addClass("active");						 
		var identifier = $(this).attr("ident");		
	    $(".content").each(function(){	
			$idAttr = $(this).attr("id");						
			if($idAttr == identifier){
				$(this).animate({width:"600px"},500 );
				$("#accordion .content div").hide();
				$("#content"+ $(this).attr("id")).delay(650).fadeIn("slow");
			}
			else{
				$("#content"+ $(this).attr("id")).clearQueue();
				$("#accordion .content div").hide();
				$(this).animate({width:"60px"},500 );					
			}
		});	   
	});
	
	
	$(".content").mouseover(function(){ 
		$(".nav").each(function(){
			$(this).removeClass("active");			   
		});
		$("."+$(this).attr("id")).addClass("active");						 
		var identifier = $(this).attr("id");		
	    $(".content").each(function(){	
			$idAttr = $(this).attr("id");
			$(this).clearQueue();
			if($idAttr == identifier){
				$(this).animate({width:"600px"},300 );
			 	$("#content"+ $(this).attr("id")).delay(500).fadeIn("slow");
			}
			else{
				$("#content"+ $(this).attr("id")).clearQueue();
				//$("#accordion .content div").hide();
				$(this).animate({width:"60px"},300 );					
			}
		});	   
	}).mouseleave(function(){$("#accordion .content div").hide();});;
	
	$("#wrap").mouseleave(function(){
	    $("#content1").clearQueue();
		$("#content2").clearQueue();
		$("#content3").clearQueue();
		$("#content4").clearQueue();
		$("#content5").clearQueue();
		$("#content6").clearQueue();
		$(".nav").each(function(){
			$(this).removeClass("active");			   
		});
		$("#accordion .content div").hide();						   
		$(".content").each(function(){			
			$(this).animate({width:"150px"},300 );			
		});							  
	});
	
	$("#video-light").click(function(){
		$("#close-btn").show();
		$("#video-wrap").show("slow");
		return false;
	});
	
	$("#close-btn").click(function(){
		$(this).hide();						   
		$("#video-wrap").hide("slow");
		return false;
	});
});
