$(function() {

  // dropdown code for nav 
  $("ul.dropdown li").hover(function(){

    // swap the img src with the hover attribute
    // and set the hover attribute to the old src
    var tmp = $(this).attr('src');
    $(this).attr('src', $(this).attr('hover'));
    $(this).attr('hover', curr);

    // if its there, set the dropdown visibility
    $('ul:first',this).css('visibility', 'visible');
  },
  function() {

    // when not hovered, swap the hover and src attributes
    var tmp = $(this).attr('src');
    $(this).attr('src', $(this).attr('hover'));
    $(this).attr('hover', curr);

    // hide the dropdown
    $('ul:first',this).css('visibility', 'hidden');
  });
  // end nav rollovers

  // plain image rollovers
  $('.rollover').hover(function() {

    // as in dropdown fn above, swap src and hover attribs
    var curr = $(this).attr('src');
    $(this).attr('src', $(this).attr('hover'));
    $(this).attr('hover', curr);
  }, function() {

    // as in dropdown fn above, swap hover and src attribs
    var curr = $(this).attr('src');
    $(this).attr('src', $(this).attr('hover'));
    $(this).attr('hover', curr);
  });
  // end image rollovers

});
