Выберите этаж
'+ '
'+ '
'+ '
свободна
'+ '
'+ '
'+ '
без отделки
'+ '
'+ '
'+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '
Общая39.6 м²
Этаж6/22
Ценаот 3 192 060 р
'+ '
'+ ''+ ''+ '' }, { id: 'h-'+1, rooms: [1], path: 'M1206,1500,1206,1539,1470,1539,1468,1947,1205,1947,1205,2021,929,2021,929,1557,855,1558,853,1343,1072,1341,1074,1500Z', // координаты pathAttributes: { 'stroke-width': 0, 'cursor': 'pointer', 'fill': '#9c9c9c', 'fill-opacity': .5, 'href': '/selection/house154/section3/floor6/flat34606/' // ссылка }, pathAttributesActive: { 'fill': '#fb9500', // цвет при наведении 'fill-opacity': .5 }, tip: '
'+ '
'+ '
'+ '
Однокомнатная, 219
'+ '
'+ '
'+ '
свободна
'+ '
'+ '
'+ '
без отделки
'+ '
'+ '
'+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '
Общая34.8 м²
Этаж6/22
Ценаот 2 862 840 р
'+ '
'+ '
'+ '
'+ '
' }, { id: 'h-'+2, rooms: [1], path: 'M871,1344,871,1541,947,1541,945,1949,736,1949,736,2023,461,2023,459,1383,609,1382,609,1344Z', // координаты pathAttributes: { 'stroke-width': 0, 'cursor': 'pointer', 'fill': '#9c9c9c', 'fill-opacity': .5, 'href': '/selection/house154/section3/floor6/flat34607/' // ссылка }, pathAttributesActive: { 'fill': '#fb9500', // цвет при наведении 'fill-opacity': .5 }, tip: '
'+ '
'+ '
'+ '
Однокомнатная, 220
'+ '
'+ '
'+ '
свободна
'+ '
'+ '
'+ '
без отделки
'+ '
'+ '
'+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '
Общая36.6 м²
Этаж6/22
Ценаот 2 954 760 р
'+ '
'+ '
'+ '
'+ '
' }, { id: 'h-'+3, rooms: [2], path: 'M-2,723,233,725,235,1191,332,1191,330,1382,473,1384,473,1947,277,1947,277,2023,1,2023Z', // координаты pathAttributes: { 'stroke-width': 0, 'cursor': 'pointer', 'fill': '#9c9c9c', 'fill-opacity': .5, 'href': '/selection/house154/section3/floor6/flat34608/' // ссылка }, pathAttributesActive: { 'fill': '#fb9500', // цвет при наведении 'fill-opacity': .5 }, tip: '
'+ '
'+ '
'+ '
Двухкомнатная, 221
'+ '
'+ '
'+ '
свободна
'+ '
'+ '
'+ '
без отделки
'+ '
'+ '
'+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '
Общая59.7 м²
Этаж6/22
Ценаот 4 596 900 р
'+ '
'+ '
'+ '
'+ '
' }, { id: 'h-'+5, rooms: [2], path: 'M1060,1207,775,1207,775,983,470,985,468,724,595,725,595,499,521,499,521,225,1056,225Z', // координаты pathAttributes: { 'stroke-width': 0, 'cursor': 'pointer', 'fill': '#9c9c9c', 'fill-opacity': .5, 'href': '/selection/house154/section3/floor6/flat34610/' // ссылка }, pathAttributesActive: { 'fill': '#fb9500', // цвет при наведении 'fill-opacity': .5 }, tip: '
'+ '
'+ '
'+ '
Двухкомнатная, 223
'+ '
'+ '
'+ '
свободна
'+ '
'+ '
'+ '
без отделки
'+ '
'+ '
'+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '
Общая60.3 м²
Этаж6/22
Ценаот 4 389 240 р
'+ '
'+ '
'+ '
'+ '
' }, ]; // Props var paper = Raphael('paper-floor'); var paperImage = '/upload/iblock/26f/4sec.png'; var paperWrapper = '.paper-wrapper'; var paperOuter = '.paper-floor-holder'; var paperWidth = 2000; var paperHeight = 2024; var paperOffsetX = $('.aside').outerWidth(); var paperTipOffsetX = 0; var paperTipOffsetY = -30; function paperFit() { width = $(paperOuter).width(); height = width / (paperWidth / paperHeight); paper.setSize(width, height); } var maxWidth = (paperWidth - paperHeight) * 2; if(maxWidth = 850) maxWidth = 850; $('#paper-floor').parent().css({ 'max-width': maxWidth }); // Init paper.setViewBox(0, 0, paperWidth, paperHeight, true); //paper.setSize('100%', '100%'); paperFit(); paper.image(paperImage, 0, 0, '100%', '100%'); // Draw paper.setStart(); var arSectionsID = []; // Set sections $.each(flats, function(key, value) { var flat = paper.path(value.path).attr(value.pathAttributes); arSectionsID[value.id] = flat.id; flat.hover( function(event) { this.animate(value.pathAttributesActive, 300); if ($('#tip-' + key).length) { $('#tip-' + key).css({ 'top' : event.pageY + paperTipOffsetY, 'left': event.pageX - paperOffsetX + paperTipOffsetX }).show(); } else { $(paperWrapper).append( $('
', { 'id' : 'tip-' + key }) .hide() .css({ 'top' : event.pageY + paperTipOffsetY, 'left': event.pageX - paperOffsetX + paperTipOffsetX }) .html(value.tip) .show() ); } }, function() { this.animate(value.pathAttributes, 300); $('#tip-' + key).hide(); } ); flat.mousemove(function(event) { if ($('#tip-' + key).length) { $('#tip-' + key).css({ 'top' : event.pageY + paperTipOffsetY, 'left': event.pageX - paperOffsetX + paperTipOffsetX }).show(); } }) }); paper.setFinish(); $(window).on('resize', paperFit); function array_intersect(arr1, arr2) { var arr3 = []; for(i = 0; i