// from header.php, functions for hover nav, floating sidenav, blinking name, etc.
	iebody=document.documentElement;
if (document.documentElement && document.documentElement.scrollTop)
	iebody=document.documentElement;
else if (document.body) {
	iebody=document.body;
}
		function startList() { //Blinking Welcome
		if (document.all&&document.getElementById) {
		navRoot3 = document.getElementById("welc");
		if(navRoot3) {
		  if(window.ctr<=15) {
			if(navRoot3.className=="welcc") {
				navRoot3.className="welcc2";
			}
			else {
				navRoot3.className="welcc";
			}
			window.ctr++;
		  }
		}
			}
		}
		window.ctr=0;
/*
function movv() { //moving nav
	daPush = document.getElementById("pusher");
	daPush2= document.getElementById("pusher2");
	daPush3= document.getElementById('pusher_gallery');
	if(daPush && daPush2) {
		posstring=daPush.style.height;
		yarr=posstring.split('p');
		if(document.all && iebody.scrollTop) {
			winpos=iebody.scrollTop;
		}
		else if (document.all) {
			winpos=document.body.scrollTop;
		}
		else
			winpos= window.pageYOffset;
		ypos=yarr[0];
		winpos=winpos-0;
		ypos=ypos-0;
		speed=4;
		daypos=ypos+((winpos-ypos)/speed)-20;
		totalscrolled=daypos+document.getElementById('sidecontent').scrollHeight+210;
		heightlimit=document.body.scrollHeight;
		if(daypos>0 && totalscrolled<heightlimit) {
			//window.status=(daypos+' | '+document.body.scrollHeight+'|'+totalscrolled);
			daPush.style.height=daypos+"px";
			daPush2.style.height=daypos+"px";
			if(daPush3)
				daPush3.style.height=daypos+"px";
		}
	}
}
*/
function wch_hide_show() { //for hiding and showing
	if(document.all) {
		bla=document.getElementById('list_tss').currentStyle.display;
		if(bla=='block') WCH.Apply('list_tss','test','n');
		else if(bla=='none') WCH.Discard('list_tss','test');	
	
		bleh=document.getElementById('cl_drop').currentStyle.display;
		if(bleh=='block') WCH.Apply('cl_drop','cl_parent','n');
		else if(bleh=='none') WCH.Discard('cl_drop','cl_parent');	
	}

}
	/*
	if(screen.height>600) {
		ty=setInterval(movv,20);		
	}
	*/

	if(document.all) {
		//var y=window.setInterval(startList,500);
		window.setInterval(wch_hide_show,5);
	}

$(document).ready(function() {
	$('#e').each(function() {
		var emel=$(this).html();
		emel=emel.replace("[ at ]", "@");
		$(this).html(emel);
		$(this).attr('href','mailto:'+emel);
	});

	/* not used for now
	$('#shellnameloading').hide();
	$('#speciestype').change(function() {
		$('#shellnameloading').show();					
	    $.getJSON("/shell_list_receiver.php",
			{op: 'shellnameJSON',species: $(this).val()}, 
			function(j){			
				var options = '';
				for (var i = 0; i < j.length; i++) {
					options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>';
				}
				$("#shellname").html(options);
				$('#shellnameloading').hide();
			}
		);
	});*/
	$('#speciestype').change(function() {
		$('#shellrange').val('');
	});
	$('#shellrange').change(function() {
		sort_shells();
	});
	
	
	$(".zzoom").jqueryzoom({xzoom: 300, yzoom: 300});
	$(".zzoom").each(function() {		
		$('#imageBigExists').show();
	});
	/*
	$(".zzoom img").each(function() {
		$.getJSON($(this).attr('jqimg')+'?&jsoncallback=?',function() {
				$(".zzoom").jqueryzoom({xzoom: 300, yzoom: 300});
				$('#imageBigExists').show();
				alert('x');
			});
	});
	*/
	

	
	

});

$(function() {
$('#featured-group-0').cycle({timeout: 6000,fx:'scrollDown', cleartypeNoBg:true});

setTimeout("$('#featured-group-1').cycle({timeout: 6000,fx:'scrollDown', cleartypeNoBg:true});",500);
setTimeout("$('#featured-group-2').cycle({timeout: 6000,fx:'scrollDown', cleartypeNoBg:true});",1000);



});
