/*
	// Section img and img wide random chooser.
*/
$(document).ready(function(){
	if ($("#si_block").length > 0)
	{
		choose_section_img();
	}
	
	if ($("#si_block_wide").length > 0)
	{
		choose_section_img_wide();
	}
	
	
 });
function choose_section_img()
{
	var si_img_src = new Array();
	var si_img_alt = new Array();
	var si_new_alt = "";
	
	// Live image file names. Number-names not required. Add/remove array elements as needed.
	si_img_src[0] = '1';
	si_img_src[1] = '2';
	si_img_src[2] = '3';
	si_img_src[3] = '4';
	si_img_src[4] = '5';
	si_img_src[5] = '6';
	si_img_src[6] = '7';
	si_img_src[7] = '8';
	//si_img_src[8] = '9';
	
	// Image alt text.
	si_img_alt[0] = 'Frontiers';
	si_img_alt[1] = 'Frontiers';
	si_img_alt[2] = 'Frontiers';
	si_img_alt[3] = 'Frontiers';
	si_img_alt[4] = 'Frontiers';
	si_img_alt[5] = 'Frontiers';
	si_img_alt[6] = 'Frontiers';
	si_img_alt[7] = 'Frontiers';
	//si_img_alt[8] = 'Frontiers';
	
	var si_total = si_img_src.length;
	var si_number=Math.floor(Math.random()*si_total); 	
	
	var si_new_img = "../images/section_imgs/"+si_img_src[si_number]+".jpg";
	if (si_img_alt[si_number]) 
	{
		si_new_alt = si_img_alt[si_number];
	}
	
	$('#si_block img').attr({
		src: si_new_img,
		alt: si_new_alt
	});
}
 /*
	// END Section img random chooser.
*/


function choose_section_img_wide()
{
	var si_img_src = new Array();
	var si_img_alt = new Array();
	var si_new_alt = "";
	
	// Live image file names. Number-names not required. Add/remove array elements as needed.
	si_img_src[0] = '1';
	si_img_src[1] = '2';
	si_img_src[2] = '3';
	si_img_src[3] = '4';
	si_img_src[4] = '5';
	si_img_src[5] = '6';
	si_img_src[6] = '7';
	si_img_src[7] = '8';
	//si_img_src[8] = '9';
	
	// Image alt text.
	si_img_alt[0] = 'Frontiers';
	si_img_alt[1] = 'Frontiers';
	si_img_alt[2] = 'Frontiers';
	si_img_alt[3] = 'Frontiers';
	si_img_alt[4] = 'Frontiers';
	si_img_alt[5] = 'Frontiers';
	si_img_alt[6] = 'Frontiers';
	si_img_alt[7] = 'Frontiers';
	//si_img_alt[8] = 'Frontiers';
	
	var si_total = si_img_src.length;
	var si_number=Math.floor(Math.random()*si_total); 	
	
	var si_new_img = "../images/section_imgs/wide/"+si_img_src[si_number]+".jpg";
	if (si_img_alt[si_number]) 
	{
		si_new_alt = si_img_alt[si_number];
	}
	
	$('#si_block_wide img').attr({
		src: si_new_img,
		alt: si_new_alt
	});
}
 /*
	// END Section img WIDE random chooser.
*/




/*
	Left Column Quote Selector
*/
$(document).ready(function(){
	
	var num_lcquotes = $(".lcquote_wrap").length;
	if(num_lcquotes > 0)
	{
	
		var lcquote_chosen=Math.floor(Math.random()*num_lcquotes);
		$(".lcquote_wrap").each(function(i) { 
			if(i != lcquote_chosen)
			{
				$(this).hide();
			} else {
				$(this).show();
			}
		});	
	}
});
/*
	END Left Column Quote Selector
*/
