
/*	Main functions
	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -	*/

$(document).ready(
	function()
	{
$("#zyczenia").click(function () {
      $(this).fadeOut("slow");
    });

		/*	Image carousel
			- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -	*/


		function mycarousel_initCallback(carousel)
		{
		
			// Pause autoscrolling if the user moves with the cursor over the clip.
			carousel.clip.hover(function() {
				carousel.stopAuto();
			}, function() {
				carousel.startAuto();
			});
			
			carousel.clip.click(function() {
			});
				
		};
		
		$("#imageCarousel img").css("cursor","pointer");
		$("#imageCarousel img").click(function() {
				var bigImg = $(this).attr("src").replace(".jpg", "").concat("_big.jpg");
				//window.location=bigImg;
				window.location="/51/referencje/";
		});

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


		/*	Image carousel2
			- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -	*/


		
		$("#imageCarousel2 img").css("cursor","pointer");
		$("#imageCarousel2 img").click(function() {
				var bigImg = $(this).attr("src").replace(".jpg", "").concat("_big.jpg");
				window.location=bigImg;
		});

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


	});

