// ethan@waveriderdesign.com 4.16.2008 - auto-attach rollover functionality to buttons with class "rollover-button"
/*
$(document).ready(function() {
  $('.rollover-button').each(function() {
    $(this).hover(function() { this.src = $(this).attr('src').replace(/\.jpg$/, '-ro.jpg'); }, function() { this.src = $(this).attr('src').replace(/-ro\.jpg/, '.jpg'); });
  });
*/
rollover_images = new Object();

$(document).ready(function() {
  $('.rollover-button').mouseover(function() {
  	$(this).attr('src', rollover_images[$(this).attr('src')].src.replace(/http.*\.com/, ""));
  }).mouseout(function() {
  	$(this).attr('src', $(this).attr('src').replace("-ro.jpg", ".jpg"));
  	$(this).attr('src', $(this).attr('src').replace("-ro.png", ".png"));
  });
});
$(document).ready(function() {
	$('.rollover-button').each(function() {
		rollover_images[$(this).attr('src')] = new Image();
		rollover_images[$(this).attr('src')].src = $(this).attr('src').replace(".jpg", "-ro.jpg").replace(".png", "-ro.png");
	});

  $('#track-order-link').add('#header-bottom .rollover-image').hover(function() {
	$('#header-bottom .rollover-image').attr('src', '/images/waveriderdesign/header/track-your-order-ro.png');
  },
  function() {
  	$('#header-bottom .rollover-image').attr('src', '/images/waveriderdesign/header/track-your-order.png');
  });
});