﻿// Simply swaps out images marked with the class name swap
// by replacing .jpg with _over.jpg within the image name.

// jQuery Image Swap
$(function() {
    $(".swap img")
	.mouseover(function() {
	    var src = $(this).attr("src").match(/[^\.]+/) + "_over.jpg";
	    $(this).attr("src", src);
	})
	.mouseout(function() {
	    var src = $(this).attr("src").replace("_over", "");
	    $(this).attr("src", src);
	});
});

