$(function() {

	$(".hover").hover(function () {
		var filePath = $(this).attr("src");
		var imgAlt = $(this).attr("alt");
		var dotPos = filePath.lastIndexOf(".") ;
		var extension = filePath.substr(dotPos,filePath.length);
		var newPath = filePath.replace(extension,"_on"+extension);
		$(this).attr("src",newPath);
		$(".text").html(imgAlt);
	},function () {
		$(this).stop(true,false);
		$(this).attr("src", $(this).attr("src").split("_on.").join("."));
	});

});
