// JavaScript Document

$(document).ready(function() {

	$('.clickable').next('div.windowContent').hide();
	$('h2#hem').next('div.windowContent').slideDown("slow");


	$('.clickable').click(function() {
		$(this).next('div.windowContent').slideToggle(300);
	})
	
	$('#showAll').click(function() {
		$('div.windowContent').show(100);
	})
	$('#hideAll').click(function() {
		$('div.windowContent').hide(100);
	})

});


function takeYear(theDate)
{
	x = theDate.getYear();
	var y = x % 100;
	y += (y < 38) ? 2000 : 1900;
	return y;
}

function lastMod()
{
	var x = new Date (document.lastModified);
	Modif = new Date(x.toGMTString());
	Year = takeYear(Modif);
	Month = Modif.getMonth();
	Month = Month + 1;
	Day = Modif.getDate();
	document.write("Uppdaterat " + Day + "/" + Month + " " + Year);
}


/* GOOGLE TRANSLATE START */

function googleTranslateElementInit() {
  new google.translate.TranslateElement({
    pageLanguage: 'sv'
  }, 'google_translate_element');
}

/* GOOGLE TRANSLATE SLUT */