$(function() {
draw();
function imHtmlize(str) {
return str.toString().replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''');
}
function cssConnectIsActive(name) {
return $('.css_connect__' + name).width() >= 100;
}
function draw() {
$('.rose').not('.JS_PROCESSED, .JS_IGNORE').addClass('JS_PROCESSED').each(function() {
var angle = Math.PI - Math.atan2(e.offsetX - cx, e.offsetY - cy) - delta / 2;
var dataIdx = Math.ceil(angle / delta) % count;
var html = imHtmlize(data[dataIdx].title);
if (typeof(data[dataIdx].hint_line2) !== 'undefined') {
html += '<br/>' + imHtmlize(data[dataIdx].hint_line2);
}
$tester.html(html);