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 window.console.log('initing - 1');
15 if ( nifty_inited ) return;
16 window.console.log('initing - 2');
17 var elements=document.getElementsByClassName('nifty-medium');
18 for (var i=0; i<elements.length; i++) {
19 window.console.log('catched ' + elements[i].id);
20 Nifty('div#'+elements[i].id,'medium');