/*
  SM 03Aug09
  SM 23Sep09: Using the suplied js instead of my own jQuery code.
*/

// Old Way
//sfHover = function() {
//  if(!document.getElementById("suckerfish")) { return false; } // SM 06Oct09: Quick check for IE7.
//	var sfEls = document.getElementById("suckerfish").getElementsByTagName("LI");
//	for (var i=0; i<sfEls.length; i++) {
//		sfEls[i].onmouseover=function() {
//			this.className+=" sfhover";
//		}
//		sfEls[i].onmouseout=function() {
//			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
//		}
//	}
//}
//if (window.attachEvent) window.attachEvent("onload", sfHover);


// jQuery Way #1
$(document).ready(function() {
  $('#suckerfish li').hover(function() {  
    $(this).addClass('sfhover');
  },function() {
    $(this).removeClass('sfhover');
  });
  
  // SM 11Aug10: Hack for KH - should be in PHP, but don't want to crawl through Navigator code...
  // SM 17Aug10: Updated hack to use css to set the image as a background (easier to update)
  $('#suckerfish li:first').addClass('nav_first');
  //$('#suckerfish li:first').children('a:first').html('<img src="http://images.regional.org.au/shared/images/home/home-icon-white-sml.png"/>');
  $('#suckerfish li:first').children('a:first').html('<span id="nav_home_icon" title="Home"></span>');
  
});

// jQuery Way #2
//$(document).ready(function() {
//  $('#suckerfish li').mouseover(function(){ $(this).addClass('sfhover'); });
//  $('#suckerfish li').mouseout(function(){ $(this).addClass('sfhover'); });
//});