function autoFill(id, v){
	$(id).css({ color: "#b0cae0" }).attr({ value: v }).focus(function(){
		if($(this).val()==v){
			$(this).val("").css({ color: "#fff" });
		}
	}).blur(function(){
		if($(this).val()==""){
			$(this).css({ color: "#b0cae0" }).val(v);
		}
	});

}

function autoFillForm(id, v){
	$(id).css({ color: "#999",backgroundColor: "#fff",border:"1px solid #ccc"}).attr({ value: v }).focus(function(){
																  
		$(this).css({ backgroundColor: "#E7E7E7",border:"1px solid #ccc" })	
		
		if($(this).val()==v){
			$(this).val("").css({ color: "#000", backgroundColor: "#E7E7E7", border:"1px solid #ccc" });
		}
	}).blur(function(){
		if($(this).val()==""){
			$(this).css({ color: "#999", backgroundColor: "#fff" }).val(v);
		}
		
			$(this).css({ backgroundColor: "#fff",border:"1px solid #ccc" })
			
	});

}

$(document).ready(function(){
						   
autoFill($("#login_username"), "Användarnamn");
autoFill($("#login_password"), "Lösenord");
autoFillForm($("#name"), "Ditt namn");
autoFillForm($("#email"), "Din epostadress");
autoFillForm($("#message"), "Din fråga/meddelande");

autoFillForm($("#username"), "Användarnamn");
autoFillForm($("#password"), "Lösenord");

$("a[href^=http]").click(function(){return !window.open(this.href);});
$("a[href$='.pdf']").click(function(){return !window.open(this.href);});
$("a[href^=news]").click(function(){return !window.open(this.href,"mywindow","menubar=0,resizable=1,status=0,toolbar=0,scrollbars=1,width=760,height=450");});


$("#techlist_1736").click(function(){
								   
	$("#sentar1952").hide("fast", function(){
    $("#sentar1736").show("fast");
	$("#techlist_h3").html("Teknisk data Sentar 1736");
    });	
	});


$("#techlist_1952").click(function(){
								   
	 $("#sentar1736").hide("fast", function(){
    $("#sentar1952").show("fast");
	$("#techlist_h3").html("Teknisk data Sentar 1952");
    });							   
	});


        //var currDate=new Date();
        //var currMonth = currDate.getMonth();
        //currMonth = parseInt(currMonth) + 1;
	
		//var myId = $("#welcome");
               
        //if (currMonth == 1)  $(myId).addClass("winter content");
		//if (currMonth == 2)  $(myId).addClass("winter content");
        //if (currMonth == 3)  $(myId).addClass("spring content");
		//if (currMonth == 4)  $(myId).addClass("spring content");
		//if (currMonth == 5)  $(myId).addClass("spring content");
        //if (currMonth == 6)  $(myId).addClass("summer content");
		//if (currMonth == 7)  $(myId).addClass("summer content");
		//if (currMonth == 8)  $(myId).addClass("summer content");
		//if (currMonth == 10) $(myId).addClass("fall content");
		//if (currMonth == 11) $(myId).addClass("fall content");
        //if (currMonth == 12) $(myId).addClass("winter content");
		
});



 

