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();
    });
};

$(function(){
	$('.wiecej_tekstu_a').click(function(){
		$(this).hide();
		$('.wiecej_tekstu').slideDown();
		return false;
	});
	jQuery('#galeria_wrap').jcarousel({
        auto: 3,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
	jQuery('.accordion h4').click(function() {
		var toggle = jQuery(this).next().css('display') == 'none';
		jQuery('.accordion .wrap_item .hidden, .accordion .wrap .visible').slideUp();
		if(toggle){
			jQuery(this).next().slideToggle();
		}
		return false;
	});
	$('#signin_username').focus(function(){
		if($(this).val() == 'Login'){
			$(this).val('');
		}
	});
	$('#signin_username').blur(function(){
		if($(this).val() == ''){
			$(this).val('Login');
		}
	});
});

