(function () {
	var head = document.getElementsByTagName("head")[0];
	if (head) {
		var scriptStyles = document.createElement("link");
		scriptStyles.rel = "stylesheet";
		scriptStyles.type = "text/css";
		scriptStyles.href = "http://www.csus.edu/webpages/css/superfish.css";
		head.appendChild(scriptStyles);
	}
}());
  
$(document).ready(function(){ 
	$("ul.sf-menu").superfish({ 
		animation:{opacity:'show'},
		speed:100,
		delay:50               
	});
	$('#searchdiv').attr('role', 'search');
	$('#main_content').attr('role', 'main');
	$('#navbar').attr('role', 'navigation');
	$('#site_logo').attr('role', 'banner');
	$('#footer').attr('role', 'contentinfo');
	
	var prefix = "/bios/images/rotate/";
	var photos = {
		'alpinelake.png':'Photo of Alpine Lake',
		'cell.png':'color-enhanced photo of cells',
		'dna1.png':'colorized scanning micrograph DNA double helix',
		'e_coli.png':'E. coli cell',
		'fish.png':'school of fish',
		'Flower.png':'unidentified flower',
		'models.png':'model organisms commonly used in biology',
		'hastings_trip.png':'students at Hastings reserve',
		'sieboldi_DSC_5174_adjusted.jpg':'Cichlasoma sieboldii female with fry, from the Rio Coloradito, Costa Rica'
	};
	var length=0;
	for(i in photos) {length=length+1;};
	
	ri=Math.floor(length*Math.random());
	
	var cur_photo = 0;
	for(i in photos) {
			if (cur_photo == ri) {
				$('#rotatePhoto').attr('src', prefix + i).attr('alt', photos[i]);
				break;
			} else {
				cur_photo = cur_photo + 1;
			}
	}
	// pick random item from photos hash
	
	
}); 
