$(document).ready(function(){
	
	/*$("ul.food .frst li:even").css("margin-right","60px");
	$("ul.food .scnd li:even").css("margin-right","60px");
	$("ul.food .thrd li:even").css("margin-right","60px");*/
	$("ul.food li:even").css("margin-right","60px");
	$("ul.food li:even").css("margin-right","60px");
	$("ul.food li:even").css("margin-right","60px");
	
	
	
	
	
	
	
	$(".panel1").each(function(){
    	var nHeight = $(window).height();
    	if (nHeight < $(this).find(".cont").height() + 70) {
    	    nHeight = $(this).find(".cont").height() + 70;
    	}
    	$(".panel1").css("height",nHeight + "px");
	});
	
	$(".panel2").each(function(){
    	var nHeight = $(window).height();
    	if (nHeight < $(this).find(".cont").height() + 120) {
    	    nHeight = $(this).find(".cont").height() + 120;
    	}
    	$(".panel2").css("height",nHeight + "px");
	});
	
	$(".panel3").each(function(){
    	var nHeight = $(window).height();
    	if (nHeight < $(this).find(".cont").height() + 100) {
    	    nHeight = $(this).find(".cont").height() + 100;
    	}
    	$(".panel3").css("height",nHeight + "px");
	});
	
	$(".panel4").each(function(){
    	var nHeight = $(window).height();
    	if (nHeight < $(this).find(".cont").height() + 100) {
    	    nHeight = $(this).find(".cont").height() + 100;
    	}
    	$(".panel4").css("height",nHeight + "px");
	});
	
	
	
	
	
	
	$(".meny-block h2 a").bind({
 		click: function(){
    		var target = "#" + $(this).attr("class");
			$.scrollTo(target,600);
    	},
    	mouseenter: function(){
			$(this).parent().find(".pil").stop(true,false).animate({right: "-35px"},100);
    	},
		mouseleave: function(){
			$(this).parent().find(".pil").stop(true,false).animate({right: "-25px"},100);
		}
	});
	
	$("ul#nav li:not(.ingen-panel)").click(function(){
		var target = "#" + $(this).attr("class");
		$.scrollTo(target,600);
	});
	
	$("#meny-nav li").bind({
		click: function(){
    		var listClass = "." + $(this).text(),
    		// MÅSTE ÄNDRAS SÅ ATT DEN GÖR OM TILL SMÅ BOKSTÄVER
    			list1 = $("ul.food li:not("+listClass+")"),
				list2 = $("ul li" + listClass),
				i = 0;

			$("#meny-nav li").removeClass("curr");
			$(this).addClass("curr");
			
			$(".menyn h1").hide();
			$(".menyn h1" + listClass).fadeIn(700, 'easeInCirc');
			$("ul.food li").hide();
			list2.fadeIn(700, 'easeInCirc');
    	},
    	mouseenter: function(){
			if (!$(this).hasClass("curr")){
				$(this).animate({color: "#39074c"});
    		}
    	},
		mouseleave: function(){
			if (!$(this).hasClass("curr")){
				$(this).animate({color: "#51096c"});
			}
		}
	});
	
	$('.form-style1, .form-style2').focus(function(){
 		$(this).animate({opacity: .5}, 100);
	}).blur(function(){
 		 $(this).animate({opacity: 1});
	});
	
	$('#form1 .button').hover(function(){
		$(this).stop(false,false).animate({opacity: .5}, 200);
	}, function(){
		$(this).stop(false,false).animate({opacity: 1}, 100);
	});
	
});




