	function toggleContents(event) {
		var el = event.element();

		if (!$(el).hasClassName('rad'))
			el = $(el).up('div.rad');

		if (!$(el).hasClassName('highlight')) {
			$(el).addClassName('highlight');
			new Effect.Morph(el, {
				style: 'height: 90px;background:url(img/grey-round-top.gif) #ebebeb no-repeat;',
				duration: 0.3
			});
			
			// logga visningen
			var objektId = $(el).down('.objektid').innerHTML;
			new Ajax.Request('/index/logga-visning/objekt/' + objektId);
		} else {
			new Effect.Morph(el, {
				style: 'height: 12px;background: #ffffff;',
				duration: 0.3
			});
			$(el).removeClassName('highlight');
		}
	}

	document.observe('dom:loaded', function(e) {
		$$('div.rad').each(function (e, index) {
			$(e).observe('click', toggleContents);
		});
	});

	function showInfo(objektId, lang) {
		return !window.open('/objektinfo/' + objektId + '/' + lang, 'objektinfo', 'menubar=0,status=0,toolbar=0,scrollbars=1,resizable=1,width=545,height=550');
	}
	
