$(document).ready(function () {

	var w_height = $('#center').height();
	var d_height = $(document).height();

	if(parseInt(w_height) < parseInt(d_height)){
		$('#center').css('height', d_height+'px');
	}

	$('#images').cycle({ 
    		fx:    'fade', 
    		speed:  1000
 	});

	$('.image_container').click(function() {

		var id = $(this).attr('id');

		$('.image_'+id).show();		

	});

	$('.image').click(function() {

		var id = $(this).attr('id');

		$('.image_'+id).hide();	

	});

	$('.image_close').click(function() {

		var id = $(this).attr('id');

		$('.image_'+id).hide();	

	});

	$('#menu li a').hover ( function() {
		$(this).addClass('hover');
	}, function() {
		$(this).removeClass('hover');
	});
});

Cufon.replace ('h1, td.top .menu li a, .menu_link, div#rightcol h3', { fontFamily: 'Adobe Garamond Pro', hover: true })


function nyttFonster(minsajt, namnet, bredd, hojd, scroll) { 
  var venster = (screen.width - bredd) / 2; 
  var uppifroon = (screen.height - hojd) / 2; 
  hurdant = 'width='+bredd+',height='+hojd+',top='+uppifroon+',left='+venster+',scrollbars='+scroll+',resizable' 
  win = window.open(minsajt, namnet, hurdant) 
  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } 
} 



function visa(id) { 
  if(document.getElementById) { var obj = document.getElementById(id); } 
  else 
    if(document.all){ var obj = document.all(id); } 
    if(obj.style.display == 'none'){ obj.style.display = ''; } 
    else { obj.style.display = 'none'; } 
}	
