//nav rollover
$(function() {
	$("#main-nav a img").hover(function() {
		if($(this).attr("src").indexOf("-on") == -1) 
		{
			$(this).attr("src", $(this).attr("src").split(".").join("-on."));
		}
	}, function() {
		if($(this).attr("class") != "on")
		    $(this).attr("src", $(this).attr("src").split("-on.").join("."));
	});
});

//staff photo rollover

/*if default photo, do not change on rollover*/
/*on click turn off all other photos, show bio*/
$(function() {
  $("#staff td img").hover(function() {
	if($(this).attr("src").indexOf("-on") == -1)
	    $(this).attr("src", $(this).attr("src").split(".").join("-on."));
  }, function() {
	if($(this).attr("class") != "on")
	    $(this).attr("src", $(this).attr("src").split("-on.").join("."));
  });
  $("#staff td img").click(function() {
	$("#staff td img").each(function() {	
		$(this).attr("class","off");
	});

	$(this).attr("class","on");
	
	$("#staff td img").each(function() {
		if($(this).attr("class") == "off")
		{
			if($(this).attr("src").indexOf("-on") != -1) 
				$(this).attr("src", $(this).attr("src").split("-on.").join("."));
		}

	});

	var staffAboutId = "#staff-about-";
	staffAboutId += $(this).attr("src").split("thumb-")[1].split(".")[0];
	staffAboutId = staffAboutId.split("-on")[0];
	
	var staffName = $(this).attr("src").split("thumb-")[1].split("-on.")[0];




	$("#staff-about div").each(function() {

		if($(this).attr("class") == "show-staff-info")
			$(this).attr("class","hide-staff-info");

		if($(this).attr("id").indexOf(staffName) != -1 && $(this).attr("class") == "hide-staff-info")
			$(staffAboutId).attr("class","show-staff-info");
			
	});
  });
});


$(document).ready(function(){
	$("#blog-link img").hover(function() {
		$("#blog-coming-soon").animate({opacity: "100", top: "-85"}, "slow");
	}, function() {
		$("#blog-coming-soon").stop(true, true).animate({opacity: "0", top: "-140"}, "fast");
	});
});

/*$(document).ready(function(){
	$("#shop-link img").hover(function() {
		$("#shop-coming-soon").animate({opacity: "100", top: "-85"}, "slow");
	}, function() {
		$("#shop-coming-soon").stop(true, true).animate({opacity: "0", top: "-140"}, "fast");
	});
});*/
