var hover = {
	targets: null,
	init: function() {
		hover.targets = $(".hover");
		hover.targets.hover(
			function() {
				var src = $(this).attr("src");
				if (src.match(/_on\.[a-zA-Z]+/g)) return;
				src = src.replace(/(.*)\.([a-zA-Z]+)/g,"$1_on.$2");
				$(this).attr("src", src);
			},
			function() {
				var src = $(this).attr("src");
				if (src.match(/_on\.[a-zA-Z]+/g)) src = src.replace(/(.*)_on\.([a-zA-Z]+)/g,"$1.$2");
				$(this).attr("src", src);
			}
		);
	}
}

var hoverCol = {
	targets: null,
	init: function() {
		hoverCol.targets = $(".columnBlock .column-col5 .col .img a");
		hoverCol.targets.hover(
			function() {
				$(this).parent().parent().addClass("on");
			},
			function() {
				$(this).parent().parent().removeClass("on");
			}
		);
	}
}

$(document).ready(hover.init);
$(document).ready(hoverCol.init);
