﻿var strtype = "";
function rollOverThis(thisObj){ 
	$(thisObj).hover(
		function(){
			strtype = findexts($(this).attr("src"));
			if($(this).attr("src").indexOf("on") > 1) {
				var newSrc = $(this).attr("src").replace("off."+strtype+"","on."+strtype+"#hover");
				$(this).attr("src",newSrc);
			}
		},
		function(){
			if($(this).attr("src").indexOf("on."+strtype+"#hover") != -1) {
				var oldSrc = $(this).attr("src").replace("on."+strtype+"#hover","off."+strtype+"");
				$(this).attr("src",oldSrc);
			}
		}
	);
}

function findexts(filename) {
		var from = filename.length - 3;
		var to = filename.length;
		filename = filename.substring(from,to);
		return filename;
}


