4 instead of explicitly calling
5 Nifty ('div#$id','medium');
6 on every single element as the original niftycube.js recommends,
7 we just do that on every element that has one of the
8 the nifty-{small,medium,big} class set
11 var nifty_inited = false;
13 function nifty_init () {
14 if ( nifty_inited ) return;
15 var sizes= { 0: 'small', 1: 'medium', 2: 'big', length: 3};
16 $A(sizes).each (function (size) {
18 var elements=document.getElementsByClassName('nifty-'+size);
19 for (var i=0; i<elements.length; i++) {
20 // use Rounded rather than Nifty
21 // the latter needs an id that some elements don't have
22 // plus, it's more efficient anyway
23 pleRounded(elements[i],size);