window.addEvent('domready', init);

var images_home_small = new Array();
images_home_small[0] = '/assets/images/home_small/image_1.jpg';
images_home_small[1] = '/assets/images/home_small/image_2.jpg';
images_home_small[2] = '/assets/images/home_small/image_3.jpg';
images_home_small[3] = '/assets/images/home_small/image_4.jpg';
images_home_small[4] = '/assets/images/home_small/image_5.jpg';

var accordion_approach = [	{'section':'sec1'},
							{'section':'sec2'},
							{'section':'sec3'}
						];
var accordian_awards = [{'section':'sec1'},{'section':'sec2'}]

function init() {
	if($('bot_right_img').src == '') {
		random_image('bot_right_img', images_home_small);
	}
}

function random_image(element, pictures) {
	var random = $random(0, pictures.length - 1);
	$(element).src = pictures[random];
}
function toggle_accordion(accordion_data, section_name) {
	for(var i=0; i<accordion_data.length; i++) {
		if(accordion_data[i].section == section_name) {
			$(section_name).style.display = 'block';
		}
		else {
			$(accordion_data[i].section).style.display = 'none';
		}
	}
}
