/*
 * module_table.js
 * 
 * For styling the table module. See comments below.
 */

namespace("Telenor.Table");

Telenor.Table = {        
	    styleAllTables : function() {
	    	// Remove last border on all td's and th's
	    	$('.tbl_Standard th:last-child, .tbl_Standard td:last-child').css('border-right','0');
	    	
	    	// Every other tr has darker background
	    	$('tbody').each(function(){
	    		$('tr:even td:not(.empty)',this).addClass('zebra');
	    	});

	    	// Every other td has even darker background
	        $('tbody tr').each(function(){
	            $('td:not(.zebra):odd', this).addClass('zLight');
	        });

	    	// Every other td has even darker background
	        $('tbody tr').each(function(){
	            $('td.zebra:odd', this).addClass('zebraGray');
	        });
	    	
	    	// Every other th has darker background
	    	$('tbody').each(function(){
	    		$('th:odd', this).addClass('zebraDarkTh');
	    	});
	    	
	    	// Set width 188px on first column
	    	// ** Disabled
	    	//$('.tbl_Standard td:first-child, .tbl_Standard th:first-child').addClass('firstTD');
	    }
}

$(document).ready(function(){
	Telenor.Table.styleAllTables();
});
