
function initializeIllustrations(frames, matColorText, selectedColor) {
	    var colorSelectorContainer = document.getElementById('colorSelectorContainer');
    	var frameChangerContainer = document.getElementById('frameChangerContainer');
    	var subproductForm = document.getElementById('subproduct');
    	var matColor = document.getElementById('matColor');
    	
    	var frameChanger = new FrameChanger(frameChangerContainer, frames);
    	
    	var colorSelector = new ColorSelector(colorSelectorContainer, frames, 'colorItem', 'colorItem-selected');
    	colorSelector.addListener(function(name, color) {
    		if(name == 'select') {
    		    // только по клику
                subproductForm.value = color.id;
                matColor.innerHTML = matColorText + ' ' + color.name.italics();
                frameChanger.setColor(color.color);
                
    		}
    	});
    	
    	colorSelector.apply();
    	colorSelector.selectColor(selectedColor);
    	
}
