$(document).ready(function() {
   Shadowbox.init();
	$("#intro").css("opacity", 0.99999);
	$(".hover").fadeTo(10000, 0.4);
	$(".hover").stop().animate({ opacity: 0.4 }, 1);
	$(".hover").hover(function() {
		$(this).stop().animate({ opacity: 1 }, 1);
	}, function() {
		$(this).stop().animate({ opacity: 0.4 }, 400);
	});
	
	
	
			//ANIMERA OCH SLIDES
				      $(".panel").css("opacity","0");		
				      $("#Start").animate({ 
							opacity: 1
					      }, 500 );				
			
			$(".slide").click(function(){
						$("#ccsmall").fadeIn();

				var target = $(this).attr("title");
				var pos = $(".slide").index(this);				
				var faktor = 900;
				
				var result = faktor * pos * -1 + "px";
				
				//alert(target);
				      $(".panel").animate({ 
							opacity: 0
					      }, 500 );				
				      $(target).animate({ 
							opacity: 1
					      }, 500 );				
				      $("#board").animate({ 
							marginLeft: result
					      }, 500 );
			});
	
	$(".price").click(function(){
	//alert("hej");
		$("#ccsmall").fadeOut();
	});
	
    $(".hoverexpand").mouseover(function(){
		var target = $(this).attr("title");
		$(target).fadeIn("slow");
    }).mouseout(function(){
		var target = $(this).attr("title");
		$(target).fadeOut("slow");
    });


});




