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=new Array();
16 sizes[0]='small'; sizes[1]='medium'; sizes[2]='large';
20 var elements=document.getElementsByClassName('nifty-'+size);
21 for (var i=0; i<elements.length; i++) {
22 // use Rounded rather than Nifty
23 // the latter needs an id that some elements don't have
24 // plus, it's more efficient anyway
25 pleRounded(elements[i],size);