1
|
window.addEvent('domready', function() {
|
2
|
$$('div.stats_group').each(function (statistics) {
|
3
|
var toggle = statistics.getElement('img.toggle');
|
4
|
if (toggle != null) {
|
5
|
toggle.data = statistics.getElement('div.toggle');
|
6
|
toggle.slide = new Fx.Slide(toggle.data, {resetHeight: true});
|
7
|
if (!toggle.data.isDisplayed()) {
|
8
|
toggle.slide.hide();
|
9
|
toggle.data.show();
|
10
|
}
|
11
|
toggle.addEvent('click', function () {
|
12
|
if (this.slide.open) {
|
13
|
this.slide.slideOut();
|
14
|
this.src = 'components/com_openaire/images/plus.gif';
|
15
|
} else {
|
16
|
this.slide.slideIn();
|
17
|
this.src = 'components/com_openaire/images/minus.gif';
|
18
|
}
|
19
|
});
|
20
|
}
|
21
|
});
|
22
|
$$('div.chart').each(function (chart) {
|
23
|
chart.toggle = chart.getElement('span.chartToggle');
|
24
|
chart.toggle.url = chart.getElement('input.chartUrl').value;
|
25
|
chart.toggle.addEvent('click', function () {
|
26
|
SqueezeBox.open(this.url, {handler: 'iframe', size: {x: 750, y: 450}});
|
27
|
});
|
28
|
});
|
29
|
});
|
30
|
|