<!--

	//================================================================================================
	// VARIABLES DECLARATION
	//================================================================================================	
	var gallerySlideshow;
	
	//================================================================================================
	// AJAX FUNCTIONS
	//================================================================================================		

	
	//================================================================================================
	// FORM FUNCTIONS
	//================================================================================================

	
	//================================================================================================
	// LAYOUT FUNCTIONS 
	//================================================================================================			
	function resetDivPositions()
	{
		var w = window.getWidth() / 2 - 500;
		$('aboutContainer').setStyle('left', (w + 176) + 'px');
		$('partnersContainer').setStyle('left', (w + 500) + 'px');
		$('melbourneContainer').setStyle('left', (w + 661) + 'px');
		$('programsContainer').setStyle('left', (w + 823) + 'px');
	}
	
	//================================================================================================
	// EVENTS FUNCTIONS
	//================================================================================================		
	function setupActions()
	{
		if ($chk($$('.imgHover')[0])) 
		{				
			$$('.imgHover').addEvents({			
				'mouseover' : function(e) {
					var srcURL = this.getProperty('src');
					if ($chk(srcURL))
						this.setProperty('src', srcURL.replace('.gif', '_hover.gif'));
				},
			
				'mouseout' : function(e) {
					var srcURL = this.getProperty('src');
					if ($chk(srcURL))
						this.setProperty('src', srcURL.replace('_hover.gif', '.gif'));					
				}				
			});				
		}	
		
		if ($chk($$(".subnav"))) 
		{
			$$(".subnav").addEvents({			
				'mouseover' : function(e) {
					this.setStyle('background-color', '#666666');
				},
			
				'mouseout' : function(e) {
					this.setStyle('background-color', '#333333');				
				}				
			});
		}		
		
		if ($chk($$(".gallery_thumb"))) 
		{
			$$(".gallery_thumb").addEvents({			
				'mouseover' : function(e) {
					this.setStyle('background-color', '#e0e0e0');
				},
			
				'mouseout' : function(e) {
					this.setStyle('background-color', '#ffffff');				
				}				
			});

			$$(".thumbGallery").addEvents({			
				'click' : function(e) {
					var idx = $$('.thumbGallery').indexOf(this);
					gallerySlideshow.go(parseInt(idx));
				}			
			});			
		}	

		if ($chk($("btn_first"))) 
		{
			var divThumbs = $('scrollable_thumbs');
			
			$("btn_first").addEvents({			
				'click' : function(e) {
					var fx = new Fx.Scroll(divThumbs).toLeft();
				}
			});

			$("btn_last").addEvents({			
				'click' : function(e) {
					var fx = new Fx.Scroll(divThumbs).toRight();
				}
			});		

			$("btn_prev").addEvents({			
				'click' : function(e) {
				
				}
			});

			$("btn_next").addEvents({			
				'click' : function(e) {
				
				}
			});			
		}			
	}	
	
	function setupSlideshows()
	{
		if ($chk($('rotating_home_news')))
		{
			var homeSlideShow = new SimpleSlideShow({
				startIndex: 0,
				slides: $$('.slide_news')
			});
			
			var play = function() 
			{
				homeSlideShow.forward();
			}
			var timerHome = play.periodical(7000);			
		}	
		
		if ($chk($('gallery')))
		{
			gallerySlideshow = new Slideshow('gallery', false, {delay: 5000, width: 560, height: 300});
		}		
	}
	
	
		function setupSlidetestishows()
	{
		if ($chk($('rotating_home_testimonials')))
		{
			var homeSlideShow = new SimpleSlideShow({
				startIndex: 0,
				slides: $$('.slide_testimonials')
			});
			
			var play = function() 
			{
				homeSlideShow.forward();
			}
			var timerHome = play.periodical(7000);			
		}	
		
		if ($chk($('gallery')))
		{
			gallerySlideshow = new Slideshow('gallery', false, {delay: 5000, width: 560, height: 300});
		}		
	}
	
	//================================================================================================
	// START THIS WHEN PAGE DOM READY
	//================================================================================================		
	window.addEvents({
	
		'domready' : function(e) {
			setupActions();
			setupSlideshows();
			setupSlidetestishows();
			resetDivPositions();
		},
		
		'resize' : function() {
			resetDivPositions();
		}
		
	});
	

//-->