// JavaScript Document jQuery(document).ready(function() { $('img[src*=_off.],input[src*=_off.]').hover(function() { $(this).attr('src', $(this).attr('src').replace('_off.', '_on.')); }, function() { $(this).attr('src', $(this).attr('src').replace('_on.', '_off.')); }); });