initBoxes = function() { $$("a.preview").each(function(e) { e.onclick=function() { $('overlay').show(); //$('loading').show(); new Ajax.Updater('preview_page','http://www.theinvestor.ro/preview/'+e.rel+'/',{method:'get', onComplete:function() {dim=$('preview_page').getDimensions(); sdim=e.cumulativeOffset(); $('preview_page').style.top=(sdim.top-dim.height)+'px'; $('preview_page').style.left=(sdim.left+20)+'px'; $('ajaxloading').hide(); $('preview_page').show(); }, onCreate: function() { $('ajaxloading').show(); } }); } } ); $$("a.trimite_email").each(function(e) { e.onclick=function() { $('overlay').show(); //$('loading').show(); dim=$('ct_trimite_mail').getDimensions(); sdim=e.cumulativeOffset(); $('ct_trimite_mail').style.top=(sdim.top+13)+'px'; $('ct_trimite_mail').style.left=(sdim.left+20)+'px'; $('ct_trimite_mail').show(); }; } ); $$("a.clogin").each(function(e) { e.onclick=function() { $('overlay').show(); dim=$('wlogin').getDimensions(); sdim=e.cumulativeOffset(); $('wlogin').style.top=(sdim.top+13)+'px'; $('wlogin').style.left=(sdim.left+20)+'px'; $('wlogin').show(); }; } ); } lightclose = function() { $$('.autoclose').each(function(e) { e.hide(); }); $('overlay').hide(); } document.observe("dom:loaded", function() { initBoxes();}); //Event.observe(window, 'load', function() { $$("a.lightwindow").each(function(e) { e.style.visibility="visible" }); $$("a.shadowbox").each(function(e) { e.style.visibility="visible" }) } ) Shadowbox.loadSkin('classic', 'http://www.theinvestor.ro/jscripts/skin'); window.onload = function(){ var options = { continuous: 'true' }; Shadowbox.init(); MM_preloadImages('http://www.theinvestor.ro/images/m_news_o.jpg','http://www.theinvestor.ro/images/m_business_o.jpg','http://www.theinvestor.ro/images/m_politics_o.jpg','http://www.theinvestor.ro/images/m_politics_o.jpg','http://www.theinvestor.ro/images/m_biz_cultura_o.jpg','http://www.theinvestor.ro/images/m_critical_eye_o.jpg','http://www.theinvestor.ro/images/m_life_style_o.jpg','http://www.theinvestor.ro/images/m_evenimente_o.jpg','http://www.theinvestor.ro/images/m_b2b_o.jpg','http://www.theinvestor.ro/images/m_stuff_o.jpg','http://www.theinvestor.ro/images/m_organizatii_o.jpg'); } document.observe("dom:loaded", function() { $$("a.shadowbox").each(function(e) { e.style.visibility="hidden" }); }); Event.observe(window, 'load', function() { $$("a.shadowbox").each(function(e) { e.style.visibility="visible" }); } )