$(document).ready(function(){
PEPS.hoverllover.init()
})
PEPS={}
PEPS.hoverllover={
init: function(){
this.preload()
$(".hover").hover(
function(){$(this).attr('src',PEPS.hoverllover.newimage($(this).attr('src')));},
function(){$(this).attr('src',PEPS.hoverllover.oldimage($(this).attr('src')));}
)
},
preload: function(){
$(window).bind('load',function(){
$('.hover').each(function(key,elm){$('<img>').attr('src',PEPS.hoverllover.newimage($(this).attr('src')));})
})
},
newimage: function(src){
return src.substring(0,src.search(/(\.[a-z]+)$/))+'_hover'+src.match(/(\.[a-z]+)$/)[0]
},
oldimage: function(src){
return src.replace(/_hover\./,'.')}}
