/* $(function(){ $("#facebook").css("left","-220px"); $("#facebook").hover(function(){ $("#facebook").animate({left: "0px"}, {queue:false,duration:500} ); return false; }, function(){ $("#facebook").animate({left: "-220px"}, {queue:false,duration:500} ); return false; }); */ jQuery("#listek-r").hover(function(){ jQuery("#listek-r").animate({right: "0px"}, {queue:false,duration:500} ); return false; }, function(){ jQuery("#listek-r").animate({right: "-220px"}, {queue:false,duration:500} ); return false; }); /* */ /* $('#search input[name=q]').autocomplete('http://www.fabrykakluczy.pl/szukaj/', { minChars: 3, matchSubset: 1, matchContains: 1, cacheLength: 10, selectOnly: 1 }); Scroller.init(); //changeSlide(); }); */ function changeSlide() { el = jQuery('#banners a:visible'); el.hide(); if (el.next().length) { el.next().show(); } else { jQuery('#banners a:first').show(); } setTimeout(changeSlide, 5000); } var Scroller = { windowHeight: 0, imageHeight: 0, maxTop: 0, init: function() { if (jQuery('#promobg').lenght == 0) return; Scroller.windowResize(); jQuery(window).scroll(Scroller.moveBackground); jQuery(window).resize(Scroller.windowResize); var image_url = jQuery('#promobg').css('background-image'); var image; image_url = image_url.match(/^url\("?(.+?)"?\)$/); if (image_url[1]) { image_url = image_url[1]; image = new Image(); jQuery(image).load(function () { Scroller.imageHeight = image.height; Scroller.moveBackground(); jQuery('#promobg').css('height', image.height + 'px'); }); image.src = image_url; Scroller.checkBodySize(); } }, moveBackground: function() { if (Scroller.imageHeight == 0) return; newPos = parseInt((Scroller.windowHeight - Scroller.imageHeight) * jQuery(window).scrollTop() / Scroller.maxTop); jQuery('#promobg').css('top', newPos + 'px'); }, windowResize: function() { Scroller.windowHeight = jQuery(window).height(); Scroller.moveBackground(); }, checkBodySize: function() { Scroller.maxTop = jQuery('body').height() - Scroller.windowHeight; setTimeout('Scroller.checkBodySize()', 1000); } } /* var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1627822-73']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); */