$(function(){	$("#offers").hover(function(){		$("#offers").animate({"left": "+=90px"}, "fast");	},function(){		$("#offers").animate({"left": "-=90px"}, "fast");	});
    $("#menu ul li").hover(function(){
        $(this).children("ul").slideDown("fast");
    },function(){
    	$(this).children("ul").slideUp("fast");
    });/*
    $("#menu li").mouseover(function(){
		$(this).find("ul").slideDown("fast");
	});
	
    $("#menu li").mouseout(function(){
		$(this).find("ul").slideUp("fast");
	});*/
	var zIndexNumber = 1000;
	$('div').each(function() {
	$(this).css('zIndex', zIndexNumber);
	zIndexNumber -= 10;
	});
	
	$("#right input, #right textarea, #right select").focus(function(){
		$(this).css("background","#fff");
	});
	
	$("#right input, #right textarea, #right select").blur(function(){
		$(this).css("background","#fde9d9");
	});
	
	$("#header > img").eq(0).fadeTo(0,0);
	$("#header > img").eq(1).fadeTo(0,0);
	$("#header > img").eq(2).fadeTo(0,0);
	var pic =0;
	function fader(){
		if(pic == 0){
			$("#header > img").eq(3).fadeTo(2000,0);
			$("#header > img").eq(2).fadeTo(2000,0);
		}
		$("#header > img").eq(pic).fadeTo(2000,1);
		$("#header > img").eq(pic).prev().fadeTo(2000,0);
		pic = pic+1;
		if(pic == 3){
			pic = 0;
		}
	}
	setInterval(fader,8000);
	
	/* AJAX lösning
	$("#menu ul li > a").click(function(){
		$("#cont_top").html('');
		$("#cont_top").append("<h1 style='margin:0px; padding:3px 5px;'>"+$(this).html()+"</h1>");
		//alert($(this).find("a").attr("href"));
		$.ajax({
		  url: $(this).attr("id"),
		  cache: false,
		  success: function(html){
		    $("#cont_cont").html(html);
		  }
		});

	});*/
	
	


});
function do_validate_form()
	{
		emailpattern=/^([a-zA-Z\u00F6\u00E4\u00E5\u00D6\u00C5\u00C4])+([a-zA-Z-_.0-9\u00F6\u00E4\u00E5\u00D6\u00C5\u00C4])+@([a-zA-Z0-9_.-\u00F6\u00E4\u00E5\u00D6\u00C5\u00C4])+\.([a-zA-Z])+([a-zA-Z])+/;
		email = document.interestedmail_form.epost.value
		if(!emailpattern.test(email))
			{
			alert('Please Enter valid value Email');
			return false;
			}
		if(document.interestedmail_form.message.value == "")
			{
			alert('Please Enter message text before clicking Send button');
			return false;	
			}
		//alert(document.interestedmail_form.message.value)
		document.interestedmail_form.submit();
		}