// JavaScript Document

//Activate Immediately
$(document).ready(function(){
	
	//Main Slider Show Arrows	
	$("#slider_leftarrow").show();
	$("#slider_rightarrow").show();
						   
	//Main Slider Allows Non-Javascript Users to Scroll through choices					   
	$("#slider").css( {overflow:"hidden"});
	
	//Main Slider Controls
	$('#slider').serialScroll({
		items:'#slider_content li', // Selector to the items ( relative to the matched elements, '#sections' in this case )
		prev:'#slider_leftarrow',// Selector to the 'prev' button (absolute!, meaning it's relative to the document)
		next:'#slider_rightarrow',// Selector to the 'next' button (absolute too)
		axis:'x',// The default is 'y' scroll on both ways
		interval:9000,// Sets interval for auto scroll
		duration:700,// Length of the animation (if you scroll 2 axes and use queue, then each axis take half this time)
		force:true, // Force a scroll to the element specified by 'start' (some browsers don't reset on refreshes)
		lock:true, // Ignore events if already animating (true by default)		
		start:0, // On which element (index) to begin ( 0 is the default, redundant in this case )		
		constant:false, // constant speed
		
		onBefore:function( e, elem, $pane, $items, pos ){
			e.preventDefault();
			if( this.blur )
				this.blur();
		},
		onAfter:function( elem ){

		}
	});
	
	//Logo Slider Show Arrows
	$("#our_partners_leftarrow").show();
	$("#our_partners_rightarrow").show();
	
	//Logo Allows Non-Javascript Users to Scroll through choices					   
	$("#corporate").css( {overflow:"hidden"});
	
	//Logo Slider Controls
	$('#corporate').serialScroll({
		items:'#corporate_logos li', // Selector to the items ( relative to the matched elements, '#sections' in this case )
		prev:'#our_partners_leftarrow',// Selector to the 'prev' button (absolute!, meaning it's relative to the document)
		next:'#our_partners_rightarrow',// Selector to the 'next' button (absolute too)
		axis:'x',// The default is 'y' scroll on both ways
		interval:0,// Sets interval for auto scroll
		duration:700,// Length of the animation (if you scroll 2 axes and use queue, then each axis take half this time)
		force:true, // Force a scroll to the element specified by 'start' (some browsers don't reset on refreshes)
		lock:true, // Ignore events if already animating (true by default)		
		start:0, // On which element (index) to begin ( 0 is the default, redundant in this case )		
		constant:false, // constant speed
		step:6, // how many elements to scroll on each action
		
		onBefore:function( e, elem, $pane, $items, pos ){
			e.preventDefault();
			if( this.blur )
				this.blur();
		},
		onAfter:function( elem ){

		}
	});
	
	//Logo Allows Non-Javascript Users to Scroll through choices					   
	$("#alliance").css( {overflow:"hidden"});
	
	//Logo Slider Controls
	$('#alliance').serialScroll({
		items:'#alliance_logos li', // Selector to the items ( relative to the matched elements, '#sections' in this case )
		prev:'#our_partners_leftarrow',// Selector to the 'prev' button (absolute!, meaning it's relative to the document)
		next:'#our_partners_rightarrow',// Selector to the 'next' button (absolute too)
		axis:'x',// The default is 'y' scroll on both ways
		interval:0,// Sets interval for auto scroll
		duration:700,// Length of the animation (if you scroll 2 axes and use queue, then each axis take half this time)
		force:true, // Force a scroll to the element specified by 'start' (some browsers don't reset on refreshes)
		lock:true, // Ignore events if already animating (true by default)		
		start:0, // On which element (index) to begin ( 0 is the default, redundant in this case )		
		constant:false, // constant speed
		step:6, // how many elements to scroll on each action
		
		onBefore:function( e, elem, $pane, $items, pos ){
			e.preventDefault();
			if( this.blur )
				this.blur();
		},
		onAfter:function( elem ){

		}
	});
	

});

function showCorporate(){
	
	$("#alliance").fadeOut("fast");
	$("#corporate").fadeIn("fast");
	
}

function showAlliance(){
	
	$("#alliance").fadeIn("fast");
	$("#corporate").fadeOut("fast");
	
}



