
jquery_hover = {

	init: function(){
		this.preload();
		$('.hover').mouseover(function(){
            $(this).attr('src',jquery_hover.Hover($(this)));
        }).mouseout(function(){
            $(this).attr('src',jquery_hover.Out($(this)));
        });
    },

	preload: function(){
		$().bind('load', function() {
			$('.hover').each(function(key,elm){
				$('img').attr('src',jquery_hover.Out());
			});
		});
	},

	Hover: function(id){
		var imgReturn = '';
		src         = $(id).attr('src');
		ext         = src.substring(src.lastIndexOf(".")).toLowerCase();
		newImg      = src.replace(ext,'');
		return newImg + '_hover' + ext;
	},

	Out: function(id){
		src = $(id).attr('src');
		return src.replace('_hover', '');
	}

}