<div id="changeColor">
<input type="button" id="red" value="Red">
<input type="button" id="blue" value="Blue">
<input type="button" id="green" value="Green">
</div>
<figure id="imapc">
<object data="test_1.svg" type="image/svg+xml" id="imap">
</object>
<figcaption>SVG-рисунок</figcaption>
</figure>
$(window).on('load', function () {
var svgobject = document.getElementById('imap');
if ('contentDocument' in svgobject)
var svgdom = svgobject.contentDocument;
$('#changeColor input[type=button]').click(function (e) {
var row = $(this).parent();
var className = row.attr("id");
var idClicked = e.target.id;
$("."+className, svgdom).myAddClass(idClicked);
});
});