$(document).ready(function()
{ 
    $("p.toggle").click( 
   		function() 
		{ 
			$(this).next("ul.toggle").toggle("normal"); 
		}
		);
	$("ul.menu li").children("p").click( 
		function() 
		{ 
			$(this).next("ul").toggle("normal"); 
		}
		);
	$("ul.linki li").children("p").click( 
		function() 
		{ 
			$(this).next("ul").toggle("normal"); 
		});
	$(document).pngFix(); 	
});
function baner_zmiana_nr(id)
{
	document.baner_zmiana.GotoFrame((id-1)*60+1);
	document.baner_zmiana.Play();
}				
function pobierz(id,adres)
{
	$("#"+id).text('');
	$("#"+id).show();
	$("#"+id).append("<table style='width:100%;'><tr><td style='width:100%;height:200px;text-align:center;'><img src='www/js/img/loading.gif' alt='Wczytywanie'/></td></tr>")
	$("#"+id).load(adres,function(){$("#"+id).show('normal');});
	document.getElementById('herb').innerHTML="";
	$(document).pngFix(); 
}
function text(id,text)
{
	$("#"+id).text('');
	$("#"+id).append(text);
}
hs.graphicsDir = 'galeria/styl/graphics/';
					hs.align = 'center';
					hs.transitions = ['expand', 'crossfade'];
					hs.outlineType = 'rounded-white';
					hs.fadeInOut = true;
					//hs.dimmingOpacity = 0.75;

					// Add the controlbar
					hs.addSlideshow({
					//slideshowGroup: 'group1',
					interval: 5000,
					repeat: false,
					useControls: true,
					fixedControls: 'fit',
					overlayOptions: {
					//opacity: .75,
					position: 'bottom center',
					hideOnMouseOut: false
					}
					}); 
					

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();
    });
};

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        auto: 3,
        wrap: 'last',
		scroll: 1,
        initCallback: mycarousel_initCallback
    });
});
