// *****************************************************************************************
// Script:		js/common.js
// Author(s):		Guillaume Lambert - guillaume@falzhobel.ca
// 			Alex Gignac - alex@ax2.ca
//
// Date:		Nov 2009
//
// Common javascript functions including dom-ready commands
//
// Functions:
//	-
//
// *****************************************************************************************

/*
 * window onload event (dom loaded)
 * *****************************************************************************************
 * event.observe window load
 * based on jQuery's event observe when dom is ready, scripts to be loaded onload
 *
 */

$(document).ready(function() {
	
	// global calls
	//----------------------------------------------------------------------------------
	
	// ...
	
	// homepage
	//----------------------------------------------------------------------------------
	if (sectionID == 'home') {
	
		// assign news ticker
		$('ul#ticker01').liScroll();
		
		// assign outils carousel
		$('#outils_carousel').loopedSlider({ 
			container: '.outils_slider',
			slides: '.outils_slides',
			pagination: '.outils_pagination',
			containerClick: false,
			autoStart: 7000, 
			restart: 7000,
			slidespeed: 500 
		});
		
	}
	// references
	//----------------------------------------------------------------------------------
	if (sectionID == 'references') {
	
		// assign click event to logos to show/hide reference text
		$('p.references_logos a').click(function(event) {
			$(this).parents('.references_box').children('div').toggle();
		});
	
	}
	 
});