$(function(){$('.lightbox').lightBox();});
	
	$(document).ready(function(){

		$(".textcontent").hide();
		$(".cat").hide();
		$(".headline").addClass('more').addClass('pointer');	
		$(".cat .headline:first").addClass('less').next().addClass('showing').slideDown();

		var myFile = document.location.toString();
		if (myFile.match('#')) {
			var myAnchor = '#' + myFile.split('#')[1];
			$('#header a[href="' + myAnchor + '"]').addClass("active");
			$(myAnchor).addClass("showingdiv").slideDown();
		} else {
			$("#header a:first").addClass("active");
			$(".cat:first").addClass("showingdiv").slideDown();
		}
		
		
		$('.headline').click(function(){
			if ($(this).next().hasClass("showing") ){
				$(this).next().removeClass('showing');
				$(this).next().slideUp('slow');
				$(this).removeClass('less').addClass('more');
			} else {
			 	$(this).next().addClass('showing');
				$(this).next().slideDown('slow');
				$(this).removeClass('more').addClass('less');
			}
		 });
		 
		 $('#header a.menu').click(function(){
			var sida = $(this).attr("href");
			
			if(!$(this).hasClass("active")){
				$("#header a").removeClass("active");
				$(".showingdiv").slideUp().removeClass("showingdiv");
				$(this).addClass("active");
				$(sida).slideDown().addClass("showingdiv");
			}
			return false;
		 });
	
	});