

function input_highlight(obj)
{
	obj.style.backgroundColor = '#f7f3ea';
	obj.onblur = new Function("this.style.backgroundColor='white'");
}

function blur_links()
{
	lnks = document.getElementsByTagName('a');

	for (i = 0; i < lnks.length; i++)
	{
		lnks[i].onfocus = new Function("this.blur()");
	}

	lnks = document.getElementsByTagName('area');

	for (i = 0; i < lnks.length; i++)
	{
		lnks[i].onfocus = new Function("this.blur()");
	}
}

function toggle_reference(className) {
  
  $('#contentRightWhocantell ul').hide();
  $('ul.' + className).show();
  
  $('ul.whatwedo li').removeClass('active');
  $('ul.whatwedo li.' + className).addClass('active');
}

function menu() {
  $("#menu li img").each(function() {
    if ($(this).attr('src').indexOf('_over.gif') == -1) {
      $(this).bind('mouseover', function() {
        src    = $(this).attr('src');
        newSrc = (src.indexOf('_off.gif') == -1) && (src.indexOf('_over.gif') == -1) ? src.replace(/.gif/, '_over.gif') : src;
        $(this).attr('src', newSrc);
      });
      
      $(this).bind('mouseout', function() {
        src    = $(this).attr('src');
        newSrc = src.replace(/_over.gif/, '.gif');
        $(this).attr('src', newSrc);
      });
    }
  });
}

$(document).ready(function() {
    // Highlighting on focus
  $("input, select, textarea").bind('focus', function() {
    $(this).css('background-color', '#c7e0f3');
  });
  
  // De-highlight on blur
  $("input, select, textarea").bind('blur', function() {
    $(this).css('background-color', '#ffffff');
  });
  
});
