// JavaScript Document
// requires jquery 1.3.2
// ambetante table: 3d borders, corners, dubbele heading, ...


$(document).ready(function(){		
			//ambetante table style
			//alles links uitlijnen
			$('.iframetable thead tr:nth-child(2) th').addClass('table_alignleft');
			$('.iframetable tbody tr td').addClass('table_alignleft');
			$('.iframetable tfoot tr td:first-child').addClass('table_alignleft');
			
			//1ste headerrow:
			//background left en right + stretcher
			//border top uitschakelen
			$('.iframetable thead tr:first-child th').addClass('tableheading_level1_stretcher');		
			$('.iframetable thead tr:first-child th').addClass('tableheading_notopborder');
			$('.iframetable thead tr:first-child th').addClass('table_header_fontsize');		
			
			$('.iframetable thead tr:first-child th:first-child').addClass('left_td');
			
			$('.iframetable thead tr:first-child th:last-child').removeClass('tableheading_level1_stretcher');
			$('.iframetable thead tr:first-child th:last-child').addClass('tableheading_level1_rightcorner');
			
			//borders uitschakelen
			$('.iframetable thead tr th:first-child').addClass('left_td');
			$('.iframetable thead th:last-child').addClass('right_td');
			
			//2de header row
			$('.iframetable thead tr:nth-child(2) th:nth-child(4)').addClass('table_heading_dark');
			$('.iframetable thead tr:nth-child(2) th:nth-child(5)').addClass('table_heading_dark');
			$('.iframetable thead tr:nth-child(2) th:nth-child(6)').addClass('table_heading_dark');
			
			//repeat 2de headerrow in de tbody
			//we werken met :eq() ipv nth-child:
			//webkit (safari, chrome) (win, osx) vind nl de juiste tr niet als de table al
			//gerenderd is (table hiden bij document.ready en showen bij einde table-formattting
			//is ook een mogelijkheid
			
			//eq: geen goed idee: eq kan nl. maar 1 element selecteren
			//maw: de tweede tabel zoekt ie niet meer
			//we gaan de eerste table dus hide/show doen
			
			$('.iframetable tbody tr:nth-child(4) th').addClass('table_alignleft');
			$('.iframetable tbody tr:nth-child(4) th').addClass('th_whitetext');
			$('.iframetable tbody tr:nth-child(4) th:nth-child(4)').addClass('table_heading_dark');
			$('.iframetable tbody tr:nth-child(4) th:nth-child(5)').addClass('table_heading_dark');
			$('.iframetable tbody tr:nth-child(4) th:nth-child(6)').addClass('table_heading_dark');
			$('.iframetable tbody tr:nth-child(4) th:first-child').addClass('left_td');			
			
			$('.iframetable tr:first-child td').addClass('tableheading_first_td');			
			
			
			//text in thead wit maken
			//(staat standaard zwart voor clients met javascript disabled, kwestie van geen witte tekst op witte achtergrond)
			$('.iframetable thead th').addClass('th_whitetext');
			
			//borders voor de uiterste datacellen
			$('.iframetable tr td:first-child').addClass('table_leftborder');
			$('.iframetable tr td:last-child').addClass('table_rightborder');
			
			
			
			//repeat 1ste headerrow in de tbody
			
			$('.iframetable tbody tr:nth-child(3) th').addClass('th_whitetext');
			$('.iframetable tbody tr:nth-child(3) th').addClass('tableheading_level1_stretcher');		
			$('.iframetable tbody tr:nth-child(3) th').addClass('table_header_fontsize');		
			$('.iframetable tbody tr:nth-child(3) th:first-child').addClass('left_td');
			$('.iframetable tbody tr:nth-child(3) th:last-child').addClass('tableheading_level1_stretcher');
			$('.iframetable thead tr th:first-child').addClass('left_td');
			
			//footer
			
			$('.iframetable tfoot td:first-child').removeClass('table_rightborder');
			$('.iframetable tfoot td:first-child').addClass('tablefooter_rightcorner');			
			$('.iframetable tfoot td:first-child').addClass('table_leftborder');
			$('.iframetable tfoot td:first-child').css('border-right','0px');
			//$('.iframetable tfoot td:first-child').addClass('table_footer_borderbottom');
			
			
			
			$("#tabeloostende").show();	
			
			
									
	   })