
/*
$(document).ready(function() {
	//Roll Overs
	$("img.rollover,a.rollover img").hover(function() {
		$(this).attr("src", $(this).attr("src").split(".jpg").join("_on.jpg"));
		}, function() {
		$(this).attr("src", $(this).attr("src").split("_on.jpg").join(".jpg"));
	});
	
});
*/
	jQuery.fn.rollOver = function(settings){
		settings = jQuery.extend({
			overAppend:  "_on"
		}, settings);
 
		if($('input[type="image"], img.rollover, a.rollover img').length > 0){
			$('input[type="image"], img.rollover, a.rollover img').each(function(){
				var img = $(this).attr("src");
				var extension = img.substring(img.lastIndexOf("."));
				var over = img.replace(extension, settings.overAppend + extension);
					$(this).hover(
					function(){ //modify src atribute for "on" State 
						$(this).attr({ src : over});
					},
					function(){ //modify atributes for "off" State
						$(this).attr({ src : img});
					}
				);
			});
		}
	};

$(document).ready(function() {
	$(this).rollOver({
		overAppend : "_on"
	})
});//doc ready


