<!--

	//================================================================================================
	// VARIABLES DECLARATION
	//================================================================================================	
	var desc_show = 0;
	
	//================================================================================================
	// AJAX FUNCTIONS
	//================================================================================================		

	
	//================================================================================================
	// FORM FUNCTIONS
	//================================================================================================

	
	//================================================================================================
	// LAYOUT FUNCTIONS 
	//================================================================================================			
	function hideDetails()
	{
		$$('.desc_box').setStyle('display', 'none');
	}
	
	function showDescBox(id)
	{
		if (id != desc_show)
		{
			hideDetails();
			$('desc_' + id).setStyle('display', 'block');
			desc_show = id;
		}
		else
		{
			hideDetails();
			desc_show = 0;
		}
	}	
	
	//================================================================================================
	// EVENTS FUNCTIONS
	//================================================================================================		
	function setupSlideshows()
	{
		if ($chk($('scrollable_testimonials')))
		{
			var testimonialShow = new SimpleSlideShow({
				startIndex: 0,
				slides: $$('.slide_testimonial')
			});
			
			var play = function() 
			{
				testimonialShow.forward();
			}
			var timer = play.periodical(4000);			
		}	
		
		if ($chk($('scrollable_clients')))
		{
			var clientsShow = new SimpleSlideShow({
				startIndex: 0,
				slides: $$('.slide_clients')
			});
			
			var playClients = function() 
			{
				clientsShow.forward();
			}
			var timerClients = playClients.periodical(5000);			
		}			
	}	
	
	function setupActions()
	{
		if ($chk($$('.feature_box')))
		{
			$$('.feature_box').addEvents({

				'click' : function(e) {
					if (!this.hasClass('bg_selected'))
					{
						$$('.feature_box').removeClass('bg_selected');
						$$('.feature_box').setStyle('background-color', '#333333');
						this.setStyle('background-color', '#000000');
						this.addClass('bg_selected');
					}
					else
					{
						this.setStyle('background-color', '#333333');
						this.removeClass('bg_selected');
					}
				},
				
				'mouseover' : function(e) {
					if (!this.hasClass('bg_selected'))
					{
						this.setStyle('background-color', '#000000');
					}
				},
				
				'mouseout' : function(e) {
					if (!this.hasClass('bg_selected'))
					{
						this.setStyle('background-color', '#333333');
					}
				}
			});
		}		
		
		if ($chk($$('.img_hover')))
		{
			$$('.img_hover').setStyle('opacity', 0.7);
			$$('.img_hover').addEvents({

				'mouseover' : function(e) {
					new Fx.Morph($(this), {duration: 'short'}).start({'opacity' : 1});
				},
				
				'mouseout' : function(e) {
					new Fx.Morph($(this), {duration: 'short'}).start({'opacity' : 0.7});
				}
			});
		}			
	}	
	
	function setupCufon()
	{
		Cufon.replace('.archer', { fontFamily: 'Archer SemiBoldItalic' });
		Cufon.replace('.archer_book', { fontFamily: 'Archer BookItalic' });
		Cufon.replace('.gotham', { fontFamily: 'Gotham Medium' });
	}
	
	//================================================================================================
	// START THIS WHEN PAGE DOM READY
	//================================================================================================		
	window.addEvents({
	
		'domready' : function(e) {
			setupSlideshows();
			setupActions();
			setupCufon();

			hideDetails();
		},
		
		'resize' : function() {

		}
		
	});
	

//-->
