eInterval = graphPeriod.match(/(\d+)([a-z]+)/i);
    start = moment().tz(timezone);
    end = moment().tz(timezone);
    start.subtract(parseInterval[1], parseInterval[2]);

    e.preventDefault();
    baseUrl += '?chartId=' + chartId + '&start=' + start.unix() + '&end=' + end.unix();
    window.location = baseUrl;
  });

  /* Active drag and drop */
  jQuery('.graphZone').sortable({
    handle: '.title',
  });
});
</script>
{/literal}
