$(document).ready(function(){

  $("#headerMenu img").hover(
    function(){
      if($(this).attr("src").indexOf("_active") == -1) {
        var newSrc = $(this).attr("src").replace(".png","_active.png");
        $(this).attr("src",newSrc);
		$(this).attr("ovr", "1");
      }
    },
    function(){
      if($(this).attr("src").indexOf("_active.png") != -1 && $(this).attr("ovr").indexOf("1") != -1) {
        var oldSrc = $(this).attr("src").replace("_active.png",".png");
        $(this).attr("src",oldSrc);
		$(this).attr("ovr", "0");
      }
    }
  );


  $('#headerMenu li.headlink').hover(
    function() { $('ul', this).css('display', 'block'); },
    function() { $('ul', this).css('display', 'none'); }
  );


});


$(function() {
//	if ($("body.staff #headerMenu img.staff").attr("src").indexOf("png") != -1) {
/*
		$("body.home #headerMenu img.home").attr("src", $("body.home #headerMenu img.home").attr("src").replace(".png","_active.png") );
		$("body.services #headerMenu img.services").attr("src", $("body.services #headerMenu img.services").attr("src").replace(".png","_active.png") );
		$("body.aboutus #headerMenu img.aboutus").attr("src", $("body.aboutus #headerMenu img.aboutus").attr("src").replace(".png","_active.png") );
		$("body.news #headerMenu img.news").attr("src", $("body.news #headerMenu img.news").attr("src").replace(".png","_active.png") );
		$("body.staff #headerMenu img.staff").attr("src", $("body.staff #headerMenu img.staff").attr("src").replace(".png","_active.png") );
		$("body.contact #headerMenu img.contact").attr("src", $("body.contact #headerMenu img.contact").attr("src").replace(".png","_active.png") );
*/
//	}
});

