/**
 * @requires jQuery
 * Main JavaScript file.
 */

/* Create the namespace */
if (typeof Dansa === 'undefined') {
	var Dansa = {};
}

/**
 * @requires jQuery
 * Initiate when document is ready.
 */
$(function(){

	/**
	 * @requires jQuery
	 * Fix the background.
 	 */
 	$('#bg img').hide();
	$(window).load(function(){
		var background = new Dansa.Background();
	});
	
	/**
	 * @requires jQuery
	 * Slide the background
 	 */
	if ($('.front-page').length) {
		var slider = new Dansa.Slider($('#bg'));
	}
	
	/**
 	 * @requires jQuery
 	 * Put a class on every other table row.
	 */
	var allTables = $('#content table');
	if (allTables.length) {
		allTables.find('tr:even td').addClass('table-alt');
	}
	
});
