	var rolloverClass = ".rollover";
	var overAppend = "-over";

$(document).ready(function(){	
	$(rolloverClass).hover(
		function(){
			if($(this).attr("src").indexOf(overAppend) == -1) {
				var oldSrc = $(this).attr("src");
				var ftype = oldSrc.getFileType();
				var hoverSrc = oldSrc.replace(ftype,overAppend + ftype);
				$(this).attr("src", hoverSrc);
			}
		},
		function(){
			var hoverSrc = $(this).attr("src");
			var ftype = hoverSrc.getFileType();
			if($(this).attr("src").indexOf(overAppend + ftype) != -1){
				var oldSrc = hoverSrc.replace(overAppend + ftype, ftype);
				$(this).attr("src", oldSrc);
			}						  
		}
	);
	
$("#nav li").hover(
	function(){ $("ul", this).fadeIn("fast"); }, 
	function() { $("ul", this).fadeOut("fast"); } 
);
if (document.all) {
	$("#nav li").hoverClass ("sfHover");
}	
	
	/* handle mailto links so they alert with a confirm before proceeding... */
	$("a[@href^='mailto']").click(function(){
	  if(!confirm("Sending us an e-mail will not make you a client of Holmstrom & Kennedy."
  		+" Until we have agreed to represent you, anything you send us will not"
  		+" necessarily be confidential or privileged. We cannot necessarily respond to"
  		+" every unsolicited email. Even if we are able to respond, our communications"
  		+" would likely be preliminary only. Before we can agree to represent a"
  		+" potential client, we must review the matter closely and screen parties"
  		+" involved for possible conflicts of interest. Only at that time would we"
  		+" confirm with you that we have agreed to represent you.\n\nBy proceeding to send an email, you confirm that you understand and agree"
  		+" to the foregoing notice.")){
		  return false;
	  } else return true;
	});
	
	
 });

$.fn.hoverClass = function(c) {
    return this.each(function(){
        $(this).hover( 
            function() { $(this).addClass(c);  },
            function() { $(this).removeClass(c); }
        );
    });
};   
