function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

$(document).ready(function(){
$('#cont').fadeIn(2000);
$('#menu1').mouseover( function(){
$('#menulinia').animate({
    left: '0'
  }, 300);
});
$('#menu2').mouseover( function(){
$('#menulinia').animate({
    left: '230'
  }, 300);  
});
$('#menu3').mouseover( function(){
$('#menulinia').animate({
    left: '450'
  }, 300);  
 });
$('#menu4').mouseover( function(){
$('#menulinia').animate({
    left: '595'
  }, 300);  
 });
$('#menu5').mouseover( function(){
$('#menulinia').animate({
    left: '723'
  }, 300);  
 });

   /*    var zxc = $('#linia');

           var liniowe = function(zxc){

                zxc.animate({"left" : "200px"}, 3000);
                zxc.animate({"left" : "0px"}, 3000);


             setTimeout(liniowe(zxc), 0);


           }

             setTimeout(liniowe(zxc), 0);*/
             
			
$('#but1').click( function(){
	$('#newsbox DIV').fadeOut( 'slow', function(){
	$('#akt0').fadeIn('slow', function(){
	$('#akt1').fadeIn('slow');   
	}); }); });  
$('#but2').click( function(){
	$('#newsbox DIV').fadeOut( 'slow', function(){
	$('#akt2').fadeIn('slow', function(){
	$('#akt3').fadeIn('slow');   
	}); }); });
$('#but3').click( function(){
	$('#newsbox DIV').fadeOut( 'slow', function(){
	$('#akt4').fadeIn('slow', function(){
	$('#akt5').fadeIn('slow');   
	}); }); });


         
$('#karuzela').jcarousel({
        auto: 3,
        scroll: 1,
        wrap: 'both',
        initCallback: mycarousel_initCallback
    });
 });










function linia() {
$('#linia').animate({"left" : "200px"}, 3000);
$('#linia').animate({"left" : "0px"}, 3000);
};
$(function() {
setInterval( "linia()", 6000 );
});





/*
function slideSwitch() {
var $active = $('#slideshow DIV.active');
if ( $active.length == 0 ) $active = $('#slideshow DIV:last');
var $next = $active.next().length ? $active.next()
: $('#slideshow DIV:first');
$active.addClass('last-active');
$('#linia').animate({"left" : "200px"}, 3000);
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active last-active');
$('#linia').animate({"left" : "0px"}, 3000);
});
}
$(function() {
setInterval( "slideSwitch()", 6000 );
});

*/


