 
 $(document).ready(function(){
	$("a[rel^='prettyPhoto']").prettyPhoto();
	
	    $('.org_n').hover(function () {
	        $(this).attr("class", "tmp_org_y");
	    }, 
	          function () {
	            $(".tmp_org_y").attr("class", "org_n");
	          }

	    );
	    
	    $('.orgLng_').hover(function () {
	        $(this).attr("class", "tmp_orgLng_y");
	    }, 
	          function () {
	            $(".tmp_orgLng_y").attr("class", "orgLng_");
	          }

	    );




$('span.mailme').each(function(index) {
    var at = / at /;
    var dot = / dot /g;
    var addr = $(this).text().replace(at,"@").replace(dot,".");
    $(this).after('<a href="mailto:'+addr+'" title="Send an email">'+ addr +'</a>')
    .hover(function(){window.status="Send a letter!";}, function(){window.status="";});
	$(this).remove();
  });

	$('span[id^=mnCtg]').click(function () { 
		var varID = this.id.substring(2);
		      //$("#"+varID+"").toggle();
			if ($("#"+varID+"").css("display")=="inline")
			  {
			      $("#"+varID+"").hide();
			  }
			  else
			  {
			      $("#"+varID+"").show();
			  }

	    });


$('span[id^=mnCtg]').hover(
function(){
if($("img", this).attr("src").indexOf("_bw") != -1) {
var newSrc = $("img", this).attr("src").replace("_bw.jpg","_tmp.jpg");
$("img", this).attr("src",newSrc);
$(this).css("color", "#fb7014");
}
},
function(){
if($("img", this).attr("src").indexOf("_tmp.jpg") != -1) {
var oldSrc = $("img", this).attr("src").replace("_tmp.jpg","_bw.jpg");
$("img", this).attr("src",oldSrc);
$(this).css("color", "#ffffff");
}
}
);

 });



