Выберите этаж
'+ '
'+ '
'+ '
свободна
'+ '
'+ '
'+ '
без отделки
'+ '
'+ '
'+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '
Общая59.1 м²
Этаж3/22
Ценаот 4 509 930 р
'+ '
'+ ''+ ''+ '' }, { id: 'h-'+2, rooms: [1], path: 'M1196,718,1196,1405,895,1405,894,1327,630,1327,630,937,784,937,782,718Z', // координаты pathAttributes: { 'stroke-width': 0, 'cursor': 'pointer', 'fill': '#9c9c9c', 'fill-opacity': .5, 'href': '/selection/house154/section6/floor3/flat34900/' // ссылка }, pathAttributesActive: { 'fill': '#fb9500', // цвет при наведении 'fill-opacity': .5 }, tip: '
'+ '
'+ '
'+ '
Однокомнатная, 513
'+ '
'+ '
'+ '
свободна
'+ '
'+ '
'+ '
без отделки
'+ '
'+ '
'+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '
Общая39.8 м²
Этаж3/22
Ценаот 3 235 740 р
'+ '
'+ '
'+ '
'+ '
' }, { id: 'h-'+3, rooms: [1], path: 'M798,723,800,953,645,952,645,1403,364,1403,362,1329,77,1329,77,916,484,916,484,723Z', // координаты pathAttributes: { 'stroke-width': 0, 'cursor': 'pointer', 'fill': '#9c9c9c', 'fill-opacity': .5, 'href': '/selection/house154/section6/floor3/flat34901/' // ссылка }, pathAttributesActive: { 'fill': '#fb9500', // цвет при наведении 'fill-opacity': .5 }, tip: '
'+ '
'+ '
'+ '
Однокомнатная, 514
'+ '
'+ '
'+ '
свободна
'+ '
'+ '
'+ '
без отделки
'+ '
'+ '
'+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '
Общая37.1 м²
Этаж3/22
Ценаот 2 970 195 р
'+ '
'+ '
'+ '
'+ '
' }, { id: 'h-'+4, rooms: [1], path: 'M509,736,482,736,484,930,0,928,0,647,77,646,77,262,509,262Z', // координаты pathAttributes: { 'stroke-width': 0, 'cursor': 'pointer', 'fill': '#9c9c9c', 'fill-opacity': .5, 'href': '/selection/house154/section6/floor3/flat34902/' // ссылка }, pathAttributesActive: { 'fill': '#fb9500', // цвет при наведении 'fill-opacity': .5 }, tip: '
'+ '
'+ '
'+ '
Однокомнатная, 515
'+ '
'+ '
'+ '
свободна
'+ '
'+ '
'+ '
без отделки
'+ '
'+ '
'+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '
Общая34.7 м²
Этаж3/22
Ценаот 2 830 495 р
'+ '
'+ '
'+ '
'+ '
' }, { id: 'h-'+5, rooms: [2], path: 'M862,542,712,540,712,584,493,584,491,273,79,271,77,-1,862,1Z', // координаты pathAttributes: { 'stroke-width': 0, 'cursor': 'pointer', 'fill': '#9c9c9c', 'fill-opacity': .5, 'href': '/selection/house154/section6/floor3/flat34903/' // ссылка }, pathAttributesActive: { 'fill': '#fb9500', // цвет при наведении 'fill-opacity': .5 }, tip: '
'+ '
'+ '
'+ '
Двухкомнатная, 516
'+ '
'+ '
'+ '
свободна
'+ '
'+ '
'+ '
без отделки
'+ '
'+ '
'+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '
Общая39.7 м²
Этаж3/22
Ценаот 3 334 950 р
'+ '
'+ '
'+ '
'+ '
' }, ]; // Props var paper = Raphael('paper-floor'); var paperImage = '/upload/iblock/72f/1sec.png'; var paperWrapper = '.paper-wrapper'; var paperOuter = '.paper-floor-holder'; var paperWidth = 2000; var paperHeight = 1405; 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