function slideSwitch() {
    
	// zmiana obrazka
	var $active = $('#horizontal img.active');
    if ( $active.length == 0 ) $active = $('#horizontal img:last');

    var $next =  $active.next().length ? $active.next()
        : $('#horizontal img:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
    });
	
}
	

$(document).ready(function(){


	$("#slider").css("overflow","hidden");
	$("#content").css({
		left:1000
	});
	$("#search-pl").hide();
	$("#search-en").hide();

	$("#horizontal img").css({
		height:447,
		width:940,
		opacity:0,
		top:0 //167
	});
	
	$("#leftSlider").css({
		position:"relative",
		right:300
	});	
	

	jQuery(function($){ 
		var e = $('#content'); 
		 
		e.queue(function(){ 
		  setTimeout(function(){ 
			e.dequeue(); 
		  }, 200 ); 
		}); 
		e.animate({
			left:0},
			600, // tempo
			//'swing', // ease
			function(){ // callback
				
				$("#kurtyna").animate({
					height:0,
					top:447}, 600);
				
				$("#horizontal img:first").animate({
					height:447,
					width:940,
					opacity:1,
					top:0},600,function() {
					
					$("#search-pl").fadeIn(400);
					$("#search-en").fadeIn(400);
					setInterval( "slideSwitch()", 4000 );
				
				});
				
				
				
				
		});  
	}); 
	
  
});
