function getPagSiz() { var xScroll, yScroll; if (window.innerHeight && window.scrollMaxY) { xScroll = window.innerWidth + window.scrollMaxX; yScroll = window.innerHeight + window.scrollMaxY; // all but Explorer Mac } else if (document.body.scrollHeight > document.body.offsetHeight) { xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari } else { xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } var windowWidth, windowHeight; if (self.innerHeight) { // all except Explorer if (document.documentElement.clientHeight) { windowWidth = document.documentElement.clientWidth; } else { windowWidth = self.innerWidth; } windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { // other Explorers windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } // for small pages with total height less then height of the viewport if (yScroll < windowHeight) { pageHeight = windowHeight; } else { pageHeight = yScroll; } // for small pages with total width less then width of the viewport if (xScroll < windowWidth) { pageWidth = xScroll; } else { pageWidth = windowWidth; } arrayPageSize = [pageWidth, pageHeight, windowWidth, windowHeight]; return arrayPageSize; } $(document).ready(function(){ $(function() { $("#mainmenu-content ul.menu").lavaLamp({ fx: "backout", speed: 800 })}); $("#mainmenu-content ul.menu li").hover(function(){ $(this).addClass('topmenu_hover'); }, function() { $(this).removeClass('topmenu_hover'); }); //popup if ($('#block-block-24').length > 0) { $('body').append('
'); var lay_cont = $('#block-block-24').html(); $('#catalog_layer1').append(lay_cont); var arrayPageSize = getPagSiz(); var objOverlay = document.getElementById('katalog_overlay1'); $('div#katalog_overlay1').css({ 'width': '100%', 'background': '#000', 'opacity': '0.7', 'position': 'absolute', 'left': '0', 'top': '0', 'z-index': '9998' }); $('#catalog_layer1').show(300); objOverlay.style.height = (arrayPageSize[1] + 'px'); $('div#katalog_overlay1').click(function(){ $('#catalog_layer1,#katalog_overlay1').remove(); }); $('a.katalog_close').click(function(){ $('#catalog_layer1,#katalog_overlay1').remove(); return false; }); } });