        Cufon.replace('.h1', {fontFamily: 'Georgia', textShadow: '-1px -1px 10 #fff, 1px 1px #333'});
        $(document).ready(function() 
        {
            
    		$("#image_reel a span").hide();          
            			$("#makeMeScrollable").smoothDivScroll({ autoScroll: "onstart", 
														autoScrollDirection: "backandforth",
														autoScrollStep: 1,
														autoScrollInterval: 100,
														startAtElementId: "startAtMe",
														visibleHotSpots: "always" });                                                        
        		$activePage = $(".scrollableArea a:first").css("z-index", 1).addClass("active");
        		$("#image_reel a:first").fadeIn(500);  		
        		switchImage = function() {
        			var oldIdImg = $oldPage.attr("rel");
        			var activeIdImg = $activePage.attr("rel");
        			$oldImg = $("#image_reel a[rel="+(oldIdImg)+"]");
        			$oldImg.css("z-index", 0)
        			$activeImg = $("#image_reel a[rel="+activeIdImg+"]");
        			$activeImg.css("z-index", 1);
        			$(".scrollableArea a").removeClass("active");
        			$activePage.addClass("active");
        			$activeImg.fadeIn(500, function() {$oldImg.fadeOut(5);});
        		};
        		changeActive = function() {
        			play = setInterval(function() {
        				$oldPage = $activePage;
        				
        				$activePage = $activePage.next();
        				if($activePage.length===0) {
        					$activePage = $(".scrollableArea a:first");
        				}
        				$activePage.addClass("active");
        				switchImage();
        			}, 4000);
        		};
  		        changeActive();
        		$(".scrollableArea a").click(function() {
        			$oldPage = $activePage;
        			$activePage = $(this);
        			clearInterval(play);
        			switchImage();
        			changeActive();
        		});
        		$("#image_reel a").hover(function() {
        			clearInterval(play);
                    $(this).children("span").fadeIn("fast");
        		}, function() {
        			changeActive();
                    $(this).children("span").fadeOut("fast");
        		});
       			$("a.fancybox").fancybox();
                
                $(".scrollableArea a").hover(function(){
                    $(this).addClass("active");
                },function(){
                    $(this).removeClass("active");
                });
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            $('.slideshow').cycle({
        		fx: 'fade',
                timeout:  5000 
        	});
            $(".menu_pionowe ul li").menu();
    		$('.styleswitch').click(function()
    		{
    			switchStylestyle(this.getAttribute("rel"));
                document.location.href = document.location.href;
    			return false;
    		});
    		var c = readCookie('style');
    		if (c) switchStylestyle(c);   
    	});
    
    	function switchStylestyle(styleName)
    	{
    		$('link[rel*=style][title]').each(function(i) 
    		{
    			this.disabled = true;
    			if (this.getAttribute('title') == styleName) this.disabled = false;
    		});
    		createCookie('style', styleName, 365);
    	}
        function createCookie(name,value,days)
        {
        	if (days)
        	{
        		var date = new Date();
        		date.setTime(date.getTime()+(days*24*60*60*1000));
        		var expires = "; expires="+date.toGMTString();
        	}
        	else var expires = "";
        	document.cookie = name+"="+value+expires+"; path=/";
        }
        function readCookie(name)
        {
        	var nameEQ = name + "=";
        	var ca = document.cookie.split(';');
        	for(var i=0;i < ca.length;i++)
        	{
        		var c = ca[i];
        		while (c.charAt(0)==' ') c = c.substring(1,c.length);
        		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
        	}
        	return null;
        }
        function eraseCookie(name)
        {
        	createCookie(name,"",-1);
        }
