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

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

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

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

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

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

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

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

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

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
		scroll: 1,
        auto: 0, // scroll timing in seconds
        wrap: 'last',
        initCallback: karosel1

    });
	
    jQuery('#videoGaleriSl').jcarousel({
		scroll: 1,
        auto: 0, // scroll timing in seconds
        wrap: 'last',
        initCallback: karosel2

    });	
    jQuery('#fotoGaleriSl').jcarousel({
		scroll: 1,
        auto: 2, // scroll timing in seconds
        wrap: 'last',
        initCallback: karosel3

    });
    jQuery('#katSliMenu').jcarousel({
		scroll: 1,
        auto: 0, // scroll timing in seconds
        wrap: 'last',
        initCallback: karosel3

    });	
    jQuery('ul#galSlider').jcarousel({
		scroll: 1,
        auto: 2, // scroll timing in seconds
        wrap: 'last',
        initCallback: karosel3

    });		
});
