	$(document).ready(function() {

		$('ul#nav ul').prepend('<li class="header"><img src="/fileadmin/templates/images/submenu_header.png" alt=""/></li>');
	
		$('ul.accordion li').each(function() {
			$(this).html('<div class="wrap">'+$(this).html()+'</div>');
		});
	
		$('ul.accordion li div.tab_box_headline').click(function() {
			$(this).parent().parent().parent().find('> li').animate({ 'height': '18px' }, 500, 'easeInOutQuart');
			$(this).parent().parent().animate({ 'height': $(this).parent().parent().find('.wrap').outerHeight()+'px' }, 500, 'easeInOutQuart');
		});

		$('ul.accordion li div.tab_box_headline a').each(function() {
				var text = $(this).html();
				$(this).parent().parent().html(text);
		});

		$('ul.accordion li:first').css('height', $(this).find('.wrap').outerHeight()+'px');
	
		$('ul.accordion li:last').css({ 'background-image': 'none', 'padding-bottom': 10 });
	
		$('ul.accordion li').append('<img src="/fileadmin/templates/images/accordion_foot.gif" alt="" style="position: absolute; left: -1px; bottom: 0px; width: 230px; height: 9px; z-index: 100;"/>');
		$('ul.accordion').append('<img src="/fileadmin/templates/images/accordion_foot.gif" alt="" style="position: absolute; left: 0; bottom: 0px; width: 230px; height: 9px; z-index: 100;"/>');

		// Sl�et fra pga line-height bug i IE7
		// Cufon.replace('#top-left h1',  { fontFamily: 'Futura' });
		
		$('#bread-crumb a:first').html('Forside');
		
		if(!$('#leftmenu .content').html()) {
			$('#leftmenu').hide();
		}
		
		$('#normal-contents .box .flexible_twocols table:first').css('width','450px');
		$('#normal-contents .box .flexible_twocols .flexible_twocols_left').css('width','280px');
		$('#normal-contents .box .flexible_twocols .flexible_twocols_right').css('width','150px');
		
		/*
		try {
			$('#normal-contents .box .flexible_twocols td').css('display','inline');
		} catch(E) {;}
		try {
			$('#normal-contents .box .flexible_twocols .flexible_twocols_left').css({ 'display': 'table-cell', 'width': '60%' });
		} catch(E) {;}
		try {
			$('#normal-contents .box .flexible_twocols .flexible_twocols_right').css({ 'display': 'table-cell', 'padding-left': '10px', 'width':'40%' });
		} catch(E) {;}
		
		$('.box .content table').css({ 'width': '100%', 'margin':'0'})
		*/
		$('select.tx-indexedsearch-selectbox-sections').css('width','100%');
		
		/*
		$('#normal-contents .content div:first').css('display','none');
		$('#normal-contents .content div:last').css('display','none');
		*/
		
	});