/* Initialize */


$(document).ready(function(){
	$(window).resize(function() {
		if ($(window).width() < 1260){
			$('#arrows').removeClass("arrowsSmaller");
			$('#arrows').addClass("arrowsSmaller");
		} else {
			$('#arrows').removeClass("arrowsSmaller");	
		}
		if ($(window).width() < 995){
			$('#arrows').removeClass("arrowsSmallest");
			$('#arrows').addClass("arrowsSmallest");
		} else {
			$('#arrows').removeClass("arrowsSmallest");
		}
		if ($(window).width() < 995){
			$('body').removeClass("noScroll");
			$('#cutter').removeClass("noScroll");
			$('#cutter').addClass("noScroll");
		} else {
			$('body').removeClass("noScroll");
			$('body').addClass("noScroll");
			$('#cutter').removeClass("noScroll");
		}
	});
	$('body').addClass("noScroll");



	var toggle = true;
	$('#clickArea').click(function() {
		if (toggle){
			$("#middleThing").animate({
				top: "566px"
			}, 500, function() {
				// Animation complete.
			});
		} else {
			$("#middleThing").animate({
				top: "473px"
			}, 500, function() {
				// Animation complete.
			});
		}
		toggle = !toggle;
	});
	var toggle2 = true;
	$('#clickArea').click(function() {
		if (toggle2){
			$("#middleThing2").animate({
				top: "468px"
			}, 500, function() {
				// Animation complete.
			});
		} else {
			$("#middleThing2").animate({
				top: "345px"
			}, 500, function() {
				// Animation complete.
			});
		}
		toggle2 = !toggle2;
	});

	
	$('#fEng').mouseover(function() {
		$("#iEng").stop();
		$("#iEng").animate({
			opacity: 0.1
		}, 50, function() {
		});
	}).mouseout(function(){
		$("#iEng").stop();
		$("#iEng").animate({
			opacity: 1
		}, 500, function() {
		});
	});
	$('#fSwe').mouseover(function() {
		$("#iSwe").stop();
		$("#iSwe").animate({
			opacity: 0.1
		}, 50, function() {
		});
	}).mouseout(function(){
		$("#iSwe").stop();
		$("#iSwe").animate({
			opacity: 1
		}, 500, function() {
		});
	});
	
	$("#menu2 img").css({opacity: 0.5});
	$("#menu a img,#menu2 a img").mouseover(function() {
		$(this).css({opacity: 0.6});
	}).mouseout(function() {
		$(this).css({opacity: 1});
	}).css({opacity: 1});

	$("#black").css("height", $(document).height()); 
	
	$('#menu_8').click(function() {
		$("#black").show().animate({
			opacity: 0.3
		}, 100, function() {
		});	
		$("#inBlack").show().animate({
			opacity: 1
		}, 100, function() {
		});	
		$("#black").click(function() {
			$("#black").show().animate({
				opacity: 0
			}, 100, function() {
				$(this).hide();
			});	
			$("#inBlack").show().animate({
				opacity: 0
			}, 100, function() {
				$(this).hide();
			});	
		});
		
		return false;
	});
	/*$(window).scroll(function () { 
      $("black").css("display", "inline").fadeOut("slow"); 
    });*/

	
});
